{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.lb1sP2Mo/b1/dune-grid-glue_2.9.0-3_armhf.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.lb1sP2Mo/b2/dune-grid-glue_2.9.0-3_armhf.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,4 +1,4 @@\n \n d327c79fea702c69d4a1b51e0cf3c105 877388 debug optional libdune-grid-glue-dev-dbgsym_2.9.0-3_armhf.deb\n 9e773081fc77bd4a6b7ff0c18761daee 99008 libdevel optional libdune-grid-glue-dev_2.9.0-3_armhf.deb\n- 9c375b6d08d0ec3726a75bfa483d89dd 958852 doc optional libdune-grid-glue-doc_2.9.0-3_all.deb\n+ aad62d47b639ddcaf6d73f477e00a26a 959272 doc optional libdune-grid-glue-doc_2.9.0-3_all.deb\n"}, {"source1": "libdune-grid-glue-doc_2.9.0-3_all.deb", "source2": "libdune-grid-glue-doc_2.9.0-3_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-13 13:23:40.000000 debian-binary\n -rw-r--r-- 0 0 0 7384 2023-01-13 13:23:40.000000 control.tar.xz\n--rw-r--r-- 0 0 0 951276 2023-01-13 13:23:40.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 951696 2023-01-13 13:23:40.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": "@@ -44,22 +44,22 @@\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00062.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00062_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00065.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00065_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00068.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00068_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00071.html\n-usr/share/doc/libdune-grid-glue-doc/doxygen/a00071_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00074.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00074_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00077.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00077_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00080.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00080_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00083.html\n+usr/share/doc/libdune-grid-glue-doc/doxygen/a00083_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00086.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00086_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00089.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00089_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00092.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00092_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00095.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": "@@ -7,75 +7,75 @@\n -rw-r--r-- 0 root (0) root (0) 1157 2022-12-23 06:52:03.000000 ./usr/share/doc/libdune-grid-glue-doc/changelog.gz\n -rw-r--r-- 0 root (0) root (0) 2569 2023-01-12 15:07:38.000000 ./usr/share/doc/libdune-grid-glue-doc/copyright\n drwxr-xr-x 0 root (0) root (0) 0 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/\n -rw-r--r-- 0 root (0) root (0) 7138 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00002.html\n -rw-r--r-- 0 root (0) root (0) 81665 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00002_source.html\n -rw-r--r-- 0 root (0) root (0) 5797 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00005.html\n -rw-r--r-- 0 root (0) root (0) 52527 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00005_source.html\n--rw-r--r-- 0 root (0) root (0) 5609 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00008.html\n--rw-r--r-- 0 root (0) root (0) 84446 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00008_source.html\n--rw-r--r-- 0 root (0) root (0) 5453 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00011.html\n--rw-r--r-- 0 root (0) root (0) 27383 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00011_source.html\n--rw-r--r-- 0 root (0) root (0) 6157 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00014.html\n--rw-r--r-- 0 root (0) root (0) 14373 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00014_source.html\n--rw-r--r-- 0 root (0) root (0) 8112 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00017.html\n--rw-r--r-- 0 root (0) root (0) 119797 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00017_source.html\n--rw-r--r-- 0 root (0) root (0) 5088 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00020.html\n--rw-r--r-- 0 root (0) root (0) 16768 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00020_source.html\n--rw-r--r-- 0 root (0) root (0) 10871 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00023.html\n--rw-r--r-- 0 root (0) root (0) 70887 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00023_source.html\n--rw-r--r-- 0 root (0) root (0) 5321 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00026.html\n--rw-r--r-- 0 root (0) root (0) 16899 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00026_source.html\n--rw-r--r-- 0 root (0) root (0) 7675 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00029.html\n--rw-r--r-- 0 root (0) root (0) 11025 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00029_source.html\n--rw-r--r-- 0 root (0) root (0) 5360 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00032.html\n--rw-r--r-- 0 root (0) root (0) 8500 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00032_source.html\n--rw-r--r-- 0 root (0) root (0) 11613 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00035.html\n--rw-r--r-- 0 root (0) root (0) 39771 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00035_source.html\n--rw-r--r-- 0 root (0) root (0) 6619 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038.html\n--rw-r--r-- 0 root (0) root (0) 9138 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038_source.html\n--rw-r--r-- 0 root (0) root (0) 8136 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00041.html\n--rw-r--r-- 0 root (0) root (0) 72681 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00041_source.html\n--rw-r--r-- 0 root (0) root (0) 7370 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044.html\n--rw-r--r-- 0 root (0) root (0) 44830 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044_source.html\n--rw-r--r-- 0 root (0) root (0) 5980 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047.html\n--rw-r--r-- 0 root (0) root (0) 27621 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047_source.html\n--rw-r--r-- 0 root (0) root (0) 8222 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050.html\n--rw-r--r-- 0 root (0) root (0) 30066 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050_source.html\n+-rw-r--r-- 0 root (0) root (0) 6157 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00008.html\n+-rw-r--r-- 0 root (0) root (0) 14373 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00008_source.html\n+-rw-r--r-- 0 root (0) root (0) 5088 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00011.html\n+-rw-r--r-- 0 root (0) root (0) 16768 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00011_source.html\n+-rw-r--r-- 0 root (0) root (0) 10871 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00014.html\n+-rw-r--r-- 0 root (0) root (0) 70887 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00014_source.html\n+-rw-r--r-- 0 root (0) root (0) 5321 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00017.html\n+-rw-r--r-- 0 root (0) root (0) 16899 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00017_source.html\n+-rw-r--r-- 0 root (0) root (0) 5609 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00020.html\n+-rw-r--r-- 0 root (0) root (0) 84446 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00020_source.html\n+-rw-r--r-- 0 root (0) root (0) 5453 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00023.html\n+-rw-r--r-- 0 root (0) root (0) 27383 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00023_source.html\n+-rw-r--r-- 0 root (0) root (0) 8112 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00026.html\n+-rw-r--r-- 0 root (0) root (0) 119797 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00026_source.html\n+-rw-r--r-- 0 root (0) root (0) 8136 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00029.html\n+-rw-r--r-- 0 root (0) root (0) 72681 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00029_source.html\n+-rw-r--r-- 0 root (0) root (0) 7370 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00032.html\n+-rw-r--r-- 0 root (0) root (0) 44830 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00032_source.html\n+-rw-r--r-- 0 root (0) root (0) 6619 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00035.html\n+-rw-r--r-- 0 root (0) root (0) 9138 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00035_source.html\n+-rw-r--r-- 0 root (0) root (0) 8222 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038.html\n+-rw-r--r-- 0 root (0) root (0) 30066 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038_source.html\n+-rw-r--r-- 0 root (0) root (0) 11613 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00041.html\n+-rw-r--r-- 0 root (0) root (0) 39771 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00041_source.html\n+-rw-r--r-- 0 root (0) root (0) 7675 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044.html\n+-rw-r--r-- 0 root (0) root (0) 11025 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044_source.html\n+-rw-r--r-- 0 root (0) root (0) 5360 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047.html\n+-rw-r--r-- 0 root (0) root (0) 8500 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047_source.html\n+-rw-r--r-- 0 root (0) root (0) 5980 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050.html\n+-rw-r--r-- 0 root (0) root (0) 27621 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050_source.html\n -rw-r--r-- 0 root (0) root (0) 5429 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00053.html\n -rw-r--r-- 0 root (0) root (0) 44826 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00053_source.html\n--rw-r--r-- 0 root (0) root (0) 5562 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00056.html\n--rw-r--r-- 0 root (0) root (0) 72929 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00056_source.html\n--rw-r--r-- 0 root (0) root (0) 5388 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059.html\n--rw-r--r-- 0 root (0) root (0) 50226 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059_source.html\n--rw-r--r-- 0 root (0) root (0) 8206 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062.html\n--rw-r--r-- 0 root (0) root (0) 96800 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062_source.html\n--rw-r--r-- 0 root (0) root (0) 6647 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065.html\n--rw-r--r-- 0 root (0) root (0) 36462 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065_source.html\n--rw-r--r-- 0 root (0) root (0) 4559 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00068.html\n--rw-r--r-- 0 root (0) root (0) 63705 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00068_source.html\n--rw-r--r-- 0 root (0) root (0) 5484 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00071.html\n--rw-r--r-- 0 root (0) root (0) 36322 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00071_source.html\n--rw-r--r-- 0 root (0) root (0) 5967 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00074.html\n--rw-r--r-- 0 root (0) root (0) 37342 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00074_source.html\n--rw-r--r-- 0 root (0) root (0) 6080 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00077.html\n--rw-r--r-- 0 root (0) root (0) 59845 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00077_source.html\n--rw-r--r-- 0 root (0) root (0) 4310 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00080.html\n--rw-r--r-- 0 root (0) root (0) 55659 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00080_source.html\n--rw-r--r-- 0 root (0) root (0) 10146 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00083.html\n--rw-r--r-- 0 root (0) root (0) 6348 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00086.html\n--rw-r--r-- 0 root (0) root (0) 45998 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00086_source.html\n--rw-r--r-- 0 root (0) root (0) 12399 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00089.html\n--rw-r--r-- 0 root (0) root (0) 149554 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00089_source.html\n--rw-r--r-- 0 root (0) root (0) 5930 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092.html\n--rw-r--r-- 0 root (0) root (0) 19310 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092_source.html\n+-rw-r--r-- 0 root (0) root (0) 8206 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00056.html\n+-rw-r--r-- 0 root (0) root (0) 96800 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00056_source.html\n+-rw-r--r-- 0 root (0) root (0) 5562 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059.html\n+-rw-r--r-- 0 root (0) root (0) 72929 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059_source.html\n+-rw-r--r-- 0 root (0) root (0) 5388 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062.html\n+-rw-r--r-- 0 root (0) root (0) 50226 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062_source.html\n+-rw-r--r-- 0 root (0) root (0) 5930 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065.html\n+-rw-r--r-- 0 root (0) root (0) 19310 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065_source.html\n+-rw-r--r-- 0 root (0) root (0) 6080 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00068.html\n+-rw-r--r-- 0 root (0) root (0) 59845 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00068_source.html\n+-rw-r--r-- 0 root (0) root (0) 10146 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00071.html\n+-rw-r--r-- 0 root (0) root (0) 5357 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00074.html\n+-rw-r--r-- 0 root (0) root (0) 22694 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00074_source.html\n+-rw-r--r-- 0 root (0) root (0) 12399 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00077.html\n+-rw-r--r-- 0 root (0) root (0) 149554 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00077_source.html\n+-rw-r--r-- 0 root (0) root (0) 6348 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00080.html\n+-rw-r--r-- 0 root (0) root (0) 45998 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00080_source.html\n+-rw-r--r-- 0 root (0) root (0) 4559 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00083.html\n+-rw-r--r-- 0 root (0) root (0) 63705 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00083_source.html\n+-rw-r--r-- 0 root (0) root (0) 4310 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00086.html\n+-rw-r--r-- 0 root (0) root (0) 55659 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00086_source.html\n+-rw-r--r-- 0 root (0) root (0) 5484 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00089.html\n+-rw-r--r-- 0 root (0) root (0) 36322 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00089_source.html\n+-rw-r--r-- 0 root (0) root (0) 5967 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092.html\n+-rw-r--r-- 0 root (0) root (0) 37342 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092_source.html\n -rw-r--r-- 0 root (0) root (0) 11543 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00095.html\n -rw-r--r-- 0 root (0) root (0) 239992 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00095_source.html\n--rw-r--r-- 0 root (0) root (0) 5357 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00098.html\n--rw-r--r-- 0 root (0) root (0) 22694 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00098_source.html\n+-rw-r--r-- 0 root (0) root (0) 6647 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00098.html\n+-rw-r--r-- 0 root (0) root (0) 36462 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00098_source.html\n -rw-r--r-- 0 root (0) root (0) 5859 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00101.html\n -rw-r--r-- 0 root (0) root (0) 4619 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00103.html\n -rw-r--r-- 0 root (0) root (0) 67072 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00104.html\n -rw-r--r-- 0 root (0) root (0) 5774 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00105.html\n -rw-r--r-- 0 root (0) root (0) 15143 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00106.html\n -rw-r--r-- 0 root (0) root (0) 13626 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00107.html\n -rw-r--r-- 0 root (0) root (0) 6280 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00108.html\n@@ -226,15 +226,15 @@\n -rw-r--r-- 0 root (0) root (0) 6780 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_65f347cff0208f20f00d27c542208238.html\n -rw-r--r-- 0 root (0) root (0) 2198 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_65f347cff0208f20f00d27c542208238_dep.png\n -rw-r--r-- 0 root (0) root (0) 7640 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_68eff8a27dcb1cd0ff0ecf490070d3de.html\n -rw-r--r-- 0 root (0) root (0) 13471 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_68eff8a27dcb1cd0ff0ecf490070d3de_dep.png\n -rw-r--r-- 0 root (0) root (0) 6670 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_eaad0bdad6fc03850e65b1fdad9faad4.html\n -rw-r--r-- 0 root (0) root (0) 7018 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_eaad0bdad6fc03850e65b1fdad9faad4_dep.png\n -rw-r--r-- 0 root (0) root (0) 45631 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/doxygen.css\n--rw-r--r-- 0 root (0) root (0) 27057 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dune-grid-glue.tag.gz\n+-rw-r--r-- 0 root (0) root (0) 27053 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dune-grid-glue.tag.gz\n -rw-r--r-- 0 root (0) root (0) 7704 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dynsections.js\n -rw-r--r-- 0 root (0) root (0) 15973 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/files.html\n -rw-r--r-- 0 root (0) root (0) 3221 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/functions.html\n -rw-r--r-- 0 root (0) root (0) 3786 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/functions_b.html\n -rw-r--r-- 0 root (0) root (0) 13456 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/functions_c.html\n -rw-r--r-- 0 root (0) root (0) 4846 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/functions_d.html\n -rw-r--r-- 0 root (0) root (0) 6112 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/functions_e.html\n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00002.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00002.html", "unified_diff": "@@ -87,28 +87,28 @@\n #include <type_traits>
\n #include <dune/common/deprecated.hh>
\n #include <dune/common/exceptions.hh>
\n #include <dune/common/iteratorfacades.hh>
\n #include <dune/common/promotiontraits.hh>
\n #include <dune/common/shared_ptr.hh>
\n #include <dune/common/stdstreams.hh>
\n-#include "adapter/gridgluecommunicate.hh"
\n-#include <dune/grid-glue/merging/merger.hh>
\n+#include "adapter/gridgluecommunicate.hh"
\n+#include <dune/grid-glue/merging/merger.hh>
\n #include <dune/common/parallel/mpitraits.hh>
\n #include <dune/common/parallel/mpicommunication.hh>
\n #include <dune/common/parallel/indexset.hh>
\n #include <dune/common/parallel/plocalindex.hh>
\n #include <dune/common/parallel/remoteindices.hh>
\n #include <dune/common/parallel/communicator.hh>
\n #include <dune/common/parallel/interface.hh>
\n-#include "adapter/rangegenerators.hh"
\n-#include "adapter/gridglue.cc"
\n-#include "adapter/intersection.hh"
\n-#include "adapter/intersectioniterator.hh"
\n-#include "adapter/intersectionindexset.hh"
\n+#include "adapter/rangegenerators.hh"
\n+#include "adapter/gridglue.cc"
\n+#include "adapter/intersection.hh"
\n+#include "adapter/intersectioniterator.hh"
\n+#include "adapter/intersectionindexset.hh"
\n \n

Go to the source code of this file.

\n \n \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00002_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00002_source.html", "unified_diff": "@@ -95,16 +95,16 @@\n
19#include <dune/common/deprecated.hh>
\n
20#include <dune/common/exceptions.hh>
\n
21#include <dune/common/iteratorfacades.hh>
\n
22#include <dune/common/promotiontraits.hh>
\n
23#include <dune/common/shared_ptr.hh>
\n
24#include <dune/common/stdstreams.hh>
\n
25
\n-
26#include "adapter/gridgluecommunicate.hh"
\n-
27#include <dune/grid-glue/merging/merger.hh>
\n+
26#include "adapter/gridgluecommunicate.hh"
\n+
27#include <dune/grid-glue/merging/merger.hh>
\n
28
\n
29#include <dune/common/parallel/mpitraits.hh>
\n
30#include <dune/common/parallel/mpicommunication.hh>
\n
31#include <dune/common/parallel/indexset.hh>
\n
32#include <dune/common/parallel/plocalindex.hh>
\n
33#include <dune/common/parallel/remoteindices.hh>
\n
34#include <dune/common/parallel/communicator.hh>
\n@@ -391,30 +391,30 @@\n \n
399
\n
400} // end namespace GridGlue
\n \n
401} // end namespace Dune
\n \n
402
\n-
403#include "adapter/rangegenerators.hh"
\n+
403#include "adapter/rangegenerators.hh"
\n
404
\n-
405#include "adapter/gridglue.cc"
\n+
405#include "adapter/gridglue.cc"
\n
406
\n-
407#include "adapter/intersection.hh"
\n-
408#include "adapter/intersectioniterator.hh"
\n-
409#include "adapter/intersectionindexset.hh"
\n+
407#include "adapter/intersection.hh"
\n+
408#include "adapter/intersectioniterator.hh"
\n+
409#include "adapter/intersectionindexset.hh"
\n
410
\n
411#endif // DUNE_GRIDGLUE_GRIDGLUE_HH
\n-
gridglue.cc
\n-
rangegenerators.hh
\n-
intersection.hh
Model of the Intersection concept provided by GridGlue.
\n-
intersectionindexset.hh
\n-
gridgluecommunicate.hh
Describes the parallel communication interface class for Dune::GridGlue.
\n-
intersectioniterator.hh
Implement iterators over GridGlue intersections.
\n-
merger.hh
\n+
rangegenerators.hh
\n+
intersectionindexset.hh
\n+
gridgluecommunicate.hh
Describes the parallel communication interface class for Dune::GridGlue.
\n+
intersectioniterator.hh
Implement iterators over GridGlue intersections.
\n+
gridglue.cc
\n+
intersection.hh
Model of the Intersection concept provided by GridGlue.
\n+
merger.hh
\n
Dune
Definition gridglue.hh:37
\n
Dune::GridGlue::GridGlue
sequential adapter to couple two grids at specified close together boundaries
Definition gridglue.hh:67
\n
Dune::GridGlue::GridGlue::Coords
Dune::FieldVector< ctype, dimworld > Coords
The type used for coordinate vectors.
Definition gridglue.hh:174
\n
Dune::GridGlue::GridGlue::getIntersection
Intersection getIntersection(int i) const
Definition gridglue.hh:388
\n
Dune::GridGlue::GridGlue::Grid1Vertex
GridVertex< 1 > Grid1Vertex
The type of the Grid1 vertices.
Definition gridglue.hh:194
\n
Dune::GridGlue::GridGlue::IndexSet
Dune::GridGlue::IntersectionIndexSet< P0, P1 > IndexSet
Type of remote intersection indexSet.
Definition gridglue.hh:206
\n
Dune::GridGlue::GridGlue::IndexType
unsigned int IndexType
Definition gridglue.hh:147
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -322,23 +322,23 @@\n 405#include \"_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bc_\bc\"\n 406\n 407#include \"_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\"\n 408#include \"_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bi_\bt_\be_\br_\ba_\bt_\bo_\br_\b._\bh_\bh\"\n 409#include \"_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bi_\bn_\bd_\be_\bx_\bs_\be_\bt_\b._\bh_\bh\"\n 410\n 411#endif // DUNE_GRIDGLUE_GRIDGLUE_HH\n-_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bc_\bc\n _\br_\ba_\bn_\bg_\be_\bg_\be_\bn_\be_\br_\ba_\bt_\bo_\br_\bs_\b._\bh_\bh\n-_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n-Model of the Intersection concept provided by GridGlue.\n _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bi_\bn_\bd_\be_\bx_\bs_\be_\bt_\b._\bh_\bh\n _\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\bc_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\be_\b._\bh_\bh\n Describes the parallel communication interface class for Dune::GridGlue.\n _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bi_\bt_\be_\br_\ba_\bt_\bo_\br_\b._\bh_\bh\n Implement iterators over GridGlue intersections.\n+_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bc_\bc\n+_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n+Model of the Intersection concept provided by GridGlue.\n _\bm_\be_\br_\bg_\be_\br_\b._\bh_\bh\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n sequential adapter to couple two grids at specified close together boundaries\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:67\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bs\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00008.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00008.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: gridglue.cc File Reference\n+dune-grid-glue: rangegenerators.hh File Reference\n \n \n \n \n \n \n \n@@ -70,40 +70,42 @@\n
\n \n
\n \n
\n
\n+Classes |\n Namespaces |\n Functions
\n-
gridglue.cc File Reference
\n+
rangegenerators.hh File Reference
\n
\n
\n-
#include "intersection.hh"
\n-#include <vector>
\n-#include <iterator>
\n-#include "../gridglue.hh"
\n-#include "../common/ringcomm.hh"
\n-#include <dune/common/unused.hh>
\n+
#include <dune/common/iteratorrange.hh>
\n
\n

Go to the source code of this file.

\n

\n Classes

class  Dune::GridGlue::GridGlue< P0, P1 >
 sequential adapter to couple two grids at specified close together boundaries More...
\n+\n+\n+\n+

\n+Classes

struct  Dune::GridGlue::Reverse< reverse >
 
\n \n \n \n \n \n

\n Namespaces

namespace  Dune
 
namespace  Dune::GridGlue
 
\n \n-\n-\n-\n+\n+\n+\n+\n

\n Functions

template<typename T >
void Dune::GridGlue::printVector (const std::vector< T > &v, std::string name, int rank)
 
template<... >
IteratorRange<... > Dune::GridGlue::intersections (const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
 Iterate over all intersections of a GridGlue.
 
\n \n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,28 +1,27 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-gridglue.cc File Reference\n-#include \"_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\"\n-#include \n-#include \n-#include \"_\b._\b._\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh\"\n-#include \"_\b._\b._\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\br_\bi_\bn_\bg_\bc_\bo_\bm_\bm_\b._\bh_\bh\"\n-#include \n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n+rangegenerators.hh File Reference\n+#include \n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n+C\bCl\bla\bas\bss\bse\bes\bs\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\be_\bv_\be_\br_\bs_\be_\b<_\b _\br_\be_\bv_\be_\br_\bs_\be_\b _\b>\n+\u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br (const std::vector< T > &v, std::string name,\n- int rank)\n+template<... >\n+IteratorRange<... >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs (const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be<... > &glue,\n+ const _\bR_\be_\bv_\be_\br_\bs_\be<... > &reverse=!reversed)\n+\u00a0 Iterate over all intersections of a _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be.\n \u00a0\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00008_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00008_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: gridglue.cc Source File\n+dune-grid-glue: rangegenerators.hh Source File\n \n \n \n \n \n \n \n@@ -74,502 +74,78 @@\n \n \n \n
\n-
gridglue.cc
\n+
rangegenerators.hh
\n
\n
\n-Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
\n-
2// vi: set et ts=4 sw=2 sts=2:
\n-
3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
\n-
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
\n-
5/* IMPLEMENTATION OF CLASS G R I D G L U E */
\n-
6
\n-
7#include "intersection.hh"
\n-
8#include <vector>
\n-
9#include <iterator>
\n-
10#include "../gridglue.hh"
\n-
11#if HAVE_MPI
\n-
12#include "../common/ringcomm.hh"
\n-
13#endif
\n-
14
\n-
15#include <dune/common/unused.hh>
\n-
16
\n-
17namespace Dune {
\n-
18namespace GridGlue {
\n+Go to the documentation of this file.
1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
\n+
2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
\n+
3#ifndef DUNE_GRIDGLUE_ADAPTER_RANGEGENERATORS_HH
\n+
4#define DUNE_GRIDGLUE_ADAPTER_RANGEGENERATORS_HH
\n+
5
\n+
6#include <dune/common/iteratorrange.hh>
\n+
7
\n+
8namespace Dune {
\n+
9namespace GridGlue {
\n+
10
\n+
14template<bool reverse>
\n+
\n+
15struct Reverse
\n+
16 : std::integral_constant<bool, reverse>
\n+
17{
\n+
18 typedef Reverse type;
\n
19
\n-
20template<typename P0, typename P1>
\n+
20 constexpr
\n
\n-
21GridGlue<P0, P1>::GridGlue(const std::shared_ptr< const GridPatch<0> >& gp0, const std::shared_ptr< const GridPatch<1> >& gp1, const std::shared_ptr<Merger>& merger)
\n-
22 : patches_{gp0, gp1}, merger_(merger)
\n-
23{
\n-
24#if HAVE_MPI
\n-
25 // if we have only seq. meshes don't use parallel glueing
\n-
26 if (gp0->gridView().comm().size() == 1
\n-
27 && gp1->gridView().comm().size() == 1)
\n-
28 mpicomm_ = MPI_COMM_SELF;
\n-
29 else
\n-
30 mpicomm_ = MPI_COMM_WORLD;
\n-
31#endif // HAVE_MPI
\n-
32 std::cout << "GridGlue: Constructor succeeded!" << std::endl;
\n-
33}
\n+\n+
22 { return {}; }
\n
\n-
34
\n-
35template<typename P0, typename P1>
\n-
\n-\n-
37{
\n-
38 int myrank = 0;
\n-
39#if HAVE_MPI
\n-
40 int commsize = 1;
\n-
41 MPI_Comm_rank(mpicomm_, &myrank);
\n-
42 MPI_Comm_size(mpicomm_, &commsize);
\n-
43#endif // HAVE_MPI
\n-
44
\n-
45 // clear the contents from the current intersections array
\n-
46 {
\n-
47 std::vector<IntersectionData> dummy(1); // we need size 1, as we always store data for the end-intersection
\n-
48 intersections_.swap(dummy);
\n-
49 }
\n-
50
\n-
51 std::vector<Dune::FieldVector<ctype, dimworld> > patch0coords;
\n-
52 std::vector<unsigned int> patch0entities;
\n-
53 std::vector<Dune::GeometryType> patch0types;
\n-
54 std::vector<Dune::FieldVector<ctype,dimworld> > patch1coords;
\n-
55 std::vector<unsigned int> patch1entities;
\n-
56 std::vector<Dune::GeometryType> patch1types;
\n-
57
\n-
58 /*
\n-
59 * extract global surface patchs
\n-
60 */
\n-
61
\n-
62 // retrieve the coordinate and topology information from the extractors
\n-
63 // and apply transformations if necessary
\n-
64 extractGrid(patch<0>(), patch0coords, patch0entities, patch0types);
\n-
65 extractGrid(patch<1>(), patch1coords, patch1entities, patch1types);
\n-
66
\n-
67 std::cout << ">>>> rank " << myrank << " coords: "
\n-
68 << patch0coords.size() << " and " << patch1coords.size() << std::endl;
\n-
69 std::cout << ">>>> rank " << myrank << " entities: "
\n-
70 << patch0entities.size() << " and " << patch1entities.size() << std::endl;
\n-
71 std::cout << ">>>> rank " << myrank << " types: "
\n-
72 << patch0types.size() << " and " << patch1types.size() << std::endl;
\n-
73
\n-
74#ifdef WRITE_TO_VTK
\n-
75 const char prefix[] = "GridGlue::Builder::build() : ";
\n-
76 char patch0surf[256];
\n-
77 sprintf(patch0surf, "/tmp/vtk-patch0-test-%i", myrank);
\n-
78 char patch1surf[256];
\n-
79 sprintf(patch1surf, "/tmp/vtk-patch1-test-%i", myrank);
\n-
80
\n-
81 // std::cout << prefix << "Writing patch0 surface to '" << patch0surf << ".vtk'...\\n";
\n-
82 // VtkSurfaceWriter vtksw(patch0surf);
\n-
83 // vtksw.writeSurface(patch0coords, patch0entities, grid0dim, dimworld);
\n-
84 // std::cout << prefix << "Done writing patch0 surface!\\n";
\n-
85
\n-
86 // std::cout << prefix << "Writing patch1 surface to '" << patch1surf << ".vtk'...\\n";
\n-
87 // vtksw.setFilename(patch1surf);
\n-
88 // vtksw.writeSurface(patch1coords, patch1entities, grid1dim, dimworld);
\n-
89 // std::cout << prefix << "Done writing patch1 surface!\\n";
\n-
90#endif // WRITE_TO_VTK
\n-
91
\n-
92 // we start with an empty set
\n-
93 index__sz = 0;
\n-
94
\n-
95#if HAVE_MPI
\n-
96 if (commsize > 1)
\n-
97 {
\n-
98 // setup parallel indexset
\n-
99 patch0_is_.beginResize();
\n-
100 patch1_is_.beginResize();
\n-
101 }
\n-
102
\n-
103 auto op =
\n-
104 [&](
\n-
105 const int mergingrank,
\n-
106 const std::vector<Dune::FieldVector<ctype,dimworld> >& remotePatch0coords,
\n-
107 const std::vector<unsigned int>& remotePatch0entities,
\n-
108 const std::vector<Dune::GeometryType>& remotePatch0types,
\n-
109 const std::vector<Dune::FieldVector<ctype,dimworld> >& remotePatch1coords,
\n-
110 const std::vector<unsigned int>& remotePatch1entities,
\n-
111 const std::vector<Dune::GeometryType>& remotePatch1types
\n-
112 )
\n-
113 {
\n-
114 if (remotePatch1entities.size() > 0 && patch0entities.size() > 0)
\n-
115 mergePatches(patch0coords, patch0entities, patch0types, myrank,
\n-
116 remotePatch1coords, remotePatch1entities, remotePatch1types, mergingrank);
\n-
117 if (mergingrank != myrank &&
\n-
118 remotePatch0entities.size() > 0 && patch1entities.size() > 0)
\n-
119 mergePatches(remotePatch0coords, remotePatch0entities, remotePatch0types, mergingrank,
\n-
120 patch1coords, patch1entities, patch1types, myrank);
\n-
121 };
\n-
122 Parallel::MPI_AllApply(mpicomm_, op,
\n-
123 patch0coords, patch0entities, patch0types,
\n-
124 patch1coords, patch1entities, patch1types
\n-
125 );
\n-
126
\n-
127 if (commsize > 1)
\n-
128 {
\n-
129 // finalize ParallelIndexSet & RemoteIndices
\n-
130 patch0_is_.endResize();
\n-
131 patch1_is_.endResize();
\n-
132
\n-
133 // setup remote index information
\n-
134 remoteIndices_.setIncludeSelf(true);
\n-
135 // #warning add list of neighbors ...
\n-
136 remoteIndices_.setIndexSets(patch0_is_, patch1_is_, mpicomm_) ;
\n-
137 remoteIndices_.rebuild<true/* all indices are public */>();
\n-
138
\n-
139 // DEBUG Print all remote indices
\n-
140#ifdef DEBUG_GRIDGLUE_PARALLELMERGE
\n-
141 for (auto it = remoteIndices_.begin(); it != remoteIndices_.end(); it++)
\n-
142 {
\n-
143 std::cout << myrank << "\\tri-list\\t" << it->first << std::endl;
\n-
144 for (auto xit = it->second.first->begin(); xit != it->second.first->end(); ++xit)
\n-
145 std::cout << myrank << "\\tri-list 1 \\t" << it->first << "\\t" << *xit << std::endl;
\n-
146 for (auto xit = it->second.second->begin(); xit != it->second.second->end(); ++xit)
\n-
147 std::cout << myrank << "\\tri-list 2 \\t" << it->first << "\\t" << *xit << std::endl;
\n-
148 }
\n-
149#endif
\n-
150 }
\n-
151#else // HAVE_MPI
\n-
152
\n-
153 if (patch1entities.size() > 0 && patch0entities.size() > 0)
\n-
154 {
\n-
155 mergePatches(patch0coords, patch0entities, patch0types, myrank,
\n-
156 patch1coords, patch1entities, patch1types, myrank);
\n-
157#ifdef CALL_MERGER_TWICE
\n-
158 mergePatches(patch0coords, patch0entities, patch0types, myrank,
\n-
159 patch1coords, patch1entities, patch1types, myrank);
\n-
160#endif
\n-
161 }
\n-
162
\n-
163#endif // HAVE_MPI
\n-
164
\n-
165}
\n-
\n-
166
\n-
167template<typename T>
\n-
\n-
168void printVector(const std::vector<T> & v, std::string name, int rank)
\n-
169{
\n-
170 std::cout << rank << ": " << name << std::endl;
\n-
171 for (size_t i=0; i<v.size(); i++)
\n-
172 {
\n-
173 std::cout << v[i] << " ";
\n-
174 }
\n-
175 std::cout << std::endl;
\n-
176}
\n-
\n-
177
\n-
178template<typename P0, typename P1>
\n-
\n-\n-
180 const std::vector<Dune::FieldVector<ctype,dimworld> >& patch0coords,
\n-
181 const std::vector<unsigned int>& patch0entities,
\n-
182 const std::vector<Dune::GeometryType>& patch0types,
\n-
183 const int patch0rank,
\n-
184 const std::vector<Dune::FieldVector<ctype,dimworld> >& patch1coords,
\n-
185 const std::vector<unsigned int>& patch1entities,
\n-
186 const std::vector<Dune::GeometryType>& patch1types,
\n-
187 const int patch1rank)
\n-
188{
\n-
189
\n-
190 // howto handle overlap etc?
\n-
191
\n-
192 int myrank = 0;
\n-
193#if HAVE_MPI
\n-
194 int commsize = 1;
\n-
195 MPI_Comm_rank(mpicomm_, &myrank);
\n-
196 MPI_Comm_size(mpicomm_, &commsize);
\n-
197#endif // HAVE_MPI
\n-
198
\n-
199 // which patches are local?
\n-
200 const bool patch0local = (myrank == patch0rank);
\n-
201 const bool patch1local = (myrank == patch1rank);
\n-
202
\n-
203 // remember the number of previous remote intersections
\n-
204 const unsigned int offset = intersections_.size()-1;
\n-
205
\n-
206 std::cout << myrank
\n-
207 << " GridGlue::mergePatches : rank " << patch0rank << " / " << patch1rank << std::endl;
\n-
208
\n-
209 // start the actual build process
\n-
210 merger_->build(patch0coords, patch0entities, patch0types,
\n-
211 patch1coords, patch1entities, patch1types);
\n-
212
\n-
213 // append to intersections list
\n-
214 intersections_.resize(merger_->nSimplices() + offset + 1);
\n-
215 for (unsigned int i = 0; i < merger_->nSimplices(); ++i)
\n-
216 intersections_[offset + i] = IntersectionData(*this, i, offset, patch0local, patch1local);
\n-
217
\n-
218 index__sz = intersections_.size() - 1;
\n-
219
\n-
220 std::cout << myrank
\n-
221 << " GridGlue::mergePatches : "
\n-
222 << "The number of remote intersections is " << intersections_.size()-1 << std::endl;
\n-
223
\n-
224#if 0
\n-
225 printVector(patch0coords,"patch0coords",myrank);
\n-
226 printVector(patch0entities,"patch0entities",myrank);
\n-
227 printVector(patch0types,"patch0types",myrank);
\n-
228 printVector(patch1coords,"patch1coords",myrank);
\n-
229 printVector(patch1entities,"patch1entities",myrank);
\n-
230 printVector(patch1types,"patch1types",myrank);
\n-
231#endif
\n-
232
\n-
233#if HAVE_MPI
\n-
234 if (commsize > 1)
\n-
235 {
\n-
236 // update remote index sets
\n-
237 assert(Dune::RESIZE == patch0_is_.state());
\n-
238 assert(Dune::RESIZE == patch1_is_.state());
\n-
239
\n-
240 for (unsigned int i = 0; i < merger_->nSimplices(); i++)
\n-
241 {
\n-
242 // #warning only handle the newest intersections / merger info
\n-
243 const IntersectionData & it = intersections_[i];
\n-
244 GlobalId gid(patch0rank, patch1rank, i);
\n-
245 if (it.template local<0>())
\n-
246 {
\n-
247 Dune::PartitionType ptype = patch<0>().element(it.template index<0>()).partitionType();
\n-
248 patch0_is_.add (gid, LocalIndex(offset+i, ptype) );
\n-
249 }
\n-
250 if (it.template local<1>())
\n-
251 {
\n-
252 Dune::PartitionType ptype = patch<1>().element(it.template index<1>()).partitionType();
\n-
253 patch1_is_.add (gid, LocalIndex(offset+i, ptype) );
\n-
254 }
\n-
255 }
\n-
256 }
\n-
257#endif // HAVE_MPI
\n-
258
\n-
259 // cleanup the merger
\n-
260 merger_->clear();
\n-
261}
\n+
23};
\n
\n-
262
\n-
263template<typename P0, typename P1>
\n-
264template<typename Extractor>
\n-
\n-\n-
266 std::vector<Dune::FieldVector<ctype, dimworld> > & coords,
\n-
267 std::vector<unsigned int> & entities,
\n-
268 std::vector<Dune::GeometryType>& geometryTypes) const
\n-
269{
\n-
270 std::vector<typename Extractor::Coords> tempcoords;
\n-
271 std::vector<typename Extractor::VertexVector> tempentities;
\n-
272
\n-
273 extractor.getCoords(tempcoords);
\n-
274 coords.clear();
\n-
275 coords.reserve(tempcoords.size());
\n-
276
\n-
277 for (unsigned int i = 0; i < tempcoords.size(); ++i)
\n-
278 {
\n-
279 assert(int(dimworld) == int(Extractor::dimworld));
\n-
280 coords.push_back(Dune::FieldVector<ctype, dimworld>());
\n-
281 for (size_t j = 0; j <dimworld; ++j)
\n-
282 coords.back()[j] = tempcoords[i][j];
\n-
283 }
\n-
284
\n-
285 extractor.getFaces(tempentities);
\n-
286 entities.clear();
\n-
287
\n-
288 for (unsigned int i = 0; i < tempentities.size(); ++i) {
\n-
289 for (unsigned int j = 0; j < tempentities[i].size(); ++j)
\n-
290 entities.push_back(tempentities[i][j]);
\n-
291 }
\n-
292
\n-
293 // get the list of geometry types from the extractor
\n-
294 extractor.getGeometryTypes(geometryTypes);
\n-
295
\n-
296}
\n-
\n-
297
\n-
298template<typename P0, typename P1>
\n-
299template<class DataHandleImp, class DataTypeImp>
\n-
\n-\n-\n-
302 Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const
\n-
303{
\n-\n-
305 typedef typename DataHandle::DataType DataType;
\n-
306
\n-
307#if HAVE_MPI
\n-
308
\n-
309 if (mpicomm_ != MPI_COMM_SELF)
\n-
310 {
\n-
311 /*
\n-
312 * P A R A L L E L V E R S I O N
\n-
313 */
\n-
314 // setup communication interfaces
\n-
315 Dune::dinfo << "GridGlue: parallel communication" << std::endl;
\n-
316 typedef Dune::EnumItem <Dune::PartitionType, Dune::InteriorEntity> InteriorFlags;
\n-
317 typedef Dune::EnumItem <Dune::PartitionType, Dune::OverlapEntity> OverlapFlags;
\n-
318 typedef Dune::EnumRange <Dune::PartitionType, Dune::InteriorEntity, Dune::GhostEntity> AllFlags;
\n-
319 Dune::Interface interface;
\n-
320 assert(remoteIndices_.isSynced());
\n-
321 switch (iftype)
\n-
322 {
\n-
323 case Dune::InteriorBorder_InteriorBorder_Interface :
\n-
324 interface.build (remoteIndices_, InteriorFlags(), InteriorFlags() );
\n-
325 break;
\n-
326 case Dune::InteriorBorder_All_Interface :
\n-
327 if (dir == Dune::ForwardCommunication)
\n-
328 interface.build (remoteIndices_, InteriorFlags(), AllFlags() );
\n-
329 else
\n-
330 interface.build (remoteIndices_, AllFlags(), InteriorFlags() );
\n-
331 break;
\n-
332 case Dune::Overlap_OverlapFront_Interface :
\n-
333 interface.build (remoteIndices_, OverlapFlags(), OverlapFlags() );
\n-
334 break;
\n-
335 case Dune::Overlap_All_Interface :
\n-
336 if (dir == Dune::ForwardCommunication)
\n-
337 interface.build (remoteIndices_, OverlapFlags(), AllFlags() );
\n-
338 else
\n-
339 interface.build (remoteIndices_, AllFlags(), OverlapFlags() );
\n-
340 break;
\n-
341 case Dune::All_All_Interface :
\n-
342 interface.build (remoteIndices_, AllFlags(), AllFlags() );
\n-
343 break;
\n-
344 default :
\n-
345 DUNE_THROW(Dune::NotImplemented, "GridGlue::communicate for interface " << iftype << " not implemented");
\n-
346 }
\n-
347
\n-
348 // setup communication info (class needed to tunnel all info to the operator)
\n-\n-
350 CommInfo commInfo;
\n-
351 commInfo.dir = dir;
\n-
352 commInfo.gridglue = this;
\n-
353 commInfo.data = &data;
\n-
354
\n-
355 // create communicator
\n-
356 Dune::BufferedCommunicator bComm ;
\n-
357 bComm.template build< CommInfo >(commInfo, commInfo, interface);
\n-
358
\n-
359 // do communication
\n-
360 // choose communication direction.
\n-
361 if (dir == Dune::ForwardCommunication)
\n-
362 bComm.forward< Dune::GridGlue::ForwardOperator >(commInfo, commInfo);
\n-
363 else
\n-
364 bComm.backward< Dune::GridGlue::BackwardOperator >(commInfo, commInfo);
\n-
365 }
\n-
366 else
\n-
367#endif // HAVE_MPI
\n-
368 {
\n-
369 /*
\n-
370 * S E Q U E N T I A L V E R S I O N
\n-
371 */
\n-
372 Dune::dinfo << "GridGlue: sequential fallback communication" << std::endl;
\n-
373
\n-
374 // get comm buffer size
\n-
375 int ssz = size() * 10; // times data per intersection
\n-
376 int rsz = size() * 10;
\n-
377
\n-
378 // allocate send/receive buffer
\n-
379 auto sendbuffer = std::make_unique<DataType[]>(ssz);
\n-
380 auto receivebuffer = std::make_unique<DataType[]>(rsz);
\n-
381
\n-
382 // gather
\n-
383 Dune::GridGlue::StreamingMessageBuffer<DataType> gatherbuffer(sendbuffer.get());
\n-
384 for (const auto& in : intersections(*this))
\n-
385 {
\n-
386 /*
\n-
387 we need to have to variants depending on the communication direction.
\n-
388 */
\n-
389 if (dir == Dune::ForwardCommunication)
\n-
390 {
\n-
391 /*
\n-
392 dir : Forward (grid0 -> grid1)
\n-
393 */
\n-
394 if (in.self())
\n-
395 {
\n-
396 data.gather(gatherbuffer, in.inside(), in);
\n-
397 }
\n-
398 }
\n-
399 else // (dir == Dune::BackwardCommunication)
\n-
400 {
\n-
401 /*
\n-
402 dir : Backward (grid1 -> grid0)
\n-
403 */
\n-
404 if (in.neighbor())
\n-
405 {
\n-
406 data.gather(gatherbuffer, in.outside(), in.flip());
\n-
407 }
\n-
408 }
\n-
409 }
\n-
410
\n-
411 assert(ssz == rsz);
\n-
412 for (int i=0; i<ssz; i++)
\n-
413 receivebuffer[i] = sendbuffer[i];
\n-
414
\n-
415 // scatter
\n-
416 Dune::GridGlue::StreamingMessageBuffer<DataType> scatterbuffer(receivebuffer.get());
\n-
417 for (const auto& in : intersections(*this))
\n-
418 {
\n-
419 /*
\n-
420 we need to have to variants depending on the communication direction.
\n-
421 */
\n-
422 if (dir == Dune::ForwardCommunication)
\n-
423 {
\n-
424 /*
\n-
425 dir : Forward (grid0 -> grid1)
\n-
426 */
\n-
427 if (in.neighbor())
\n-
428 data.scatter(scatterbuffer, in.outside(), in.flip(),
\n-
429 data.size(in));
\n-
430 }
\n-
431 else // (dir == Dune::BackwardCommunication)
\n-
432 {
\n-
433 /*
\n-
434 dir : Backward (grid1 -> grid0)
\n-
435 */
\n-
436 if (in.self())
\n-
437 data.scatter(scatterbuffer, in.inside(), in,
\n-
438 data.size(in));
\n-
439 }
\n-
440 }
\n-
441 }
\n-
442}
\n-
\n-
443
\n-
444} // end namespace GridGlue
\n-
445} // end namespace Dune
\n-
Model of the Intersection concept provided by GridGlue.
\n+
24
\n+
25#ifdef DOXYGEN
\n+
26
\n+\n+
32
\n+
66template<...>
\n+
67IteratorRange<...>
\n+
68intersections(const GridGlue<...>& glue, const Reverse<...>& reverse = !reversed);
\n+
69
\n+
70#else
\n+
71
\n+
72namespace {
\n+
73const Reverse<true> reversed = {};
\n+
74} /* namespace */
\n+
75
\n+
76template<typename P0, typename P1, bool reverse = false>
\n+
77IteratorRange< typename GridGlue<P0, P1>::template IntersectionIterator<reverse ? 1 : 0> >
\n+
78intersections(const GridGlue<P0, P1>& glue, const Reverse<reverse>& = {})
\n+
79{
\n+
80 const static int side = reverse ? 1 : 0;
\n+
81 return {glue.template ibegin<side>(), glue.template iend<side>()};
\n+
82}
\n+
83
\n+
84#endif // DOXYGEN
\n+
85
\n+
86} /* namespace GridGlue */
\n+
87} /* namespace Dune */
\n+
88
\n+
89#endif
\n
Definition gridglue.hh:37
\n
IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
Iterate over all intersections of a GridGlue.
\n-
void printVector(const std::vector< T > &v, std::string name, int rank)
Definition gridglue.cc:168
\n-
void MPI_AllApply(MPI_Comm mpicomm, OP &&op, const Args &... data)
apply an operator locally to a difstributed data set
Definition ringcomm.hh:297
\n
sequential adapter to couple two grids at specified close together boundaries
Definition gridglue.hh:67
\n-
void mergePatches(const std::vector< Dune::FieldVector< ctype, dimworld > > &patch0coords, const std::vector< unsigned int > &patch0entities, const std::vector< Dune::GeometryType > &patch0types, const int patch0rank, const std::vector< Dune::FieldVector< ctype, dimworld > > &patch1coords, const std::vector< unsigned int > &patch1entities, const std::vector< Dune::GeometryType > &patch1types, const int patch1rank)
after building the merged grid the intersection can be updated through this method (for internal use)
Definition gridglue.cc:179
\n-
void communicate(Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > &data, Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const
Communicate information on the MergedGrid of a GridGlue.
Definition gridglue.cc:300
\n-
void build()
Definition gridglue.cc:36
\n-
void extractGrid(const Extractor &extractor, std::vector< Dune::FieldVector< ctype, dimworld > > &coords, std::vector< unsigned int > &faces, std::vector< Dune::GeometryType > &geometryTypes) const
Definition gridglue.cc:265
\n-
std::conditional_t< side==0, P0, std::conditional_t< side==1, P1, void > > GridPatch
Definition gridglue.hh:96
\n-
storage class for Dune::GridGlue::Intersection related data
Definition intersection.hh:38
\n-
Definition gridgluecommunicate.hh:26
\n-
describes the features of a data handle for communication in parallel runs using the GridGlue::commun...
Definition gridgluecommunicate.hh:77
\n-
size_t size(RISType &i) const
Definition gridgluecommunicate.hh:92
\n-
void scatter(MessageBufferImp &buff, const EntityType &e, const RISType &i, size_t n)
Definition gridgluecommunicate.hh:118
\n-
void gather(MessageBufferImp &buff, const EntityType &e, const RISType &i) const
pack data from user to message buffer
Definition gridgluecommunicate.hh:104
\n-
Definition gridgluecommunicate.hh:141
\n-
forward gather scatter to user defined CommInfo class
Definition gridgluecommunicate.hh:194
\n-
collects all GridGlue data requried for communication
Definition gridgluecommunicate.hh:272
\n-
Dune::CommunicationDirection dir
Definition gridgluecommunicate.hh:288
\n-
::Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > * data
Definition gridgluecommunicate.hh:282
\n-
const GridGlue * gridglue
Definition gridgluecommunicate.hh:281
\n-
Provides codimension-independent methods for grid extraction.
Definition extractor.hh:46
\n-
static constexpr auto dimworld
Definition extractor.hh:50
\n-
void getFaces(std::vector< VertexVector > &faces) const
Get the corners of the extracted subentities.
Definition extractor.hh:304
\n-
void getGeometryTypes(std::vector< Dune::GeometryType > &geometryTypes) const
Get the list of geometry types.
Definition extractor.hh:293
\n-
void getCoords(std::vector< Dune::FieldVector< ctype, dimworld > > &coords) const
getter for the coordinates array
Definition extractor.hh:275
\n+
IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
Iterate over all intersections of a GridGlue.
\n+
Definition rangegenerators.hh:17
\n+
const Reverse< true > reversed
Definition rangegenerators.hh:31
\n+
Reverse type
Definition rangegenerators.hh:18
\n+
constexpr Reverse<!reverse > operator!() const
Definition rangegenerators.hh:21
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,584 +1,88 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-gridglue.cc\n+rangegenerators.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n-2// vi: set et ts=4 sw=2 sts=2:\n-3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n+1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n-4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n+2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-5/* IMPLEMENTATION OF CLASS G R I D G L U E */\n-6\n-7#include \"_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\"\n-8#include \n-9#include \n-10#include \"../gridglue.hh\"\n-11#if HAVE_MPI\n-12#include \"../common/ringcomm.hh\"\n-13#endif\n-14\n-15#include \n-16\n-17namespace _\bD_\bu_\bn_\be {\n-18namespace GridGlue {\n+3#ifndef DUNE_GRIDGLUE_ADAPTER_RANGEGENERATORS_HH\n+4#define DUNE_GRIDGLUE_ADAPTER_RANGEGENERATORS_HH\n+5\n+6#include \n+7\n+8namespace _\bD_\bu_\bn_\be {\n+9namespace GridGlue {\n+10\n+14template\n+_\b1_\b5struct _\bR_\be_\bv_\be_\br_\bs_\be\n+16 : std::integral_constant\n+17{\n+_\b1_\b8 typedef _\bR_\be_\bv_\be_\br_\bs_\be _\bt_\by_\bp_\be;\n 19\n-20template\n-_\b2_\b1_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be(const std::shared_ptr< const _\bG_\br_\bi_\bd_\bP_\ba_\bt_\bc_\bh_\b<_\b0_\b> >& gp0,\n-const std::shared_ptr< const _\bG_\br_\bi_\bd_\bP_\ba_\bt_\bc_\bh_\b<_\b1_\b> >& gp1, const std::\n-shared_ptr& merger)\n-22 : patches_{gp0, gp1}, merger_(merger)\n-23{\n-24#if HAVE_MPI\n-25 // if we have only seq. meshes don't use parallel glueing\n-26 if (gp0->gridView().comm().size() == 1\n-27 && gp1->gridView().comm().size() == 1)\n-28 mpicomm_ = MPI_COMM_SELF;\n-29 else\n-30 mpicomm_ = MPI_COMM_WORLD;\n-31#endif // HAVE_MPI\n-32 std::cout << \"GridGlue: Constructor succeeded!\" << std::endl;\n-33}\n-34\n-35template\n-_\b3_\b6void _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>_\b:_\b:_\bb_\bu_\bi_\bl_\bd()\n-37{\n-38 int myrank = 0;\n-39#if HAVE_MPI\n-40 int commsize = 1;\n-41 MPI_Comm_rank(mpicomm_, &myrank);\n-42 MPI_Comm_size(mpicomm_, &commsize);\n-43#endif // HAVE_MPI\n-44\n-45 // clear the contents from the current intersections array\n-46 {\n-47 std::vector dummy(1); // we need size 1, as we always\n-store data for the end-intersection\n-48 intersections_.swap(dummy);\n-49 }\n-50\n-51 std::vector > patch0coords;\n-52 std::vector patch0entities;\n-53 std::vector patch0types;\n-54 std::vector > patch1coords;\n-55 std::vector patch1entities;\n-56 std::vector patch1types;\n-57\n-58 /*\n-59 * extract global surface patchs\n-60 */\n-61\n-62 // retrieve the coordinate and topology information from the extractors\n-63 // and apply transformations if necessary\n-64 extractGrid(patch<0>(), patch0coords, patch0entities, patch0types);\n-65 extractGrid(patch<1>(), patch1coords, patch1entities, patch1types);\n-66\n-67 std::cout << \">>>> rank \" << myrank << \" coords: \"\n-68 << patch0coords.size() << \" and \" << patch1coords.size() << std::endl;\n-69 std::cout << \">>>> rank \" << myrank << \" entities: \"\n-70 << patch0entities.size() << \" and \" << patch1entities.size() << std::endl;\n-71 std::cout << \">>>> rank \" << myrank << \" types: \"\n-72 << patch0types.size() << \" and \" << patch1types.size() << std::endl;\n-73\n-74#ifdef WRITE_TO_VTK\n-75 const char prefix[] = \"GridGlue::Builder::build() : \";\n-76 char patch0surf[256];\n-77 sprintf(patch0surf, \"/tmp/vtk-patch0-test-%i\", myrank);\n-78 char patch1surf[256];\n-79 sprintf(patch1surf, \"/tmp/vtk-patch1-test-%i\", myrank);\n-80\n-81 // std::cout << prefix << \"Writing patch0 surface to '\" << patch0surf <<\n-\".vtk'...\\n\";\n-82 // VtkSurfaceWriter vtksw(patch0surf);\n-83 // vtksw.writeSurface(patch0coords, patch0entities, grid0dim, dimworld);\n-84 // std::cout << prefix << \"Done writing patch0 surface!\\n\";\n+20 constexpr\n+_\b2_\b1 _\bR_\be_\bv_\be_\br_\bs_\be_\b<_\b!_\br_\be_\bv_\be_\br_\bs_\be_\b> _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b!() const\n+22 { return {}; }\n+23};\n+24\n+25#ifdef DOXYGEN\n+26\n+_\b3_\b1const _\bR_\be_\bv_\be_\br_\bs_\be_\b<_\bt_\br_\bu_\be_\b> _\br_\be_\bv_\be_\br_\bs_\be_\bd;\n+32\n+66template<...>\n+67IteratorRange<...>\n+_\b6_\b8_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\b._\b._\b._\b>& glue, const _\bR_\be_\bv_\be_\br_\bs_\be_\b<_\b._\b._\b._\b>& reverse =\n+!reversed);\n+69\n+70#else\n+71\n+72namespace {\n+73const _\bR_\be_\bv_\be_\br_\bs_\be_\b<_\bt_\br_\bu_\be_\b> reversed = {};\n+74} /* namespace */\n+75\n+76template\n+77IteratorRange< typename GridGlue::template\n+IntersectionIterator >\n+78_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(const GridGlue& glue, const Reverse& = {})\n+79{\n+80 const static int side = reverse ? 1 : 0;\n+81 return {glue.template ibegin(), glue.template iend()};\n+82}\n+83\n+84#endif // DOXYGEN\n 85\n-86 // std::cout << prefix << \"Writing patch1 surface to '\" << patch1surf <<\n-\".vtk'...\\n\";\n-87 // vtksw.setFilename(patch1surf);\n-88 // vtksw.writeSurface(patch1coords, patch1entities, grid1dim, dimworld);\n-89 // std::cout << prefix << \"Done writing patch1 surface!\\n\";\n-90#endif // WRITE_TO_VTK\n-91\n-92 // we start with an empty set\n-93 index__sz = 0;\n-94\n-95#if HAVE_MPI\n-96 if (commsize > 1)\n-97 {\n-98 // setup parallel indexset\n-99 patch0_is_.beginResize();\n-100 patch1_is_.beginResize();\n-101 }\n-102\n-103 auto op =\n-104 [&](\n-105 const int mergingrank,\n-106 const std::vector >& remotePatch0coords,\n-107 const std::vector& remotePatch0entities,\n-108 const std::vector& remotePatch0types,\n-109 const std::vector >& remotePatch1coords,\n-110 const std::vector& remotePatch1entities,\n-111 const std::vector& remotePatch1types\n-112 )\n-113 {\n-114 if (remotePatch1entities.size() > 0 && patch0entities.size() > 0)\n-115 mergePatches(patch0coords, patch0entities, patch0types, myrank,\n-116 remotePatch1coords, remotePatch1entities, remotePatch1types, mergingrank);\n-117 if (mergingrank != myrank &&\n-118 remotePatch0entities.size() > 0 && patch1entities.size() > 0)\n-119 mergePatches(remotePatch0coords, remotePatch0entities, remotePatch0types,\n-mergingrank,\n-120 patch1coords, patch1entities, patch1types, myrank);\n-121 };\n-122 _\bP_\ba_\br_\ba_\bl_\bl_\be_\bl_\b:_\b:_\bM_\bP_\bI_\b__\bA_\bl_\bl_\bA_\bp_\bp_\bl_\by(mpicomm_, op,\n-123 patch0coords, patch0entities, patch0types,\n-124 patch1coords, patch1entities, patch1types\n-125 );\n-126\n-127 if (commsize > 1)\n-128 {\n-129 // finalize ParallelIndexSet & RemoteIndices\n-130 patch0_is_.endResize();\n-131 patch1_is_.endResize();\n-132\n-133 // setup remote index information\n-134 remoteIndices_.setIncludeSelf(true);\n-135 // #warning add list of neighbors ...\n-136 remoteIndices_.setIndexSets(patch0_is_, patch1_is_, mpicomm_) ;\n-137 remoteIndices_.rebuild();\n-138\n-139 // DEBUG Print all remote indices\n-140#ifdef DEBUG_GRIDGLUE_PARALLELMERGE\n-141 for (auto it = remoteIndices_.begin(); it != remoteIndices_.end(); it++)\n-142 {\n-143 std::cout << myrank << \"\\tri-list\\t\" << it->first << std::endl;\n-144 for (auto xit = it->second.first->begin(); xit != it->second.first->end();\n-++xit)\n-145 std::cout << myrank << \"\\tri-list 1 \\t\" << it->first << \"\\t\" << *xit <<\n-std::endl;\n-146 for (auto xit = it->second.second->begin(); xit != it->second.second->end\n-(); ++xit)\n-147 std::cout << myrank << \"\\tri-list 2 \\t\" << it->first << \"\\t\" << *xit <<\n-std::endl;\n-148 }\n-149#endif\n-150 }\n-151#else // HAVE_MPI\n-152\n-153 if (patch1entities.size() > 0 && patch0entities.size() > 0)\n-154 {\n-155 mergePatches(patch0coords, patch0entities, patch0types, myrank,\n-156 patch1coords, patch1entities, patch1types, myrank);\n-157#ifdef CALL_MERGER_TWICE\n-158 mergePatches(patch0coords, patch0entities, patch0types, myrank,\n-159 patch1coords, patch1entities, patch1types, myrank);\n-160#endif\n-161 }\n-162\n-163#endif // HAVE_MPI\n-164\n-165}\n-166\n-167template\n-_\b1_\b6_\b8void _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(const std::vector & v, std::string name, int rank)\n-169{\n-170 std::cout << rank << \": \" << name << std::endl;\n-171 for (size_t i=0; i\n-_\b1_\b7_\b9void _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>_\b:_\b:_\bm_\be_\br_\bg_\be_\bP_\ba_\bt_\bc_\bh_\be_\bs(\n-180 const std::vector >& patch0coords,\n-181 const std::vector& patch0entities,\n-182 const std::vector& patch0types,\n-183 const int patch0rank,\n-184 const std::vector >& patch1coords,\n-185 const std::vector& patch1entities,\n-186 const std::vector& patch1types,\n-187 const int patch1rank)\n-188{\n-189\n-190 // howto handle overlap etc?\n-191\n-192 int myrank = 0;\n-193#if HAVE_MPI\n-194 int commsize = 1;\n-195 MPI_Comm_rank(mpicomm_, &myrank);\n-196 MPI_Comm_size(mpicomm_, &commsize);\n-197#endif // HAVE_MPI\n-198\n-199 // which patches are local?\n-200 const bool patch0local = (myrank == patch0rank);\n-201 const bool patch1local = (myrank == patch1rank);\n-202\n-203 // remember the number of previous remote intersections\n-204 const unsigned int offset = intersections_.size()-1;\n-205\n-206 std::cout << myrank\n-207 << \" GridGlue::mergePatches : rank \" << patch0rank << \" / \" << patch1rank\n-<< std::endl;\n-208\n-209 // start the actual build process\n-210 merger_->build(patch0coords, patch0entities, patch0types,\n-211 patch1coords, patch1entities, patch1types);\n-212\n-213 // append to intersections list\n-214 intersections_.resize(merger_->nSimplices() + offset + 1);\n-215 for (unsigned int i = 0; i < merger_->nSimplices(); ++i)\n-216 intersections_[offset + i] = _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba(*this, i, offset,\n-patch0local, patch1local);\n-217\n-218 index__sz = intersections_.size() - 1;\n-219\n-220 std::cout << myrank\n-221 << \" GridGlue::mergePatches : \"\n-222 << \"The number of remote intersections is \" << intersections_.size()-1 <<\n-std::endl;\n-223\n-224#if 0\n-225 _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(patch0coords,\"patch0coords\",myrank);\n-226 _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(patch0entities,\"patch0entities\",myrank);\n-227 _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(patch0types,\"patch0types\",myrank);\n-228 _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(patch1coords,\"patch1coords\",myrank);\n-229 _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(patch1entities,\"patch1entities\",myrank);\n-230 _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(patch1types,\"patch1types\",myrank);\n-231#endif\n-232\n-233#if HAVE_MPI\n-234 if (commsize > 1)\n-235 {\n-236 // update remote index sets\n-237 assert(Dune::RESIZE == patch0_is_.state());\n-238 assert(Dune::RESIZE == patch1_is_.state());\n-239\n-240 for (unsigned int i = 0; i < merger_->nSimplices(); i++)\n-241 {\n-242 // #warning only handle the newest intersections / merger info\n-243 const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba & it = intersections_[i];\n-244 _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd gid(patch0rank, patch1rank, i);\n-245 if (it.template local<0>())\n-246 {\n-247 Dune::PartitionType ptype = patch<0>().element(it.template index<0>\n-()).partitionType();\n-248 patch0_is_.add (gid, LocalIndex(offset+i, ptype) );\n-249 }\n-250 if (it.template local<1>())\n-251 {\n-252 Dune::PartitionType ptype = patch<1>().element(it.template index<1>\n-()).partitionType();\n-253 patch1_is_.add (gid, LocalIndex(offset+i, ptype) );\n-254 }\n-255 }\n-256 }\n-257#endif // HAVE_MPI\n-258\n-259 // cleanup the merger\n-260 merger_->clear();\n-261}\n-262\n-263template\n-264template\n-_\b2_\b6_\b5void _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>_\b:_\b:_\be_\bx_\bt_\br_\ba_\bc_\bt_\bG_\br_\bi_\bd (const _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br & extractor,\n-266 std::vector > & coords,\n-267 std::vector & entities,\n-268 std::vector& geometryTypes) const\n-269{\n-270 std::vector tempcoords;\n-271 std::vector tempentities;\n-272\n-273 extractor._\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs(tempcoords);\n-274 coords.clear();\n-275 coords.reserve(tempcoords.size());\n-276\n-277 for (unsigned int i = 0; i < tempcoords.size(); ++i)\n-278 {\n-279 assert(int(dimworld) == int(_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd));\n-280 coords.push_back(Dune::FieldVector());\n-281 for (size_t j = 0; j \n-299template\n-_\b3_\b0_\b0void _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>_\b:_\b:_\bc_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\be(\n-301 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b<_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b> & data,\n-302 Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const\n-303{\n-304 typedef _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b<_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b>\n-DataHandle;\n-305 typedef typename DataHandle::DataType DataType;\n-306\n-307#if HAVE_MPI\n-308\n-309 if (mpicomm_ != MPI_COMM_SELF)\n-310 {\n-311 /*\n-312 * P A R A L L E L V E R S I O N\n-313 */\n-314 // setup communication interfaces\n-315 Dune::dinfo << \"GridGlue: parallel communication\" << std::endl;\n-316 typedef Dune::EnumItem \n-InteriorFlags;\n-317 typedef Dune::EnumItem \n-OverlapFlags;\n-318 typedef Dune::EnumRange AllFlags;\n-319 Dune::Interface interface;\n-320 assert(remoteIndices_.isSynced());\n-321 switch (iftype)\n-322 {\n-323 case Dune::InteriorBorder_InteriorBorder_Interface :\n-324 interface.build (remoteIndices_, InteriorFlags(), InteriorFlags() );\n-325 break;\n-326 case Dune::InteriorBorder_All_Interface :\n-327 if (dir == Dune::ForwardCommunication)\n-328 interface.build (remoteIndices_, InteriorFlags(), AllFlags() );\n-329 else\n-330 interface.build (remoteIndices_, AllFlags(), InteriorFlags() );\n-331 break;\n-332 case Dune::Overlap_OverlapFront_Interface :\n-333 interface.build (remoteIndices_, OverlapFlags(), OverlapFlags() );\n-334 break;\n-335 case Dune::Overlap_All_Interface :\n-336 if (dir == Dune::ForwardCommunication)\n-337 interface.build (remoteIndices_, OverlapFlags(), AllFlags() );\n-338 else\n-339 interface.build (remoteIndices_, AllFlags(), OverlapFlags() );\n-340 break;\n-341 case Dune::All_All_Interface :\n-342 interface.build (remoteIndices_, AllFlags(), AllFlags() );\n-343 break;\n-344 default :\n-345 DUNE_THROW(Dune::NotImplemented, \"GridGlue::communicate for interface \" <<\n-iftype << \" not implemented\");\n-346 }\n-347\n-348 // setup communication info (class needed to tunnel all info to the\n-operator)\n-349 typedef _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b,_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b>\n-_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo;\n-350 _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo commInfo;\n-351 commInfo._\bd_\bi_\br = dir;\n-352 commInfo._\bg_\br_\bi_\bd_\bg_\bl_\bu_\be = this;\n-353 commInfo._\bd_\ba_\bt_\ba = &data;\n-354\n-355 // create communicator\n-356 Dune::BufferedCommunicator bComm ;\n-357 bComm.template build< CommInfo >(commInfo, commInfo, interface);\n-358\n-359 // do communication\n-360 // choose communication direction.\n-361 if (dir == Dune::ForwardCommunication)\n-362 bComm.forward< _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bF_\bo_\br_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br >(commInfo, commInfo);\n-363 else\n-364 bComm.backward< _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bB_\ba_\bc_\bk_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br >(commInfo, commInfo);\n-365 }\n-366 else\n-367#endif // HAVE_MPI\n-368 {\n-369 /*\n-370 * S E Q U E N T I A L V E R S I O N\n-371 */\n-372 Dune::dinfo << \"GridGlue: sequential fallback communication\" << std::endl;\n-373\n-374 // get comm buffer size\n-375 int ssz = size() * 10; // times data per intersection\n-376 int rsz = size() * 10;\n-377\n-378 // allocate send/receive buffer\n-379 auto sendbuffer = std::make_unique(ssz);\n-380 auto receivebuffer = std::make_unique(rsz);\n-381\n-382 // gather\n-383 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b<_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\b> gatherbuffer\n-(sendbuffer.get());\n-384 for (const auto& in : _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(*this))\n-385 {\n-386 /*\n-387 we need to have to variants depending on the communication direction.\n-388 */\n-389 if (dir == Dune::ForwardCommunication)\n-390 {\n-391 /*\n-392 dir : Forward (grid0 -> grid1)\n-393 */\n-394 if (in.self())\n-395 {\n-396 data._\bg_\ba_\bt_\bh_\be_\br(gatherbuffer, in.inside(), in);\n-397 }\n-398 }\n-399 else // (dir == Dune::BackwardCommunication)\n-400 {\n-401 /*\n-402 dir : Backward (grid1 -> grid0)\n-403 */\n-404 if (in.neighbor())\n-405 {\n-406 data._\bg_\ba_\bt_\bh_\be_\br(gatherbuffer, in.outside(), in.flip());\n-407 }\n-408 }\n-409 }\n-410\n-411 assert(ssz == rsz);\n-412 for (int i=0; i scatterbuffer\n-(receivebuffer.get());\n-417 for (const auto& in : _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(*this))\n-418 {\n-419 /*\n-420 we need to have to variants depending on the communication direction.\n-421 */\n-422 if (dir == Dune::ForwardCommunication)\n-423 {\n-424 /*\n-425 dir : Forward (grid0 -> grid1)\n-426 */\n-427 if (in.neighbor())\n-428 data._\bs_\bc_\ba_\bt_\bt_\be_\br(scatterbuffer, in.outside(), in.flip(),\n-429 data._\bs_\bi_\bz_\be(in));\n-430 }\n-431 else // (dir == Dune::BackwardCommunication)\n-432 {\n-433 /*\n-434 dir : Backward (grid1 -> grid0)\n-435 */\n-436 if (in.self())\n-437 data._\bs_\bc_\ba_\bt_\bt_\be_\br(scatterbuffer, in.inside(), in,\n-438 data._\bs_\bi_\bz_\be(in));\n-439 }\n-440 }\n-441 }\n-442}\n-443\n-444} // end namespace GridGlue\n-445} // end namespace Dune\n-_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n-Model of the Intersection concept provided by GridGlue.\n+86} /* namespace GridGlue */\n+87} /* namespace Dune */\n+88\n+89#endif\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n > &reverse=!reversed)\n Iterate over all intersections of a GridGlue.\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br\n-void printVector(const std::vector< T > &v, std::string name, int rank)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.cc:168\n-_\bD_\bu_\bn_\be_\b:_\b:_\bP_\ba_\br_\ba_\bl_\bl_\be_\bl_\b:_\b:_\bM_\bP_\bI_\b__\bA_\bl_\bl_\bA_\bp_\bp_\bl_\by\n-void MPI_AllApply(MPI_Comm mpicomm, OP &&op, const Args &... data)\n-apply an operator locally to a difstributed data set\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn ringcomm.hh:297\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n sequential adapter to couple two grids at specified close together boundaries\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:67\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bm_\be_\br_\bg_\be_\bP_\ba_\bt_\bc_\bh_\be_\bs\n-void mergePatches(const std::vector< Dune::FieldVector< ctype, dimworld > >\n-&patch0coords, const std::vector< unsigned int > &patch0entities, const std::\n-vector< Dune::GeometryType > &patch0types, const int patch0rank, const std::\n-vector< Dune::FieldVector< ctype, dimworld > > &patch1coords, const std::\n-vector< unsigned int > &patch1entities, const std::vector< Dune::GeometryType >\n-&patch1types, const int patch1rank)\n-after building the merged grid the intersection can be updated through this\n-method (for internal use)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.cc:179\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\be\n-void communicate(Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >\n-&data, Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const\n-Communicate information on the MergedGrid of a GridGlue.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.cc:300\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bb_\bu_\bi_\bl_\bd\n-void build()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.cc:36\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\be_\bx_\bt_\br_\ba_\bc_\bt_\bG_\br_\bi_\bd\n-void extractGrid(const Extractor &extractor, std::vector< Dune::FieldVector<\n-ctype, dimworld > > &coords, std::vector< unsigned int > &faces, std::vector<\n-Dune::GeometryType > &geometryTypes) const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.cc:265\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bP_\ba_\bt_\bc_\bh\n-std::conditional_t< side==0, P0, std::conditional_t< side==1, P1, void > >\n-GridPatch\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:96\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba\n-storage class for Dune::GridGlue::Intersection related data\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:38\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:26\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be\n-describes the features of a data handle for communication in parallel runs\n-using the GridGlue::commun...\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:77\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bs_\bi_\bz_\be\n-size_t size(RISType &i) const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:92\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bs_\bc_\ba_\bt_\bt_\be_\br\n-void scatter(MessageBufferImp &buff, const EntityType &e, const RISType &i,\n-size_t n)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:118\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bg_\ba_\bt_\bh_\be_\br\n-void gather(MessageBufferImp &buff, const EntityType &e, const RISType &i)\n-const\n-pack data from user to message buffer\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:104\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:141\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n-forward gather scatter to user defined CommInfo class\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:194\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo\n-collects all GridGlue data requried for communication\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:272\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bd_\bi_\br\n-Dune::CommunicationDirection dir\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:288\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bd_\ba_\bt_\ba\n-::Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > * data\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:282\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be\n-const GridGlue * gridglue\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:281\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-Provides codimension-independent methods for grid extraction.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:46\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd\n-static constexpr auto dimworld\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:50\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bt_\bF_\ba_\bc_\be_\bs\n-void getFaces(std::vector< VertexVector > &faces) const\n-Get the corners of the extracted subentities.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:304\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bt_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\bs\n-void getGeometryTypes(std::vector< Dune::GeometryType > &geometryTypes) const\n-Get the list of geometry types.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:293\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs\n-void getCoords(std::vector< Dune::FieldVector< ctype, dimworld > > &coords)\n-const\n-getter for the coordinates array\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:275\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n+> &reverse=!reversed)\n+Iterate over all intersections of a GridGlue.\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\be_\bv_\be_\br_\bs_\be\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn rangegenerators.hh:17\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\be_\bv_\be_\br_\bs_\be_\b:_\b:_\br_\be_\bv_\be_\br_\bs_\be_\bd\n+const Reverse< true > reversed\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn rangegenerators.hh:31\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\be_\bv_\be_\br_\bs_\be_\b:_\b:_\bt_\by_\bp_\be\n+Reverse type\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn rangegenerators.hh:18\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\be_\bv_\be_\br_\bs_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b!\n+constexpr Reverse operator!() const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn rangegenerators.hh:21\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00011.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00011.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: gridglueamirawriter.hh File Reference\n+dune-grid-glue: intersectionindexset.hh File Reference\n \n \n \n \n \n \n \n@@ -72,41 +72,34 @@\n
  • dune
  • grid-glue
  • adapter
  • \n
    \n
    \n
    \n \n-
    gridglueamirawriter.hh File Reference
    \n+
    intersectionindexset.hh File Reference
    \n
    \n
    \n-\n-

    Write all remote intersections to a AmiraMesh file. \n-More...

    \n-
    #include <fstream>
    \n-#include <sstream>
    \n-#include <type_traits>
    \n+\n

    Go to the source code of this file.

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

    \n Classes

    class  Dune::GridGlue::GridGlueAmiraWriter
     Write remote intersections to a AmiraMesh file for debugging purposes. More...
    class  Dune::GridGlue::IntersectionIndexSet< P0, P1 >
     
    \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n-

    Detailed Description

    \n-

    Write all remote intersections to a AmiraMesh file.

    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,27 +2,21 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n _\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-gridglueamirawriter.hh File Reference\n-Write all remote intersections to a AmiraMesh file. _\bM_\bo_\br_\be_\b._\b._\b.\n-#include \n-#include \n-#include \n+intersectionindexset.hh File Reference\n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\bA_\bm_\bi_\br_\ba_\bW_\br_\bi_\bt_\be_\br\n-\u00a0 Write remote intersections to a AmiraMesh file for debugging purposes.\n- _\bM_\bo_\br_\be_\b._\b._\b.\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b _\b>\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n-*\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-Write all remote intersections to a AmiraMesh file.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00011_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00011_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: gridglueamirawriter.hh Source File\n+dune-grid-glue: intersectionindexset.hh Source File\n \n \n \n \n \n \n \n@@ -74,166 +74,87 @@\n \n \n \n
    \n-
    gridglueamirawriter.hh
    \n+
    intersectionindexset.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    8#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH
    \n-
    9#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH
    \n-
    10
    \n-
    11#include <fstream>
    \n-
    12#include <sstream>
    \n-
    13#include <type_traits>
    \n+
    3#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
    \n+
    4#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
    \n+
    5
    \n+\n+\n+
    8
    \n+
    9#ifndef ONLY_SIMPLEX_INTERSECTIONS
    \n+
    10// we currently support only one intersection type. If we want to support more,
    \n+
    11// we have to think about the semantics of our IndexSet
    \n+
    12#error Not Implemented
    \n+
    13#endif
    \n
    14
    \n
    15namespace Dune {
    \n-
    16namespace GridGlue {
    \n+
    16 namespace GridGlue {
    \n
    17
    \n-
    \n-\n-
    21{
    \n-
    22
    \n-
    26 template <class Glue, int side>
    \n-
    27 static void writeIntersections(const Glue& glue, const std::string& filename)
    \n-
    28 {
    \n-
    29 static_assert((side==0 || side==1), "'side' can only be 0 or 1");
    \n+
    18 template<typename P0, typename P1>
    \n+
    \n+\n+
    20 {
    \n+
    21 friend class ::Dune::GridGlue::GridGlue<P0,P1>;
    \n+
    22 typedef ::Dune::GridGlue::GridGlue<P0,P1> GridGlue;
    \n+
    23
    \n+
    24 public:
    \n+
    25
    \n+\n+
    29 typedef size_t SizeType;
    \n
    30
    \n-
    31 std::ofstream fgrid;
    \n-
    32
    \n-
    33 fgrid.open(filename.c_str());
    \n-
    34
    \n-
    35 using GridView = typename Glue::template GridView<side>;
    \n-
    36 const int dim = GridView::dimension;
    \n-
    37 const int domdimw = GridView::dimensionworld;
    \n+
    33 template<int I, int O>
    \n+
    \n+\n+
    35 {
    \n+
    36 return i.i_->index_;
    \n+
    37 }
    \n+
    \n
    38
    \n-
    39 // coordinates have to be in R^3 in the VTK format
    \n-
    40 std::string coordinatePadding;
    \n-
    41 for (int i=domdimw; i<3; i++)
    \n-
    42 coordinatePadding += " 0";
    \n-
    43
    \n-
    44 int overlaps = glue.size();
    \n+
    \n+
    41 SizeType size () const
    \n+
    42 {
    \n+
    43 return glue_->size();
    \n+
    44 }
    \n+
    \n
    45
    \n-
    46 if (dim==3) {
    \n+
    46 private:
    \n
    47
    \n-
    48 fgrid << "# HyperSurface 0.1 ASCII \\n" << std::endl;
    \n-
    49 fgrid<<"\\n";
    \n-
    50 fgrid<<"Parameters {\\n";
    \n-
    51 fgrid<<" Materials {\\n";
    \n-
    52 fgrid<<" outside {\\n";
    \n-
    53 fgrid<<" Id 0\\n";
    \n-
    54 fgrid<<" }\\n";
    \n-
    55 fgrid<<" inside {\\n";
    \n-
    56 fgrid<<" Id 1\\n";
    \n-
    57 fgrid<<" }\\n";
    \n-
    58 fgrid<<" }\\n";
    \n-
    59 fgrid<<"\\n";
    \n-
    60 fgrid<<"}\\n";
    \n-
    61
    \n-
    62 // ////////////////////////////////////////////
    \n-
    63 // Write vertices
    \n-
    64 // ////////////////////////////////////////////
    \n-
    65
    \n-
    66 //use dim and not dim+1
    \n-
    67 fgrid<<"\\nVertices "<< overlaps*(dim)<<"\\n";
    \n-
    68 auto isEnd = glue.template iend<side>();
    \n-
    69 for (auto isIt = glue.template ibegin<side>(); isIt != isEnd; ++isIt)
    \n-
    70 {
    \n-
    71 const auto& geometry = isIt->geometry();
    \n-
    72 for (int i = 0; i < geometry.corners(); ++i)
    \n-
    73 fgrid << geometry.corner(i) << coordinatePadding << std::endl;
    \n-
    74 }
    \n-
    75
    \n-
    76 // ////////////////////////////////////////////
    \n-
    77 // Write triangles
    \n-
    78 // ////////////////////////////////////////////
    \n-
    79
    \n-
    80 fgrid<<"NBranchingPoints 0\\n";
    \n-
    81 fgrid<<"NVerticesOnCurves 0\\n";
    \n-
    82 fgrid<<"BoundaryCurves 0\\n";
    \n-
    83 fgrid<<"Patches 1\\n";
    \n-
    84 fgrid<<"{\\n";
    \n-
    85 fgrid<<"InnerRegion inside\\n";
    \n-
    86 fgrid<<"OuterRegion outside\\n";
    \n-
    87 fgrid<<"BoundaryID 0\\n";
    \n-
    88 fgrid<<"BranchingPoints 0";
    \n-
    89 fgrid<<"\\n";
    \n-
    90
    \n-
    91 fgrid<<"Triangles "<<overlaps<<std::endl;
    \n-
    92
    \n-
    93 for (int i=0;i<overlaps; i++)
    \n-
    94 fgrid<<i*dim+1<<" "<<i*dim+2<<" "<<i*dim+3<<std::endl;
    \n-
    95 fgrid<<"}\\n";
    \n-
    96
    \n-
    97 } else if (dim==2) {
    \n-
    98
    \n-
    99 fgrid << "# AmiraMesh 3D ASCII 2.0 \\n";
    \n-
    100 fgrid<<"\\n";
    \n-
    101 fgrid<<"define Lines "<<3*overlaps<<"\\n";
    \n-
    102 fgrid<<"nVertices "<<2*overlaps<<"\\n";
    \n-
    103 fgrid<<"\\n";
    \n-
    104 fgrid<<"Parameters {\\n";
    \n-
    105 fgrid<<" ContentType \\"HxLineSet\\" \\n";
    \n-
    106 fgrid<<"}\\n";
    \n-
    107 fgrid<<"\\n";
    \n-
    108 fgrid<<"Lines { int LineIdx } @1\\n";
    \n-
    109 fgrid<<"Vertices { float[3] Coordinates } @2\\n";
    \n-
    110 fgrid<<"\\n";
    \n-
    111 fgrid<<"# Data section follows\\n";
    \n-
    112 fgrid<<"@1 \\n";
    \n-
    113 for (int i=0; i<overlaps;i++)
    \n-
    114 fgrid<<2*i<<"\\n"<<2*i+1<<"\\n"<<-1<<"\\n";
    \n-
    115 fgrid<<"\\n";
    \n-
    116 fgrid<<"@2 \\n";
    \n-
    117
    \n-
    118 auto isEnd = glue.template iend<side>();
    \n-
    119 for (auto isIt = glue.template ibegin<side>(); isIt != isEnd; ++isIt) {
    \n-
    120 const auto& geometry = isIt->geometry();
    \n-
    121 for (int i = 0; i <2; ++i)
    \n-
    122 fgrid << geometry.corner(i) <<" "<<0<<"\\n";
    \n-
    123 }
    \n-
    124 }
    \n-
    125
    \n-
    126 fgrid.close();
    \n-
    127 }
    \n-
    128
    \n-
    129public:
    \n-
    130 template<typename Glue>
    \n-
    \n-
    131 static void write(const Glue& glue, const std::string& path, int appendix=1)
    \n-
    132 {
    \n-
    133 std::ostringstream name0;
    \n-
    134 name0 << path;
    \n-
    135 name0 << "/domain.surf" << std::setw(3) << std::setfill('0') << appendix;
    \n-
    136
    \n-
    137 // Write extracted grid and remote intersection on the grid1-side
    \n-
    138 writeIntersections<Glue,0>(glue,name0.str());
    \n-
    139
    \n-
    140 std::ostringstream name1;
    \n-
    141 name1 << path;
    \n-
    142 name1 << "/target.surf" << std::setw(3) << std::setfill('0') << appendix;
    \n-
    143
    \n-
    144 writeIntersections<Glue,1>(glue, name1.str());
    \n-
    145 }
    \n-
    \n-
    146
    \n-
    147};
    \n-
    \n-
    148
    \n-
    149} // namespace GridGlue
    \n-
    150} // namespace Dune
    \n-
    151
    \n-
    152#endif // DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH
    \n+\n+
    50 glue_(g) {}
    \n+
    51
    \n+
    52 const GridGlue * glue_;
    \n+
    53 };
    \n+
    \n+
    54
    \n+
    55 } // end namespace GridGlue
    \n+
    56} // end namespace Dune
    \n+
    57
    \n+
    58#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
    \n+
    Central component of the module implementing the coupling of two grids.
    \n+
    Model of the Intersection concept provided by GridGlue.
    \n
    Definition gridglue.hh:37
    \n-
    Write remote intersections to a AmiraMesh file for debugging purposes.
    Definition gridglueamirawriter.hh:21
    \n-
    static void write(const Glue &glue, const std::string &path, int appendix=1)
    Definition gridglueamirawriter.hh:131
    \n+
    sequential adapter to couple two grids at specified close together boundaries
    Definition gridglue.hh:67
    \n+
    unsigned int IndexType
    Definition gridglue.hh:147
    \n+
    size_t size() const
    Definition gridglue.hh:393
    \n+
    IndexType index_
    index of this intersection after GridGlue interface
    Definition intersection.hh:112
    \n+
    The intersection of two entities of the two patches of a GridGlue.
    Definition intersection.hh:261
    \n+
    Definition intersectionindexset.hh:20
    \n+
    SizeType size() const
    Return total number of intersections.
    Definition intersectionindexset.hh:41
    \n+
    GridGlue::IndexType IndexType
    The type used for the indices.
    Definition intersectionindexset.hh:27
    \n+
    IndexType index(const Intersection< P0, P1, I, O > &i) const
    Map Dune::GridGlue::Intersection to index.
    Definition intersectionindexset.hh:34
    \n+
    size_t SizeType
    The type used for the size.
    Definition intersectionindexset.hh:29
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,165 +1,105 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-gridglueamirawriter.hh\n+intersectionindexset.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n+_\b1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-8#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH\n-9#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH\n-10\n-11#include \n-12#include \n-13#include \n+3#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH\n+4#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH\n+5\n+6#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n+7#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+8\n+9#ifndef ONLY_SIMPLEX_INTERSECTIONS\n+10// we currently support only one intersection type. If we want to support\n+more,\n+11// we have to think about the semantics of our IndexSet\n+12#error Not Implemented\n+13#endif\n 14\n 15namespace _\bD_\bu_\bn_\be {\n-16namespace GridGlue {\n+16 namespace _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be {\n 17\n-_\b2_\b0class _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\bA_\bm_\bi_\br_\ba_\bW_\br_\bi_\bt_\be_\br\n-21{\n-22\n-26 template \n-27 static void writeIntersections(const Glue& glue, const std::string&\n-filename)\n-28 {\n-29 static_assert((side==0 || side==1), \"'side' can only be 0 or 1\");\n+18 template\n+_\b1_\b9 class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt\n+20 {\n+21 friend class ::Dune::GridGlue::GridGlue;\n+22 typedef ::Dune::GridGlue::GridGlue _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be;\n+23\n+24 public:\n+25\n+_\b2_\b7 typedef typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be;\n+_\b2_\b9 typedef size_t _\bS_\bi_\bz_\be_\bT_\by_\bp_\be;\n 30\n-31 std::ofstream fgrid;\n-32\n-33 fgrid.open(filename.c_str());\n-34\n-35 using GridView = typename Glue::template GridView;\n-36 const int dim = GridView::dimension;\n-37 const int domdimw = GridView::dimensionworld;\n+33 template\n+_\b3_\b4 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bi_\bn_\bd_\be_\bx (const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bP_\b0_\b,_\bP_\b1_\b,_\bI_\b,_\bO_\b> & i) const\n+35 {\n+36 return i.i_->_\bi_\bn_\bd_\be_\bx_\b_;\n+37 }\n 38\n-39 // coordinates have to be in R^3 in the VTK format\n-40 std::string coordinatePadding;\n-41 for (int i=domdimw; i<3; i++)\n-42 coordinatePadding += \" 0\";\n-43\n-44 int overlaps = glue.size();\n+_\b4_\b1 _\bS_\bi_\bz_\be_\bT_\by_\bp_\be _\bs_\bi_\bz_\be () const\n+42 {\n+43 return glue_->_\bs_\bi_\bz_\be();\n+44 }\n 45\n-46 if (dim==3) {\n+46 private:\n 47\n-48 fgrid << \"# HyperSurface 0.1 ASCII \\n\" << std::endl;\n-49 fgrid<<\"\\n\";\n-50 fgrid<<\"Parameters {\\n\";\n-51 fgrid<<\" Materials {\\n\";\n-52 fgrid<<\" outside {\\n\";\n-53 fgrid<<\" Id 0\\n\";\n-54 fgrid<<\" }\\n\";\n-55 fgrid<<\" inside {\\n\";\n-56 fgrid<<\" Id 1\\n\";\n-57 fgrid<<\" }\\n\";\n-58 fgrid<<\" }\\n\";\n-59 fgrid<<\"\\n\";\n-60 fgrid<<\"}\\n\";\n-61\n-62 // ////////////////////////////////////////////\n-63 // Write vertices\n-64 // ////////////////////////////////////////////\n-65\n-66 //use dim and not dim+1\n-67 fgrid<<\"\\nVertices \"<< overlaps*(dim)<<\"\\n\";\n-68 auto isEnd = glue.template iend();\n-69 for (auto isIt = glue.template ibegin(); isIt != isEnd; ++isIt)\n-70 {\n-71 const auto& geometry = isIt->geometry();\n-72 for (int i = 0; i < geometry.corners(); ++i)\n-73 fgrid << geometry.corner(i) << coordinatePadding << std::endl;\n-74 }\n-75\n-76 // ////////////////////////////////////////////\n-77 // Write triangles\n-78 // ////////////////////////////////////////////\n-79\n-80 fgrid<<\"NBranchingPoints 0\\n\";\n-81 fgrid<<\"NVerticesOnCurves 0\\n\";\n-82 fgrid<<\"BoundaryCurves 0\\n\";\n-83 fgrid<<\"Patches 1\\n\";\n-84 fgrid<<\"{\\n\";\n-85 fgrid<<\"InnerRegion inside\\n\";\n-86 fgrid<<\"OuterRegion outside\\n\";\n-87 fgrid<<\"BoundaryID 0\\n\";\n-88 fgrid<<\"BranchingPoints 0\";\n-89 fgrid<<\"\\n\";\n-90\n-91 fgrid<<\"Triangles \"<();\n-119 for (auto isIt = glue.template ibegin(); isIt != isEnd; ++isIt) {\n-120 const auto& geometry = isIt->geometry();\n-121 for (int i = 0; i <2; ++i)\n-122 fgrid << geometry.corner(i) <<\" \"<<0<<\"\\n\";\n-123 }\n-124 }\n-125\n-126 fgrid.close();\n-127 }\n-128\n-129public:\n-130 template\n-_\b1_\b3_\b1 static void _\bw_\br_\bi_\bt_\be(const Glue& glue, const std::string& path, int\n-appendix=1)\n-132 {\n-133 std::ostringstream name0;\n-134 name0 << path;\n-135 name0 << \"/domain.surf\" << std::setw(3) << std::setfill('0') << appendix;\n-136\n-137 // Write extracted grid and remote intersection on the grid1-side\n-138 writeIntersections(glue,name0.str());\n-139\n-140 std::ostringstream name1;\n-141 name1 << path;\n-142 name1 << \"/target.surf\" << std::setw(3) << std::setfill('0') << appendix;\n-143\n-144 writeIntersections(glue, name1.str());\n-145 }\n-146\n-147};\n-148\n-149} // namespace GridGlue\n-150} // namespace Dune\n-151\n-152#endif // DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH\n+49 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be * g) :\n+50 glue_(g) {}\n+51\n+52 const GridGlue * glue_;\n+53 };\n+54\n+55 } // end namespace GridGlue\n+56} // end namespace Dune\n+57\n+58#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH\n+_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh\n+Central component of the module implementing the coupling of two grids.\n+_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n+Model of the Intersection concept provided by GridGlue.\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\bA_\bm_\bi_\br_\ba_\bW_\br_\bi_\bt_\be_\br\n-Write remote intersections to a AmiraMesh file for debugging purposes.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglueamirawriter.hh:21\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\bA_\bm_\bi_\br_\ba_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be\n-static void write(const Glue &glue, const std::string &path, int appendix=1)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglueamirawriter.hh:131\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n+sequential adapter to couple two grids at specified close together boundaries\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:67\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n+unsigned int IndexType\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:147\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bs_\bi_\bz_\be\n+size_t size() const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:393\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bi_\bn_\bd_\be_\bx_\b_\n+IndexType index_\n+index of this intersection after GridGlue interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:112\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+The intersection of two entities of the two patches of a GridGlue.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:261\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionindexset.hh:20\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt_\b:_\b:_\bs_\bi_\bz_\be\n+SizeType size() const\n+Return total number of intersections.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionindexset.hh:41\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n+GridGlue::IndexType IndexType\n+The type used for the indices.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionindexset.hh:27\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt_\b:_\b:_\bi_\bn_\bd_\be_\bx\n+IndexType index(const Intersection< P0, P1, I, O > &i) const\n+Map Dune::GridGlue::Intersection to index.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionindexset.hh:34\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt_\b:_\b:_\bS_\bi_\bz_\be_\bT_\by_\bp_\be\n+size_t SizeType\n+The type used for the size.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionindexset.hh:29\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00014.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00014.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: rangegenerators.hh File Reference\n+dune-grid-glue: gridgluecommunicate.hh File Reference\n \n \n \n \n \n \n \n@@ -72,41 +72,73 @@\n
  • dune
  • grid-glue
  • adapter
  • \n
    \n \n
    \n \n-
    rangegenerators.hh File Reference
    \n+
    gridgluecommunicate.hh File Reference
    \n
    \n
    \n-
    #include <dune/common/iteratorrange.hh>
    \n+\n+

    Describes the parallel communication interface class for Dune::GridGlue. \n+More...

    \n+
    #include <type_traits>
    \n+#include <dune/common/bartonnackmanifcheck.hh>
    \n+#include <dune/common/parallel/communicator.hh>
    \n+#include <dune/grid/common/datahandleif.hh>
    \n+#include <dune/grid/common/gridenums.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 Classes

    struct  Dune::GridGlue::Reverse< reverse >
    struct  Dune::GridGlue::GlobalId
     
    class  Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >
     describes the features of a data handle for communication in parallel runs using the GridGlue::communicate methods. More...
     
    class  Dune::GridGlue::StreamingMessageBuffer< DT >
     
    class  Dune::GridGlue::CommunicationOperator< dir >
     forward gather scatter to user defined CommInfo class More...
     
    struct  Dune::GridGlue::CommInfo< GG, DataHandleImp, DataTypeImp >
     collects all GridGlue data requried for communication More...
     
    struct  Dune::CommPolicy< ::Dune::GridGlue::CommInfo< GG, DataHandleImp, DataTypeImp > >
     specialization of the CommPolicy struct, required for the ParallelIndexsets More...
     
    \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n+\n+\n+\n+\n+\n+\n+\n+

    \n+Typedefs

    typedef std::pair< int, int > Dune::GridGlue::RankPair
     
    typedef CommunicationOperator< Dune::ForwardCommunication > Dune::GridGlue::ForwardOperator
     
    typedef CommunicationOperator< Dune::BackwardCommunication > Dune::GridGlue::BackwardOperator
     
    \n \n-\n-\n-\n-\n+\n+\n

    \n Functions

    template<... >
    IteratorRange<... > Dune::GridGlue::intersections (const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
     Iterate over all intersections of a GridGlue.
     
    std::ostream & Dune::GridGlue::operator<< (std::ostream &os, const GlobalId &id)
     
    \n-
    \n+

    Detailed Description

    \n+

    Describes the parallel communication interface class for Dune::GridGlue.

    \n+
    Author
    Christian Engwer
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,27 +1,61 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-rangegenerators.hh File Reference\n-#include \n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bT_\by_\bp_\be_\bd_\be_\bf_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n+gridgluecommunicate.hh File Reference\n+Describes the parallel communication interface class for _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be.\n+_\bM_\bo_\br_\be_\b._\b._\b.\n+#include \n+#include \n+#include \n+#include \n+#include \n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\be_\bv_\be_\br_\bs_\be_\b<_\b _\br_\be_\bv_\be_\br_\bs_\be_\b _\b>\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n+\u00a0\n+ class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b<_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>\n+\u00a0 describes the features of a data handle for communication in parallel\n+ runs using the _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\be methods. _\bM_\bo_\br_\be_\b._\b._\b.\n+\u00a0\n+ class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b<_\b _\bD_\bT_\b _\b>\n+\u00a0\n+ class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br_\b<_\b _\bd_\bi_\br_\b _\b>\n+\u00a0 forward gather scatter to user defined _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo class _\bM_\bo_\br_\be_\b._\b._\b.\n+\u00a0\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\b _\bG_\bG_\b,_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>\n+\u00a0 collects all _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be data requried for communication _\bM_\bo_\br_\be_\b._\b._\b.\n+\u00a0\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bP_\bo_\bl_\bi_\bc_\by_\b<_\b _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\b _\bG_\bG_\b,_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,\n+ _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>_\b _\b>\n+\u00a0 specialization of the CommPolicy struct, required for the\n+ ParallelIndexsets _\bM_\bo_\br_\be_\b._\b._\b.\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+T\bTy\byp\bpe\bed\bde\bef\bfs\bs\n+ typedef std::pair< int, int >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\ba_\bn_\bk_\bP_\ba_\bi_\br\n+\u00a0\n+typedef _\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br< Dune::\n+ ForwardCommunication >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bF_\bo_\br_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n+\u00a0\n+typedef _\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br< Dune::\n+ BackwardCommunication >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bB_\ba_\bc_\bk_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n+\u00a0\n F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-template<... >\n-IteratorRange<... >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs (const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be<... > &glue,\n- const _\bR_\be_\bv_\be_\br_\bs_\be<... > &reverse=!reversed)\n-\u00a0 Iterate over all intersections of a _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be.\n+std::ostream &\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b<_\b< (std::ostream &os, const _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n+ &id)\n \u00a0\n+*\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n+Describes the parallel communication interface class for _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be.\n+ Author\n+ Christian Engwer\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00014_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00014_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: rangegenerators.hh Source File\n+dune-grid-glue: gridgluecommunicate.hh Source File\n \n \n \n \n \n \n \n@@ -74,78 +74,365 @@\n \n \n \n
    \n-
    rangegenerators.hh
    \n+
    gridgluecommunicate.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n-
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#ifndef DUNE_GRIDGLUE_ADAPTER_RANGEGENERATORS_HH
    \n-
    4#define DUNE_GRIDGLUE_ADAPTER_RANGEGENERATORS_HH
    \n-
    5
    \n-
    6#include <dune/common/iteratorrange.hh>
    \n+Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+
    2// vi: set et ts=4 sw=2 sts=2:
    \n+
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n+
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+
    5#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH
    \n+
    6#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH
    \n
    7
    \n-
    8namespace Dune {
    \n-
    9namespace GridGlue {
    \n-
    10
    \n-
    14template<bool reverse>
    \n-
    \n-
    15struct Reverse
    \n-
    16 : std::integral_constant<bool, reverse>
    \n-
    17{
    \n-
    18 typedef Reverse type;
    \n+
    13#include <type_traits>
    \n+
    14
    \n+
    15#include <dune/common/bartonnackmanifcheck.hh>
    \n+
    16#include <dune/common/parallel/communicator.hh>
    \n+
    17#include <dune/grid/common/datahandleif.hh>
    \n+
    18#include <dune/grid/common/gridenums.hh>
    \n
    19
    \n-
    20 constexpr
    \n-
    \n-\n-
    22 { return {}; }
    \n-
    \n-
    23};
    \n-
    \n-
    24
    \n-
    25#ifdef DOXYGEN
    \n-
    26
    \n-\n-
    32
    \n-
    66template<...>
    \n-
    67IteratorRange<...>
    \n-
    68intersections(const GridGlue<...>& glue, const Reverse<...>& reverse = !reversed);
    \n-
    69
    \n-
    70#else
    \n-
    71
    \n-
    72namespace {
    \n-
    73const Reverse<true> reversed = {};
    \n-
    74} /* namespace */
    \n-
    75
    \n-
    76template<typename P0, typename P1, bool reverse = false>
    \n-
    77IteratorRange< typename GridGlue<P0, P1>::template IntersectionIterator<reverse ? 1 : 0> >
    \n-
    78intersections(const GridGlue<P0, P1>& glue, const Reverse<reverse>& = {})
    \n-
    79{
    \n-
    80 const static int side = reverse ? 1 : 0;
    \n-
    81 return {glue.template ibegin<side>(), glue.template iend<side>()};
    \n-
    82}
    \n-
    83
    \n-
    84#endif // DOXYGEN
    \n+
    20
    \n+
    21namespace Dune {
    \n+
    22 namespace GridGlue {
    \n+
    23
    \n+
    24 typedef std::pair<int, int> RankPair;
    \n+
    \n+
    25 struct GlobalId : public std::pair<RankPair, unsigned int>
    \n+
    26 {
    \n+
    \n+\n+
    31 this->first.first = 0;
    \n+
    32 this->first.second = 0;
    \n+
    33 this->second = 0;
    \n+
    34 }
    \n+
    \n+
    \n+
    38 GlobalId(int i) {
    \n+
    39 this->first.first = i;
    \n+
    40 this->first.second = i;
    \n+
    41 this->second = 0;
    \n+
    42 }
    \n+
    \n+
    \n+
    48 GlobalId(int i, int j, unsigned int n) {
    \n+
    49 this->first.first = std::min(i,j);
    \n+
    50 this->first.second = std::max(i,j);
    \n+
    51 this->second = n;
    \n+
    52 }
    \n+
    \n+
    53 };
    \n+
    \n+
    54
    \n+
    \n+
    55 inline std::ostream& operator<<(std::ostream& os, const GlobalId & id)
    \n+
    56 {
    \n+
    57 os << "("
    \n+
    58 << id.first.first << "," << id.first.second << ","
    \n+
    59 << id.second << ")";
    \n+
    60 return os;
    \n+
    61 }
    \n+
    \n+
    62
    \n+
    75 template <class DataHandleImp, class DataTypeImp>
    \n+
    \n+\n+
    77 {
    \n+
    78 public:
    \n+
    80 typedef DataTypeImp DataType;
    \n+
    81
    \n+
    82 protected:
    \n+
    83 // one should not create an explicit instance of this inteface object
    \n+\n
    85
    \n-
    86} /* namespace GridGlue */
    \n-
    87} /* namespace Dune */
    \n-
    88
    \n-
    89#endif
    \n+
    86 public:
    \n+
    87
    \n+
    91 template<class RISType>
    \n+
    \n+
    92 size_t size (RISType& i) const
    \n+
    93 {
    \n+
    94 CHECK_INTERFACE_IMPLEMENTATION((asImp().size(i)));
    \n+
    95 return asImp().size(i);
    \n+
    96 }
    \n+
    \n+
    97
    \n+
    103 template<class MessageBufferImp, class EntityType, class RISType>
    \n+
    \n+
    104 void gather (MessageBufferImp& buff, const EntityType& e, const RISType & i) const
    \n+
    105 {
    \n+
    106 MessageBufferIF<MessageBufferImp> buffIF(buff);
    \n+
    107 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().gather(buffIF,e,i)));
    \n+
    108 }
    \n+
    \n+
    109
    \n+
    117 template<class MessageBufferImp, class EntityType, class RISType>
    \n+
    \n+
    118 void scatter (MessageBufferImp& buff, const EntityType& e, const RISType & i, size_t n)
    \n+
    119 {
    \n+
    120 MessageBufferIF<MessageBufferImp> buffIF(buff);
    \n+
    121 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().scatter(buffIF,e,i,n)));
    \n+
    122 }
    \n+
    \n+
    123
    \n+
    124 private:
    \n+
    126 DataHandleImp& asImp () {
    \n+
    127 return static_cast<DataHandleImp &> (*this);
    \n+
    128 }
    \n+
    130 const DataHandleImp& asImp () const
    \n+
    131 {
    \n+
    132 return static_cast<const DataHandleImp &>(*this);
    \n+
    133 }
    \n+
    134 }; // end class CommDataHandleIF
    \n+
    \n+
    135
    \n+
    140 template<typename DT>
    \n+
    \n+\n+
    142 public:
    \n+
    143 typedef DT value_type;
    \n+
    144
    \n+
    145 // Constructor
    \n+
    \n+\n+
    147 {
    \n+
    148 a=p;
    \n+
    149 i=0;
    \n+
    150 j=0;
    \n+
    151 }
    \n+
    \n+
    152
    \n+
    153 // write data to message buffer, acts like a stream !
    \n+
    154 template<class Y>
    \n+
    \n+
    155 void write (const Y& data)
    \n+
    156 {
    \n+
    157 static_assert(std::is_same<DT,Y>::value, "DataType mismatch");
    \n+
    158 a[i++] = data;
    \n+
    159 }
    \n+
    \n+
    160
    \n+
    161 // read data from message buffer, acts like a stream !
    \n+
    162 template<class Y>
    \n+
    \n+
    163 void read (Y& data) const
    \n+
    164 {
    \n+
    165 static_assert(std::is_same<DT,Y>::value, "DataType mismatch");
    \n+
    166 data = a[j++];
    \n+
    167 }
    \n+
    \n+
    168
    \n+
    169 size_t counter() const { return i; }
    \n+
    170
    \n+
    \n+
    171 void clear()
    \n+
    172 {
    \n+
    173 i = 0;
    \n+
    174 j = 0;
    \n+
    175 }
    \n+
    \n+
    176
    \n+
    177 // we need access to these variables in an assertion
    \n+
    178#ifdef NDEBUG
    \n+
    179 private:
    \n+
    180#endif
    \n+
    181 DT *a;
    \n+
    182 size_t i;
    \n+
    183 mutable size_t j;
    \n+
    184 };
    \n+
    \n+
    185
    \n+
    192 template<int dir>
    \n+
    \n+\n+
    194 {
    \n+
    195 public:
    \n+
    196 template<class CommInfo>
    \n+
    \n+
    197 static const typename CommInfo::DataType& gather(const CommInfo& commInfo, size_t i, size_t j = 0)
    \n+
    198 {
    \n+
    199 // get Intersection
    \n+
    200 typedef typename CommInfo::GridGlue::Intersection Intersection;
    \n+
    201 Intersection ris(commInfo.gridglue->getIntersection(i));
    \n+
    202
    \n+
    203 // fill buffer if we have a new intersection
    \n+
    204 if (j == 0)
    \n+
    205 {
    \n+
    206 commInfo.mbuffer.clear();
    \n+
    207 if (dir == Dune::ForwardCommunication)
    \n+
    208 {
    \n+
    209 // read from grid0
    \n+
    210 if(ris.self())
    \n+
    211 commInfo.data->gather(commInfo.mbuffer, ris.inside(), ris);
    \n+
    212 }
    \n+
    213 else // (dir == Dune::BackwardCommunication)
    \n+
    214 {
    \n+
    215 // read from grid1
    \n+
    216 if(ris.neighbor())
    \n+
    217 commInfo.data->gather(commInfo.mbuffer, ris.outside(), ris.flip());
    \n+
    218 }
    \n+
    219 }
    \n+
    220
    \n+
    221 // return the j'th value in the buffer
    \n+
    222 assert(j < commInfo.mbuffer.i);
    \n+
    223 return commInfo.buffer[j];
    \n+
    224 }
    \n+
    \n+
    225
    \n+
    226 template<class CommInfo>
    \n+
    \n+
    227 static void scatter(CommInfo& commInfo, const typename CommInfo::DataType& v, std::size_t i, std::size_t j = 0)
    \n+
    228 {
    \n+
    229 // extract GridGlue objects...
    \n+
    230 typedef typename CommInfo::GridGlue::Intersection Intersection;
    \n+
    231 Intersection ris(commInfo.gridglue->getIntersection(i));
    \n+
    232
    \n+
    233 // get size if we have a new intersection
    \n+
    234 if (j == 0)
    \n+
    235 {
    \n+
    236 commInfo.mbuffer.clear();
    \n+
    237 commInfo.currentsize = commInfo.data->size(ris);
    \n+
    238 }
    \n+
    239
    \n+
    240 // write entry to buffer
    \n+
    241 commInfo.buffer[j] = v;
    \n+
    242
    \n+
    243 // write back the buffer if we are at the end of this intersection
    \n+
    244 if (j == commInfo.currentsize-1)
    \n+
    245 {
    \n+
    246 if (dir == Dune::ForwardCommunication)
    \n+
    247 {
    \n+
    248 // write to grid1
    \n+
    249 if(ris.neighbor())
    \n+
    250 commInfo.data->scatter(commInfo.mbuffer, ris.outside(), ris.flip(), commInfo.currentsize);
    \n+
    251 }
    \n+
    252 else // (dir == Dune::BackwardCommunication)
    \n+
    253 {
    \n+
    254 // write to grid0
    \n+
    255 if(ris.self())
    \n+
    256 commInfo.data->scatter(commInfo.mbuffer, ris.inside(), ris, commInfo.currentsize);
    \n+
    257 }
    \n+
    258 assert(commInfo.mbuffer.j <= commInfo.currentsize);
    \n+
    259 }
    \n+
    260 }
    \n+
    \n+
    261 };
    \n+
    \n+
    262
    \n+\n+\n+
    265
    \n+
    270 template <typename GG, class DataHandleImp, class DataTypeImp>
    \n+
    \n+
    271 struct CommInfo
    \n+
    272 {
    \n+
    273 typedef DataTypeImp value_type;
    \n+
    274 typedef GG GridGlue;
    \n+
    275 typedef DataTypeImp DataType;
    \n+
    276
    \n+
    \n+\n+
    278 {}
    \n+
    \n+
    279
    \n+
    280 // tunnel information to the policy and the operators
    \n+\n+\n+
    283
    \n+
    284 // state variables
    \n+
    285 std::vector<DataType> buffer;
    \n+
    286 mutable ::Dune::GridGlue::StreamingMessageBuffer<DataType> mbuffer;
    \n+\n+
    288 Dune::CommunicationDirection dir;
    \n+
    289 };
    \n+
    \n+
    290
    \n+
    291 } // end namespace GridGlue
    \n+
    292
    \n+
    293#if HAVE_MPI
    \n+
    298 template<typename GG, class DataHandleImp, class DataTypeImp>
    \n+
    \n+
    299 struct CommPolicy< ::Dune::GridGlue::CommInfo<GG, DataHandleImp, DataTypeImp> >
    \n+
    300 {
    \n+
    304 typedef ::Dune::GridGlue::CommInfo<GG, DataHandleImp, DataTypeImp> Type;
    \n+
    305
    \n+
    309 typedef DataTypeImp IndexedType;
    \n+
    310
    \n+
    314 // typedef SizeOne IndexedTypeFlag;
    \n+
    315 typedef VariableSize IndexedTypeFlag;
    \n+
    316
    \n+
    \n+
    320 static size_t getSize(const Type& commInfo, size_t i)
    \n+
    321 {
    \n+
    322 // get Intersection
    \n+
    323 typedef typename Type::GridGlue::Intersection Intersection;
    \n+
    324 Intersection ris(commInfo.gridglue->getIntersection(i));
    \n+
    325
    \n+
    326 // ask data handle for size
    \n+
    327 return commInfo.data->size(ris);
    \n+
    328 }
    \n+
    \n+
    329 };
    \n+
    \n+
    330#endif
    \n+
    331
    \n+
    332} // end namespace Dune
    \n+
    333#endif
    \n
    Definition gridglue.hh:37
    \n-
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n-
    sequential adapter to couple two grids at specified close together boundaries
    Definition gridglue.hh:67
    \n-
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n-
    Definition rangegenerators.hh:17
    \n-
    const Reverse< true > reversed
    Definition rangegenerators.hh:31
    \n-
    Reverse type
    Definition rangegenerators.hh:18
    \n-
    constexpr Reverse<!reverse > operator!() const
    Definition rangegenerators.hh:21
    \n+
    CommunicationOperator< Dune::BackwardCommunication > BackwardOperator
    Definition gridgluecommunicate.hh:264
    \n+
    CommunicationOperator< Dune::ForwardCommunication > ForwardOperator
    Definition gridgluecommunicate.hh:263
    \n+
    std::pair< int, int > RankPair
    Definition gridgluecommunicate.hh:24
    \n+
    std::ostream & operator<<(std::ostream &os, const GlobalId &id)
    Definition gridgluecommunicate.hh:55
    \n+
    The intersection of two entities of the two patches of a GridGlue.
    Definition intersection.hh:261
    \n+
    Intersection< P0, P1, O, I > flip() const
    Return a copy of the intersection with inside and outside switched.
    Definition intersection.hh:483
    \n+
    bool self() const
    For parallel computations: Return true if inside() entity exists locally.
    Definition intersection.hh:393
    \n+
    InsideEntity inside(unsigned int parentId=0) const
    Return element on the inside of this intersection.
    Definition intersection.hh:319
    \n+
    size_t neighbor(unsigned int g=0) const
    Return number of embeddings into local grid0 (grid1) entities.
    Definition intersection.hh:399
    \n+
    OutsideEntity outside(unsigned int parentId=0) const
    Return element on the outside of this intersection.
    Definition intersection.hh:328
    \n+
    Definition gridgluecommunicate.hh:26
    \n+
    GlobalId(int i)
    Definition gridgluecommunicate.hh:38
    \n+
    GlobalId()
    Definition gridgluecommunicate.hh:30
    \n+
    GlobalId(int i, int j, unsigned int n)
    Definition gridgluecommunicate.hh:48
    \n+
    describes the features of a data handle for communication in parallel runs using the GridGlue::commun...
    Definition gridgluecommunicate.hh:77
    \n+
    size_t size(RISType &i) const
    Definition gridgluecommunicate.hh:92
    \n+
    void scatter(MessageBufferImp &buff, const EntityType &e, const RISType &i, size_t n)
    Definition gridgluecommunicate.hh:118
    \n+
    void gather(MessageBufferImp &buff, const EntityType &e, const RISType &i) const
    pack data from user to message buffer
    Definition gridgluecommunicate.hh:104
    \n+
    DataTypeImp DataType
    data type of data to communicate
    Definition gridgluecommunicate.hh:80
    \n+
    CommDataHandle()
    Definition gridgluecommunicate.hh:84
    \n+
    Definition gridgluecommunicate.hh:141
    \n+
    size_t j
    Definition gridgluecommunicate.hh:183
    \n+
    StreamingMessageBuffer(DT *p)
    Definition gridgluecommunicate.hh:146
    \n+
    DT * a
    Definition gridgluecommunicate.hh:181
    \n+
    size_t counter() const
    Definition gridgluecommunicate.hh:169
    \n+
    void write(const Y &data)
    Definition gridgluecommunicate.hh:155
    \n+
    void read(Y &data) const
    Definition gridgluecommunicate.hh:163
    \n+
    DT value_type
    Definition gridgluecommunicate.hh:143
    \n+
    size_t i
    Definition gridgluecommunicate.hh:182
    \n+
    void clear()
    Definition gridgluecommunicate.hh:171
    \n+
    forward gather scatter to user defined CommInfo class
    Definition gridgluecommunicate.hh:194
    \n+
    static void scatter(CommInfo &commInfo, const typename CommInfo::DataType &v, std::size_t i, std::size_t j=0)
    Definition gridgluecommunicate.hh:227
    \n+
    static const CommInfo::DataType & gather(const CommInfo &commInfo, size_t i, size_t j=0)
    Definition gridgluecommunicate.hh:197
    \n+
    collects all GridGlue data requried for communication
    Definition gridgluecommunicate.hh:272
    \n+
    Dune::CommunicationDirection dir
    Definition gridgluecommunicate.hh:288
    \n+
    DataTypeImp value_type
    Definition gridgluecommunicate.hh:273
    \n+
    DataTypeImp DataType
    Definition gridgluecommunicate.hh:275
    \n+
    ::Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > * data
    Definition gridgluecommunicate.hh:282
    \n+
    GG GridGlue
    Definition gridgluecommunicate.hh:274
    \n+
    size_t currentsize
    Definition gridgluecommunicate.hh:287
    \n+
    CommInfo()
    Definition gridgluecommunicate.hh:277
    \n+
    mutable ::Dune::GridGlue::StreamingMessageBuffer< DataType > mbuffer
    Definition gridgluecommunicate.hh:286
    \n+
    const GridGlue * gridglue
    Definition gridgluecommunicate.hh:281
    \n+
    std::vector< DataType > buffer
    Definition gridgluecommunicate.hh:285
    \n+
    static size_t getSize(const Type &commInfo, size_t i)
    Get the number of objects at an intersection.
    Definition gridgluecommunicate.hh:320
    \n+
    DataTypeImp IndexedType
    The datatype that should be communicated.
    Definition gridgluecommunicate.hh:309
    \n+
    ::Dune::GridGlue::CommInfo< GG, DataHandleImp, DataTypeImp > Type
    The type of the GridGlueCommInfo.
    Definition gridgluecommunicate.hh:304
    \n+
    VariableSize IndexedTypeFlag
    Each intersection can communicate a different number of objects.
    Definition gridgluecommunicate.hh:315
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,88 +1,442 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-rangegenerators.hh\n+gridgluecommunicate.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n+1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n+2// vi: set et ts=4 sw=2 sts=2:\n+3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n-2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n+4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-3#ifndef DUNE_GRIDGLUE_ADAPTER_RANGEGENERATORS_HH\n-4#define DUNE_GRIDGLUE_ADAPTER_RANGEGENERATORS_HH\n-5\n-6#include \n+5#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH\n+6#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH\n 7\n-8namespace _\bD_\bu_\bn_\be {\n-9namespace GridGlue {\n-10\n-14template\n-_\b1_\b5struct _\bR_\be_\bv_\be_\br_\bs_\be\n-16 : std::integral_constant\n-17{\n-_\b1_\b8 typedef _\bR_\be_\bv_\be_\br_\bs_\be _\bt_\by_\bp_\be;\n+13#include \n+14\n+15#include \n+16#include \n+17#include \n+18#include \n 19\n-20 constexpr\n-_\b2_\b1 _\bR_\be_\bv_\be_\br_\bs_\be_\b<_\b!_\br_\be_\bv_\be_\br_\bs_\be_\b> _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b!() const\n-22 { return {}; }\n-23};\n-24\n-25#ifdef DOXYGEN\n-26\n-_\b3_\b1const _\bR_\be_\bv_\be_\br_\bs_\be_\b<_\bt_\br_\bu_\be_\b> _\br_\be_\bv_\be_\br_\bs_\be_\bd;\n-32\n-66template<...>\n-67IteratorRange<...>\n-_\b6_\b8_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\b._\b._\b._\b>& glue, const _\bR_\be_\bv_\be_\br_\bs_\be_\b<_\b._\b._\b._\b>& reverse =\n-!reversed);\n-69\n-70#else\n-71\n-72namespace {\n-73const _\bR_\be_\bv_\be_\br_\bs_\be_\b<_\bt_\br_\bu_\be_\b> reversed = {};\n-74} /* namespace */\n-75\n-76template\n-77IteratorRange< typename GridGlue::template\n-IntersectionIterator >\n-78_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(const GridGlue& glue, const Reverse& = {})\n-79{\n-80 const static int side = reverse ? 1 : 0;\n-81 return {glue.template ibegin(), glue.template iend()};\n-82}\n-83\n-84#endif // DOXYGEN\n+20\n+21namespace _\bD_\bu_\bn_\be {\n+22 namespace GridGlue {\n+23\n+_\b2_\b4 typedef std::pair _\bR_\ba_\bn_\bk_\bP_\ba_\bi_\br;\n+_\b2_\b5 struct _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd : public std::pair\n+26 {\n+_\b3_\b0 _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd() {\n+31 this->first.first = 0;\n+32 this->first.second = 0;\n+33 this->second = 0;\n+34 }\n+_\b3_\b8 _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd(int i) {\n+39 this->first.first = i;\n+40 this->first.second = i;\n+41 this->second = 0;\n+42 }\n+_\b4_\b8 _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd(int i, int j, unsigned int n) {\n+49 this->first.first = std::min(i,j);\n+50 this->first.second = std::max(i,j);\n+51 this->second = n;\n+52 }\n+53 };\n+54\n+_\b5_\b5 inline std::ostream& _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b<_\b<(std::ostream& os, const _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd & id)\n+56 {\n+57 os << \"(\"\n+58 << id.first.first << \",\" << id.first.second << \",\"\n+59 << id.second << \")\";\n+60 return os;\n+61 }\n+62\n+75 template \n+_\b7_\b6 class _\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be\n+77 {\n+78 public:\n+_\b8_\b0 typedef DataTypeImp _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be;\n+81\n+82 protected:\n+83 // one should not create an explicit instance of this inteface object\n+_\b8_\b4 _\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be() {}\n 85\n-86} /* namespace GridGlue */\n-87} /* namespace Dune */\n-88\n-89#endif\n+86 public:\n+87\n+91 template\n+_\b9_\b2 size_t _\bs_\bi_\bz_\be (RISType& i) const\n+93 {\n+94 CHECK_INTERFACE_IMPLEMENTATION((asImp()._\bs_\bi_\bz_\be(i)));\n+95 return asImp().size(i);\n+96 }\n+97\n+103 template\n+_\b1_\b0_\b4 void _\bg_\ba_\bt_\bh_\be_\br (MessageBufferImp& buff, const EntityType& e, const RISType &\n+i) const\n+105 {\n+106 MessageBufferIF buffIF(buff);\n+107 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._\bg_\ba_\bt_\bh_\be_\br(buffIF,e,i)));\n+108 }\n+109\n+117 template\n+_\b1_\b1_\b8 void _\bs_\bc_\ba_\bt_\bt_\be_\br (MessageBufferImp& buff, const EntityType& e, const RISType &\n+i, size_t n)\n+119 {\n+120 MessageBufferIF buffIF(buff);\n+121 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._\bs_\bc_\ba_\bt_\bt_\be_\br(buffIF,e,i,n)));\n+122 }\n+123\n+124 private:\n+126 DataHandleImp& asImp () {\n+127 return static_cast (*this);\n+128 }\n+130 const DataHandleImp& asImp () const\n+131 {\n+132 return static_cast(*this);\n+133 }\n+134 }; // end class CommDataHandleIF\n+135\n+140 template\n+_\b1_\b4_\b1 class _\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br {\n+142 public:\n+_\b1_\b4_\b3 typedef DT _\bv_\ba_\bl_\bu_\be_\b__\bt_\by_\bp_\be;\n+144\n+145 // Constructor\n+_\b1_\b4_\b6 _\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br (DT *p)\n+147 {\n+148 _\ba=p;\n+149 _\bi=0;\n+150 _\bj=0;\n+151 }\n+152\n+153 // write data to message buffer, acts like a stream !\n+154 template\n+_\b1_\b5_\b5 void _\bw_\br_\bi_\bt_\be (const Y& data)\n+156 {\n+157 static_assert(std::is_same::value, \"DataType mismatch\");\n+158 _\ba[_\bi++] = data;\n+159 }\n+160\n+161 // read data from message buffer, acts like a stream !\n+162 template\n+_\b1_\b6_\b3 void _\br_\be_\ba_\bd (Y& data) const\n+164 {\n+165 static_assert(std::is_same::value, \"DataType mismatch\");\n+166 data = _\ba[_\bj++];\n+167 }\n+168\n+_\b1_\b6_\b9 size_t _\bc_\bo_\bu_\bn_\bt_\be_\br() const { return _\bi; }\n+170\n+_\b1_\b7_\b1 void _\bc_\bl_\be_\ba_\br()\n+172 {\n+173 _\bi = 0;\n+174 _\bj = 0;\n+175 }\n+176\n+177 // we need access to these variables in an assertion\n+178#ifdef NDEBUG\n+179 private:\n+180#endif\n+_\b1_\b8_\b1 DT *_\ba;\n+_\b1_\b8_\b2 size_t _\bi;\n+_\b1_\b8_\b3 mutable size_t _\bj;\n+184 };\n+185\n+192 template\n+_\b1_\b9_\b3 class _\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n+194 {\n+195 public:\n+196 template\n+_\b1_\b9_\b7 static const typename _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be& _\bg_\ba_\bt_\bh_\be_\br(const _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo& commInfo,\n+size_t i, size_t j = 0)\n+198 {\n+199 // get Intersection\n+200 typedef typename CommInfo::GridGlue::Intersection _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n+201 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn ris(commInfo._\bg_\br_\bi_\bd_\bg_\bl_\bu_\be->getIntersection(i));\n+202\n+203 // fill buffer if we have a new intersection\n+204 if (j == 0)\n+205 {\n+206 commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br._\bc_\bl_\be_\ba_\br();\n+207 if (dir == Dune::ForwardCommunication)\n+208 {\n+209 // read from grid0\n+210 if(ris._\bs_\be_\bl_\bf())\n+211 commInfo._\bd_\ba_\bt_\ba->gather(commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br, ris._\bi_\bn_\bs_\bi_\bd_\be(), ris);\n+212 }\n+213 else // (dir == Dune::BackwardCommunication)\n+214 {\n+215 // read from grid1\n+216 if(ris._\bn_\be_\bi_\bg_\bh_\bb_\bo_\br())\n+217 commInfo._\bd_\ba_\bt_\ba->gather(commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br, ris._\bo_\bu_\bt_\bs_\bi_\bd_\be(), ris._\bf_\bl_\bi_\bp());\n+218 }\n+219 }\n+220\n+221 // return the j'th value in the buffer\n+222 assert(j < commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br._\bi);\n+223 return commInfo._\bb_\bu_\bf_\bf_\be_\br[j];\n+224 }\n+225\n+226 template\n+_\b2_\b2_\b7 static void _\bs_\bc_\ba_\bt_\bt_\be_\br(_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo& commInfo, const typename _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be&\n+v, std::size_t i, std::size_t j = 0)\n+228 {\n+229 // extract GridGlue objects...\n+230 typedef typename CommInfo::GridGlue::Intersection _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n+231 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn ris(commInfo._\bg_\br_\bi_\bd_\bg_\bl_\bu_\be->getIntersection(i));\n+232\n+233 // get size if we have a new intersection\n+234 if (j == 0)\n+235 {\n+236 commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br._\bc_\bl_\be_\ba_\br();\n+237 commInfo._\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be = commInfo._\bd_\ba_\bt_\ba->size(ris);\n+238 }\n+239\n+240 // write entry to buffer\n+241 commInfo._\bb_\bu_\bf_\bf_\be_\br[j] = v;\n+242\n+243 // write back the buffer if we are at the end of this intersection\n+244 if (j == commInfo._\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be-1)\n+245 {\n+246 if (dir == Dune::ForwardCommunication)\n+247 {\n+248 // write to grid1\n+249 if(ris._\bn_\be_\bi_\bg_\bh_\bb_\bo_\br())\n+250 commInfo._\bd_\ba_\bt_\ba->scatter(commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br, ris._\bo_\bu_\bt_\bs_\bi_\bd_\be(), ris._\bf_\bl_\bi_\bp(),\n+commInfo._\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be);\n+251 }\n+252 else // (dir == Dune::BackwardCommunication)\n+253 {\n+254 // write to grid0\n+255 if(ris._\bs_\be_\bl_\bf())\n+256 commInfo._\bd_\ba_\bt_\ba->scatter(commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br, ris._\bi_\bn_\bs_\bi_\bd_\be(), ris,\n+commInfo._\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be);\n+257 }\n+258 assert(commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br._\bj <= commInfo._\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be);\n+259 }\n+260 }\n+261 };\n+262\n+_\b2_\b6_\b3 typedef _\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br_\b<_\bD_\bu_\bn_\be_\b:_\b:_\bF_\bo_\br_\bw_\ba_\br_\bd_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\b> _\bF_\bo_\br_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br;\n+_\b2_\b6_\b4 typedef _\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br_\b<_\bD_\bu_\bn_\be_\b:_\b:_\bB_\ba_\bc_\bk_\bw_\ba_\br_\bd_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\b>\n+_\bB_\ba_\bc_\bk_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br;\n+265\n+270 template \n+_\b2_\b7_\b1 struct _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo\n+272 {\n+_\b2_\b7_\b3 typedef DataTypeImp _\bv_\ba_\bl_\bu_\be_\b__\bt_\by_\bp_\be;\n+_\b2_\b7_\b4 typedef GG _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be;\n+_\b2_\b7_\b5 typedef DataTypeImp _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be;\n+276\n+_\b2_\b7_\b7 _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo() : _\bb_\bu_\bf_\bf_\be_\br(100), _\bm_\bb_\bu_\bf_\bf_\be_\br(&_\bb_\bu_\bf_\bf_\be_\br[0])\n+278 {}\n+279\n+280 // tunnel information to the policy and the operators\n+_\b2_\b8_\b1 const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be * _\bg_\br_\bi_\bd_\bg_\bl_\bu_\be;\n+_\b2_\b8_\b2 _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b<_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b> * _\bd_\ba_\bt_\ba;\n+283\n+284 // state variables\n+_\b2_\b8_\b5 std::vector _\bb_\bu_\bf_\bf_\be_\br;\n+_\b2_\b8_\b6 mutable ::Dune::GridGlue::StreamingMessageBuffer _\bm_\bb_\bu_\bf_\bf_\be_\br;\n+_\b2_\b8_\b7 size_t _\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be;\n+_\b2_\b8_\b8 Dune::CommunicationDirection _\bd_\bi_\br;\n+289 };\n+290\n+291 } // end namespace GridGlue\n+292\n+293#if HAVE_MPI\n+298 template\n+_\b2_\b9_\b9 struct CommPolicy< ::_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo >\n+300 {\n+_\b3_\b0_\b4 typedef ::Dune::GridGlue::CommInfo _\bT_\by_\bp_\be;\n+305\n+_\b3_\b0_\b9 typedef DataTypeImp _\bI_\bn_\bd_\be_\bx_\be_\bd_\bT_\by_\bp_\be;\n+310\n+314 // typedef SizeOne IndexedTypeFlag;\n+_\b3_\b1_\b5 typedef VariableSize _\bI_\bn_\bd_\be_\bx_\be_\bd_\bT_\by_\bp_\be_\bF_\bl_\ba_\bg;\n+316\n+_\b3_\b2_\b0 static size_t _\bg_\be_\bt_\bS_\bi_\bz_\be(const _\bT_\by_\bp_\be& commInfo, size_t i)\n+321 {\n+322 // get Intersection\n+323 typedef typename Type::GridGlue::Intersection Intersection;\n+324 Intersection ris(commInfo._\bg_\br_\bi_\bd_\bg_\bl_\bu_\be->getIntersection(i));\n+325\n+326 // ask data handle for size\n+327 return commInfo._\bd_\ba_\bt_\ba->size(ris);\n+328 }\n+329 };\n+330#endif\n+331\n+332} // end namespace Dune\n+333#endif\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n-> &reverse=!reversed)\n-Iterate over all intersections of a GridGlue.\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n-sequential adapter to couple two grids at specified close together boundaries\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:67\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n-> &reverse=!reversed)\n-Iterate over all intersections of a GridGlue.\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\be_\bv_\be_\br_\bs_\be\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn rangegenerators.hh:17\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\be_\bv_\be_\br_\bs_\be_\b:_\b:_\br_\be_\bv_\be_\br_\bs_\be_\bd\n-const Reverse< true > reversed\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn rangegenerators.hh:31\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\be_\bv_\be_\br_\bs_\be_\b:_\b:_\bt_\by_\bp_\be\n-Reverse type\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn rangegenerators.hh:18\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\be_\bv_\be_\br_\bs_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b!\n-constexpr Reverse operator!() const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn rangegenerators.hh:21\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bB_\ba_\bc_\bk_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n+CommunicationOperator< Dune::BackwardCommunication > BackwardOperator\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:264\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bF_\bo_\br_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n+CommunicationOperator< Dune::ForwardCommunication > ForwardOperator\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:263\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\ba_\bn_\bk_\bP_\ba_\bi_\br\n+std::pair< int, int > RankPair\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:24\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b<_\b<\n+std::ostream & operator<<(std::ostream &os, const GlobalId &id)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:55\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+The intersection of two entities of the two patches of a GridGlue.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:261\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bf_\bl_\bi_\bp\n+Intersection< P0, P1, O, I > flip() const\n+Return a copy of the intersection with inside and outside switched.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:483\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bs_\be_\bl_\bf\n+bool self() const\n+For parallel computations: Return true if inside() entity exists locally.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:393\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bs_\bi_\bd_\be\n+InsideEntity inside(unsigned int parentId=0) const\n+Return element on the inside of this intersection.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:319\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bn_\be_\bi_\bg_\bh_\bb_\bo_\br\n+size_t neighbor(unsigned int g=0) const\n+Return number of embeddings into local grid0 (grid1) entities.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:399\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bo_\bu_\bt_\bs_\bi_\bd_\be\n+OutsideEntity outside(unsigned int parentId=0) const\n+Return element on the outside of this intersection.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:328\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:26\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n+GlobalId(int i)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:38\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n+GlobalId()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:30\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n+GlobalId(int i, int j, unsigned int n)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:48\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be\n+describes the features of a data handle for communication in parallel runs\n+using the GridGlue::commun...\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:77\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bs_\bi_\bz_\be\n+size_t size(RISType &i) const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:92\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bs_\bc_\ba_\bt_\bt_\be_\br\n+void scatter(MessageBufferImp &buff, const EntityType &e, const RISType &i,\n+size_t n)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:118\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bg_\ba_\bt_\bh_\be_\br\n+void gather(MessageBufferImp &buff, const EntityType &e, const RISType &i)\n+const\n+pack data from user to message buffer\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:104\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be\n+DataTypeImp DataType\n+data type of data to communicate\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:80\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be\n+CommDataHandle()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:84\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:141\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bj\n+size_t j\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:183\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br\n+StreamingMessageBuffer(DT *p)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:146\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\ba\n+DT * a\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:181\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bc_\bo_\bu_\bn_\bt_\be_\br\n+size_t counter() const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:169\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be\n+void write(const Y &data)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:155\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\br_\be_\ba_\bd\n+void read(Y &data) const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:163\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bv_\ba_\bl_\bu_\be_\b__\bt_\by_\bp_\be\n+DT value_type\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:143\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bi\n+size_t i\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:182\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bc_\bl_\be_\ba_\br\n+void clear()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:171\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n+forward gather scatter to user defined CommInfo class\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:194\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bs_\bc_\ba_\bt_\bt_\be_\br\n+static void scatter(CommInfo &commInfo, const typename CommInfo::DataType &v,\n+std::size_t i, std::size_t j=0)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:227\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bg_\ba_\bt_\bh_\be_\br\n+static const CommInfo::DataType & gather(const CommInfo &commInfo, size_t i,\n+size_t j=0)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:197\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo\n+collects all GridGlue data requried for communication\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:272\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bd_\bi_\br\n+Dune::CommunicationDirection dir\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:288\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bv_\ba_\bl_\bu_\be_\b__\bt_\by_\bp_\be\n+DataTypeImp value_type\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:273\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be\n+DataTypeImp DataType\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:275\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bd_\ba_\bt_\ba\n+::Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > * data\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:282\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n+GG GridGlue\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:274\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be\n+size_t currentsize\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:287\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo\n+CommInfo()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:277\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bm_\bb_\bu_\bf_\bf_\be_\br\n+mutable ::Dune::GridGlue::StreamingMessageBuffer< DataType > mbuffer\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:286\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be\n+const GridGlue * gridglue\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:281\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bb_\bu_\bf_\bf_\be_\br\n+std::vector< DataType > buffer\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:285\n+_\bD_\bu_\bn_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bP_\bo_\bl_\bi_\bc_\by_\b<_\b _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\b _\bG_\bG_\b,_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>\n+_\b>_\b:_\b:_\bg_\be_\bt_\bS_\bi_\bz_\be\n+static size_t getSize(const Type &commInfo, size_t i)\n+Get the number of objects at an intersection.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:320\n+_\bD_\bu_\bn_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bP_\bo_\bl_\bi_\bc_\by_\b<_\b _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\b _\bG_\bG_\b,_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>\n+_\b>_\b:_\b:_\bI_\bn_\bd_\be_\bx_\be_\bd_\bT_\by_\bp_\be\n+DataTypeImp IndexedType\n+The datatype that should be communicated.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:309\n+_\bD_\bu_\bn_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bP_\bo_\bl_\bi_\bc_\by_\b<_\b _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\b _\bG_\bG_\b,_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>\n+_\b>_\b:_\b:_\bT_\by_\bp_\be\n+::Dune::GridGlue::CommInfo< GG, DataHandleImp, DataTypeImp > Type\n+The type of the GridGlueCommInfo.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:304\n+_\bD_\bu_\bn_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bP_\bo_\bl_\bi_\bc_\by_\b<_\b _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\b _\bG_\bG_\b,_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>\n+_\b>_\b:_\b:_\bI_\bn_\bd_\be_\bx_\be_\bd_\bT_\by_\bp_\be_\bF_\bl_\ba_\bg\n+VariableSize IndexedTypeFlag\n+Each intersection can communicate a different number of objects.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:315\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00017.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00017.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: intersection.hh File Reference\n+dune-grid-glue: intersectioniterator.hh File Reference\n \n \n \n \n \n \n \n@@ -71,74 +71,40 @@\n \n
    \n \n
    \n \n-
    intersection.hh File Reference
    \n+Namespaces
    \n+
    intersectioniterator.hh File Reference
    \n \n
    \n \n-

    Model of the Intersection concept provided by GridGlue. \n+

    Implement iterators over GridGlue intersections. \n More...

    \n-
    #include <algorithm>
    \n-#include <optional>
    \n-#include <tuple>
    \n-#include <dune/common/deprecated.hh>
    \n-#include <dune/common/version.hh>
    \n-#include <dune/geometry/affinegeometry.hh>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/grid-glue/gridglue.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::GridGlue::IntersectionData< P0, P1 >
     storage class for Dune::GridGlue::Intersection related data More...
     
    struct  Dune::GridGlue::IntersectionTraits< P0, P1, inside, outside >
     
    class  Dune::GridGlue::Intersection< P0, P1, I, O >
     The intersection of two entities of the two patches of a GridGlue. More...
    class  Dune::GridGlue::IntersectionIterator< P0, P1, inside, outside >
     
    \n \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n-\n-\n-\n

    \n-Macros

    #define ONLY_SIMPLEX_INTERSECTIONS
     
    \n

    Detailed Description

    \n-

    Model of the Intersection concept provided by GridGlue.

    \n+

    Implement iterators over GridGlue intersections.

    \n
    Author
    Christian Engwer
    \n-

    Macro Definition Documentation

    \n-\n-

    ◆ ONLY_SIMPLEX_INTERSECTIONS

    \n-\n-
    \n-
    \n- \n- \n- \n- \n-
    #define ONLY_SIMPLEX_INTERSECTIONS
    \n-
    \n-\n-
    \n-
    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,46 +1,26 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs\n-intersection.hh File Reference\n-Model of the Intersection concept provided by GridGlue. _\bM_\bo_\br_\be_\b._\b._\b.\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n+intersectioniterator.hh File Reference\n+Implement iterators over GridGlue intersections. _\bM_\bo_\br_\be_\b._\b._\b.\n #include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n- class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b _\b>\n-\u00a0 storage class for _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn related data _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b,_\b _\bi_\bn_\bs_\bi_\bd_\be_\b,_\b _\bo_\bu_\bt_\bs_\bi_\bd_\be_\b _\b>\n-\u00a0\n- class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b,_\b _\bI_\b,_\b _\bO_\b _\b>\n-\u00a0 The intersection of two entities of the two patches of a _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be.\n- _\bM_\bo_\br_\be_\b._\b._\b.\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b,_\b _\bi_\bn_\bs_\bi_\bd_\be_\b,_\b _\bo_\bu_\bt_\bs_\bi_\bd_\be_\b _\b>\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n-M\bMa\bac\bcr\bro\bos\bs\n-#define\u00a0 _\bO_\bN_\bL_\bY_\b__\bS_\bI_\bM_\bP_\bL_\bE_\bX_\b__\bI_\bN_\bT_\bE_\bR_\bS_\bE_\bC_\bT_\bI_\bO_\bN_\bS\n-\u00a0\n *\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-Model of the Intersection concept provided by GridGlue.\n+Implement iterators over GridGlue intersections.\n Author\n Christian Engwer\n-*\b**\b**\b**\b**\b* M\bMa\bac\bcr\bro\bo D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn D\bDo\boc\bcu\bum\bme\ben\bnt\bta\bat\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0O\bON\bNL\bLY\bY_\b_S\bSI\bIM\bMP\bPL\bLE\bEX\bX_\b_I\bIN\bNT\bTE\bER\bRS\bSE\bEC\bCT\bTI\bIO\bON\bNS\bS *\b**\b**\b**\b**\b*\n-#define ONLY_SIMPLEX_INTERSECTIONS\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00017_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00017_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: intersection.hh Source File\n+dune-grid-glue: intersectioniterator.hh Source File\n \n \n \n \n \n \n \n@@ -74,578 +74,95 @@\n \n \n \n
    \n-
    intersection.hh
    \n+
    intersectioniterator.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    11#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH
    \n-
    12#define DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH
    \n-
    13
    \n-
    14#include <algorithm>
    \n-
    15#include <optional>
    \n-
    16#include <tuple>
    \n-
    17
    \n-
    18#include <dune/common/deprecated.hh>
    \n-
    19#include <dune/common/version.hh>
    \n-
    20#include <dune/geometry/affinegeometry.hh>
    \n-
    21#include <dune/geometry/referenceelements.hh>
    \n-\n-
    23
    \n-
    24#define ONLY_SIMPLEX_INTERSECTIONS
    \n-
    25
    \n-
    26namespace Dune {
    \n-
    27 namespace GridGlue {
    \n-
    28
    \n-
    29 // forward declaration
    \n-
    30 template<typename P0, typename P1>
    \n-
    31 class IntersectionIndexSet;
    \n-
    32
    \n-
    36 template<typename P0, typename P1>
    \n-
    \n-\n-
    38 {
    \n-
    39 public:
    \n-
    40 typedef ::Dune::GridGlue::GridGlue<P0, P1> GridGlue;
    \n-
    41
    \n-\n+
    12#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH
    \n+
    13#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH
    \n+
    14
    \n+\n+
    16
    \n+
    17namespace Dune {
    \n+
    18 namespace GridGlue {
    \n+
    19
    \n+
    21 template<typename P0, typename P1, int inside, int outside>
    \n+
    \n+\n+
    23 public Dune::ForwardIteratorFacade< IntersectionIterator<P0,P1,inside,outside>,
    \n+
    24 const Intersection<P0,P1,inside,outside> >
    \n+
    25 {
    \n+
    26 public:
    \n+
    27
    \n+
    28 typedef ::Dune::GridGlue::GridGlue<P0, P1> GridGlue;
    \n+
    29 typedef ::Dune::GridGlue::Intersection<P0,P1,inside,outside> Intersection;
    \n+
    30
    \n+
    \n+
    31 IntersectionIterator(const GridGlue * glue, unsigned int i)
    \n+
    32 : glue_(glue),
    \n+
    33 index_(i),
    \n+
    34 intersection_(glue_, & glue_->intersections_[index_])
    \n+
    35 {}
    \n+
    \n+
    36
    \n+
    \n+\n+
    38 {
    \n+
    39 assert(("never dereference the end iterator" &&
    \n+
    40 index_ != glue_->index__sz));
    \n+
    41 return intersection_;
    \n+
    42 }
    \n+
    \n
    43
    \n-
    45 static constexpr int coorddim = GridGlue::dimworld;
    \n-
    46
    \n-
    47 private:
    \n-
    48 // intermediate quantities
    \n-
    49 template<int side>
    \n-
    50 static constexpr int dim() { return GridGlue::template GridView<side>::Grid::dimension - GridGlue::template GridPatch<side>::codim; }
    \n-
    51
    \n-
    52 public:
    \n-
    54 static constexpr int mydim = dim<0>() < dim<1>() ? dim<0>() : dim<1>();
    \n+
    \n+
    44 void increment()
    \n+
    45 {
    \n+
    46 intersection_ = Intersection(glue_, & glue_->intersections_[++index_]);
    \n+
    47 }
    \n+
    \n+
    48
    \n+
    \n+
    49 bool equals(const IntersectionIterator& iter) const
    \n+
    50 {
    \n+
    51 return iter.index_ == index_;
    \n+
    52 }
    \n+
    \n+
    53
    \n+
    54 private:
    \n
    55
    \n-
    56 template<int side>
    \n-
    57 using GridLocalGeometry = AffineGeometry<
    \n-
    58 typename GridGlue::template GridView<side>::ctype, mydim, GridGlue::template GridView<side>::dimension>;
    \n-
    59
    \n-
    60 using Grid0LocalGeometry [[deprecated("please use GridLocalGeometry<0> instead")]] = GridLocalGeometry<0>;
    \n-
    61 using Grid1LocalGeometry [[deprecated("please use GridLocalGeometry<1> instead")]] = GridLocalGeometry<1>;
    \n-
    62
    \n-
    63 template<int side>
    \n-
    64 using GridGeometry = AffineGeometry<
    \n-
    65 typename GridGlue::template GridView<side>::ctype, mydim, GridGlue::template GridView<side>::dimensionworld>;
    \n-
    66
    \n-
    67 using Grid0Geometry [[deprecated("please use GridGeometry<0> instead")]] = GridGeometry<0>;
    \n-
    68 using Grid1Geometry [[deprecated("please use GridGeometry<1> instead")]] = GridGeometry<1>;
    \n-
    69
    \n-
    70 template<int side>
    \n-
    71 using GridIndexType = typename GridGlue::template GridView<side>::IndexSet::IndexType;
    \n-
    72
    \n-
    73 using Grid0IndexType [[deprecated("please use GridIndexType<0> instead")]] = GridIndexType<0>;
    \n-
    74 using Grid1IndexType [[deprecated("please use GridIndexType<1> instead")]] = GridIndexType<1>;
    \n-
    75
    \n-
    77 IntersectionData(const GridGlue& glue, unsigned int mergeindex, unsigned int offset, bool grid0local, bool grid1local);
    \n-
    78
    \n-
    80 IntersectionData() = default;
    \n-
    81
    \n-
    82 /* Accessor Functions */
    \n-
    83
    \n-
    84 template<int side>
    \n-
    \n-
    85 const GridLocalGeometry<side>& localGeometry(unsigned int parentId = 0) const
    \n-
    86 { return *std::get<side>(sideData_).gridlocalgeom[parentId]; }
    \n-
    \n-
    87
    \n-
    88 template<int side>
    \n-
    \n-\n-
    90 { return *std::get<side>(sideData_).gridgeom; }
    \n-
    \n-
    91
    \n-
    92 template<int side>
    \n-
    \n-
    93 bool local() const
    \n-
    94 { return std::get<side>(sideData_).gridlocal; }
    \n-
    \n-
    95
    \n-
    96 template<int side>
    \n-
    \n-
    97 IndexType index(unsigned int parentId = 0) const
    \n-
    98 { return std::get<side>(sideData_).gridindices[parentId]; }
    \n-
    \n-
    99
    \n-
    100 template<int side>
    \n-
    \n-\n-
    102 { return std::get<side>(sideData_).gridindices.size(); }
    \n-
    \n-
    103
    \n-
    104 private:
    \n-
    105 template<int side>
    \n-
    106 void initializeGeometry(const GridGlue& glue, unsigned mergeindex);
    \n-
    107
    \n-
    108 /* M E M B E R V A R I A B L E S */
    \n-
    109
    \n-
    110 public:
    \n-\n-
    113
    \n-
    114 private:
    \n-
    115 template<int side>
    \n-
    116 struct SideData {
    \n-
    118 bool gridlocal = false;
    \n-
    119
    \n-
    121 std::vector< GridIndexType<side> > gridindices;
    \n-
    122
    \n-
    124 std::vector< std::optional< GridLocalGeometry<side> > > gridlocalgeom;
    \n-
    125
    \n-
    133 std::optional< GridGeometry<side> > gridgeom;
    \n-
    134 };
    \n-
    135
    \n-
    136 std::tuple< SideData<0>, SideData<1> > sideData_;
    \n-
    137 };
    \n-
    \n-
    138
    \n-
    139 template<typename P0, typename P1>
    \n-
    140 template<int side>
    \n-
    141 void IntersectionData<P0, P1>::initializeGeometry(const GridGlue& glue, unsigned mergeindex)
    \n-
    142 {
    \n-
    143 auto& data = std::get<side>(sideData_);
    \n-
    144
    \n-
    145 const unsigned n_parents = glue.merger_->template parents<side>(mergeindex);
    \n-
    146
    \n-
    147 // init containers
    \n-
    148 data.gridindices.resize(n_parents);
    \n-
    149 data.gridlocalgeom.resize(n_parents);
    \n-
    150
    \n-
    151 // default values
    \n-
    152 data.gridindices[0] = 0;
    \n-
    153
    \n-
    154 static constexpr int nSimplexCorners = mydim + 1;
    \n-
    155 using ctype = typename GridGlue::ctype;
    \n-
    156
    \n-
    157 // initialize the local and the global geometries of grid `side`
    \n-
    158
    \n-
    159 // compute the coordinates of the subface's corners in codim 0 entity local coordinates
    \n-
    160 static constexpr int elementdim = GridGlue::template GridView<side>::template Codim<0>::Geometry::mydimension;
    \n-
    161
    \n-
    162 // coordinates within the subentity that contains the remote intersection
    \n-
    163 std::array<Dune::FieldVector< ctype, dim<side>() >, nSimplexCorners> corners_subEntity_local;
    \n-
    164
    \n-
    165 for (unsigned int par = 0; par < n_parents; ++par) {
    \n-
    166 for (int i = 0; i < nSimplexCorners; ++i)
    \n-
    167 corners_subEntity_local[i] = glue.merger_->template parentLocal<side>(mergeindex, i, par);
    \n-
    168
    \n-
    169 // Coordinates of the remote intersection corners wrt the element coordinate system
    \n-
    170 std::array<Dune::FieldVector<ctype, elementdim>, nSimplexCorners> corners_element_local;
    \n-
    171
    \n-
    172 if (data.gridlocal) {
    \n-
    173 data.gridindices[par] = glue.merger_->template parent<side>(mergeindex,par);
    \n-
    174
    \n-
    175 typename GridGlue::template GridPatch<side>::LocalGeometry
    \n-
    176 gridLocalGeometry = glue.template patch<side>().geometryLocal(data.gridindices[par]);
    \n-
    177 for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
    \n-
    178 corners_element_local[i] = gridLocalGeometry.global(corners_subEntity_local[i]);
    \n-
    179 }
    \n-
    180
    \n-
    181 // set the corners of the local geometry
    \n-
    182#ifdef ONLY_SIMPLEX_INTERSECTIONS
    \n-
    183# if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
    \n-
    184 const Dune::GeometryType type = Dune::GeometryTypes::simplex(mydim);
    \n-
    185# else
    \n-
    186 const Dune::GeometryType type(Dune::GeometryType::simplex, mydim);
    \n-
    187# endif
    \n-
    188#else
    \n-
    189#error Not Implemented
    \n-
    190#endif
    \n-
    191 data.gridlocalgeom[par].emplace(type, corners_element_local);
    \n-
    192
    \n-
    193 // Add world geometry only for 0th parent
    \n-
    194 if (par == 0) {
    \n-
    195 typename GridGlue::template GridPatch<side>::Geometry
    \n-
    196 gridWorldGeometry = glue.template patch<side>().geometry(data.gridindices[par]);
    \n-
    197
    \n-
    198 // world coordinates of the remote intersection corners
    \n-
    199 std::array<Dune::FieldVector<ctype, GridGlue::template GridView<side>::dimensionworld>, nSimplexCorners> corners_global;
    \n-
    200
    \n-
    201 for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
    \n-
    202 corners_global[i] = gridWorldGeometry.global(corners_subEntity_local[i]);
    \n-
    203 }
    \n-
    204
    \n-
    205 data.gridgeom.emplace(type, corners_global);
    \n-
    206 }
    \n-
    207 }
    \n-
    208 }
    \n-
    209 }
    \n-
    210
    \n-
    212 template<typename P0, typename P1>
    \n-
    \n-
    213 IntersectionData<P0, P1>::IntersectionData(const GridGlue& glue, unsigned int mergeindex, unsigned int offset,
    \n-
    214 bool grid0local, bool grid1local)
    \n-
    215 : index_(mergeindex+offset)
    \n-
    216 {
    \n-
    217 // if an invalid index is given do not proceed!
    \n-
    218 // (happens when the parent GridGlue initializes the "end"-Intersection)
    \n-
    219 assert (0 <= mergeindex || mergeindex < glue.index__sz);
    \n-
    220
    \n-
    221 std::get<0>(sideData_).gridlocal = grid0local;
    \n-
    222 std::get<1>(sideData_).gridlocal = grid1local;
    \n-
    223
    \n-
    224 initializeGeometry<0>(glue, mergeindex);
    \n-
    225 initializeGeometry<1>(glue, mergeindex);
    \n-
    226 }
    \n-
    \n-
    227
    \n-
    232 template<typename P0, typename P1, int inside, int outside>
    \n-
    \n-\n-
    234 {
    \n-\n-\n-
    237
    \n-
    238 using InsideGridView = typename GridGlue::template GridView<inside>;
    \n-
    239 using OutsideGridView = typename GridGlue::template GridView<outside>;
    \n-
    240
    \n-
    241 using InsideLocalGeometry = typename IntersectionData::template GridLocalGeometry<inside>;
    \n-
    242 using OutsideLocalGeometry = typename IntersectionData::template GridLocalGeometry<outside>;
    \n-
    243
    \n-
    244 using Geometry = typename IntersectionData::template GridGeometry<inside>;
    \n-
    245 using OutsideGeometry = typename IntersectionData::template GridGeometry<outside>;
    \n-
    246
    \n-
    247 static constexpr auto coorddim = IntersectionData::coorddim;
    \n-
    248 static constexpr auto mydim = IntersectionData::mydim;
    \n-
    249 static constexpr int insidePatch = inside;
    \n-
    250 static constexpr int outsidePatch = outside;
    \n-
    251
    \n-
    252 using ctype = typename GridGlue::ctype;
    \n-
    253 using LocalCoordinate = Dune::FieldVector<ctype, mydim>;
    \n-
    254 using GlobalCoordinate = Dune::FieldVector<ctype, coorddim>;
    \n-
    255 };
    \n-
    \n-
    256
    \n-
    259 template<typename P0, typename P1, int I, int O>
    \n-
    \n-\n-
    261 {
    \n-
    262
    \n-
    263 public:
    \n-
    264
    \n-\n-
    266
    \n-
    267 typedef typename Traits::GridGlue GridGlue;
    \n-\n-
    269
    \n-
    270
    \n-\n-\n-
    273
    \n-\n-\n-\n-
    277
    \n-
    278 typedef typename Traits::Geometry Geometry;
    \n-
    279 typedef typename Traits::ctype ctype;
    \n-
    280
    \n-
    281 typedef typename InsideGridView::Traits::template Codim<0>::Entity InsideEntity;
    \n-
    282 typedef typename OutsideGridView::Traits::template Codim<0>::Entity OutsideEntity;
    \n-
    283
    \n-\n-\n-
    286
    \n-
    288 static constexpr auto coorddim = Traits::coorddim;
    \n-
    289
    \n-
    291 static constexpr auto mydim = Traits::mydim;
    \n-
    292
    \n-
    294 static constexpr int insidePatch = Traits::insidePatch;
    \n-
    295
    \n-
    297 static constexpr int outsidePatch = Traits::outsidePatch;
    \n-
    298
    \n-
    299 // typedef unsigned int IndexType;
    \n-
    300
    \n-
    301 private:
    \n-
    305 static constexpr int codimensionWorld = coorddim - mydim;
    \n-
    306
    \n-
    307 public:
    \n-
    308 /* C O N S T R U C T O R S */
    \n-
    309
    \n-
    \n-
    311 Intersection(const GridGlue* glue, const IntersectionData* i) :
    \n-
    312 glue_(glue), i_(i) {}
    \n-
    \n-
    313
    \n-
    314 /* F U N C T I O N A L I T Y */
    \n-
    315
    \n-\n-
    \n-
    319 inside(unsigned int parentId = 0) const
    \n-
    320 {
    \n-
    321 assert(self());
    \n-
    322 return glue_->template patch<I>().element(i_->template index<I>(parentId));
    \n-
    323 }
    \n-
    \n-
    324
    \n-\n-
    \n-
    328 outside(unsigned int parentId = 0) const
    \n-
    329 {
    \n-
    330 assert(neighbor());
    \n-
    331 return glue_->template patch<O>().element(i_->template index<O>(parentId));
    \n-
    332 }
    \n-
    \n-
    333
    \n-
    \n-
    335 bool conforming() const
    \n-
    336 {
    \n-
    337 throw Dune::NotImplemented();
    \n-
    338 }
    \n-
    \n-
    339
    \n-
    \n-
    342 const InsideLocalGeometry& geometryInInside(unsigned int parentId = 0) const
    \n-
    343 {
    \n-
    344 return i_->template localGeometry<I>(parentId);
    \n-
    345 }
    \n-
    \n-
    346
    \n-
    \n-
    349 const OutsideLocalGeometry& geometryInOutside(unsigned int parentId = 0) const
    \n-
    350 {
    \n-
    351 return i_->template localGeometry<O>(parentId);
    \n-
    352 }
    \n-
    \n-
    353
    \n-
    \n-
    360 const Geometry& geometry() const
    \n-
    361 {
    \n-
    362 return i_->template geometry<I>();
    \n-
    363 }
    \n-
    \n-
    364
    \n-
    \n-
    371 const OutsideGeometry& geometryOutside() const // DUNE_DEPRECATED
    \n-
    372 {
    \n-
    373 return i_->template geometry<O>();
    \n-
    374 }
    \n-
    \n-
    375
    \n-
    \n-
    377 Dune::GeometryType type() const
    \n-
    378 {
    \n-
    379 #ifdef ONLY_SIMPLEX_INTERSECTIONS
    \n-
    380 # if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
    \n-
    381 return Dune::GeometryTypes::simplex(mydim);
    \n-
    382 # else
    \n-
    383 static const Dune::GeometryType type(Dune::GeometryType::simplex, mydim);
    \n-
    384 return type;
    \n-
    385 # endif
    \n-
    386 #else
    \n-
    387 #error Not Implemented
    \n-
    388 #endif
    \n-
    389 }
    \n-
    \n-
    390
    \n-
    391
    \n-
    \n-
    393 bool self() const
    \n-
    394 {
    \n-
    395 return i_->template local<I>();
    \n-
    396 }
    \n-
    \n-
    397
    \n-
    \n-
    399 size_t neighbor(unsigned int g = 0) const
    \n-
    400 {
    \n-
    401 if (g == 0 && i_->template local<O>()) {
    \n-
    402 return i_->template parents<O>();
    \n-
    403 } else if (g == 1 && i_->template local<I>()) {
    \n-
    404 return i_->template parents<I>();
    \n-
    405 }
    \n-
    406 return 0;
    \n-
    407 }
    \n-
    \n-
    408
    \n-
    \n-
    410 int indexInInside(unsigned int parentId = 0) const
    \n-
    411 {
    \n-
    412 assert(self());
    \n-
    413 return glue_->template patch<I>().indexInInside(i_->template index<I>(parentId));
    \n-
    414 }
    \n-
    \n-
    415
    \n-
    \n-
    417 int indexInOutside(unsigned int parentId = 0) const
    \n-
    418 {
    \n-
    419 assert(neighbor());
    \n-
    420 return glue_->template patch<O>().indexInInside(i_->template index<O>(parentId));
    \n-
    421 }
    \n-
    \n-
    422
    \n-
    \n-\n-
    428 {
    \n-
    429 GlobalCoordinate normal;
    \n-
    430
    \n-
    431 if (codimensionWorld == 0)
    \n-
    432 DUNE_THROW(Dune::Exception, "There is no normal vector to a full-dimensional intersection");
    \n-
    433 else if (codimensionWorld == 1) {
    \n-
    434 /* TODO: Implement the general n-ary cross product here */
    \n-
    435 const auto jacobianTransposed = geometry().jacobianTransposed(local);
    \n-
    436 if (mydim==1) {
    \n-
    437 normal[0] = - jacobianTransposed[0][1];
    \n-
    438 normal[1] = jacobianTransposed[0][0];
    \n-
    439 } else if (mydim==2) {
    \n-
    440 normal[0] = (jacobianTransposed[0][1] * jacobianTransposed[1][2] - jacobianTransposed[0][2] * jacobianTransposed[1][1]);
    \n-
    441 normal[1] = - (jacobianTransposed[0][0] * jacobianTransposed[1][2] - jacobianTransposed[0][2] * jacobianTransposed[1][0]);
    \n-
    442 normal[2] = (jacobianTransposed[0][0] * jacobianTransposed[1][1] - jacobianTransposed[0][1] * jacobianTransposed[1][0]);
    \n-
    443 } else
    \n-
    444 DUNE_THROW(Dune::NotImplemented, "Remote intersections don't implement the 'outerNormal' method for " << mydim << "-dimensional intersections yet");
    \n-
    445 } else
    \n-
    446 DUNE_THROW(Dune::NotImplemented, "Remote intersections don't implement the 'outerNormal' method for intersections with codim >= 2 yet");
    \n-
    447
    \n-
    448 return normal;
    \n-
    449 }
    \n-
    \n-
    450
    \n-
    \n-\n-
    456 {
    \n-
    457 GlobalCoordinate normal = outerNormal(local);
    \n-
    458 normal /= normal.two_norm();
    \n-
    459 return normal;
    \n-
    460 }
    \n-
    \n-
    461
    \n-
    \n-\n-
    467 {
    \n-
    468 return (unitOuterNormal(local) *= geometry().integrationElement(local));
    \n-
    469 }
    \n-
    \n-
    470
    \n-
    \n-\n-
    476 {
    \n-
    477 return unitOuterNormal(ReferenceElements<ctype,mydim>::general(type()).position(0,0));
    \n-
    478 }
    \n-
    \n-
    479
    \n-
    \n-\n-
    484 {
    \n-
    485 return Intersection<P0,P1,O,I>(glue_,i_);
    \n-
    486 }
    \n-
    \n-
    487
    \n-
    488#ifdef QUICKHACK_INDEX
    \n-
    489 typedef typename GridGlue::IndexType IndexType;
    \n-
    490
    \n-
    491 IndexType index() const
    \n-
    492 {
    \n-
    493 return i_->index_;
    \n-
    494 }
    \n-
    495
    \n-
    496#endif
    \n-
    497
    \n-
    498 private:
    \n-
    499
    \n-
    500 friend class IntersectionIndexSet<P0,P1>;
    \n-
    501
    \n-
    502 /* M E M B E R V A R I A B L E S */
    \n-
    503
    \n-
    505 const GridGlue* glue_;
    \n-
    506
    \n-
    508 const IntersectionData* i_;
    \n-
    509 };
    \n-
    \n-
    510
    \n-
    511
    \n-
    512 } // end namespace GridGlue
    \n-
    513} // end namespace Dune
    \n-
    514
    \n-
    515#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH
    \n+
    56 const GridGlue* glue_;
    \n+
    57 unsigned int index_;
    \n+
    58
    \n+
    59 Intersection intersection_;
    \n+
    60 };
    \n+
    \n+
    61
    \n+
    62 } // end namespace GridGlue
    \n+
    63} // end namespace Dune
    \n+
    64
    \n+
    65#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH
    \n
    Central component of the module implementing the coupling of two grids.
    \n
    Definition gridglue.hh:37
    \n
    sequential adapter to couple two grids at specified close together boundaries
    Definition gridglue.hh:67
    \n-
    unsigned int IndexType
    Definition gridglue.hh:147
    \n-
    PromotionTraits< typenameGridView< 0 >::ctype, typenameGridView< 1 >::ctype >::PromotedType ctype
    The type used for coordinates.
    Definition gridglue.hh:171
    \n-
    static constexpr int dimworld
    export the world dimension This is the maximum of the extractors' world dimensions.
    Definition gridglue.hh:166
    \n-
    storage class for Dune::GridGlue::Intersection related data
    Definition intersection.hh:38
    \n-
    GridGlue::IndexType IndexType
    Definition intersection.hh:42
    \n-
    AffineGeometry< typename GridGlue::template GridView< side >::ctype, mydim, GridGlue::template GridView< side >::dimensionworld > GridGeometry
    Definition intersection.hh:65
    \n-
    const GridLocalGeometry< side > & localGeometry(unsigned int parentId=0) const
    Definition intersection.hh:85
    \n-
    static constexpr int coorddim
    Dimension of the world space of the intersection.
    Definition intersection.hh:45
    \n-
    GridGeometry< 0 > Grid0Geometry
    Definition intersection.hh:67
    \n-
    typename GridGlue::template GridView< side >::IndexSet::IndexType GridIndexType
    Definition intersection.hh:71
    \n-
    IndexType index(unsigned int parentId=0) const
    Definition intersection.hh:97
    \n-
    IndexType parents() const
    Definition intersection.hh:101
    \n-
    GridLocalGeometry< 1 > Grid1LocalGeometry
    Definition intersection.hh:61
    \n-
    const GridGeometry< side > & geometry() const
    Definition intersection.hh:89
    \n-
    bool local() const
    Definition intersection.hh:93
    \n-
    ::Dune::GridGlue::GridGlue< P0, P1 > GridGlue
    Definition intersection.hh:40
    \n-
    static constexpr int mydim
    Dimension of the intersection.
    Definition intersection.hh:54
    \n-
    AffineGeometry< typename GridGlue::template GridView< side >::ctype, mydim, GridGlue::template GridView< side >::dimension > GridLocalGeometry
    Definition intersection.hh:58
    \n-
    GridLocalGeometry< 0 > Grid0LocalGeometry
    Definition intersection.hh:60
    \n-
    IndexType index_
    index of this intersection after GridGlue interface
    Definition intersection.hh:112
    \n-
    GridIndexType< 1 > Grid1IndexType
    Definition intersection.hh:74
    \n-
    GridGeometry< 1 > Grid1Geometry
    Definition intersection.hh:68
    \n-
    GridIndexType< 0 > Grid0IndexType
    Definition intersection.hh:73
    \n-
    IntersectionData()=default
    Default Constructor.
    \n-
    The intersection of two entities of the two patches of a GridGlue.
    Definition intersection.hh:261
    \n-
    Traits::OutsideLocalGeometry OutsideLocalGeometry
    Definition intersection.hh:275
    \n-
    Intersection< P0, P1, O, I > flip() const
    Return a copy of the intersection with inside and outside switched.
    Definition intersection.hh:483
    \n-
    bool conforming() const
    Return true if intersection is conforming.
    Definition intersection.hh:335
    \n-
    InsideGridView::Traits::template Codim< 0 >::Entity InsideEntity
    Definition intersection.hh:281
    \n-
    Traits::GridGlue GridGlue
    Definition intersection.hh:267
    \n-
    int indexInOutside(unsigned int parentId=0) const
    Local number of codim 1 entity in outside() Entity where intersection is contained in.
    Definition intersection.hh:417
    \n-
    int indexInInside(unsigned int parentId=0) const
    Local number of codim 1 entity in the inside() Entity where intersection is contained in.
    Definition intersection.hh:410
    \n-
    bool self() const
    For parallel computations: Return true if inside() entity exists locally.
    Definition intersection.hh:393
    \n-
    static constexpr auto mydim
    dimension of the intersection
    Definition intersection.hh:291
    \n-
    static constexpr int outsidePatch
    outside patch
    Definition intersection.hh:297
    \n-
    Dune::GeometryType type() const
    Type of reference element for this intersection.
    Definition intersection.hh:377
    \n-
    InsideEntity inside(unsigned int parentId=0) const
    Return element on the inside of this intersection.
    Definition intersection.hh:319
    \n-
    Traits::LocalCoordinate LocalCoordinate
    Definition intersection.hh:284
    \n-
    const OutsideLocalGeometry & geometryInOutside(unsigned int parentId=0) const
    Geometric information about this intersection in local coordinates of the outside() element.
    Definition intersection.hh:349
    \n-
    GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
    Return a unit outer normal.
    Definition intersection.hh:455
    \n-
    Traits::ctype ctype
    Definition intersection.hh:279
    \n-
    IntersectionTraits< P0, P1, I, O > Traits
    Definition intersection.hh:265
    \n-
    Traits::IntersectionData IntersectionData
    Definition intersection.hh:268
    \n-
    Traits::GlobalCoordinate GlobalCoordinate
    Definition intersection.hh:285
    \n-
    Traits::OutsideGeometry OutsideGeometry
    Definition intersection.hh:276
    \n-
    size_t neighbor(unsigned int g=0) const
    Return number of embeddings into local grid0 (grid1) entities.
    Definition intersection.hh:399
    \n-
    Intersection(const GridGlue *glue, const IntersectionData *i)
    Constructor for a given Dataset.
    Definition intersection.hh:311
    \n-
    static constexpr int insidePatch
    inside patch
    Definition intersection.hh:294
    \n-
    Traits::Geometry Geometry
    Definition intersection.hh:278
    \n-
    OutsideGridView::Traits::template Codim< 0 >::Entity OutsideEntity
    Definition intersection.hh:282
    \n-
    OutsideEntity outside(unsigned int parentId=0) const
    Return element on the outside of this intersection.
    Definition intersection.hh:328
    \n-
    const Geometry & geometry() const
    Geometric information about this intersection as part of the inside grid.
    Definition intersection.hh:360
    \n-
    Traits::InsideLocalGeometry InsideLocalGeometry
    Definition intersection.hh:272
    \n-
    GlobalCoordinate outerNormal(const LocalCoordinate &local) const
    Return an outer normal (length not necessarily 1)
    Definition intersection.hh:427
    \n-
    const OutsideGeometry & geometryOutside() const
    Geometric information about this intersection as part of the outside grid.
    Definition intersection.hh:371
    \n-
    Traits::OutsideGridView OutsideGridView
    Definition intersection.hh:274
    \n-
    GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
    Return an outer normal with the length of the integration element.
    Definition intersection.hh:466
    \n-
    Traits::InsideGridView InsideGridView
    Definition intersection.hh:271
    \n-
    const InsideLocalGeometry & geometryInInside(unsigned int parentId=0) const
    Geometric information about this intersection in local coordinates of the inside() element.
    Definition intersection.hh:342
    \n-
    GlobalCoordinate centerUnitOuterNormal() const
    Unit outer normal at the center of the intersection.
    Definition intersection.hh:475
    \n-
    static constexpr auto coorddim
    dimension of the world space of the intersection
    Definition intersection.hh:288
    \n-
    Definition intersection.hh:234
    \n-
    static constexpr int insidePatch
    Definition intersection.hh:249
    \n-
    Dune::FieldVector< ctype, mydim > LocalCoordinate
    Definition intersection.hh:253
    \n-
    static constexpr auto coorddim
    Definition intersection.hh:247
    \n-
    typename IntersectionData::template GridGeometry< outside > OutsideGeometry
    Definition intersection.hh:245
    \n-
    typename GridGlue::ctype ctype
    Definition intersection.hh:252
    \n-
    typename GridGlue::template GridView< outside > OutsideGridView
    Definition intersection.hh:239
    \n-
    Dune::FieldVector< ctype, coorddim > GlobalCoordinate
    Definition intersection.hh:254
    \n-
    typename IntersectionData::template GridLocalGeometry< outside > OutsideLocalGeometry
    Definition intersection.hh:242
    \n-
    typename GridGlue::template GridView< inside > InsideGridView
    Definition intersection.hh:238
    \n-
    typename IntersectionData::template GridGeometry< inside > Geometry
    Definition intersection.hh:244
    \n-
    typename IntersectionData::template GridLocalGeometry< inside > InsideLocalGeometry
    Definition intersection.hh:241
    \n-
    static constexpr int outsidePatch
    Definition intersection.hh:250
    \n-
    static constexpr auto mydim
    Definition intersection.hh:248
    \n+\n+
    Definition intersectioniterator.hh:25
    \n+
    ::Dune::GridGlue::GridGlue< P0, P1 > GridGlue
    Definition intersectioniterator.hh:28
    \n+
    const Intersection & dereference() const
    Definition intersectioniterator.hh:37
    \n+
    void increment()
    Definition intersectioniterator.hh:44
    \n+
    ::Dune::GridGlue::Intersection< P0, P1, inside, outside > Intersection
    Definition intersectioniterator.hh:29
    \n+
    IntersectionIterator(const GridGlue *glue, unsigned int i)
    Definition intersectioniterator.hh:31
    \n+
    bool equals(const IntersectionIterator &iter) const
    Definition intersectioniterator.hh:49
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,752 +1,99 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-intersection.hh\n+intersectioniterator.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-11#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH\n-12#define DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH\n-13\n-14#include \n-15#include \n-16#include \n-17\n-18#include \n-19#include \n-20#include \n-21#include \n-22#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n-23\n-_\b2_\b4#define ONLY_SIMPLEX_INTERSECTIONS\n-25\n-26namespace _\bD_\bu_\bn_\be {\n-27 namespace GridGlue {\n-28\n-29 // forward declaration\n-30 template\n-31 class IntersectionIndexSet;\n-32\n-36 template\n-_\b3_\b7 class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba\n+12#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH\n+13#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH\n+14\n+15#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n+16\n+17namespace _\bD_\bu_\bn_\be {\n+18 namespace GridGlue {\n+19\n+21 template\n+_\b2_\b2 class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br :\n+23 public Dune::ForwardIteratorFacade<\n+IntersectionIterator,\n+24 const Intersection >\n+25 {\n+26 public:\n+27\n+_\b2_\b8 typedef ::Dune::GridGlue::GridGlue _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be;\n+_\b2_\b9 typedef ::Dune::GridGlue::Intersection _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n+30\n+_\b3_\b1 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be * glue, unsigned int i)\n+32 : glue_(glue),\n+33 index_(i),\n+34 intersection_(glue_, & glue_->intersections_[index_])\n+35 {}\n+36\n+_\b3_\b7 const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn& _\bd_\be_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be() const\n 38 {\n-39 public:\n-_\b4_\b0 typedef ::Dune::GridGlue::GridGlue _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be;\n-41\n-_\b4_\b2 typedef typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be;\n+39 assert((\"never dereference the end iterator\" &&\n+40 index_ != glue_->index__sz));\n+41 return intersection_;\n+42 }\n 43\n-_\b4_\b5 static constexpr int _\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm = _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd;\n-46\n-47 private:\n-48 // intermediate quantities\n-49 template\n-50 static constexpr int dim() { return GridGlue::template GridView::\n-Grid::dimension - GridGlue::template GridPatch::codim; }\n-51\n-52 public:\n-_\b5_\b4 static constexpr int _\bm_\by_\bd_\bi_\bm = dim<0>() < dim<1>() ? dim<0>() : dim<1>();\n+_\b4_\b4 void _\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt()\n+45 {\n+46 intersection_ = _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(glue_, & glue_->intersections_[++index_]);\n+47 }\n+48\n+_\b4_\b9 bool _\be_\bq_\bu_\ba_\bl_\bs(const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br& iter) const\n+50 {\n+51 return iter.index_ == index_;\n+52 }\n+53\n+54 private:\n 55\n-56 template\n-_\b5_\b7 using _\bG_\br_\bi_\bd_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by = AffineGeometry<\n-58 typename GridGlue::template GridView::ctype, _\bm_\by_\bd_\bi_\bm, GridGlue::template\n-GridView::dimension>;\n-59\n-_\b6_\b0 using _\bG_\br_\bi_\bd_\b0_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by [[deprecated(\"please use GridLocalGeometry<0>\n-instead\")]] = _\bG_\br_\bi_\bd_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\b0_\b>;\n-_\b6_\b1 using _\bG_\br_\bi_\bd_\b1_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by [[deprecated(\"please use GridLocalGeometry<1>\n-instead\")]] = _\bG_\br_\bi_\bd_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\b1_\b>;\n-62\n-63 template\n-_\b6_\b4 using _\bG_\br_\bi_\bd_\bG_\be_\bo_\bm_\be_\bt_\br_\by = AffineGeometry<\n-65 typename GridGlue::template GridView::ctype, _\bm_\by_\bd_\bi_\bm, GridGlue::template\n-GridView::dimensionworld>;\n-66\n-_\b6_\b7 using _\bG_\br_\bi_\bd_\b0_\bG_\be_\bo_\bm_\be_\bt_\br_\by [[deprecated(\"please use GridGeometry<0> instead\")]] =\n-_\bG_\br_\bi_\bd_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\b0_\b>;\n-_\b6_\b8 using _\bG_\br_\bi_\bd_\b1_\bG_\be_\bo_\bm_\be_\bt_\br_\by [[deprecated(\"please use GridGeometry<1> instead\")]] =\n-_\bG_\br_\bi_\bd_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\b1_\b>;\n-69\n-70 template\n-_\b7_\b1 using _\bG_\br_\bi_\bd_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be = typename GridGlue::template GridView::IndexSet::\n-IndexType;\n-72\n-_\b7_\b3 using _\bG_\br_\bi_\bd_\b0_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be [[deprecated(\"please use GridIndexType<0> instead\")]] =\n-_\bG_\br_\bi_\bd_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be_\b<_\b0_\b>;\n-_\b7_\b4 using _\bG_\br_\bi_\bd_\b1_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be [[deprecated(\"please use GridIndexType<1> instead\")]] =\n-_\bG_\br_\bi_\bd_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be_\b<_\b1_\b>;\n-75\n-77 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be& glue, unsigned int mergeindex, unsigned int\n-offset, bool grid0local, bool grid1local);\n-78\n-_\b8_\b0 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba() = default;\n-81\n-82 /* Accessor Functions */\n-83\n-84 template\n-_\b8_\b5 const _\bG_\br_\bi_\bd_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\bs_\bi_\bd_\be_\b>& _\bl_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by(unsigned int parentId = 0)\n-const\n-86 { return *std::get(sideData_).gridlocalgeom[parentId]; }\n-87\n-88 template\n-_\b8_\b9 const _\bG_\br_\bi_\bd_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\bs_\bi_\bd_\be_\b>& _\bg_\be_\bo_\bm_\be_\bt_\br_\by() const\n-90 { return *std::get(sideData_).gridgeom; }\n-91\n-92 template\n-_\b9_\b3 bool _\bl_\bo_\bc_\ba_\bl() const\n-94 { return std::get(sideData_).gridlocal; }\n-95\n-96 template\n-_\b9_\b7 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bi_\bn_\bd_\be_\bx(unsigned int parentId = 0) const\n-98 { return std::get(sideData_).gridindices[parentId]; }\n-99\n-100 template\n-_\b1_\b0_\b1 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bp_\ba_\br_\be_\bn_\bt_\bs() const\n-102 { return std::get(sideData_).gridindices.size(); }\n-103\n-104 private:\n-105 template\n-106 void initializeGeometry(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be& glue, unsigned mergeindex);\n-107\n-108 /* M E M B E R V A R I A B L E S */\n-109\n-110 public:\n-_\b1_\b1_\b2 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bi_\bn_\bd_\be_\bx_\b_;\n-113\n-114 private:\n-115 template\n-116 struct SideData {\n-118 bool gridlocal = false;\n-119\n-121 std::vector< GridIndexType > gridindices;\n-122\n-124 std::vector< std::optional< GridLocalGeometry > > gridlocalgeom;\n-125\n-133 std::optional< GridGeometry > gridgeom;\n-134 };\n-135\n-136 std::tuple< SideData<0>, SideData<1> > sideData_;\n-137 };\n-138\n-139 template\n-140 template\n-141 void IntersectionData::initializeGeometry(const GridGlue& glue,\n-unsigned mergeindex)\n-142 {\n-143 auto& data = std::get(sideData_);\n-144\n-145 const unsigned n_parents = glue.merger_->template parents\n-(mergeindex);\n-146\n-147 // init containers\n-148 data.gridindices.resize(n_parents);\n-149 data.gridlocalgeom.resize(n_parents);\n-150\n-151 // default values\n-152 data.gridindices[0] = 0;\n-153\n-154 static constexpr int nSimplexCorners = mydim + 1;\n-155 using ctype = typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\bt_\by_\bp_\be;\n-156\n-157 // initialize the local and the global geometries of grid `side`\n-158\n-159 // compute the coordinates of the subface's corners in codim 0 entity local\n-coordinates\n-160 static constexpr int elementdim = GridGlue::template GridView::\n-template Codim<0>::Geometry::mydimension;\n-161\n-162 // coordinates within the subentity that contains the remote intersection\n-163 std::array() >, nSimplexCorners>\n-corners_subEntity_local;\n-164\n-165 for (unsigned int par = 0; par < n_parents; ++par) {\n-166 for (int i = 0; i < nSimplexCorners; ++i)\n-167 corners_subEntity_local[i] = glue.merger_->template parentLocal\n-(mergeindex, i, par);\n-168\n-169 // Coordinates of the remote intersection corners wrt the element\n-coordinate system\n-170 std::array, nSimplexCorners>\n-corners_element_local;\n-171\n-172 if (data.gridlocal) {\n-173 data.gridindices[par] = glue.merger_->template parent\n-(mergeindex,par);\n-174\n-175 typename GridGlue::template GridPatch::LocalGeometry\n-176 gridLocalGeometry = glue.template patch().geometryLocal\n-(data.gridindices[par]);\n-177 for (std::size_t i=0; i::Geometry\n-196 gridWorldGeometry = glue.template patch().geometry(data.gridindices\n-[par]);\n-197\n-198 // world coordinates of the remote intersection corners\n-199 std::array::\n-dimensionworld>, nSimplexCorners> corners_global;\n-200\n-201 for (std::size_t i=0; i\n-_\b2_\b1_\b3 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be& glue, unsigned\n-int mergeindex, unsigned int offset,\n-214 bool grid0local, bool grid1local)\n-215 : index_(mergeindex+offset)\n-216 {\n-217 // if an invalid index is given do not proceed!\n-218 // (happens when the parent GridGlue initializes the \"end\"-Intersection)\n-219 assert (0 <= mergeindex || mergeindex < glue.index__sz);\n-220\n-221 std::get<0>(sideData_).gridlocal = grid0local;\n-222 std::get<1>(sideData_).gridlocal = grid1local;\n-223\n-224 initializeGeometry<0>(glue, mergeindex);\n-225 initializeGeometry<1>(glue, mergeindex);\n-226 }\n-227\n-232 template\n-_\b2_\b3_\b3 struct _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs\n-234 {\n-_\b2_\b3_\b5 using _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be = _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>;\n-_\b2_\b3_\b6 using _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba = _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>;\n-237\n-_\b2_\b3_\b8 using _\bI_\bn_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw = typename GridGlue::template GridView;\n-_\b2_\b3_\b9 using _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw = typename GridGlue::template GridView;\n-240\n-_\b2_\b4_\b1 using _\bI_\bn_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by = typename IntersectionData::template\n-GridLocalGeometry;\n-_\b2_\b4_\b2 using _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by = typename IntersectionData::template\n-GridLocalGeometry;\n-243\n-_\b2_\b4_\b4 using _\bG_\be_\bo_\bm_\be_\bt_\br_\by = typename IntersectionData::template GridGeometry;\n-_\b2_\b4_\b5 using _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by = typename IntersectionData::template\n-GridGeometry;\n-246\n-_\b2_\b4_\b7 static constexpr auto _\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm = _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm;\n-_\b2_\b4_\b8 static constexpr auto _\bm_\by_\bd_\bi_\bm = _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bm_\by_\bd_\bi_\bm;\n-_\b2_\b4_\b9 static constexpr int _\bi_\bn_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh = inside;\n-_\b2_\b5_\b0 static constexpr int _\bo_\bu_\bt_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh = outside;\n-251\n-_\b2_\b5_\b2 using _\bc_\bt_\by_\bp_\be = typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\bt_\by_\bp_\be;\n-_\b2_\b5_\b3 using _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be = Dune::FieldVector;\n-_\b2_\b5_\b4 using _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be = Dune::FieldVector;\n-255 };\n-256\n-259 template\n-_\b2_\b6_\b0 class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-261 {\n-262\n-263 public:\n-264\n-_\b2_\b6_\b5 typedef _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b<_\bP_\b0_\b,_\bP_\b1_\b,_\bI_\b,_\bO_\b> _\bT_\br_\ba_\bi_\bt_\bs;\n-266\n-_\b2_\b6_\b7 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be;\n-_\b2_\b6_\b8 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba;\n-269\n-270\n-_\b2_\b7_\b1 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw _\bI_\bn_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw;\n-_\b2_\b7_\b2 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bI_\bn_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by;\n-273\n-_\b2_\b7_\b4 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw;\n-_\b2_\b7_\b5 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by;\n-_\b2_\b7_\b6 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by;\n-277\n-_\b2_\b7_\b8 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bG_\be_\bo_\bm_\be_\bt_\br_\by;\n-_\b2_\b7_\b9 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bc_\bt_\by_\bp_\be _\bc_\bt_\by_\bp_\be;\n-280\n-_\b2_\b8_\b1 typedef typename InsideGridView::Traits::template Codim<0>::Entity\n-_\bI_\bn_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by;\n-_\b2_\b8_\b2 typedef typename OutsideGridView::Traits::template Codim<0>::Entity\n-_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by;\n-283\n-_\b2_\b8_\b4 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be;\n-_\b2_\b8_\b5 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be;\n-286\n-_\b2_\b8_\b8 static constexpr auto _\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm = _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm;\n-289\n-_\b2_\b9_\b1 static constexpr auto _\bm_\by_\bd_\bi_\bm = _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bm_\by_\bd_\bi_\bm;\n-292\n-_\b2_\b9_\b4 static constexpr int _\bi_\bn_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh = _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bi_\bn_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh;\n-295\n-_\b2_\b9_\b7 static constexpr int _\bo_\bu_\bt_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh = _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bo_\bu_\bt_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh;\n-298\n-299 // typedef unsigned int IndexType;\n-300\n-301 private:\n-305 static constexpr int codimensionWorld = _\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm - _\bm_\by_\bd_\bi_\bm;\n-306\n-307 public:\n-308 /* C O N S T R U C T O R S */\n-309\n-_\b3_\b1_\b1 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be* glue, const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba* i) :\n-312 glue_(glue), i_(i) {}\n-313\n-314 /* F U N C T I O N A L I T Y */\n-315\n-318 _\bI_\bn_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by\n-_\b3_\b1_\b9 _\bi_\bn_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n-320 {\n-321 assert(_\bs_\be_\bl_\bf());\n-322 return glue_->template patch().element(i_->template index(parentId));\n-323 }\n-324\n-327 _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by\n-_\b3_\b2_\b8 _\bo_\bu_\bt_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n-329 {\n-330 assert(_\bn_\be_\bi_\bg_\bh_\bb_\bo_\br());\n-331 return glue_->template patch().element(i_->template index(parentId));\n-332 }\n-333\n-_\b3_\b3_\b5 bool _\bc_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg() const\n-336 {\n-337 throw Dune::NotImplemented();\n-338 }\n-339\n-_\b3_\b4_\b2 const _\bI_\bn_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by& _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be(unsigned int parentId = 0)\n-const\n-343 {\n-344 return i_->template localGeometry(parentId);\n-345 }\n-346\n-_\b3_\b4_\b9 const _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by& _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bI_\bn_\bO_\bu_\bt_\bs_\bi_\bd_\be(unsigned int parentId = 0)\n-const\n-350 {\n-351 return i_->template localGeometry(parentId);\n-352 }\n-353\n-_\b3_\b6_\b0 const _\bG_\be_\bo_\bm_\be_\bt_\br_\by& _\bg_\be_\bo_\bm_\be_\bt_\br_\by() const\n-361 {\n-362 return i_->template geometry();\n-363 }\n-364\n-_\b3_\b7_\b1 const _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by& _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bO_\bu_\bt_\bs_\bi_\bd_\be() const // DUNE_DEPRECATED\n-372 {\n-373 return i_->template geometry();\n-374 }\n-375\n-_\b3_\b7_\b7 Dune::GeometryType _\bt_\by_\bp_\be() const\n-378 {\n-379 #ifdef ONLY_SIMPLEX_INTERSECTIONS\n-380 # if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)\n-381 return Dune::GeometryTypes::simplex(_\bm_\by_\bd_\bi_\bm);\n-382 # else\n-383 static const Dune::GeometryType _\bt_\by_\bp_\be(Dune::GeometryType::simplex, _\bm_\by_\bd_\bi_\bm);\n-384 return _\bt_\by_\bp_\be;\n-385 # endif\n-386 #else\n-387 #error Not Implemented\n-388 #endif\n-389 }\n-390\n-391\n-_\b3_\b9_\b3 bool _\bs_\be_\bl_\bf() const\n-394 {\n-395 return i_->template local();\n-396 }\n-397\n-_\b3_\b9_\b9 size_t _\bn_\be_\bi_\bg_\bh_\bb_\bo_\br(unsigned int g = 0) const\n-400 {\n-401 if (g == 0 && i_->template local()) {\n-402 return i_->template parents();\n-403 } else if (g == 1 && i_->template local()) {\n-404 return i_->template parents();\n-405 }\n-406 return 0;\n-407 }\n-408\n-_\b4_\b1_\b0 int _\bi_\bn_\bd_\be_\bx_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n-411 {\n-412 assert(_\bs_\be_\bl_\bf());\n-413 return glue_->template patch().indexInInside(i_->template index\n-(parentId));\n-414 }\n-415\n-_\b4_\b1_\b7 int _\bi_\bn_\bd_\be_\bx_\bI_\bn_\bO_\bu_\bt_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n-418 {\n-419 assert(_\bn_\be_\bi_\bg_\bh_\bb_\bo_\br());\n-420 return glue_->template patch().indexInInside(i_->template index\n-(parentId));\n-421 }\n-422\n-_\b4_\b2_\b7 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be _\bo_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl(const _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be &local) const\n-428 {\n-429 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be normal;\n-430\n-431 if (codimensionWorld == 0)\n-432 DUNE_THROW(Dune::Exception, \"There is no normal vector to a full-\n-dimensional intersection\");\n-433 else if (codimensionWorld == 1) {\n-434 /* TODO: Implement the general n-ary cross product here */\n-435 const auto jacobianTransposed = _\bg_\be_\bo_\bm_\be_\bt_\br_\by().jacobianTransposed(local);\n-436 if (_\bm_\by_\bd_\bi_\bm==1) {\n-437 normal[0] = - jacobianTransposed[0][1];\n-438 normal[1] = jacobianTransposed[0][0];\n-439 } else if (_\bm_\by_\bd_\bi_\bm==2) {\n-440 normal[0] = (jacobianTransposed[0][1] * jacobianTransposed[1][2] -\n-jacobianTransposed[0][2] * jacobianTransposed[1][1]);\n-441 normal[1] = - (jacobianTransposed[0][0] * jacobianTransposed[1][2] -\n-jacobianTransposed[0][2] * jacobianTransposed[1][0]);\n-442 normal[2] = (jacobianTransposed[0][0] * jacobianTransposed[1][1] -\n-jacobianTransposed[0][1] * jacobianTransposed[1][0]);\n-443 } else\n-444 DUNE_THROW(Dune::NotImplemented, \"Remote intersections don't implement the\n-'outerNormal' method for \" << _\bm_\by_\bd_\bi_\bm << \"-dimensional intersections yet\");\n-445 } else\n-446 DUNE_THROW(Dune::NotImplemented, \"Remote intersections don't implement the\n-'outerNormal' method for intersections with codim >= 2 yet\");\n-447\n-448 return normal;\n-449 }\n-450\n-_\b4_\b5_\b5 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be _\bu_\bn_\bi_\bt_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl(const _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be &local) const\n-456 {\n-457 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be normal = _\bo_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl(local);\n-458 normal /= normal.two_norm();\n-459 return normal;\n-460 }\n-461\n-_\b4_\b6_\b6 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be _\bi_\bn_\bt_\be_\bg_\br_\ba_\bt_\bi_\bo_\bn_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl(const _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be &local) const\n-467 {\n-468 return (_\bu_\bn_\bi_\bt_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl(local) *= _\bg_\be_\bo_\bm_\be_\bt_\br_\by().integrationElement(local));\n-469 }\n-470\n-_\b4_\b7_\b5 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be _\bc_\be_\bn_\bt_\be_\br_\bU_\bn_\bi_\bt_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl () const\n-476 {\n-477 return _\bu_\bn_\bi_\bt_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl(ReferenceElements::general(_\bt_\by_\bp_\be\n-()).position(0,0));\n-478 }\n-479\n-_\b4_\b8_\b3 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bP_\b0_\b,_\bP_\b1_\b,_\bO_\b,_\bI_\b> _\bf_\bl_\bi_\bp() const\n-484 {\n-485 return _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bP_\b0_\b,_\bP_\b1_\b,_\bO_\b,_\bI_\b>(glue_,i_);\n-486 }\n-487\n-488#ifdef QUICKHACK_INDEX\n-489 typedef typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be IndexType;\n-490\n-491 IndexType index() const\n-492 {\n-493 return i_->_\bi_\bn_\bd_\be_\bx_\b_;\n-494 }\n-495\n-496#endif\n-497\n-498 private:\n-499\n-500 friend class IntersectionIndexSet;\n-501\n-502 /* M E M B E R V A R I A B L E S */\n-503\n-505 const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be* glue_;\n-506\n-508 const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba* i_;\n-509 };\n-510\n-511\n-512 } // end namespace GridGlue\n-513} // end namespace Dune\n-514\n-515#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH\n+56 const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be* glue_;\n+57 unsigned int index_;\n+58\n+59 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn intersection_;\n+60 };\n+61\n+62 } // end namespace GridGlue\n+63} // end namespace Dune\n+64\n+65#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH\n _\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh\n Central component of the module implementing the coupling of two grids.\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n sequential adapter to couple two grids at specified close together boundaries\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:67\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n-unsigned int IndexType\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:147\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\bt_\by_\bp_\be\n-PromotionTraits< typenameGridView< 0 >::ctype, typenameGridView< 1 >::ctype >::\n-PromotedType ctype\n-The type used for coordinates.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:171\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd\n-static constexpr int dimworld\n-export the world dimension This is the maximum of the extractors' world\n-dimensions.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:166\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba\n-storage class for Dune::GridGlue::Intersection related data\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:38\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n-GridGlue::IndexType IndexType\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:42\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-AffineGeometry< typename GridGlue::template GridView< side >::ctype, mydim,\n-GridGlue::template GridView< side >::dimensionworld > GridGeometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:65\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bl_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-const GridLocalGeometry< side > & localGeometry(unsigned int parentId=0) const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:85\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm\n-static constexpr int coorddim\n-Dimension of the world space of the intersection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:45\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\b0_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-GridGeometry< 0 > Grid0Geometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:67\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n-typename GridGlue::template GridView< side >::IndexSet::IndexType GridIndexType\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:71\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bi_\bn_\bd_\be_\bx\n-IndexType index(unsigned int parentId=0) const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:97\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs\n-IndexType parents() const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:101\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-GridLocalGeometry< 1 > Grid1LocalGeometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:61\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by\n-const GridGeometry< side > & geometry() const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:89\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bl_\bo_\bc_\ba_\bl\n-bool local() const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:93\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b,_\b _\bi_\bn_\bs_\bi_\bd_\be_\b,_\b _\bo_\bu_\bt_\bs_\bi_\bd_\be_\b _\b>\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:25\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n ::Dune::GridGlue::GridGlue< P0, P1 > GridGlue\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:40\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bm_\by_\bd_\bi_\bm\n-static constexpr int mydim\n-Dimension of the intersection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:54\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-AffineGeometry< typename GridGlue::template GridView< side >::ctype, mydim,\n-GridGlue::template GridView< side >::dimension > GridLocalGeometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:58\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\b0_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-GridLocalGeometry< 0 > Grid0LocalGeometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:60\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bi_\bn_\bd_\be_\bx_\b_\n-IndexType index_\n-index of this intersection after GridGlue interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:112\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n-GridIndexType< 1 > Grid1IndexType\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:74\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-GridGeometry< 1 > Grid1Geometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:68\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\b0_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n-GridIndexType< 0 > Grid0IndexType\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:73\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba\n-IntersectionData()=default\n-Default Constructor.\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-The intersection of two entities of the two patches of a GridGlue.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:261\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-Traits::OutsideLocalGeometry OutsideLocalGeometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:275\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bf_\bl_\bi_\bp\n-Intersection< P0, P1, O, I > flip() const\n-Return a copy of the intersection with inside and outside switched.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:483\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg\n-bool conforming() const\n-Return true if intersection is conforming.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:335\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by\n-InsideGridView::Traits::template Codim< 0 >::Entity InsideEntity\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:281\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n-Traits::GridGlue GridGlue\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:267\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bd_\be_\bx_\bI_\bn_\bO_\bu_\bt_\bs_\bi_\bd_\be\n-int indexInOutside(unsigned int parentId=0) const\n-Local number of codim 1 entity in outside() Entity where intersection is\n-contained in.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:417\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bd_\be_\bx_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be\n-int indexInInside(unsigned int parentId=0) const\n-Local number of codim 1 entity in the inside() Entity where intersection is\n-contained in.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:410\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bs_\be_\bl_\bf\n-bool self() const\n-For parallel computations: Return true if inside() entity exists locally.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:393\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bm_\by_\bd_\bi_\bm\n-static constexpr auto mydim\n-dimension of the intersection\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:291\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bo_\bu_\bt_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh\n-static constexpr int outsidePatch\n-outside patch\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:297\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bt_\by_\bp_\be\n-Dune::GeometryType type() const\n-Type of reference element for this intersection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:377\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bs_\bi_\bd_\be\n-InsideEntity inside(unsigned int parentId=0) const\n-Return element on the inside of this intersection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:319\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be\n-Traits::LocalCoordinate LocalCoordinate\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:284\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bI_\bn_\bO_\bu_\bt_\bs_\bi_\bd_\be\n-const OutsideLocalGeometry & geometryInOutside(unsigned int parentId=0) const\n-Geometric information about this intersection in local coordinates of the\n-outside() element.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:349\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bu_\bn_\bi_\bt_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl\n-GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const\n-Return a unit outer normal.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:455\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bt_\by_\bp_\be\n-Traits::ctype ctype\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:279\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bT_\br_\ba_\bi_\bt_\bs\n-IntersectionTraits< P0, P1, I, O > Traits\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:265\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba\n-Traits::IntersectionData IntersectionData\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:268\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be\n-Traits::GlobalCoordinate GlobalCoordinate\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:285\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-Traits::OutsideGeometry OutsideGeometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:276\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bn_\be_\bi_\bg_\bh_\bb_\bo_\br\n-size_t neighbor(unsigned int g=0) const\n-Return number of embeddings into local grid0 (grid1) entities.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:399\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-Intersection(const GridGlue *glue, const IntersectionData *i)\n-Constructor for a given Dataset.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:311\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh\n-static constexpr int insidePatch\n-inside patch\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:294\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-Traits::Geometry Geometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:278\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by\n-OutsideGridView::Traits::template Codim< 0 >::Entity OutsideEntity\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:282\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bo_\bu_\bt_\bs_\bi_\bd_\be\n-OutsideEntity outside(unsigned int parentId=0) const\n-Return element on the outside of this intersection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:328\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by\n-const Geometry & geometry() const\n-Geometric information about this intersection as part of the inside grid.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:360\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-Traits::InsideLocalGeometry InsideLocalGeometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:272\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bo_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl\n-GlobalCoordinate outerNormal(const LocalCoordinate &local) const\n-Return an outer normal (length not necessarily 1)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:427\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bO_\bu_\bt_\bs_\bi_\bd_\be\n-const OutsideGeometry & geometryOutside() const\n-Geometric information about this intersection as part of the outside grid.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:371\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw\n-Traits::OutsideGridView OutsideGridView\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:274\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bt_\be_\bg_\br_\ba_\bt_\bi_\bo_\bn_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl\n-GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const\n-Return an outer normal with the length of the integration element.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:466\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw\n-Traits::InsideGridView InsideGridView\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:271\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be\n-const InsideLocalGeometry & geometryInInside(unsigned int parentId=0) const\n-Geometric information about this intersection in local coordinates of the\n-inside() element.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:342\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\be_\bn_\bt_\be_\br_\bU_\bn_\bi_\bt_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl\n-GlobalCoordinate centerUnitOuterNormal() const\n-Unit outer normal at the center of the intersection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:475\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm\n-static constexpr auto coorddim\n-dimension of the world space of the intersection\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:288\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:234\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bi_\bn_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh\n-static constexpr int insidePatch\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:249\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be\n-Dune::FieldVector< ctype, mydim > LocalCoordinate\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:253\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm\n-static constexpr auto coorddim\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:247\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-typename IntersectionData::template GridGeometry< outside > OutsideGeometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:245\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bc_\bt_\by_\bp_\be\n-typename GridGlue::ctype ctype\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:252\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw\n-typename GridGlue::template GridView< outside > OutsideGridView\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:239\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be\n-Dune::FieldVector< ctype, coorddim > GlobalCoordinate\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:254\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-typename IntersectionData::template GridLocalGeometry< outside >\n-OutsideLocalGeometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:242\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw\n-typename GridGlue::template GridView< inside > InsideGridView\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:238\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-typename IntersectionData::template GridGeometry< inside > Geometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:244\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-typename IntersectionData::template GridLocalGeometry< inside >\n-InsideLocalGeometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:241\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bo_\bu_\bt_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh\n-static constexpr int outsidePatch\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:250\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bm_\by_\bd_\bi_\bm\n-static constexpr auto mydim\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:248\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:28\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bd_\be_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be\n+const Intersection & dereference() const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:37\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt\n+void increment()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:44\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+::Dune::GridGlue::Intersection< P0, P1, inside, outside > Intersection\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:29\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br\n+IntersectionIterator(const GridGlue *glue, unsigned int i)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:31\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\be_\bq_\bu_\ba_\bl_\bs\n+bool equals(const IntersectionIterator &iter) const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:49\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00020.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00020.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: intersectionindexset.hh File Reference\n+dune-grid-glue: gridglue.cc File Reference\n \n \n \n \n \n \n \n@@ -70,35 +70,40 @@\n \n \n
    \n \n-
    intersectionindexset.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    gridglue.cc File Reference
    \n \n
    \n-
    #include <dune/grid-glue/gridglue.hh>
    \n-#include <dune/grid-glue/adapter/intersection.hh>
    \n+
    #include "intersection.hh"
    \n+#include <vector>
    \n+#include <iterator>
    \n+#include "../gridglue.hh"
    \n+#include "../common/ringcomm.hh"
    \n+#include <dune/common/unused.hh>
    \n
    \n

    Go to the source code of this file.

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

    \n-Classes

    class  Dune::GridGlue::IntersectionIndexSet< P0, P1 >
     
    \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n+\n+\n+\n+\n

    \n+Functions

    template<typename T >
    void Dune::GridGlue::printVector (const std::vector< T > &v, std::string name, int rank)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,22 +1,28 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-intersectionindexset.hh File Reference\n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n+gridglue.cc File Reference\n+#include \"_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\"\n+#include \n+#include \n+#include \"_\b._\b._\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh\"\n+#include \"_\b._\b._\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\br_\bi_\bn_\bg_\bc_\bo_\bm_\bm_\b._\bh_\bh\"\n+#include \n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b _\b>\n-\u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br (const std::vector< T > &v, std::string name,\n+ int rank)\n+\u00a0\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00020_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00020_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: intersectionindexset.hh Source File\n+dune-grid-glue: gridglue.cc Source File\n \n \n \n \n \n \n \n@@ -74,87 +74,502 @@\n \n \n
    \n
    \n-
    intersectionindexset.hh
    \n+
    gridglue.cc
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n-
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
    \n-
    4#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
    \n-
    5
    \n-\n-\n-
    8
    \n-
    9#ifndef ONLY_SIMPLEX_INTERSECTIONS
    \n-
    10// we currently support only one intersection type. If we want to support more,
    \n-
    11// we have to think about the semantics of our IndexSet
    \n-
    12#error Not Implemented
    \n+Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+
    2// vi: set et ts=4 sw=2 sts=2:
    \n+
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n+
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+
    5/* IMPLEMENTATION OF CLASS G R I D G L U E */
    \n+
    6
    \n+
    7#include "intersection.hh"
    \n+
    8#include <vector>
    \n+
    9#include <iterator>
    \n+
    10#include "../gridglue.hh"
    \n+
    11#if HAVE_MPI
    \n+
    12#include "../common/ringcomm.hh"
    \n
    13#endif
    \n
    14
    \n-
    15namespace Dune {
    \n-
    16 namespace GridGlue {
    \n-
    17
    \n-
    18 template<typename P0, typename P1>
    \n-
    \n-\n-
    20 {
    \n-
    21 friend class ::Dune::GridGlue::GridGlue<P0,P1>;
    \n-
    22 typedef ::Dune::GridGlue::GridGlue<P0,P1> GridGlue;
    \n-
    23
    \n-
    24 public:
    \n-
    25
    \n-\n-
    29 typedef size_t SizeType;
    \n-
    30
    \n-
    33 template<int I, int O>
    \n-
    \n-\n-
    35 {
    \n-
    36 return i.i_->index_;
    \n-
    37 }
    \n-
    \n-
    38
    \n-
    \n-
    41 SizeType size () const
    \n-
    42 {
    \n-
    43 return glue_->size();
    \n-
    44 }
    \n-
    \n-
    45
    \n-
    46 private:
    \n-
    47
    \n-\n-
    50 glue_(g) {}
    \n-
    51
    \n-
    52 const GridGlue * glue_;
    \n-
    53 };
    \n-
    \n-
    54
    \n-
    55 } // end namespace GridGlue
    \n-
    56} // end namespace Dune
    \n+
    15#include <dune/common/unused.hh>
    \n+
    16
    \n+
    17namespace Dune {
    \n+
    18namespace GridGlue {
    \n+
    19
    \n+
    20template<typename P0, typename P1>
    \n+
    \n+
    21GridGlue<P0, P1>::GridGlue(const std::shared_ptr< const GridPatch<0> >& gp0, const std::shared_ptr< const GridPatch<1> >& gp1, const std::shared_ptr<Merger>& merger)
    \n+
    22 : patches_{gp0, gp1}, merger_(merger)
    \n+
    23{
    \n+
    24#if HAVE_MPI
    \n+
    25 // if we have only seq. meshes don't use parallel glueing
    \n+
    26 if (gp0->gridView().comm().size() == 1
    \n+
    27 && gp1->gridView().comm().size() == 1)
    \n+
    28 mpicomm_ = MPI_COMM_SELF;
    \n+
    29 else
    \n+
    30 mpicomm_ = MPI_COMM_WORLD;
    \n+
    31#endif // HAVE_MPI
    \n+
    32 std::cout << "GridGlue: Constructor succeeded!" << std::endl;
    \n+
    33}
    \n+
    \n+
    34
    \n+
    35template<typename P0, typename P1>
    \n+
    \n+\n+
    37{
    \n+
    38 int myrank = 0;
    \n+
    39#if HAVE_MPI
    \n+
    40 int commsize = 1;
    \n+
    41 MPI_Comm_rank(mpicomm_, &myrank);
    \n+
    42 MPI_Comm_size(mpicomm_, &commsize);
    \n+
    43#endif // HAVE_MPI
    \n+
    44
    \n+
    45 // clear the contents from the current intersections array
    \n+
    46 {
    \n+
    47 std::vector<IntersectionData> dummy(1); // we need size 1, as we always store data for the end-intersection
    \n+
    48 intersections_.swap(dummy);
    \n+
    49 }
    \n+
    50
    \n+
    51 std::vector<Dune::FieldVector<ctype, dimworld> > patch0coords;
    \n+
    52 std::vector<unsigned int> patch0entities;
    \n+
    53 std::vector<Dune::GeometryType> patch0types;
    \n+
    54 std::vector<Dune::FieldVector<ctype,dimworld> > patch1coords;
    \n+
    55 std::vector<unsigned int> patch1entities;
    \n+
    56 std::vector<Dune::GeometryType> patch1types;
    \n
    57
    \n-
    58#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
    \n-
    Central component of the module implementing the coupling of two grids.
    \n-
    Model of the Intersection concept provided by GridGlue.
    \n+
    58 /*
    \n+
    59 * extract global surface patchs
    \n+
    60 */
    \n+
    61
    \n+
    62 // retrieve the coordinate and topology information from the extractors
    \n+
    63 // and apply transformations if necessary
    \n+
    64 extractGrid(patch<0>(), patch0coords, patch0entities, patch0types);
    \n+
    65 extractGrid(patch<1>(), patch1coords, patch1entities, patch1types);
    \n+
    66
    \n+
    67 std::cout << ">>>> rank " << myrank << " coords: "
    \n+
    68 << patch0coords.size() << " and " << patch1coords.size() << std::endl;
    \n+
    69 std::cout << ">>>> rank " << myrank << " entities: "
    \n+
    70 << patch0entities.size() << " and " << patch1entities.size() << std::endl;
    \n+
    71 std::cout << ">>>> rank " << myrank << " types: "
    \n+
    72 << patch0types.size() << " and " << patch1types.size() << std::endl;
    \n+
    73
    \n+
    74#ifdef WRITE_TO_VTK
    \n+
    75 const char prefix[] = "GridGlue::Builder::build() : ";
    \n+
    76 char patch0surf[256];
    \n+
    77 sprintf(patch0surf, "/tmp/vtk-patch0-test-%i", myrank);
    \n+
    78 char patch1surf[256];
    \n+
    79 sprintf(patch1surf, "/tmp/vtk-patch1-test-%i", myrank);
    \n+
    80
    \n+
    81 // std::cout << prefix << "Writing patch0 surface to '" << patch0surf << ".vtk'...\\n";
    \n+
    82 // VtkSurfaceWriter vtksw(patch0surf);
    \n+
    83 // vtksw.writeSurface(patch0coords, patch0entities, grid0dim, dimworld);
    \n+
    84 // std::cout << prefix << "Done writing patch0 surface!\\n";
    \n+
    85
    \n+
    86 // std::cout << prefix << "Writing patch1 surface to '" << patch1surf << ".vtk'...\\n";
    \n+
    87 // vtksw.setFilename(patch1surf);
    \n+
    88 // vtksw.writeSurface(patch1coords, patch1entities, grid1dim, dimworld);
    \n+
    89 // std::cout << prefix << "Done writing patch1 surface!\\n";
    \n+
    90#endif // WRITE_TO_VTK
    \n+
    91
    \n+
    92 // we start with an empty set
    \n+
    93 index__sz = 0;
    \n+
    94
    \n+
    95#if HAVE_MPI
    \n+
    96 if (commsize > 1)
    \n+
    97 {
    \n+
    98 // setup parallel indexset
    \n+
    99 patch0_is_.beginResize();
    \n+
    100 patch1_is_.beginResize();
    \n+
    101 }
    \n+
    102
    \n+
    103 auto op =
    \n+
    104 [&](
    \n+
    105 const int mergingrank,
    \n+
    106 const std::vector<Dune::FieldVector<ctype,dimworld> >& remotePatch0coords,
    \n+
    107 const std::vector<unsigned int>& remotePatch0entities,
    \n+
    108 const std::vector<Dune::GeometryType>& remotePatch0types,
    \n+
    109 const std::vector<Dune::FieldVector<ctype,dimworld> >& remotePatch1coords,
    \n+
    110 const std::vector<unsigned int>& remotePatch1entities,
    \n+
    111 const std::vector<Dune::GeometryType>& remotePatch1types
    \n+
    112 )
    \n+
    113 {
    \n+
    114 if (remotePatch1entities.size() > 0 && patch0entities.size() > 0)
    \n+
    115 mergePatches(patch0coords, patch0entities, patch0types, myrank,
    \n+
    116 remotePatch1coords, remotePatch1entities, remotePatch1types, mergingrank);
    \n+
    117 if (mergingrank != myrank &&
    \n+
    118 remotePatch0entities.size() > 0 && patch1entities.size() > 0)
    \n+
    119 mergePatches(remotePatch0coords, remotePatch0entities, remotePatch0types, mergingrank,
    \n+
    120 patch1coords, patch1entities, patch1types, myrank);
    \n+
    121 };
    \n+
    122 Parallel::MPI_AllApply(mpicomm_, op,
    \n+
    123 patch0coords, patch0entities, patch0types,
    \n+
    124 patch1coords, patch1entities, patch1types
    \n+
    125 );
    \n+
    126
    \n+
    127 if (commsize > 1)
    \n+
    128 {
    \n+
    129 // finalize ParallelIndexSet & RemoteIndices
    \n+
    130 patch0_is_.endResize();
    \n+
    131 patch1_is_.endResize();
    \n+
    132
    \n+
    133 // setup remote index information
    \n+
    134 remoteIndices_.setIncludeSelf(true);
    \n+
    135 // #warning add list of neighbors ...
    \n+
    136 remoteIndices_.setIndexSets(patch0_is_, patch1_is_, mpicomm_) ;
    \n+
    137 remoteIndices_.rebuild<true/* all indices are public */>();
    \n+
    138
    \n+
    139 // DEBUG Print all remote indices
    \n+
    140#ifdef DEBUG_GRIDGLUE_PARALLELMERGE
    \n+
    141 for (auto it = remoteIndices_.begin(); it != remoteIndices_.end(); it++)
    \n+
    142 {
    \n+
    143 std::cout << myrank << "\\tri-list\\t" << it->first << std::endl;
    \n+
    144 for (auto xit = it->second.first->begin(); xit != it->second.first->end(); ++xit)
    \n+
    145 std::cout << myrank << "\\tri-list 1 \\t" << it->first << "\\t" << *xit << std::endl;
    \n+
    146 for (auto xit = it->second.second->begin(); xit != it->second.second->end(); ++xit)
    \n+
    147 std::cout << myrank << "\\tri-list 2 \\t" << it->first << "\\t" << *xit << std::endl;
    \n+
    148 }
    \n+
    149#endif
    \n+
    150 }
    \n+
    151#else // HAVE_MPI
    \n+
    152
    \n+
    153 if (patch1entities.size() > 0 && patch0entities.size() > 0)
    \n+
    154 {
    \n+
    155 mergePatches(patch0coords, patch0entities, patch0types, myrank,
    \n+
    156 patch1coords, patch1entities, patch1types, myrank);
    \n+
    157#ifdef CALL_MERGER_TWICE
    \n+
    158 mergePatches(patch0coords, patch0entities, patch0types, myrank,
    \n+
    159 patch1coords, patch1entities, patch1types, myrank);
    \n+
    160#endif
    \n+
    161 }
    \n+
    162
    \n+
    163#endif // HAVE_MPI
    \n+
    164
    \n+
    165}
    \n+
    \n+
    166
    \n+
    167template<typename T>
    \n+
    \n+
    168void printVector(const std::vector<T> & v, std::string name, int rank)
    \n+
    169{
    \n+
    170 std::cout << rank << ": " << name << std::endl;
    \n+
    171 for (size_t i=0; i<v.size(); i++)
    \n+
    172 {
    \n+
    173 std::cout << v[i] << " ";
    \n+
    174 }
    \n+
    175 std::cout << std::endl;
    \n+
    176}
    \n+
    \n+
    177
    \n+
    178template<typename P0, typename P1>
    \n+
    \n+\n+
    180 const std::vector<Dune::FieldVector<ctype,dimworld> >& patch0coords,
    \n+
    181 const std::vector<unsigned int>& patch0entities,
    \n+
    182 const std::vector<Dune::GeometryType>& patch0types,
    \n+
    183 const int patch0rank,
    \n+
    184 const std::vector<Dune::FieldVector<ctype,dimworld> >& patch1coords,
    \n+
    185 const std::vector<unsigned int>& patch1entities,
    \n+
    186 const std::vector<Dune::GeometryType>& patch1types,
    \n+
    187 const int patch1rank)
    \n+
    188{
    \n+
    189
    \n+
    190 // howto handle overlap etc?
    \n+
    191
    \n+
    192 int myrank = 0;
    \n+
    193#if HAVE_MPI
    \n+
    194 int commsize = 1;
    \n+
    195 MPI_Comm_rank(mpicomm_, &myrank);
    \n+
    196 MPI_Comm_size(mpicomm_, &commsize);
    \n+
    197#endif // HAVE_MPI
    \n+
    198
    \n+
    199 // which patches are local?
    \n+
    200 const bool patch0local = (myrank == patch0rank);
    \n+
    201 const bool patch1local = (myrank == patch1rank);
    \n+
    202
    \n+
    203 // remember the number of previous remote intersections
    \n+
    204 const unsigned int offset = intersections_.size()-1;
    \n+
    205
    \n+
    206 std::cout << myrank
    \n+
    207 << " GridGlue::mergePatches : rank " << patch0rank << " / " << patch1rank << std::endl;
    \n+
    208
    \n+
    209 // start the actual build process
    \n+
    210 merger_->build(patch0coords, patch0entities, patch0types,
    \n+
    211 patch1coords, patch1entities, patch1types);
    \n+
    212
    \n+
    213 // append to intersections list
    \n+
    214 intersections_.resize(merger_->nSimplices() + offset + 1);
    \n+
    215 for (unsigned int i = 0; i < merger_->nSimplices(); ++i)
    \n+
    216 intersections_[offset + i] = IntersectionData(*this, i, offset, patch0local, patch1local);
    \n+
    217
    \n+
    218 index__sz = intersections_.size() - 1;
    \n+
    219
    \n+
    220 std::cout << myrank
    \n+
    221 << " GridGlue::mergePatches : "
    \n+
    222 << "The number of remote intersections is " << intersections_.size()-1 << std::endl;
    \n+
    223
    \n+
    224#if 0
    \n+
    225 printVector(patch0coords,"patch0coords",myrank);
    \n+
    226 printVector(patch0entities,"patch0entities",myrank);
    \n+
    227 printVector(patch0types,"patch0types",myrank);
    \n+
    228 printVector(patch1coords,"patch1coords",myrank);
    \n+
    229 printVector(patch1entities,"patch1entities",myrank);
    \n+
    230 printVector(patch1types,"patch1types",myrank);
    \n+
    231#endif
    \n+
    232
    \n+
    233#if HAVE_MPI
    \n+
    234 if (commsize > 1)
    \n+
    235 {
    \n+
    236 // update remote index sets
    \n+
    237 assert(Dune::RESIZE == patch0_is_.state());
    \n+
    238 assert(Dune::RESIZE == patch1_is_.state());
    \n+
    239
    \n+
    240 for (unsigned int i = 0; i < merger_->nSimplices(); i++)
    \n+
    241 {
    \n+
    242 // #warning only handle the newest intersections / merger info
    \n+
    243 const IntersectionData & it = intersections_[i];
    \n+
    244 GlobalId gid(patch0rank, patch1rank, i);
    \n+
    245 if (it.template local<0>())
    \n+
    246 {
    \n+
    247 Dune::PartitionType ptype = patch<0>().element(it.template index<0>()).partitionType();
    \n+
    248 patch0_is_.add (gid, LocalIndex(offset+i, ptype) );
    \n+
    249 }
    \n+
    250 if (it.template local<1>())
    \n+
    251 {
    \n+
    252 Dune::PartitionType ptype = patch<1>().element(it.template index<1>()).partitionType();
    \n+
    253 patch1_is_.add (gid, LocalIndex(offset+i, ptype) );
    \n+
    254 }
    \n+
    255 }
    \n+
    256 }
    \n+
    257#endif // HAVE_MPI
    \n+
    258
    \n+
    259 // cleanup the merger
    \n+
    260 merger_->clear();
    \n+
    261}
    \n+
    \n+
    262
    \n+
    263template<typename P0, typename P1>
    \n+
    264template<typename Extractor>
    \n+
    \n+\n+
    266 std::vector<Dune::FieldVector<ctype, dimworld> > & coords,
    \n+
    267 std::vector<unsigned int> & entities,
    \n+
    268 std::vector<Dune::GeometryType>& geometryTypes) const
    \n+
    269{
    \n+
    270 std::vector<typename Extractor::Coords> tempcoords;
    \n+
    271 std::vector<typename Extractor::VertexVector> tempentities;
    \n+
    272
    \n+
    273 extractor.getCoords(tempcoords);
    \n+
    274 coords.clear();
    \n+
    275 coords.reserve(tempcoords.size());
    \n+
    276
    \n+
    277 for (unsigned int i = 0; i < tempcoords.size(); ++i)
    \n+
    278 {
    \n+
    279 assert(int(dimworld) == int(Extractor::dimworld));
    \n+
    280 coords.push_back(Dune::FieldVector<ctype, dimworld>());
    \n+
    281 for (size_t j = 0; j <dimworld; ++j)
    \n+
    282 coords.back()[j] = tempcoords[i][j];
    \n+
    283 }
    \n+
    284
    \n+
    285 extractor.getFaces(tempentities);
    \n+
    286 entities.clear();
    \n+
    287
    \n+
    288 for (unsigned int i = 0; i < tempentities.size(); ++i) {
    \n+
    289 for (unsigned int j = 0; j < tempentities[i].size(); ++j)
    \n+
    290 entities.push_back(tempentities[i][j]);
    \n+
    291 }
    \n+
    292
    \n+
    293 // get the list of geometry types from the extractor
    \n+
    294 extractor.getGeometryTypes(geometryTypes);
    \n+
    295
    \n+
    296}
    \n+
    \n+
    297
    \n+
    298template<typename P0, typename P1>
    \n+
    299template<class DataHandleImp, class DataTypeImp>
    \n+
    \n+\n+\n+
    302 Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const
    \n+
    303{
    \n+\n+
    305 typedef typename DataHandle::DataType DataType;
    \n+
    306
    \n+
    307#if HAVE_MPI
    \n+
    308
    \n+
    309 if (mpicomm_ != MPI_COMM_SELF)
    \n+
    310 {
    \n+
    311 /*
    \n+
    312 * P A R A L L E L V E R S I O N
    \n+
    313 */
    \n+
    314 // setup communication interfaces
    \n+
    315 Dune::dinfo << "GridGlue: parallel communication" << std::endl;
    \n+
    316 typedef Dune::EnumItem <Dune::PartitionType, Dune::InteriorEntity> InteriorFlags;
    \n+
    317 typedef Dune::EnumItem <Dune::PartitionType, Dune::OverlapEntity> OverlapFlags;
    \n+
    318 typedef Dune::EnumRange <Dune::PartitionType, Dune::InteriorEntity, Dune::GhostEntity> AllFlags;
    \n+
    319 Dune::Interface interface;
    \n+
    320 assert(remoteIndices_.isSynced());
    \n+
    321 switch (iftype)
    \n+
    322 {
    \n+
    323 case Dune::InteriorBorder_InteriorBorder_Interface :
    \n+
    324 interface.build (remoteIndices_, InteriorFlags(), InteriorFlags() );
    \n+
    325 break;
    \n+
    326 case Dune::InteriorBorder_All_Interface :
    \n+
    327 if (dir == Dune::ForwardCommunication)
    \n+
    328 interface.build (remoteIndices_, InteriorFlags(), AllFlags() );
    \n+
    329 else
    \n+
    330 interface.build (remoteIndices_, AllFlags(), InteriorFlags() );
    \n+
    331 break;
    \n+
    332 case Dune::Overlap_OverlapFront_Interface :
    \n+
    333 interface.build (remoteIndices_, OverlapFlags(), OverlapFlags() );
    \n+
    334 break;
    \n+
    335 case Dune::Overlap_All_Interface :
    \n+
    336 if (dir == Dune::ForwardCommunication)
    \n+
    337 interface.build (remoteIndices_, OverlapFlags(), AllFlags() );
    \n+
    338 else
    \n+
    339 interface.build (remoteIndices_, AllFlags(), OverlapFlags() );
    \n+
    340 break;
    \n+
    341 case Dune::All_All_Interface :
    \n+
    342 interface.build (remoteIndices_, AllFlags(), AllFlags() );
    \n+
    343 break;
    \n+
    344 default :
    \n+
    345 DUNE_THROW(Dune::NotImplemented, "GridGlue::communicate for interface " << iftype << " not implemented");
    \n+
    346 }
    \n+
    347
    \n+
    348 // setup communication info (class needed to tunnel all info to the operator)
    \n+\n+
    350 CommInfo commInfo;
    \n+
    351 commInfo.dir = dir;
    \n+
    352 commInfo.gridglue = this;
    \n+
    353 commInfo.data = &data;
    \n+
    354
    \n+
    355 // create communicator
    \n+
    356 Dune::BufferedCommunicator bComm ;
    \n+
    357 bComm.template build< CommInfo >(commInfo, commInfo, interface);
    \n+
    358
    \n+
    359 // do communication
    \n+
    360 // choose communication direction.
    \n+
    361 if (dir == Dune::ForwardCommunication)
    \n+
    362 bComm.forward< Dune::GridGlue::ForwardOperator >(commInfo, commInfo);
    \n+
    363 else
    \n+
    364 bComm.backward< Dune::GridGlue::BackwardOperator >(commInfo, commInfo);
    \n+
    365 }
    \n+
    366 else
    \n+
    367#endif // HAVE_MPI
    \n+
    368 {
    \n+
    369 /*
    \n+
    370 * S E Q U E N T I A L V E R S I O N
    \n+
    371 */
    \n+
    372 Dune::dinfo << "GridGlue: sequential fallback communication" << std::endl;
    \n+
    373
    \n+
    374 // get comm buffer size
    \n+
    375 int ssz = size() * 10; // times data per intersection
    \n+
    376 int rsz = size() * 10;
    \n+
    377
    \n+
    378 // allocate send/receive buffer
    \n+
    379 auto sendbuffer = std::make_unique<DataType[]>(ssz);
    \n+
    380 auto receivebuffer = std::make_unique<DataType[]>(rsz);
    \n+
    381
    \n+
    382 // gather
    \n+
    383 Dune::GridGlue::StreamingMessageBuffer<DataType> gatherbuffer(sendbuffer.get());
    \n+
    384 for (const auto& in : intersections(*this))
    \n+
    385 {
    \n+
    386 /*
    \n+
    387 we need to have to variants depending on the communication direction.
    \n+
    388 */
    \n+
    389 if (dir == Dune::ForwardCommunication)
    \n+
    390 {
    \n+
    391 /*
    \n+
    392 dir : Forward (grid0 -> grid1)
    \n+
    393 */
    \n+
    394 if (in.self())
    \n+
    395 {
    \n+
    396 data.gather(gatherbuffer, in.inside(), in);
    \n+
    397 }
    \n+
    398 }
    \n+
    399 else // (dir == Dune::BackwardCommunication)
    \n+
    400 {
    \n+
    401 /*
    \n+
    402 dir : Backward (grid1 -> grid0)
    \n+
    403 */
    \n+
    404 if (in.neighbor())
    \n+
    405 {
    \n+
    406 data.gather(gatherbuffer, in.outside(), in.flip());
    \n+
    407 }
    \n+
    408 }
    \n+
    409 }
    \n+
    410
    \n+
    411 assert(ssz == rsz);
    \n+
    412 for (int i=0; i<ssz; i++)
    \n+
    413 receivebuffer[i] = sendbuffer[i];
    \n+
    414
    \n+
    415 // scatter
    \n+
    416 Dune::GridGlue::StreamingMessageBuffer<DataType> scatterbuffer(receivebuffer.get());
    \n+
    417 for (const auto& in : intersections(*this))
    \n+
    418 {
    \n+
    419 /*
    \n+
    420 we need to have to variants depending on the communication direction.
    \n+
    421 */
    \n+
    422 if (dir == Dune::ForwardCommunication)
    \n+
    423 {
    \n+
    424 /*
    \n+
    425 dir : Forward (grid0 -> grid1)
    \n+
    426 */
    \n+
    427 if (in.neighbor())
    \n+
    428 data.scatter(scatterbuffer, in.outside(), in.flip(),
    \n+
    429 data.size(in));
    \n+
    430 }
    \n+
    431 else // (dir == Dune::BackwardCommunication)
    \n+
    432 {
    \n+
    433 /*
    \n+
    434 dir : Backward (grid1 -> grid0)
    \n+
    435 */
    \n+
    436 if (in.self())
    \n+
    437 data.scatter(scatterbuffer, in.inside(), in,
    \n+
    438 data.size(in));
    \n+
    439 }
    \n+
    440 }
    \n+
    441 }
    \n+
    442}
    \n+
    \n+
    443
    \n+
    444} // end namespace GridGlue
    \n+
    445} // end namespace Dune
    \n+
    Model of the Intersection concept provided by GridGlue.
    \n
    Definition gridglue.hh:37
    \n+
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n+
    void printVector(const std::vector< T > &v, std::string name, int rank)
    Definition gridglue.cc:168
    \n+
    void MPI_AllApply(MPI_Comm mpicomm, OP &&op, const Args &... data)
    apply an operator locally to a difstributed data set
    Definition ringcomm.hh:297
    \n
    sequential adapter to couple two grids at specified close together boundaries
    Definition gridglue.hh:67
    \n-
    unsigned int IndexType
    Definition gridglue.hh:147
    \n-
    size_t size() const
    Definition gridglue.hh:393
    \n-
    IndexType index_
    index of this intersection after GridGlue interface
    Definition intersection.hh:112
    \n-
    The intersection of two entities of the two patches of a GridGlue.
    Definition intersection.hh:261
    \n-
    Definition intersectionindexset.hh:20
    \n-
    SizeType size() const
    Return total number of intersections.
    Definition intersectionindexset.hh:41
    \n-
    GridGlue::IndexType IndexType
    The type used for the indices.
    Definition intersectionindexset.hh:27
    \n-
    IndexType index(const Intersection< P0, P1, I, O > &i) const
    Map Dune::GridGlue::Intersection to index.
    Definition intersectionindexset.hh:34
    \n-
    size_t SizeType
    The type used for the size.
    Definition intersectionindexset.hh:29
    \n+
    void mergePatches(const std::vector< Dune::FieldVector< ctype, dimworld > > &patch0coords, const std::vector< unsigned int > &patch0entities, const std::vector< Dune::GeometryType > &patch0types, const int patch0rank, const std::vector< Dune::FieldVector< ctype, dimworld > > &patch1coords, const std::vector< unsigned int > &patch1entities, const std::vector< Dune::GeometryType > &patch1types, const int patch1rank)
    after building the merged grid the intersection can be updated through this method (for internal use)
    Definition gridglue.cc:179
    \n+
    void communicate(Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > &data, Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const
    Communicate information on the MergedGrid of a GridGlue.
    Definition gridglue.cc:300
    \n+
    void build()
    Definition gridglue.cc:36
    \n+
    void extractGrid(const Extractor &extractor, std::vector< Dune::FieldVector< ctype, dimworld > > &coords, std::vector< unsigned int > &faces, std::vector< Dune::GeometryType > &geometryTypes) const
    Definition gridglue.cc:265
    \n+
    std::conditional_t< side==0, P0, std::conditional_t< side==1, P1, void > > GridPatch
    Definition gridglue.hh:96
    \n+
    storage class for Dune::GridGlue::Intersection related data
    Definition intersection.hh:38
    \n+
    Definition gridgluecommunicate.hh:26
    \n+
    describes the features of a data handle for communication in parallel runs using the GridGlue::commun...
    Definition gridgluecommunicate.hh:77
    \n+
    size_t size(RISType &i) const
    Definition gridgluecommunicate.hh:92
    \n+
    void scatter(MessageBufferImp &buff, const EntityType &e, const RISType &i, size_t n)
    Definition gridgluecommunicate.hh:118
    \n+
    void gather(MessageBufferImp &buff, const EntityType &e, const RISType &i) const
    pack data from user to message buffer
    Definition gridgluecommunicate.hh:104
    \n+
    Definition gridgluecommunicate.hh:141
    \n+
    forward gather scatter to user defined CommInfo class
    Definition gridgluecommunicate.hh:194
    \n+
    collects all GridGlue data requried for communication
    Definition gridgluecommunicate.hh:272
    \n+
    Dune::CommunicationDirection dir
    Definition gridgluecommunicate.hh:288
    \n+
    ::Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > * data
    Definition gridgluecommunicate.hh:282
    \n+
    const GridGlue * gridglue
    Definition gridgluecommunicate.hh:281
    \n+
    Provides codimension-independent methods for grid extraction.
    Definition extractor.hh:46
    \n+
    static constexpr auto dimworld
    Definition extractor.hh:50
    \n+
    void getFaces(std::vector< VertexVector > &faces) const
    Get the corners of the extracted subentities.
    Definition extractor.hh:304
    \n+
    void getGeometryTypes(std::vector< Dune::GeometryType > &geometryTypes) const
    Get the list of geometry types.
    Definition extractor.hh:293
    \n+
    void getCoords(std::vector< Dune::FieldVector< ctype, dimworld > > &coords) const
    getter for the coordinates array
    Definition extractor.hh:275
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,105 +1,584 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-intersectionindexset.hh\n+gridglue.cc\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-_\b1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n+1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n+2// vi: set et ts=4 sw=2 sts=2:\n+3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n-2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n+4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-3#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH\n-4#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH\n-5\n-6#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n-7#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n-8\n-9#ifndef ONLY_SIMPLEX_INTERSECTIONS\n-10// we currently support only one intersection type. If we want to support\n-more,\n-11// we have to think about the semantics of our IndexSet\n-12#error Not Implemented\n+5/* IMPLEMENTATION OF CLASS G R I D G L U E */\n+6\n+7#include \"_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\"\n+8#include \n+9#include \n+10#include \"../gridglue.hh\"\n+11#if HAVE_MPI\n+12#include \"../common/ringcomm.hh\"\n 13#endif\n 14\n-15namespace _\bD_\bu_\bn_\be {\n-16 namespace _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be {\n-17\n-18 template\n-_\b1_\b9 class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt\n-20 {\n-21 friend class ::Dune::GridGlue::GridGlue;\n-22 typedef ::Dune::GridGlue::GridGlue _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be;\n-23\n-24 public:\n-25\n-_\b2_\b7 typedef typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be;\n-_\b2_\b9 typedef size_t _\bS_\bi_\bz_\be_\bT_\by_\bp_\be;\n-30\n-33 template\n-_\b3_\b4 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bi_\bn_\bd_\be_\bx (const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bP_\b0_\b,_\bP_\b1_\b,_\bI_\b,_\bO_\b> & i) const\n-35 {\n-36 return i.i_->_\bi_\bn_\bd_\be_\bx_\b_;\n-37 }\n-38\n-_\b4_\b1 _\bS_\bi_\bz_\be_\bT_\by_\bp_\be _\bs_\bi_\bz_\be () const\n-42 {\n-43 return glue_->_\bs_\bi_\bz_\be();\n-44 }\n-45\n-46 private:\n-47\n-49 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be * g) :\n-50 glue_(g) {}\n-51\n-52 const GridGlue * glue_;\n-53 };\n-54\n-55 } // end namespace GridGlue\n-56} // end namespace Dune\n+15#include \n+16\n+17namespace _\bD_\bu_\bn_\be {\n+18namespace GridGlue {\n+19\n+20template\n+_\b2_\b1_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be(const std::shared_ptr< const _\bG_\br_\bi_\bd_\bP_\ba_\bt_\bc_\bh_\b<_\b0_\b> >& gp0,\n+const std::shared_ptr< const _\bG_\br_\bi_\bd_\bP_\ba_\bt_\bc_\bh_\b<_\b1_\b> >& gp1, const std::\n+shared_ptr& merger)\n+22 : patches_{gp0, gp1}, merger_(merger)\n+23{\n+24#if HAVE_MPI\n+25 // if we have only seq. meshes don't use parallel glueing\n+26 if (gp0->gridView().comm().size() == 1\n+27 && gp1->gridView().comm().size() == 1)\n+28 mpicomm_ = MPI_COMM_SELF;\n+29 else\n+30 mpicomm_ = MPI_COMM_WORLD;\n+31#endif // HAVE_MPI\n+32 std::cout << \"GridGlue: Constructor succeeded!\" << std::endl;\n+33}\n+34\n+35template\n+_\b3_\b6void _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>_\b:_\b:_\bb_\bu_\bi_\bl_\bd()\n+37{\n+38 int myrank = 0;\n+39#if HAVE_MPI\n+40 int commsize = 1;\n+41 MPI_Comm_rank(mpicomm_, &myrank);\n+42 MPI_Comm_size(mpicomm_, &commsize);\n+43#endif // HAVE_MPI\n+44\n+45 // clear the contents from the current intersections array\n+46 {\n+47 std::vector dummy(1); // we need size 1, as we always\n+store data for the end-intersection\n+48 intersections_.swap(dummy);\n+49 }\n+50\n+51 std::vector > patch0coords;\n+52 std::vector patch0entities;\n+53 std::vector patch0types;\n+54 std::vector > patch1coords;\n+55 std::vector patch1entities;\n+56 std::vector patch1types;\n 57\n-58#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH\n-_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh\n-Central component of the module implementing the coupling of two grids.\n+58 /*\n+59 * extract global surface patchs\n+60 */\n+61\n+62 // retrieve the coordinate and topology information from the extractors\n+63 // and apply transformations if necessary\n+64 extractGrid(patch<0>(), patch0coords, patch0entities, patch0types);\n+65 extractGrid(patch<1>(), patch1coords, patch1entities, patch1types);\n+66\n+67 std::cout << \">>>> rank \" << myrank << \" coords: \"\n+68 << patch0coords.size() << \" and \" << patch1coords.size() << std::endl;\n+69 std::cout << \">>>> rank \" << myrank << \" entities: \"\n+70 << patch0entities.size() << \" and \" << patch1entities.size() << std::endl;\n+71 std::cout << \">>>> rank \" << myrank << \" types: \"\n+72 << patch0types.size() << \" and \" << patch1types.size() << std::endl;\n+73\n+74#ifdef WRITE_TO_VTK\n+75 const char prefix[] = \"GridGlue::Builder::build() : \";\n+76 char patch0surf[256];\n+77 sprintf(patch0surf, \"/tmp/vtk-patch0-test-%i\", myrank);\n+78 char patch1surf[256];\n+79 sprintf(patch1surf, \"/tmp/vtk-patch1-test-%i\", myrank);\n+80\n+81 // std::cout << prefix << \"Writing patch0 surface to '\" << patch0surf <<\n+\".vtk'...\\n\";\n+82 // VtkSurfaceWriter vtksw(patch0surf);\n+83 // vtksw.writeSurface(patch0coords, patch0entities, grid0dim, dimworld);\n+84 // std::cout << prefix << \"Done writing patch0 surface!\\n\";\n+85\n+86 // std::cout << prefix << \"Writing patch1 surface to '\" << patch1surf <<\n+\".vtk'...\\n\";\n+87 // vtksw.setFilename(patch1surf);\n+88 // vtksw.writeSurface(patch1coords, patch1entities, grid1dim, dimworld);\n+89 // std::cout << prefix << \"Done writing patch1 surface!\\n\";\n+90#endif // WRITE_TO_VTK\n+91\n+92 // we start with an empty set\n+93 index__sz = 0;\n+94\n+95#if HAVE_MPI\n+96 if (commsize > 1)\n+97 {\n+98 // setup parallel indexset\n+99 patch0_is_.beginResize();\n+100 patch1_is_.beginResize();\n+101 }\n+102\n+103 auto op =\n+104 [&](\n+105 const int mergingrank,\n+106 const std::vector >& remotePatch0coords,\n+107 const std::vector& remotePatch0entities,\n+108 const std::vector& remotePatch0types,\n+109 const std::vector >& remotePatch1coords,\n+110 const std::vector& remotePatch1entities,\n+111 const std::vector& remotePatch1types\n+112 )\n+113 {\n+114 if (remotePatch1entities.size() > 0 && patch0entities.size() > 0)\n+115 mergePatches(patch0coords, patch0entities, patch0types, myrank,\n+116 remotePatch1coords, remotePatch1entities, remotePatch1types, mergingrank);\n+117 if (mergingrank != myrank &&\n+118 remotePatch0entities.size() > 0 && patch1entities.size() > 0)\n+119 mergePatches(remotePatch0coords, remotePatch0entities, remotePatch0types,\n+mergingrank,\n+120 patch1coords, patch1entities, patch1types, myrank);\n+121 };\n+122 _\bP_\ba_\br_\ba_\bl_\bl_\be_\bl_\b:_\b:_\bM_\bP_\bI_\b__\bA_\bl_\bl_\bA_\bp_\bp_\bl_\by(mpicomm_, op,\n+123 patch0coords, patch0entities, patch0types,\n+124 patch1coords, patch1entities, patch1types\n+125 );\n+126\n+127 if (commsize > 1)\n+128 {\n+129 // finalize ParallelIndexSet & RemoteIndices\n+130 patch0_is_.endResize();\n+131 patch1_is_.endResize();\n+132\n+133 // setup remote index information\n+134 remoteIndices_.setIncludeSelf(true);\n+135 // #warning add list of neighbors ...\n+136 remoteIndices_.setIndexSets(patch0_is_, patch1_is_, mpicomm_) ;\n+137 remoteIndices_.rebuild();\n+138\n+139 // DEBUG Print all remote indices\n+140#ifdef DEBUG_GRIDGLUE_PARALLELMERGE\n+141 for (auto it = remoteIndices_.begin(); it != remoteIndices_.end(); it++)\n+142 {\n+143 std::cout << myrank << \"\\tri-list\\t\" << it->first << std::endl;\n+144 for (auto xit = it->second.first->begin(); xit != it->second.first->end();\n+++xit)\n+145 std::cout << myrank << \"\\tri-list 1 \\t\" << it->first << \"\\t\" << *xit <<\n+std::endl;\n+146 for (auto xit = it->second.second->begin(); xit != it->second.second->end\n+(); ++xit)\n+147 std::cout << myrank << \"\\tri-list 2 \\t\" << it->first << \"\\t\" << *xit <<\n+std::endl;\n+148 }\n+149#endif\n+150 }\n+151#else // HAVE_MPI\n+152\n+153 if (patch1entities.size() > 0 && patch0entities.size() > 0)\n+154 {\n+155 mergePatches(patch0coords, patch0entities, patch0types, myrank,\n+156 patch1coords, patch1entities, patch1types, myrank);\n+157#ifdef CALL_MERGER_TWICE\n+158 mergePatches(patch0coords, patch0entities, patch0types, myrank,\n+159 patch1coords, patch1entities, patch1types, myrank);\n+160#endif\n+161 }\n+162\n+163#endif // HAVE_MPI\n+164\n+165}\n+166\n+167template\n+_\b1_\b6_\b8void _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(const std::vector & v, std::string name, int rank)\n+169{\n+170 std::cout << rank << \": \" << name << std::endl;\n+171 for (size_t i=0; i\n+_\b1_\b7_\b9void _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>_\b:_\b:_\bm_\be_\br_\bg_\be_\bP_\ba_\bt_\bc_\bh_\be_\bs(\n+180 const std::vector >& patch0coords,\n+181 const std::vector& patch0entities,\n+182 const std::vector& patch0types,\n+183 const int patch0rank,\n+184 const std::vector >& patch1coords,\n+185 const std::vector& patch1entities,\n+186 const std::vector& patch1types,\n+187 const int patch1rank)\n+188{\n+189\n+190 // howto handle overlap etc?\n+191\n+192 int myrank = 0;\n+193#if HAVE_MPI\n+194 int commsize = 1;\n+195 MPI_Comm_rank(mpicomm_, &myrank);\n+196 MPI_Comm_size(mpicomm_, &commsize);\n+197#endif // HAVE_MPI\n+198\n+199 // which patches are local?\n+200 const bool patch0local = (myrank == patch0rank);\n+201 const bool patch1local = (myrank == patch1rank);\n+202\n+203 // remember the number of previous remote intersections\n+204 const unsigned int offset = intersections_.size()-1;\n+205\n+206 std::cout << myrank\n+207 << \" GridGlue::mergePatches : rank \" << patch0rank << \" / \" << patch1rank\n+<< std::endl;\n+208\n+209 // start the actual build process\n+210 merger_->build(patch0coords, patch0entities, patch0types,\n+211 patch1coords, patch1entities, patch1types);\n+212\n+213 // append to intersections list\n+214 intersections_.resize(merger_->nSimplices() + offset + 1);\n+215 for (unsigned int i = 0; i < merger_->nSimplices(); ++i)\n+216 intersections_[offset + i] = _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba(*this, i, offset,\n+patch0local, patch1local);\n+217\n+218 index__sz = intersections_.size() - 1;\n+219\n+220 std::cout << myrank\n+221 << \" GridGlue::mergePatches : \"\n+222 << \"The number of remote intersections is \" << intersections_.size()-1 <<\n+std::endl;\n+223\n+224#if 0\n+225 _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(patch0coords,\"patch0coords\",myrank);\n+226 _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(patch0entities,\"patch0entities\",myrank);\n+227 _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(patch0types,\"patch0types\",myrank);\n+228 _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(patch1coords,\"patch1coords\",myrank);\n+229 _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(patch1entities,\"patch1entities\",myrank);\n+230 _\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br(patch1types,\"patch1types\",myrank);\n+231#endif\n+232\n+233#if HAVE_MPI\n+234 if (commsize > 1)\n+235 {\n+236 // update remote index sets\n+237 assert(Dune::RESIZE == patch0_is_.state());\n+238 assert(Dune::RESIZE == patch1_is_.state());\n+239\n+240 for (unsigned int i = 0; i < merger_->nSimplices(); i++)\n+241 {\n+242 // #warning only handle the newest intersections / merger info\n+243 const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba & it = intersections_[i];\n+244 _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd gid(patch0rank, patch1rank, i);\n+245 if (it.template local<0>())\n+246 {\n+247 Dune::PartitionType ptype = patch<0>().element(it.template index<0>\n+()).partitionType();\n+248 patch0_is_.add (gid, LocalIndex(offset+i, ptype) );\n+249 }\n+250 if (it.template local<1>())\n+251 {\n+252 Dune::PartitionType ptype = patch<1>().element(it.template index<1>\n+()).partitionType();\n+253 patch1_is_.add (gid, LocalIndex(offset+i, ptype) );\n+254 }\n+255 }\n+256 }\n+257#endif // HAVE_MPI\n+258\n+259 // cleanup the merger\n+260 merger_->clear();\n+261}\n+262\n+263template\n+264template\n+_\b2_\b6_\b5void _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>_\b:_\b:_\be_\bx_\bt_\br_\ba_\bc_\bt_\bG_\br_\bi_\bd (const _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br & extractor,\n+266 std::vector > & coords,\n+267 std::vector & entities,\n+268 std::vector& geometryTypes) const\n+269{\n+270 std::vector tempcoords;\n+271 std::vector tempentities;\n+272\n+273 extractor._\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs(tempcoords);\n+274 coords.clear();\n+275 coords.reserve(tempcoords.size());\n+276\n+277 for (unsigned int i = 0; i < tempcoords.size(); ++i)\n+278 {\n+279 assert(int(dimworld) == int(_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd));\n+280 coords.push_back(Dune::FieldVector());\n+281 for (size_t j = 0; j \n+299template\n+_\b3_\b0_\b0void _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>_\b:_\b:_\bc_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\be(\n+301 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b<_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b> & data,\n+302 Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const\n+303{\n+304 typedef _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b<_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b>\n+DataHandle;\n+305 typedef typename DataHandle::DataType DataType;\n+306\n+307#if HAVE_MPI\n+308\n+309 if (mpicomm_ != MPI_COMM_SELF)\n+310 {\n+311 /*\n+312 * P A R A L L E L V E R S I O N\n+313 */\n+314 // setup communication interfaces\n+315 Dune::dinfo << \"GridGlue: parallel communication\" << std::endl;\n+316 typedef Dune::EnumItem \n+InteriorFlags;\n+317 typedef Dune::EnumItem \n+OverlapFlags;\n+318 typedef Dune::EnumRange AllFlags;\n+319 Dune::Interface interface;\n+320 assert(remoteIndices_.isSynced());\n+321 switch (iftype)\n+322 {\n+323 case Dune::InteriorBorder_InteriorBorder_Interface :\n+324 interface.build (remoteIndices_, InteriorFlags(), InteriorFlags() );\n+325 break;\n+326 case Dune::InteriorBorder_All_Interface :\n+327 if (dir == Dune::ForwardCommunication)\n+328 interface.build (remoteIndices_, InteriorFlags(), AllFlags() );\n+329 else\n+330 interface.build (remoteIndices_, AllFlags(), InteriorFlags() );\n+331 break;\n+332 case Dune::Overlap_OverlapFront_Interface :\n+333 interface.build (remoteIndices_, OverlapFlags(), OverlapFlags() );\n+334 break;\n+335 case Dune::Overlap_All_Interface :\n+336 if (dir == Dune::ForwardCommunication)\n+337 interface.build (remoteIndices_, OverlapFlags(), AllFlags() );\n+338 else\n+339 interface.build (remoteIndices_, AllFlags(), OverlapFlags() );\n+340 break;\n+341 case Dune::All_All_Interface :\n+342 interface.build (remoteIndices_, AllFlags(), AllFlags() );\n+343 break;\n+344 default :\n+345 DUNE_THROW(Dune::NotImplemented, \"GridGlue::communicate for interface \" <<\n+iftype << \" not implemented\");\n+346 }\n+347\n+348 // setup communication info (class needed to tunnel all info to the\n+operator)\n+349 typedef _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b,_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b>\n+_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo;\n+350 _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo commInfo;\n+351 commInfo._\bd_\bi_\br = dir;\n+352 commInfo._\bg_\br_\bi_\bd_\bg_\bl_\bu_\be = this;\n+353 commInfo._\bd_\ba_\bt_\ba = &data;\n+354\n+355 // create communicator\n+356 Dune::BufferedCommunicator bComm ;\n+357 bComm.template build< CommInfo >(commInfo, commInfo, interface);\n+358\n+359 // do communication\n+360 // choose communication direction.\n+361 if (dir == Dune::ForwardCommunication)\n+362 bComm.forward< _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bF_\bo_\br_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br >(commInfo, commInfo);\n+363 else\n+364 bComm.backward< _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bB_\ba_\bc_\bk_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br >(commInfo, commInfo);\n+365 }\n+366 else\n+367#endif // HAVE_MPI\n+368 {\n+369 /*\n+370 * S E Q U E N T I A L V E R S I O N\n+371 */\n+372 Dune::dinfo << \"GridGlue: sequential fallback communication\" << std::endl;\n+373\n+374 // get comm buffer size\n+375 int ssz = size() * 10; // times data per intersection\n+376 int rsz = size() * 10;\n+377\n+378 // allocate send/receive buffer\n+379 auto sendbuffer = std::make_unique(ssz);\n+380 auto receivebuffer = std::make_unique(rsz);\n+381\n+382 // gather\n+383 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b<_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\b> gatherbuffer\n+(sendbuffer.get());\n+384 for (const auto& in : _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(*this))\n+385 {\n+386 /*\n+387 we need to have to variants depending on the communication direction.\n+388 */\n+389 if (dir == Dune::ForwardCommunication)\n+390 {\n+391 /*\n+392 dir : Forward (grid0 -> grid1)\n+393 */\n+394 if (in.self())\n+395 {\n+396 data._\bg_\ba_\bt_\bh_\be_\br(gatherbuffer, in.inside(), in);\n+397 }\n+398 }\n+399 else // (dir == Dune::BackwardCommunication)\n+400 {\n+401 /*\n+402 dir : Backward (grid1 -> grid0)\n+403 */\n+404 if (in.neighbor())\n+405 {\n+406 data._\bg_\ba_\bt_\bh_\be_\br(gatherbuffer, in.outside(), in.flip());\n+407 }\n+408 }\n+409 }\n+410\n+411 assert(ssz == rsz);\n+412 for (int i=0; i scatterbuffer\n+(receivebuffer.get());\n+417 for (const auto& in : _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(*this))\n+418 {\n+419 /*\n+420 we need to have to variants depending on the communication direction.\n+421 */\n+422 if (dir == Dune::ForwardCommunication)\n+423 {\n+424 /*\n+425 dir : Forward (grid0 -> grid1)\n+426 */\n+427 if (in.neighbor())\n+428 data._\bs_\bc_\ba_\bt_\bt_\be_\br(scatterbuffer, in.outside(), in.flip(),\n+429 data._\bs_\bi_\bz_\be(in));\n+430 }\n+431 else // (dir == Dune::BackwardCommunication)\n+432 {\n+433 /*\n+434 dir : Backward (grid1 -> grid0)\n+435 */\n+436 if (in.self())\n+437 data._\bs_\bc_\ba_\bt_\bt_\be_\br(scatterbuffer, in.inside(), in,\n+438 data._\bs_\bi_\bz_\be(in));\n+439 }\n+440 }\n+441 }\n+442}\n+443\n+444} // end namespace GridGlue\n+445} // end namespace Dune\n _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n Model of the Intersection concept provided by GridGlue.\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n+> &reverse=!reversed)\n+Iterate over all intersections of a GridGlue.\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt_\bV_\be_\bc_\bt_\bo_\br\n+void printVector(const std::vector< T > &v, std::string name, int rank)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.cc:168\n+_\bD_\bu_\bn_\be_\b:_\b:_\bP_\ba_\br_\ba_\bl_\bl_\be_\bl_\b:_\b:_\bM_\bP_\bI_\b__\bA_\bl_\bl_\bA_\bp_\bp_\bl_\by\n+void MPI_AllApply(MPI_Comm mpicomm, OP &&op, const Args &... data)\n+apply an operator locally to a difstributed data set\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn ringcomm.hh:297\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n sequential adapter to couple two grids at specified close together boundaries\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:67\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n-unsigned int IndexType\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:147\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bs_\bi_\bz_\be\n-size_t size() const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:393\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bi_\bn_\bd_\be_\bx_\b_\n-IndexType index_\n-index of this intersection after GridGlue interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:112\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-The intersection of two entities of the two patches of a GridGlue.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:261\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionindexset.hh:20\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt_\b:_\b:_\bs_\bi_\bz_\be\n-SizeType size() const\n-Return total number of intersections.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionindexset.hh:41\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n-GridGlue::IndexType IndexType\n-The type used for the indices.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionindexset.hh:27\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt_\b:_\b:_\bi_\bn_\bd_\be_\bx\n-IndexType index(const Intersection< P0, P1, I, O > &i) const\n-Map Dune::GridGlue::Intersection to index.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionindexset.hh:34\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bn_\bd_\be_\bx_\bS_\be_\bt_\b:_\b:_\bS_\bi_\bz_\be_\bT_\by_\bp_\be\n-size_t SizeType\n-The type used for the size.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionindexset.hh:29\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bm_\be_\br_\bg_\be_\bP_\ba_\bt_\bc_\bh_\be_\bs\n+void mergePatches(const std::vector< Dune::FieldVector< ctype, dimworld > >\n+&patch0coords, const std::vector< unsigned int > &patch0entities, const std::\n+vector< Dune::GeometryType > &patch0types, const int patch0rank, const std::\n+vector< Dune::FieldVector< ctype, dimworld > > &patch1coords, const std::\n+vector< unsigned int > &patch1entities, const std::vector< Dune::GeometryType >\n+&patch1types, const int patch1rank)\n+after building the merged grid the intersection can be updated through this\n+method (for internal use)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.cc:179\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\be\n+void communicate(Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >\n+&data, Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const\n+Communicate information on the MergedGrid of a GridGlue.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.cc:300\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bb_\bu_\bi_\bl_\bd\n+void build()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.cc:36\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\be_\bx_\bt_\br_\ba_\bc_\bt_\bG_\br_\bi_\bd\n+void extractGrid(const Extractor &extractor, std::vector< Dune::FieldVector<\n+ctype, dimworld > > &coords, std::vector< unsigned int > &faces, std::vector<\n+Dune::GeometryType > &geometryTypes) const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.cc:265\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bP_\ba_\bt_\bc_\bh\n+std::conditional_t< side==0, P0, std::conditional_t< side==1, P1, void > >\n+GridPatch\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:96\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba\n+storage class for Dune::GridGlue::Intersection related data\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:38\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:26\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be\n+describes the features of a data handle for communication in parallel runs\n+using the GridGlue::commun...\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:77\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bs_\bi_\bz_\be\n+size_t size(RISType &i) const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:92\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bs_\bc_\ba_\bt_\bt_\be_\br\n+void scatter(MessageBufferImp &buff, const EntityType &e, const RISType &i,\n+size_t n)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:118\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bg_\ba_\bt_\bh_\be_\br\n+void gather(MessageBufferImp &buff, const EntityType &e, const RISType &i)\n+const\n+pack data from user to message buffer\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:104\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:141\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n+forward gather scatter to user defined CommInfo class\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:194\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo\n+collects all GridGlue data requried for communication\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:272\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bd_\bi_\br\n+Dune::CommunicationDirection dir\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:288\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bd_\ba_\bt_\ba\n+::Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > * data\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:282\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be\n+const GridGlue * gridglue\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:281\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+Provides codimension-independent methods for grid extraction.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:46\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd\n+static constexpr auto dimworld\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:50\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bt_\bF_\ba_\bc_\be_\bs\n+void getFaces(std::vector< VertexVector > &faces) const\n+Get the corners of the extracted subentities.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:304\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bt_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\bs\n+void getGeometryTypes(std::vector< Dune::GeometryType > &geometryTypes) const\n+Get the list of geometry types.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:293\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs\n+void getCoords(std::vector< Dune::FieldVector< ctype, dimworld > > &coords)\n+const\n+getter for the coordinates array\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:275\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00023.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00023.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: gridgluecommunicate.hh File Reference\n+dune-grid-glue: gridglueamirawriter.hh File Reference\n \n \n \n \n \n \n \n@@ -71,74 +71,42 @@\n \n
    \n \n
    \n \n-
    gridgluecommunicate.hh File Reference
    \n+Namespaces
    \n+
    gridglueamirawriter.hh File Reference
    \n \n
    \n \n-

    Describes the parallel communication interface class for Dune::GridGlue. \n+

    Write all remote intersections to a AmiraMesh file. \n More...

    \n-
    #include <type_traits>
    \n-#include <dune/common/bartonnackmanifcheck.hh>
    \n-#include <dune/common/parallel/communicator.hh>
    \n-#include <dune/grid/common/datahandleif.hh>
    \n-#include <dune/grid/common/gridenums.hh>
    \n+
    #include <fstream>
    \n+#include <sstream>
    \n+#include <type_traits>
    \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 Classes

    struct  Dune::GridGlue::GlobalId
     
    class  Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp >
     describes the features of a data handle for communication in parallel runs using the GridGlue::communicate methods. More...
     
    class  Dune::GridGlue::StreamingMessageBuffer< DT >
     
    class  Dune::GridGlue::CommunicationOperator< dir >
     forward gather scatter to user defined CommInfo class More...
     
    struct  Dune::GridGlue::CommInfo< GG, DataHandleImp, DataTypeImp >
     collects all GridGlue data requried for communication More...
     
    struct  Dune::CommPolicy< ::Dune::GridGlue::CommInfo< GG, DataHandleImp, DataTypeImp > >
     specialization of the CommPolicy struct, required for the ParallelIndexsets More...
    class  Dune::GridGlue::GridGlueAmiraWriter
     Write remote intersections to a AmiraMesh file for debugging purposes. More...
     
    \n \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n-\n-\n-\n-\n-\n-\n-\n-

    \n-Typedefs

    typedef std::pair< int, int > Dune::GridGlue::RankPair
     
    typedef CommunicationOperator< Dune::ForwardCommunication > Dune::GridGlue::ForwardOperator
     
    typedef CommunicationOperator< Dune::BackwardCommunication > Dune::GridGlue::BackwardOperator
     
    \n-\n-\n-\n

    \n-Functions

    std::ostream & Dune::GridGlue::operator<< (std::ostream &os, const GlobalId &id)
     
    \n

    Detailed Description

    \n-

    Describes the parallel communication interface class for Dune::GridGlue.

    \n-
    Author
    Christian Engwer
    \n+

    Write all remote intersections to a AmiraMesh file.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,61 +1,28 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bT_\by_\bp_\be_\bd_\be_\bf_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-gridgluecommunicate.hh File Reference\n-Describes the parallel communication interface class for _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be.\n-_\bM_\bo_\br_\be_\b._\b._\b.\n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n+gridglueamirawriter.hh File Reference\n+Write all remote intersections to a AmiraMesh file. _\bM_\bo_\br_\be_\b._\b._\b.\n+#include \n+#include \n #include \n-#include \n-#include \n-#include \n-#include \n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n-\u00a0\n- class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b<_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>\n-\u00a0 describes the features of a data handle for communication in parallel\n- runs using the _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\be methods. _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n- class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b<_\b _\bD_\bT_\b _\b>\n-\u00a0\n- class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br_\b<_\b _\bd_\bi_\br_\b _\b>\n-\u00a0 forward gather scatter to user defined _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo class _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\b _\bG_\bG_\b,_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>\n-\u00a0 collects all _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be data requried for communication _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bP_\bo_\bl_\bi_\bc_\by_\b<_\b _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\b _\bG_\bG_\b,_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,\n- _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>_\b _\b>\n-\u00a0 specialization of the CommPolicy struct, required for the\n- ParallelIndexsets _\bM_\bo_\br_\be_\b._\b._\b.\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\bA_\bm_\bi_\br_\ba_\bW_\br_\bi_\bt_\be_\br\n+\u00a0 Write remote intersections to a AmiraMesh file for debugging purposes.\n+ _\bM_\bo_\br_\be_\b._\b._\b.\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n-T\bTy\byp\bpe\bed\bde\bef\bfs\bs\n- typedef std::pair< int, int >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\ba_\bn_\bk_\bP_\ba_\bi_\br\n-\u00a0\n-typedef _\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br< Dune::\n- ForwardCommunication >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bF_\bo_\br_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n-\u00a0\n-typedef _\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br< Dune::\n- BackwardCommunication >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bB_\ba_\bc_\bk_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n-\u00a0\n-F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-std::ostream &\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b<_\b< (std::ostream &os, const _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n- &id)\n-\u00a0\n *\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-Describes the parallel communication interface class for _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be.\n- Author\n- Christian Engwer\n+Write all remote intersections to a AmiraMesh file.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00023_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00023_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: gridgluecommunicate.hh Source File\n+dune-grid-glue: gridglueamirawriter.hh Source File\n \n \n \n \n \n \n \n@@ -74,365 +74,166 @@\n \n \n
    \n
    \n-
    gridgluecommunicate.hh
    \n+
    gridglueamirawriter.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n-
    2// vi: set et ts=4 sw=2 sts=2:
    \n-
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n-
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    5#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH
    \n-
    6#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH
    \n-
    7
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n+
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+
    8#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH
    \n+
    9#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH
    \n+
    10
    \n+
    11#include <fstream>
    \n+
    12#include <sstream>
    \n
    13#include <type_traits>
    \n
    14
    \n-
    15#include <dune/common/bartonnackmanifcheck.hh>
    \n-
    16#include <dune/common/parallel/communicator.hh>
    \n-
    17#include <dune/grid/common/datahandleif.hh>
    \n-
    18#include <dune/grid/common/gridenums.hh>
    \n-
    19
    \n-
    20
    \n-
    21namespace Dune {
    \n-
    22 namespace GridGlue {
    \n-
    23
    \n-
    24 typedef std::pair<int, int> RankPair;
    \n-
    \n-
    25 struct GlobalId : public std::pair<RankPair, unsigned int>
    \n-
    26 {
    \n-
    \n-\n-
    31 this->first.first = 0;
    \n-
    32 this->first.second = 0;
    \n-
    33 this->second = 0;
    \n-
    34 }
    \n-
    \n-
    \n-
    38 GlobalId(int i) {
    \n-
    39 this->first.first = i;
    \n-
    40 this->first.second = i;
    \n-
    41 this->second = 0;
    \n-
    42 }
    \n-
    \n-
    \n-
    48 GlobalId(int i, int j, unsigned int n) {
    \n-
    49 this->first.first = std::min(i,j);
    \n-
    50 this->first.second = std::max(i,j);
    \n-
    51 this->second = n;
    \n-
    52 }
    \n-
    \n-
    53 };
    \n-
    \n-
    54
    \n-
    \n-
    55 inline std::ostream& operator<<(std::ostream& os, const GlobalId & id)
    \n-
    56 {
    \n-
    57 os << "("
    \n-
    58 << id.first.first << "," << id.first.second << ","
    \n-
    59 << id.second << ")";
    \n-
    60 return os;
    \n-
    61 }
    \n-
    \n-
    62
    \n-
    75 template <class DataHandleImp, class DataTypeImp>
    \n-
    \n-\n-
    77 {
    \n-
    78 public:
    \n-
    80 typedef DataTypeImp DataType;
    \n-
    81
    \n-
    82 protected:
    \n-
    83 // one should not create an explicit instance of this inteface object
    \n-\n-
    85
    \n-
    86 public:
    \n-
    87
    \n-
    91 template<class RISType>
    \n-
    \n-
    92 size_t size (RISType& i) const
    \n-
    93 {
    \n-
    94 CHECK_INTERFACE_IMPLEMENTATION((asImp().size(i)));
    \n-
    95 return asImp().size(i);
    \n-
    96 }
    \n-
    \n-
    97
    \n-
    103 template<class MessageBufferImp, class EntityType, class RISType>
    \n-
    \n-
    104 void gather (MessageBufferImp& buff, const EntityType& e, const RISType & i) const
    \n-
    105 {
    \n-
    106 MessageBufferIF<MessageBufferImp> buffIF(buff);
    \n-
    107 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().gather(buffIF,e,i)));
    \n-
    108 }
    \n-
    \n-
    109
    \n-
    117 template<class MessageBufferImp, class EntityType, class RISType>
    \n-
    \n-
    118 void scatter (MessageBufferImp& buff, const EntityType& e, const RISType & i, size_t n)
    \n-
    119 {
    \n-
    120 MessageBufferIF<MessageBufferImp> buffIF(buff);
    \n-
    121 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp().scatter(buffIF,e,i,n)));
    \n-
    122 }
    \n-
    \n-
    123
    \n-
    124 private:
    \n-
    126 DataHandleImp& asImp () {
    \n-
    127 return static_cast<DataHandleImp &> (*this);
    \n-
    128 }
    \n-
    130 const DataHandleImp& asImp () const
    \n-
    131 {
    \n-
    132 return static_cast<const DataHandleImp &>(*this);
    \n-
    133 }
    \n-
    134 }; // end class CommDataHandleIF
    \n-
    \n-
    135
    \n-
    140 template<typename DT>
    \n-
    \n-\n-
    142 public:
    \n-
    143 typedef DT value_type;
    \n-
    144
    \n-
    145 // Constructor
    \n-
    \n-\n-
    147 {
    \n-
    148 a=p;
    \n-
    149 i=0;
    \n-
    150 j=0;
    \n-
    151 }
    \n-
    \n-
    152
    \n-
    153 // write data to message buffer, acts like a stream !
    \n-
    154 template<class Y>
    \n-
    \n-
    155 void write (const Y& data)
    \n-
    156 {
    \n-
    157 static_assert(std::is_same<DT,Y>::value, "DataType mismatch");
    \n-
    158 a[i++] = data;
    \n-
    159 }
    \n-
    \n-
    160
    \n-
    161 // read data from message buffer, acts like a stream !
    \n-
    162 template<class Y>
    \n-
    \n-
    163 void read (Y& data) const
    \n-
    164 {
    \n-
    165 static_assert(std::is_same<DT,Y>::value, "DataType mismatch");
    \n-
    166 data = a[j++];
    \n-
    167 }
    \n-
    \n-
    168
    \n-
    169 size_t counter() const { return i; }
    \n-
    170
    \n-
    \n-
    171 void clear()
    \n-
    172 {
    \n-
    173 i = 0;
    \n-
    174 j = 0;
    \n-
    175 }
    \n-
    \n-
    176
    \n-
    177 // we need access to these variables in an assertion
    \n-
    178#ifdef NDEBUG
    \n-
    179 private:
    \n-
    180#endif
    \n-
    181 DT *a;
    \n-
    182 size_t i;
    \n-
    183 mutable size_t j;
    \n-
    184 };
    \n-
    \n-
    185
    \n-
    192 template<int dir>
    \n-
    \n-\n-
    194 {
    \n-
    195 public:
    \n-
    196 template<class CommInfo>
    \n-
    \n-
    197 static const typename CommInfo::DataType& gather(const CommInfo& commInfo, size_t i, size_t j = 0)
    \n-
    198 {
    \n-
    199 // get Intersection
    \n-
    200 typedef typename CommInfo::GridGlue::Intersection Intersection;
    \n-
    201 Intersection ris(commInfo.gridglue->getIntersection(i));
    \n-
    202
    \n-
    203 // fill buffer if we have a new intersection
    \n-
    204 if (j == 0)
    \n-
    205 {
    \n-
    206 commInfo.mbuffer.clear();
    \n-
    207 if (dir == Dune::ForwardCommunication)
    \n-
    208 {
    \n-
    209 // read from grid0
    \n-
    210 if(ris.self())
    \n-
    211 commInfo.data->gather(commInfo.mbuffer, ris.inside(), ris);
    \n-
    212 }
    \n-
    213 else // (dir == Dune::BackwardCommunication)
    \n-
    214 {
    \n-
    215 // read from grid1
    \n-
    216 if(ris.neighbor())
    \n-
    217 commInfo.data->gather(commInfo.mbuffer, ris.outside(), ris.flip());
    \n-
    218 }
    \n-
    219 }
    \n-
    220
    \n-
    221 // return the j'th value in the buffer
    \n-
    222 assert(j < commInfo.mbuffer.i);
    \n-
    223 return commInfo.buffer[j];
    \n-
    224 }
    \n-
    \n-
    225
    \n-
    226 template<class CommInfo>
    \n-
    \n-
    227 static void scatter(CommInfo& commInfo, const typename CommInfo::DataType& v, std::size_t i, std::size_t j = 0)
    \n-
    228 {
    \n-
    229 // extract GridGlue objects...
    \n-
    230 typedef typename CommInfo::GridGlue::Intersection Intersection;
    \n-
    231 Intersection ris(commInfo.gridglue->getIntersection(i));
    \n-
    232
    \n-
    233 // get size if we have a new intersection
    \n-
    234 if (j == 0)
    \n-
    235 {
    \n-
    236 commInfo.mbuffer.clear();
    \n-
    237 commInfo.currentsize = commInfo.data->size(ris);
    \n-
    238 }
    \n-
    239
    \n-
    240 // write entry to buffer
    \n-
    241 commInfo.buffer[j] = v;
    \n-
    242
    \n-
    243 // write back the buffer if we are at the end of this intersection
    \n-
    244 if (j == commInfo.currentsize-1)
    \n-
    245 {
    \n-
    246 if (dir == Dune::ForwardCommunication)
    \n-
    247 {
    \n-
    248 // write to grid1
    \n-
    249 if(ris.neighbor())
    \n-
    250 commInfo.data->scatter(commInfo.mbuffer, ris.outside(), ris.flip(), commInfo.currentsize);
    \n-
    251 }
    \n-
    252 else // (dir == Dune::BackwardCommunication)
    \n-
    253 {
    \n-
    254 // write to grid0
    \n-
    255 if(ris.self())
    \n-
    256 commInfo.data->scatter(commInfo.mbuffer, ris.inside(), ris, commInfo.currentsize);
    \n-
    257 }
    \n-
    258 assert(commInfo.mbuffer.j <= commInfo.currentsize);
    \n-
    259 }
    \n-
    260 }
    \n-
    \n-
    261 };
    \n-
    \n-
    262
    \n-\n-\n-
    265
    \n-
    270 template <typename GG, class DataHandleImp, class DataTypeImp>
    \n-
    \n-
    271 struct CommInfo
    \n-
    272 {
    \n-
    273 typedef DataTypeImp value_type;
    \n-
    274 typedef GG GridGlue;
    \n-
    275 typedef DataTypeImp DataType;
    \n-
    276
    \n-
    \n-\n-
    278 {}
    \n-
    \n-
    279
    \n-
    280 // tunnel information to the policy and the operators
    \n-\n-\n-
    283
    \n-
    284 // state variables
    \n-
    285 std::vector<DataType> buffer;
    \n-
    286 mutable ::Dune::GridGlue::StreamingMessageBuffer<DataType> mbuffer;
    \n-\n-
    288 Dune::CommunicationDirection dir;
    \n-
    289 };
    \n-
    \n-
    290
    \n-
    291 } // end namespace GridGlue
    \n-
    292
    \n-
    293#if HAVE_MPI
    \n-
    298 template<typename GG, class DataHandleImp, class DataTypeImp>
    \n-
    \n-
    299 struct CommPolicy< ::Dune::GridGlue::CommInfo<GG, DataHandleImp, DataTypeImp> >
    \n-
    300 {
    \n-
    304 typedef ::Dune::GridGlue::CommInfo<GG, DataHandleImp, DataTypeImp> Type;
    \n-
    305
    \n-
    309 typedef DataTypeImp IndexedType;
    \n-
    310
    \n-
    314 // typedef SizeOne IndexedTypeFlag;
    \n-
    315 typedef VariableSize IndexedTypeFlag;
    \n-
    316
    \n-
    \n-
    320 static size_t getSize(const Type& commInfo, size_t i)
    \n-
    321 {
    \n-
    322 // get Intersection
    \n-
    323 typedef typename Type::GridGlue::Intersection Intersection;
    \n-
    324 Intersection ris(commInfo.gridglue->getIntersection(i));
    \n-
    325
    \n-
    326 // ask data handle for size
    \n-
    327 return commInfo.data->size(ris);
    \n-
    328 }
    \n-
    \n-
    329 };
    \n-
    \n-
    330#endif
    \n-
    331
    \n-
    332} // end namespace Dune
    \n-
    333#endif
    \n+
    15namespace Dune {
    \n+
    16namespace GridGlue {
    \n+
    17
    \n+
    \n+\n+
    21{
    \n+
    22
    \n+
    26 template <class Glue, int side>
    \n+
    27 static void writeIntersections(const Glue& glue, const std::string& filename)
    \n+
    28 {
    \n+
    29 static_assert((side==0 || side==1), "'side' can only be 0 or 1");
    \n+
    30
    \n+
    31 std::ofstream fgrid;
    \n+
    32
    \n+
    33 fgrid.open(filename.c_str());
    \n+
    34
    \n+
    35 using GridView = typename Glue::template GridView<side>;
    \n+
    36 const int dim = GridView::dimension;
    \n+
    37 const int domdimw = GridView::dimensionworld;
    \n+
    38
    \n+
    39 // coordinates have to be in R^3 in the VTK format
    \n+
    40 std::string coordinatePadding;
    \n+
    41 for (int i=domdimw; i<3; i++)
    \n+
    42 coordinatePadding += " 0";
    \n+
    43
    \n+
    44 int overlaps = glue.size();
    \n+
    45
    \n+
    46 if (dim==3) {
    \n+
    47
    \n+
    48 fgrid << "# HyperSurface 0.1 ASCII \\n" << std::endl;
    \n+
    49 fgrid<<"\\n";
    \n+
    50 fgrid<<"Parameters {\\n";
    \n+
    51 fgrid<<" Materials {\\n";
    \n+
    52 fgrid<<" outside {\\n";
    \n+
    53 fgrid<<" Id 0\\n";
    \n+
    54 fgrid<<" }\\n";
    \n+
    55 fgrid<<" inside {\\n";
    \n+
    56 fgrid<<" Id 1\\n";
    \n+
    57 fgrid<<" }\\n";
    \n+
    58 fgrid<<" }\\n";
    \n+
    59 fgrid<<"\\n";
    \n+
    60 fgrid<<"}\\n";
    \n+
    61
    \n+
    62 // ////////////////////////////////////////////
    \n+
    63 // Write vertices
    \n+
    64 // ////////////////////////////////////////////
    \n+
    65
    \n+
    66 //use dim and not dim+1
    \n+
    67 fgrid<<"\\nVertices "<< overlaps*(dim)<<"\\n";
    \n+
    68 auto isEnd = glue.template iend<side>();
    \n+
    69 for (auto isIt = glue.template ibegin<side>(); isIt != isEnd; ++isIt)
    \n+
    70 {
    \n+
    71 const auto& geometry = isIt->geometry();
    \n+
    72 for (int i = 0; i < geometry.corners(); ++i)
    \n+
    73 fgrid << geometry.corner(i) << coordinatePadding << std::endl;
    \n+
    74 }
    \n+
    75
    \n+
    76 // ////////////////////////////////////////////
    \n+
    77 // Write triangles
    \n+
    78 // ////////////////////////////////////////////
    \n+
    79
    \n+
    80 fgrid<<"NBranchingPoints 0\\n";
    \n+
    81 fgrid<<"NVerticesOnCurves 0\\n";
    \n+
    82 fgrid<<"BoundaryCurves 0\\n";
    \n+
    83 fgrid<<"Patches 1\\n";
    \n+
    84 fgrid<<"{\\n";
    \n+
    85 fgrid<<"InnerRegion inside\\n";
    \n+
    86 fgrid<<"OuterRegion outside\\n";
    \n+
    87 fgrid<<"BoundaryID 0\\n";
    \n+
    88 fgrid<<"BranchingPoints 0";
    \n+
    89 fgrid<<"\\n";
    \n+
    90
    \n+
    91 fgrid<<"Triangles "<<overlaps<<std::endl;
    \n+
    92
    \n+
    93 for (int i=0;i<overlaps; i++)
    \n+
    94 fgrid<<i*dim+1<<" "<<i*dim+2<<" "<<i*dim+3<<std::endl;
    \n+
    95 fgrid<<"}\\n";
    \n+
    96
    \n+
    97 } else if (dim==2) {
    \n+
    98
    \n+
    99 fgrid << "# AmiraMesh 3D ASCII 2.0 \\n";
    \n+
    100 fgrid<<"\\n";
    \n+
    101 fgrid<<"define Lines "<<3*overlaps<<"\\n";
    \n+
    102 fgrid<<"nVertices "<<2*overlaps<<"\\n";
    \n+
    103 fgrid<<"\\n";
    \n+
    104 fgrid<<"Parameters {\\n";
    \n+
    105 fgrid<<" ContentType \\"HxLineSet\\" \\n";
    \n+
    106 fgrid<<"}\\n";
    \n+
    107 fgrid<<"\\n";
    \n+
    108 fgrid<<"Lines { int LineIdx } @1\\n";
    \n+
    109 fgrid<<"Vertices { float[3] Coordinates } @2\\n";
    \n+
    110 fgrid<<"\\n";
    \n+
    111 fgrid<<"# Data section follows\\n";
    \n+
    112 fgrid<<"@1 \\n";
    \n+
    113 for (int i=0; i<overlaps;i++)
    \n+
    114 fgrid<<2*i<<"\\n"<<2*i+1<<"\\n"<<-1<<"\\n";
    \n+
    115 fgrid<<"\\n";
    \n+
    116 fgrid<<"@2 \\n";
    \n+
    117
    \n+
    118 auto isEnd = glue.template iend<side>();
    \n+
    119 for (auto isIt = glue.template ibegin<side>(); isIt != isEnd; ++isIt) {
    \n+
    120 const auto& geometry = isIt->geometry();
    \n+
    121 for (int i = 0; i <2; ++i)
    \n+
    122 fgrid << geometry.corner(i) <<" "<<0<<"\\n";
    \n+
    123 }
    \n+
    124 }
    \n+
    125
    \n+
    126 fgrid.close();
    \n+
    127 }
    \n+
    128
    \n+
    129public:
    \n+
    130 template<typename Glue>
    \n+
    \n+
    131 static void write(const Glue& glue, const std::string& path, int appendix=1)
    \n+
    132 {
    \n+
    133 std::ostringstream name0;
    \n+
    134 name0 << path;
    \n+
    135 name0 << "/domain.surf" << std::setw(3) << std::setfill('0') << appendix;
    \n+
    136
    \n+
    137 // Write extracted grid and remote intersection on the grid1-side
    \n+
    138 writeIntersections<Glue,0>(glue,name0.str());
    \n+
    139
    \n+
    140 std::ostringstream name1;
    \n+
    141 name1 << path;
    \n+
    142 name1 << "/target.surf" << std::setw(3) << std::setfill('0') << appendix;
    \n+
    143
    \n+
    144 writeIntersections<Glue,1>(glue, name1.str());
    \n+
    145 }
    \n+
    \n+
    146
    \n+
    147};
    \n+
    \n+
    148
    \n+
    149} // namespace GridGlue
    \n+
    150} // namespace Dune
    \n+
    151
    \n+
    152#endif // DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH
    \n
    Definition gridglue.hh:37
    \n-
    CommunicationOperator< Dune::BackwardCommunication > BackwardOperator
    Definition gridgluecommunicate.hh:264
    \n-
    CommunicationOperator< Dune::ForwardCommunication > ForwardOperator
    Definition gridgluecommunicate.hh:263
    \n-
    std::pair< int, int > RankPair
    Definition gridgluecommunicate.hh:24
    \n-
    std::ostream & operator<<(std::ostream &os, const GlobalId &id)
    Definition gridgluecommunicate.hh:55
    \n-
    The intersection of two entities of the two patches of a GridGlue.
    Definition intersection.hh:261
    \n-
    Intersection< P0, P1, O, I > flip() const
    Return a copy of the intersection with inside and outside switched.
    Definition intersection.hh:483
    \n-
    bool self() const
    For parallel computations: Return true if inside() entity exists locally.
    Definition intersection.hh:393
    \n-
    InsideEntity inside(unsigned int parentId=0) const
    Return element on the inside of this intersection.
    Definition intersection.hh:319
    \n-
    size_t neighbor(unsigned int g=0) const
    Return number of embeddings into local grid0 (grid1) entities.
    Definition intersection.hh:399
    \n-
    OutsideEntity outside(unsigned int parentId=0) const
    Return element on the outside of this intersection.
    Definition intersection.hh:328
    \n-
    Definition gridgluecommunicate.hh:26
    \n-
    GlobalId(int i)
    Definition gridgluecommunicate.hh:38
    \n-
    GlobalId()
    Definition gridgluecommunicate.hh:30
    \n-
    GlobalId(int i, int j, unsigned int n)
    Definition gridgluecommunicate.hh:48
    \n-
    describes the features of a data handle for communication in parallel runs using the GridGlue::commun...
    Definition gridgluecommunicate.hh:77
    \n-
    size_t size(RISType &i) const
    Definition gridgluecommunicate.hh:92
    \n-
    void scatter(MessageBufferImp &buff, const EntityType &e, const RISType &i, size_t n)
    Definition gridgluecommunicate.hh:118
    \n-
    void gather(MessageBufferImp &buff, const EntityType &e, const RISType &i) const
    pack data from user to message buffer
    Definition gridgluecommunicate.hh:104
    \n-
    DataTypeImp DataType
    data type of data to communicate
    Definition gridgluecommunicate.hh:80
    \n-
    CommDataHandle()
    Definition gridgluecommunicate.hh:84
    \n-
    Definition gridgluecommunicate.hh:141
    \n-
    size_t j
    Definition gridgluecommunicate.hh:183
    \n-
    StreamingMessageBuffer(DT *p)
    Definition gridgluecommunicate.hh:146
    \n-
    DT * a
    Definition gridgluecommunicate.hh:181
    \n-
    size_t counter() const
    Definition gridgluecommunicate.hh:169
    \n-
    void write(const Y &data)
    Definition gridgluecommunicate.hh:155
    \n-
    void read(Y &data) const
    Definition gridgluecommunicate.hh:163
    \n-
    DT value_type
    Definition gridgluecommunicate.hh:143
    \n-
    size_t i
    Definition gridgluecommunicate.hh:182
    \n-
    void clear()
    Definition gridgluecommunicate.hh:171
    \n-
    forward gather scatter to user defined CommInfo class
    Definition gridgluecommunicate.hh:194
    \n-
    static void scatter(CommInfo &commInfo, const typename CommInfo::DataType &v, std::size_t i, std::size_t j=0)
    Definition gridgluecommunicate.hh:227
    \n-
    static const CommInfo::DataType & gather(const CommInfo &commInfo, size_t i, size_t j=0)
    Definition gridgluecommunicate.hh:197
    \n-
    collects all GridGlue data requried for communication
    Definition gridgluecommunicate.hh:272
    \n-
    Dune::CommunicationDirection dir
    Definition gridgluecommunicate.hh:288
    \n-
    DataTypeImp value_type
    Definition gridgluecommunicate.hh:273
    \n-
    DataTypeImp DataType
    Definition gridgluecommunicate.hh:275
    \n-
    ::Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > * data
    Definition gridgluecommunicate.hh:282
    \n-
    GG GridGlue
    Definition gridgluecommunicate.hh:274
    \n-
    size_t currentsize
    Definition gridgluecommunicate.hh:287
    \n-
    CommInfo()
    Definition gridgluecommunicate.hh:277
    \n-
    mutable ::Dune::GridGlue::StreamingMessageBuffer< DataType > mbuffer
    Definition gridgluecommunicate.hh:286
    \n-
    const GridGlue * gridglue
    Definition gridgluecommunicate.hh:281
    \n-
    std::vector< DataType > buffer
    Definition gridgluecommunicate.hh:285
    \n-
    static size_t getSize(const Type &commInfo, size_t i)
    Get the number of objects at an intersection.
    Definition gridgluecommunicate.hh:320
    \n-
    DataTypeImp IndexedType
    The datatype that should be communicated.
    Definition gridgluecommunicate.hh:309
    \n-
    ::Dune::GridGlue::CommInfo< GG, DataHandleImp, DataTypeImp > Type
    The type of the GridGlueCommInfo.
    Definition gridgluecommunicate.hh:304
    \n-
    VariableSize IndexedTypeFlag
    Each intersection can communicate a different number of objects.
    Definition gridgluecommunicate.hh:315
    \n+
    Write remote intersections to a AmiraMesh file for debugging purposes.
    Definition gridglueamirawriter.hh:21
    \n+
    static void write(const Glue &glue, const std::string &path, int appendix=1)
    Definition gridglueamirawriter.hh:131
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,442 +1,165 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-gridgluecommunicate.hh\n+gridglueamirawriter.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n-2// vi: set et ts=4 sw=2 sts=2:\n-3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n+1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n-4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n+2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-5#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH\n-6#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH\n-7\n+8#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH\n+9#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH\n+10\n+11#include \n+12#include \n 13#include \n 14\n-15#include \n-16#include \n-17#include \n-18#include \n-19\n-20\n-21namespace _\bD_\bu_\bn_\be {\n-22 namespace GridGlue {\n-23\n-_\b2_\b4 typedef std::pair _\bR_\ba_\bn_\bk_\bP_\ba_\bi_\br;\n-_\b2_\b5 struct _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd : public std::pair\n-26 {\n-_\b3_\b0 _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd() {\n-31 this->first.first = 0;\n-32 this->first.second = 0;\n-33 this->second = 0;\n-34 }\n-_\b3_\b8 _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd(int i) {\n-39 this->first.first = i;\n-40 this->first.second = i;\n-41 this->second = 0;\n-42 }\n-_\b4_\b8 _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd(int i, int j, unsigned int n) {\n-49 this->first.first = std::min(i,j);\n-50 this->first.second = std::max(i,j);\n-51 this->second = n;\n-52 }\n-53 };\n-54\n-_\b5_\b5 inline std::ostream& _\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b<_\b<(std::ostream& os, const _\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd & id)\n-56 {\n-57 os << \"(\"\n-58 << id.first.first << \",\" << id.first.second << \",\"\n-59 << id.second << \")\";\n-60 return os;\n-61 }\n-62\n-75 template \n-_\b7_\b6 class _\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be\n-77 {\n-78 public:\n-_\b8_\b0 typedef DataTypeImp _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be;\n-81\n-82 protected:\n-83 // one should not create an explicit instance of this inteface object\n-_\b8_\b4 _\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be() {}\n-85\n-86 public:\n-87\n-91 template\n-_\b9_\b2 size_t _\bs_\bi_\bz_\be (RISType& i) const\n-93 {\n-94 CHECK_INTERFACE_IMPLEMENTATION((asImp()._\bs_\bi_\bz_\be(i)));\n-95 return asImp().size(i);\n-96 }\n-97\n-103 template\n-_\b1_\b0_\b4 void _\bg_\ba_\bt_\bh_\be_\br (MessageBufferImp& buff, const EntityType& e, const RISType &\n-i) const\n-105 {\n-106 MessageBufferIF buffIF(buff);\n-107 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._\bg_\ba_\bt_\bh_\be_\br(buffIF,e,i)));\n-108 }\n-109\n-117 template\n-_\b1_\b1_\b8 void _\bs_\bc_\ba_\bt_\bt_\be_\br (MessageBufferImp& buff, const EntityType& e, const RISType &\n-i, size_t n)\n-119 {\n-120 MessageBufferIF buffIF(buff);\n-121 CHECK_AND_CALL_INTERFACE_IMPLEMENTATION((asImp()._\bs_\bc_\ba_\bt_\bt_\be_\br(buffIF,e,i,n)));\n-122 }\n-123\n-124 private:\n-126 DataHandleImp& asImp () {\n-127 return static_cast (*this);\n-128 }\n-130 const DataHandleImp& asImp () const\n-131 {\n-132 return static_cast(*this);\n-133 }\n-134 }; // end class CommDataHandleIF\n-135\n-140 template\n-_\b1_\b4_\b1 class _\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br {\n-142 public:\n-_\b1_\b4_\b3 typedef DT _\bv_\ba_\bl_\bu_\be_\b__\bt_\by_\bp_\be;\n-144\n-145 // Constructor\n-_\b1_\b4_\b6 _\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br (DT *p)\n-147 {\n-148 _\ba=p;\n-149 _\bi=0;\n-150 _\bj=0;\n-151 }\n-152\n-153 // write data to message buffer, acts like a stream !\n-154 template\n-_\b1_\b5_\b5 void _\bw_\br_\bi_\bt_\be (const Y& data)\n-156 {\n-157 static_assert(std::is_same::value, \"DataType mismatch\");\n-158 _\ba[_\bi++] = data;\n-159 }\n-160\n-161 // read data from message buffer, acts like a stream !\n-162 template\n-_\b1_\b6_\b3 void _\br_\be_\ba_\bd (Y& data) const\n-164 {\n-165 static_assert(std::is_same::value, \"DataType mismatch\");\n-166 data = _\ba[_\bj++];\n-167 }\n-168\n-_\b1_\b6_\b9 size_t _\bc_\bo_\bu_\bn_\bt_\be_\br() const { return _\bi; }\n-170\n-_\b1_\b7_\b1 void _\bc_\bl_\be_\ba_\br()\n-172 {\n-173 _\bi = 0;\n-174 _\bj = 0;\n-175 }\n-176\n-177 // we need access to these variables in an assertion\n-178#ifdef NDEBUG\n-179 private:\n-180#endif\n-_\b1_\b8_\b1 DT *_\ba;\n-_\b1_\b8_\b2 size_t _\bi;\n-_\b1_\b8_\b3 mutable size_t _\bj;\n-184 };\n-185\n-192 template\n-_\b1_\b9_\b3 class _\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n-194 {\n-195 public:\n-196 template\n-_\b1_\b9_\b7 static const typename _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be& _\bg_\ba_\bt_\bh_\be_\br(const _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo& commInfo,\n-size_t i, size_t j = 0)\n-198 {\n-199 // get Intersection\n-200 typedef typename CommInfo::GridGlue::Intersection _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n-201 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn ris(commInfo._\bg_\br_\bi_\bd_\bg_\bl_\bu_\be->getIntersection(i));\n-202\n-203 // fill buffer if we have a new intersection\n-204 if (j == 0)\n-205 {\n-206 commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br._\bc_\bl_\be_\ba_\br();\n-207 if (dir == Dune::ForwardCommunication)\n-208 {\n-209 // read from grid0\n-210 if(ris._\bs_\be_\bl_\bf())\n-211 commInfo._\bd_\ba_\bt_\ba->gather(commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br, ris._\bi_\bn_\bs_\bi_\bd_\be(), ris);\n-212 }\n-213 else // (dir == Dune::BackwardCommunication)\n-214 {\n-215 // read from grid1\n-216 if(ris._\bn_\be_\bi_\bg_\bh_\bb_\bo_\br())\n-217 commInfo._\bd_\ba_\bt_\ba->gather(commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br, ris._\bo_\bu_\bt_\bs_\bi_\bd_\be(), ris._\bf_\bl_\bi_\bp());\n-218 }\n-219 }\n-220\n-221 // return the j'th value in the buffer\n-222 assert(j < commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br._\bi);\n-223 return commInfo._\bb_\bu_\bf_\bf_\be_\br[j];\n-224 }\n-225\n-226 template\n-_\b2_\b2_\b7 static void _\bs_\bc_\ba_\bt_\bt_\be_\br(_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo& commInfo, const typename _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be&\n-v, std::size_t i, std::size_t j = 0)\n-228 {\n-229 // extract GridGlue objects...\n-230 typedef typename CommInfo::GridGlue::Intersection _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n-231 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn ris(commInfo._\bg_\br_\bi_\bd_\bg_\bl_\bu_\be->getIntersection(i));\n-232\n-233 // get size if we have a new intersection\n-234 if (j == 0)\n-235 {\n-236 commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br._\bc_\bl_\be_\ba_\br();\n-237 commInfo._\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be = commInfo._\bd_\ba_\bt_\ba->size(ris);\n-238 }\n-239\n-240 // write entry to buffer\n-241 commInfo._\bb_\bu_\bf_\bf_\be_\br[j] = v;\n-242\n-243 // write back the buffer if we are at the end of this intersection\n-244 if (j == commInfo._\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be-1)\n-245 {\n-246 if (dir == Dune::ForwardCommunication)\n-247 {\n-248 // write to grid1\n-249 if(ris._\bn_\be_\bi_\bg_\bh_\bb_\bo_\br())\n-250 commInfo._\bd_\ba_\bt_\ba->scatter(commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br, ris._\bo_\bu_\bt_\bs_\bi_\bd_\be(), ris._\bf_\bl_\bi_\bp(),\n-commInfo._\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be);\n-251 }\n-252 else // (dir == Dune::BackwardCommunication)\n-253 {\n-254 // write to grid0\n-255 if(ris._\bs_\be_\bl_\bf())\n-256 commInfo._\bd_\ba_\bt_\ba->scatter(commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br, ris._\bi_\bn_\bs_\bi_\bd_\be(), ris,\n-commInfo._\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be);\n-257 }\n-258 assert(commInfo._\bm_\bb_\bu_\bf_\bf_\be_\br._\bj <= commInfo._\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be);\n-259 }\n-260 }\n-261 };\n-262\n-_\b2_\b6_\b3 typedef _\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br_\b<_\bD_\bu_\bn_\be_\b:_\b:_\bF_\bo_\br_\bw_\ba_\br_\bd_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\b> _\bF_\bo_\br_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br;\n-_\b2_\b6_\b4 typedef _\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br_\b<_\bD_\bu_\bn_\be_\b:_\b:_\bB_\ba_\bc_\bk_\bw_\ba_\br_\bd_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\b>\n-_\bB_\ba_\bc_\bk_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br;\n-265\n-270 template \n-_\b2_\b7_\b1 struct _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo\n-272 {\n-_\b2_\b7_\b3 typedef DataTypeImp _\bv_\ba_\bl_\bu_\be_\b__\bt_\by_\bp_\be;\n-_\b2_\b7_\b4 typedef GG _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be;\n-_\b2_\b7_\b5 typedef DataTypeImp _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be;\n-276\n-_\b2_\b7_\b7 _\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo() : _\bb_\bu_\bf_\bf_\be_\br(100), _\bm_\bb_\bu_\bf_\bf_\be_\br(&_\bb_\bu_\bf_\bf_\be_\br[0])\n-278 {}\n-279\n-280 // tunnel information to the policy and the operators\n-_\b2_\b8_\b1 const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be * _\bg_\br_\bi_\bd_\bg_\bl_\bu_\be;\n-_\b2_\b8_\b2 _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b<_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b> * _\bd_\ba_\bt_\ba;\n-283\n-284 // state variables\n-_\b2_\b8_\b5 std::vector _\bb_\bu_\bf_\bf_\be_\br;\n-_\b2_\b8_\b6 mutable ::Dune::GridGlue::StreamingMessageBuffer _\bm_\bb_\bu_\bf_\bf_\be_\br;\n-_\b2_\b8_\b7 size_t _\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be;\n-_\b2_\b8_\b8 Dune::CommunicationDirection _\bd_\bi_\br;\n-289 };\n-290\n-291 } // end namespace GridGlue\n-292\n-293#if HAVE_MPI\n-298 template\n-_\b2_\b9_\b9 struct CommPolicy< ::_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo >\n-300 {\n-_\b3_\b0_\b4 typedef ::Dune::GridGlue::CommInfo _\bT_\by_\bp_\be;\n-305\n-_\b3_\b0_\b9 typedef DataTypeImp _\bI_\bn_\bd_\be_\bx_\be_\bd_\bT_\by_\bp_\be;\n-310\n-314 // typedef SizeOne IndexedTypeFlag;\n-_\b3_\b1_\b5 typedef VariableSize _\bI_\bn_\bd_\be_\bx_\be_\bd_\bT_\by_\bp_\be_\bF_\bl_\ba_\bg;\n-316\n-_\b3_\b2_\b0 static size_t _\bg_\be_\bt_\bS_\bi_\bz_\be(const _\bT_\by_\bp_\be& commInfo, size_t i)\n-321 {\n-322 // get Intersection\n-323 typedef typename Type::GridGlue::Intersection Intersection;\n-324 Intersection ris(commInfo._\bg_\br_\bi_\bd_\bg_\bl_\bu_\be->getIntersection(i));\n-325\n-326 // ask data handle for size\n-327 return commInfo._\bd_\ba_\bt_\ba->size(ris);\n-328 }\n-329 };\n-330#endif\n-331\n-332} // end namespace Dune\n-333#endif\n+15namespace _\bD_\bu_\bn_\be {\n+16namespace GridGlue {\n+17\n+_\b2_\b0class _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\bA_\bm_\bi_\br_\ba_\bW_\br_\bi_\bt_\be_\br\n+21{\n+22\n+26 template \n+27 static void writeIntersections(const Glue& glue, const std::string&\n+filename)\n+28 {\n+29 static_assert((side==0 || side==1), \"'side' can only be 0 or 1\");\n+30\n+31 std::ofstream fgrid;\n+32\n+33 fgrid.open(filename.c_str());\n+34\n+35 using GridView = typename Glue::template GridView;\n+36 const int dim = GridView::dimension;\n+37 const int domdimw = GridView::dimensionworld;\n+38\n+39 // coordinates have to be in R^3 in the VTK format\n+40 std::string coordinatePadding;\n+41 for (int i=domdimw; i<3; i++)\n+42 coordinatePadding += \" 0\";\n+43\n+44 int overlaps = glue.size();\n+45\n+46 if (dim==3) {\n+47\n+48 fgrid << \"# HyperSurface 0.1 ASCII \\n\" << std::endl;\n+49 fgrid<<\"\\n\";\n+50 fgrid<<\"Parameters {\\n\";\n+51 fgrid<<\" Materials {\\n\";\n+52 fgrid<<\" outside {\\n\";\n+53 fgrid<<\" Id 0\\n\";\n+54 fgrid<<\" }\\n\";\n+55 fgrid<<\" inside {\\n\";\n+56 fgrid<<\" Id 1\\n\";\n+57 fgrid<<\" }\\n\";\n+58 fgrid<<\" }\\n\";\n+59 fgrid<<\"\\n\";\n+60 fgrid<<\"}\\n\";\n+61\n+62 // ////////////////////////////////////////////\n+63 // Write vertices\n+64 // ////////////////////////////////////////////\n+65\n+66 //use dim and not dim+1\n+67 fgrid<<\"\\nVertices \"<< overlaps*(dim)<<\"\\n\";\n+68 auto isEnd = glue.template iend();\n+69 for (auto isIt = glue.template ibegin(); isIt != isEnd; ++isIt)\n+70 {\n+71 const auto& geometry = isIt->geometry();\n+72 for (int i = 0; i < geometry.corners(); ++i)\n+73 fgrid << geometry.corner(i) << coordinatePadding << std::endl;\n+74 }\n+75\n+76 // ////////////////////////////////////////////\n+77 // Write triangles\n+78 // ////////////////////////////////////////////\n+79\n+80 fgrid<<\"NBranchingPoints 0\\n\";\n+81 fgrid<<\"NVerticesOnCurves 0\\n\";\n+82 fgrid<<\"BoundaryCurves 0\\n\";\n+83 fgrid<<\"Patches 1\\n\";\n+84 fgrid<<\"{\\n\";\n+85 fgrid<<\"InnerRegion inside\\n\";\n+86 fgrid<<\"OuterRegion outside\\n\";\n+87 fgrid<<\"BoundaryID 0\\n\";\n+88 fgrid<<\"BranchingPoints 0\";\n+89 fgrid<<\"\\n\";\n+90\n+91 fgrid<<\"Triangles \"<();\n+119 for (auto isIt = glue.template ibegin(); isIt != isEnd; ++isIt) {\n+120 const auto& geometry = isIt->geometry();\n+121 for (int i = 0; i <2; ++i)\n+122 fgrid << geometry.corner(i) <<\" \"<<0<<\"\\n\";\n+123 }\n+124 }\n+125\n+126 fgrid.close();\n+127 }\n+128\n+129public:\n+130 template\n+_\b1_\b3_\b1 static void _\bw_\br_\bi_\bt_\be(const Glue& glue, const std::string& path, int\n+appendix=1)\n+132 {\n+133 std::ostringstream name0;\n+134 name0 << path;\n+135 name0 << \"/domain.surf\" << std::setw(3) << std::setfill('0') << appendix;\n+136\n+137 // Write extracted grid and remote intersection on the grid1-side\n+138 writeIntersections(glue,name0.str());\n+139\n+140 std::ostringstream name1;\n+141 name1 << path;\n+142 name1 << \"/target.surf\" << std::setw(3) << std::setfill('0') << appendix;\n+143\n+144 writeIntersections(glue, name1.str());\n+145 }\n+146\n+147};\n+148\n+149} // namespace GridGlue\n+150} // namespace Dune\n+151\n+152#endif // DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bB_\ba_\bc_\bk_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n-CommunicationOperator< Dune::BackwardCommunication > BackwardOperator\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:264\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bF_\bo_\br_\bw_\ba_\br_\bd_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n-CommunicationOperator< Dune::ForwardCommunication > ForwardOperator\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:263\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\ba_\bn_\bk_\bP_\ba_\bi_\br\n-std::pair< int, int > RankPair\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:24\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bo_\bp_\be_\br_\ba_\bt_\bo_\br_\b<_\b<\n-std::ostream & operator<<(std::ostream &os, const GlobalId &id)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:55\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-The intersection of two entities of the two patches of a GridGlue.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:261\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bf_\bl_\bi_\bp\n-Intersection< P0, P1, O, I > flip() const\n-Return a copy of the intersection with inside and outside switched.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:483\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bs_\be_\bl_\bf\n-bool self() const\n-For parallel computations: Return true if inside() entity exists locally.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:393\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bs_\bi_\bd_\be\n-InsideEntity inside(unsigned int parentId=0) const\n-Return element on the inside of this intersection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:319\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bn_\be_\bi_\bg_\bh_\bb_\bo_\br\n-size_t neighbor(unsigned int g=0) const\n-Return number of embeddings into local grid0 (grid1) entities.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:399\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bo_\bu_\bt_\bs_\bi_\bd_\be\n-OutsideEntity outside(unsigned int parentId=0) const\n-Return element on the outside of this intersection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:328\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:26\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n-GlobalId(int i)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:38\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n-GlobalId()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:30\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bI_\bd\n-GlobalId(int i, int j, unsigned int n)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:48\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be\n-describes the features of a data handle for communication in parallel runs\n-using the GridGlue::commun...\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:77\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bs_\bi_\bz_\be\n-size_t size(RISType &i) const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:92\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bs_\bc_\ba_\bt_\bt_\be_\br\n-void scatter(MessageBufferImp &buff, const EntityType &e, const RISType &i,\n-size_t n)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:118\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bg_\ba_\bt_\bh_\be_\br\n-void gather(MessageBufferImp &buff, const EntityType &e, const RISType &i)\n-const\n-pack data from user to message buffer\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:104\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be\n-DataTypeImp DataType\n-data type of data to communicate\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:80\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be\n-CommDataHandle()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:84\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:141\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bj\n-size_t j\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:183\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br\n-StreamingMessageBuffer(DT *p)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:146\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\ba\n-DT * a\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:181\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bc_\bo_\bu_\bn_\bt_\be_\br\n-size_t counter() const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:169\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be\n-void write(const Y &data)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:155\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\br_\be_\ba_\bd\n-void read(Y &data) const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:163\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bv_\ba_\bl_\bu_\be_\b__\bt_\by_\bp_\be\n-DT value_type\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:143\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bi\n-size_t i\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:182\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\br_\be_\ba_\bm_\bi_\bn_\bg_\bM_\be_\bs_\bs_\ba_\bg_\be_\bB_\bu_\bf_\bf_\be_\br_\b:_\b:_\bc_\bl_\be_\ba_\br\n-void clear()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:171\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br\n-forward gather scatter to user defined CommInfo class\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:194\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bs_\bc_\ba_\bt_\bt_\be_\br\n-static void scatter(CommInfo &commInfo, const typename CommInfo::DataType &v,\n-std::size_t i, std::size_t j=0)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:227\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bu_\bn_\bi_\bc_\ba_\bt_\bi_\bo_\bn_\bO_\bp_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bg_\ba_\bt_\bh_\be_\br\n-static const CommInfo::DataType & gather(const CommInfo &commInfo, size_t i,\n-size_t j=0)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:197\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo\n-collects all GridGlue data requried for communication\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:272\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bd_\bi_\br\n-Dune::CommunicationDirection dir\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:288\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bv_\ba_\bl_\bu_\be_\b__\bt_\by_\bp_\be\n-DataTypeImp value_type\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:273\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bD_\ba_\bt_\ba_\bT_\by_\bp_\be\n-DataTypeImp DataType\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:275\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bd_\ba_\bt_\ba\n-::Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > * data\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:282\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n-GG GridGlue\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:274\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bc_\bu_\br_\br_\be_\bn_\bt_\bs_\bi_\bz_\be\n-size_t currentsize\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:287\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo\n-CommInfo()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:277\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bm_\bb_\bu_\bf_\bf_\be_\br\n-mutable ::Dune::GridGlue::StreamingMessageBuffer< DataType > mbuffer\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:286\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be\n-const GridGlue * gridglue\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:281\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b:_\b:_\bb_\bu_\bf_\bf_\be_\br\n-std::vector< DataType > buffer\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:285\n-_\bD_\bu_\bn_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bP_\bo_\bl_\bi_\bc_\by_\b<_\b _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\b _\bG_\bG_\b,_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>\n-_\b>_\b:_\b:_\bg_\be_\bt_\bS_\bi_\bz_\be\n-static size_t getSize(const Type &commInfo, size_t i)\n-Get the number of objects at an intersection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:320\n-_\bD_\bu_\bn_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bP_\bo_\bl_\bi_\bc_\by_\b<_\b _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\b _\bG_\bG_\b,_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>\n-_\b>_\b:_\b:_\bI_\bn_\bd_\be_\bx_\be_\bd_\bT_\by_\bp_\be\n-DataTypeImp IndexedType\n-The datatype that should be communicated.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:309\n-_\bD_\bu_\bn_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bP_\bo_\bl_\bi_\bc_\by_\b<_\b _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\b _\bG_\bG_\b,_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>\n-_\b>_\b:_\b:_\bT_\by_\bp_\be\n-::Dune::GridGlue::CommInfo< GG, DataHandleImp, DataTypeImp > Type\n-The type of the GridGlueCommInfo.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:304\n-_\bD_\bu_\bn_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bP_\bo_\bl_\bi_\bc_\by_\b<_\b _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bm_\bI_\bn_\bf_\bo_\b<_\b _\bG_\bG_\b,_\b _\bD_\ba_\bt_\ba_\bH_\ba_\bn_\bd_\bl_\be_\bI_\bm_\bp_\b,_\b _\bD_\ba_\bt_\ba_\bT_\by_\bp_\be_\bI_\bm_\bp_\b _\b>\n-_\b>_\b:_\b:_\bI_\bn_\bd_\be_\bx_\be_\bd_\bT_\by_\bp_\be_\bF_\bl_\ba_\bg\n-VariableSize IndexedTypeFlag\n-Each intersection can communicate a different number of objects.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluecommunicate.hh:315\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\bA_\bm_\bi_\br_\ba_\bW_\br_\bi_\bt_\be_\br\n+Write remote intersections to a AmiraMesh file for debugging purposes.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglueamirawriter.hh:21\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\bA_\bm_\bi_\br_\ba_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be\n+static void write(const Glue &glue, const std::string &path, int appendix=1)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglueamirawriter.hh:131\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00026.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00026.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: intersectioniterator.hh File Reference\n+dune-grid-glue: intersection.hh File Reference\n \n \n \n \n \n \n \n@@ -71,40 +71,74 @@\n \n
    \n
    \n
    \n \n-
    intersectioniterator.hh File Reference
    \n+Namespaces |\n+Macros
    \n+
    intersection.hh File Reference
    \n \n
    \n \n-

    Implement iterators over GridGlue intersections. \n+

    Model of the Intersection concept provided by GridGlue. \n More...

    \n-
    #include <dune/grid-glue/gridglue.hh>
    \n+
    #include <algorithm>
    \n+#include <optional>
    \n+#include <tuple>
    \n+#include <dune/common/deprecated.hh>
    \n+#include <dune/common/version.hh>
    \n+#include <dune/geometry/affinegeometry.hh>
    \n+#include <dune/geometry/referenceelements.hh>
    \n+#include <dune/grid-glue/gridglue.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::GridGlue::IntersectionIterator< P0, P1, inside, outside >
    class  Dune::GridGlue::IntersectionData< P0, P1 >
     storage class for Dune::GridGlue::Intersection related data More...
     
    struct  Dune::GridGlue::IntersectionTraits< P0, P1, inside, outside >
     
    class  Dune::GridGlue::Intersection< P0, P1, I, O >
     The intersection of two entities of the two patches of a GridGlue. More...
     
    \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n+\n+\n+\n

    \n+Macros

    #define ONLY_SIMPLEX_INTERSECTIONS
     
    \n

    Detailed Description

    \n-

    Implement iterators over GridGlue intersections.

    \n+

    Model of the Intersection concept provided by GridGlue.

    \n
    Author
    Christian Engwer
    \n-
    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ ONLY_SIMPLEX_INTERSECTIONS

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define ONLY_SIMPLEX_INTERSECTIONS
    \n+
    \n+\n+
    \n+
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,26 +1,46 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-intersectioniterator.hh File Reference\n-Implement iterators over GridGlue intersections. _\bM_\bo_\br_\be_\b._\b._\b.\n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs\n+intersection.hh File Reference\n+Model of the Intersection concept provided by GridGlue. _\bM_\bo_\br_\be_\b._\b._\b.\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n #include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b,_\b _\bi_\bn_\bs_\bi_\bd_\be_\b,_\b _\bo_\bu_\bt_\bs_\bi_\bd_\be_\b _\b>\n+ class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b _\b>\n+\u00a0 storage class for _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn related data _\bM_\bo_\br_\be_\b._\b._\b.\n+\u00a0\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b,_\b _\bi_\bn_\bs_\bi_\bd_\be_\b,_\b _\bo_\bu_\bt_\bs_\bi_\bd_\be_\b _\b>\n+\u00a0\n+ class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b,_\b _\bI_\b,_\b _\bO_\b _\b>\n+\u00a0 The intersection of two entities of the two patches of a _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be.\n+ _\bM_\bo_\br_\be_\b._\b._\b.\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+M\bMa\bac\bcr\bro\bos\bs\n+#define\u00a0 _\bO_\bN_\bL_\bY_\b__\bS_\bI_\bM_\bP_\bL_\bE_\bX_\b__\bI_\bN_\bT_\bE_\bR_\bS_\bE_\bC_\bT_\bI_\bO_\bN_\bS\n+\u00a0\n *\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-Implement iterators over GridGlue intersections.\n+Model of the Intersection concept provided by GridGlue.\n Author\n Christian Engwer\n+*\b**\b**\b**\b**\b* M\bMa\bac\bcr\bro\bo D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn D\bDo\boc\bcu\bum\bme\ben\bnt\bta\bat\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n+*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0O\bON\bNL\bLY\bY_\b_S\bSI\bIM\bMP\bPL\bLE\bEX\bX_\b_I\bIN\bNT\bTE\bER\bRS\bSE\bEC\bCT\bTI\bIO\bON\bNS\bS *\b**\b**\b**\b**\b*\n+#define ONLY_SIMPLEX_INTERSECTIONS\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00026_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00026_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: intersectioniterator.hh Source File\n+dune-grid-glue: intersection.hh Source File\n \n \n \n \n \n \n \n@@ -74,95 +74,578 @@\n \n \n \n
    \n-
    intersectioniterator.hh
    \n+
    intersection.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    12#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH
    \n-
    13#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH
    \n-
    14
    \n-\n-
    16
    \n-
    17namespace Dune {
    \n-
    18 namespace GridGlue {
    \n-
    19
    \n-
    21 template<typename P0, typename P1, int inside, int outside>
    \n-
    \n-\n-
    23 public Dune::ForwardIteratorFacade< IntersectionIterator<P0,P1,inside,outside>,
    \n-
    24 const Intersection<P0,P1,inside,outside> >
    \n-
    25 {
    \n-
    26 public:
    \n-
    27
    \n-
    28 typedef ::Dune::GridGlue::GridGlue<P0, P1> GridGlue;
    \n-
    29 typedef ::Dune::GridGlue::Intersection<P0,P1,inside,outside> Intersection;
    \n-
    30
    \n-
    \n-
    31 IntersectionIterator(const GridGlue * glue, unsigned int i)
    \n-
    32 : glue_(glue),
    \n-
    33 index_(i),
    \n-
    34 intersection_(glue_, & glue_->intersections_[index_])
    \n-
    35 {}
    \n-
    \n-
    36
    \n-
    \n-\n-
    38 {
    \n-
    39 assert(("never dereference the end iterator" &&
    \n-
    40 index_ != glue_->index__sz));
    \n-
    41 return intersection_;
    \n-
    42 }
    \n-
    \n+
    11#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH
    \n+
    12#define DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH
    \n+
    13
    \n+
    14#include <algorithm>
    \n+
    15#include <optional>
    \n+
    16#include <tuple>
    \n+
    17
    \n+
    18#include <dune/common/deprecated.hh>
    \n+
    19#include <dune/common/version.hh>
    \n+
    20#include <dune/geometry/affinegeometry.hh>
    \n+
    21#include <dune/geometry/referenceelements.hh>
    \n+\n+
    23
    \n+
    24#define ONLY_SIMPLEX_INTERSECTIONS
    \n+
    25
    \n+
    26namespace Dune {
    \n+
    27 namespace GridGlue {
    \n+
    28
    \n+
    29 // forward declaration
    \n+
    30 template<typename P0, typename P1>
    \n+
    31 class IntersectionIndexSet;
    \n+
    32
    \n+
    36 template<typename P0, typename P1>
    \n+
    \n+\n+
    38 {
    \n+
    39 public:
    \n+
    40 typedef ::Dune::GridGlue::GridGlue<P0, P1> GridGlue;
    \n+
    41
    \n+\n
    43
    \n-
    \n-
    44 void increment()
    \n-
    45 {
    \n-
    46 intersection_ = Intersection(glue_, & glue_->intersections_[++index_]);
    \n-
    47 }
    \n-
    \n-
    48
    \n-
    \n-
    49 bool equals(const IntersectionIterator& iter) const
    \n-
    50 {
    \n-
    51 return iter.index_ == index_;
    \n-
    52 }
    \n-
    \n-
    53
    \n-
    54 private:
    \n+
    45 static constexpr int coorddim = GridGlue::dimworld;
    \n+
    46
    \n+
    47 private:
    \n+
    48 // intermediate quantities
    \n+
    49 template<int side>
    \n+
    50 static constexpr int dim() { return GridGlue::template GridView<side>::Grid::dimension - GridGlue::template GridPatch<side>::codim; }
    \n+
    51
    \n+
    52 public:
    \n+
    54 static constexpr int mydim = dim<0>() < dim<1>() ? dim<0>() : dim<1>();
    \n
    55
    \n-
    56 const GridGlue* glue_;
    \n-
    57 unsigned int index_;
    \n-
    58
    \n-
    59 Intersection intersection_;
    \n-
    60 };
    \n-
    \n-
    61
    \n-
    62 } // end namespace GridGlue
    \n-
    63} // end namespace Dune
    \n-
    64
    \n-
    65#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH
    \n+
    56 template<int side>
    \n+
    57 using GridLocalGeometry = AffineGeometry<
    \n+
    58 typename GridGlue::template GridView<side>::ctype, mydim, GridGlue::template GridView<side>::dimension>;
    \n+
    59
    \n+
    60 using Grid0LocalGeometry [[deprecated("please use GridLocalGeometry<0> instead")]] = GridLocalGeometry<0>;
    \n+
    61 using Grid1LocalGeometry [[deprecated("please use GridLocalGeometry<1> instead")]] = GridLocalGeometry<1>;
    \n+
    62
    \n+
    63 template<int side>
    \n+
    64 using GridGeometry = AffineGeometry<
    \n+
    65 typename GridGlue::template GridView<side>::ctype, mydim, GridGlue::template GridView<side>::dimensionworld>;
    \n+
    66
    \n+
    67 using Grid0Geometry [[deprecated("please use GridGeometry<0> instead")]] = GridGeometry<0>;
    \n+
    68 using Grid1Geometry [[deprecated("please use GridGeometry<1> instead")]] = GridGeometry<1>;
    \n+
    69
    \n+
    70 template<int side>
    \n+
    71 using GridIndexType = typename GridGlue::template GridView<side>::IndexSet::IndexType;
    \n+
    72
    \n+
    73 using Grid0IndexType [[deprecated("please use GridIndexType<0> instead")]] = GridIndexType<0>;
    \n+
    74 using Grid1IndexType [[deprecated("please use GridIndexType<1> instead")]] = GridIndexType<1>;
    \n+
    75
    \n+
    77 IntersectionData(const GridGlue& glue, unsigned int mergeindex, unsigned int offset, bool grid0local, bool grid1local);
    \n+
    78
    \n+
    80 IntersectionData() = default;
    \n+
    81
    \n+
    82 /* Accessor Functions */
    \n+
    83
    \n+
    84 template<int side>
    \n+
    \n+
    85 const GridLocalGeometry<side>& localGeometry(unsigned int parentId = 0) const
    \n+
    86 { return *std::get<side>(sideData_).gridlocalgeom[parentId]; }
    \n+
    \n+
    87
    \n+
    88 template<int side>
    \n+
    \n+\n+
    90 { return *std::get<side>(sideData_).gridgeom; }
    \n+
    \n+
    91
    \n+
    92 template<int side>
    \n+
    \n+
    93 bool local() const
    \n+
    94 { return std::get<side>(sideData_).gridlocal; }
    \n+
    \n+
    95
    \n+
    96 template<int side>
    \n+
    \n+
    97 IndexType index(unsigned int parentId = 0) const
    \n+
    98 { return std::get<side>(sideData_).gridindices[parentId]; }
    \n+
    \n+
    99
    \n+
    100 template<int side>
    \n+
    \n+\n+
    102 { return std::get<side>(sideData_).gridindices.size(); }
    \n+
    \n+
    103
    \n+
    104 private:
    \n+
    105 template<int side>
    \n+
    106 void initializeGeometry(const GridGlue& glue, unsigned mergeindex);
    \n+
    107
    \n+
    108 /* M E M B E R V A R I A B L E S */
    \n+
    109
    \n+
    110 public:
    \n+\n+
    113
    \n+
    114 private:
    \n+
    115 template<int side>
    \n+
    116 struct SideData {
    \n+
    118 bool gridlocal = false;
    \n+
    119
    \n+
    121 std::vector< GridIndexType<side> > gridindices;
    \n+
    122
    \n+
    124 std::vector< std::optional< GridLocalGeometry<side> > > gridlocalgeom;
    \n+
    125
    \n+
    133 std::optional< GridGeometry<side> > gridgeom;
    \n+
    134 };
    \n+
    135
    \n+
    136 std::tuple< SideData<0>, SideData<1> > sideData_;
    \n+
    137 };
    \n+
    \n+
    138
    \n+
    139 template<typename P0, typename P1>
    \n+
    140 template<int side>
    \n+
    141 void IntersectionData<P0, P1>::initializeGeometry(const GridGlue& glue, unsigned mergeindex)
    \n+
    142 {
    \n+
    143 auto& data = std::get<side>(sideData_);
    \n+
    144
    \n+
    145 const unsigned n_parents = glue.merger_->template parents<side>(mergeindex);
    \n+
    146
    \n+
    147 // init containers
    \n+
    148 data.gridindices.resize(n_parents);
    \n+
    149 data.gridlocalgeom.resize(n_parents);
    \n+
    150
    \n+
    151 // default values
    \n+
    152 data.gridindices[0] = 0;
    \n+
    153
    \n+
    154 static constexpr int nSimplexCorners = mydim + 1;
    \n+
    155 using ctype = typename GridGlue::ctype;
    \n+
    156
    \n+
    157 // initialize the local and the global geometries of grid `side`
    \n+
    158
    \n+
    159 // compute the coordinates of the subface's corners in codim 0 entity local coordinates
    \n+
    160 static constexpr int elementdim = GridGlue::template GridView<side>::template Codim<0>::Geometry::mydimension;
    \n+
    161
    \n+
    162 // coordinates within the subentity that contains the remote intersection
    \n+
    163 std::array<Dune::FieldVector< ctype, dim<side>() >, nSimplexCorners> corners_subEntity_local;
    \n+
    164
    \n+
    165 for (unsigned int par = 0; par < n_parents; ++par) {
    \n+
    166 for (int i = 0; i < nSimplexCorners; ++i)
    \n+
    167 corners_subEntity_local[i] = glue.merger_->template parentLocal<side>(mergeindex, i, par);
    \n+
    168
    \n+
    169 // Coordinates of the remote intersection corners wrt the element coordinate system
    \n+
    170 std::array<Dune::FieldVector<ctype, elementdim>, nSimplexCorners> corners_element_local;
    \n+
    171
    \n+
    172 if (data.gridlocal) {
    \n+
    173 data.gridindices[par] = glue.merger_->template parent<side>(mergeindex,par);
    \n+
    174
    \n+
    175 typename GridGlue::template GridPatch<side>::LocalGeometry
    \n+
    176 gridLocalGeometry = glue.template patch<side>().geometryLocal(data.gridindices[par]);
    \n+
    177 for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
    \n+
    178 corners_element_local[i] = gridLocalGeometry.global(corners_subEntity_local[i]);
    \n+
    179 }
    \n+
    180
    \n+
    181 // set the corners of the local geometry
    \n+
    182#ifdef ONLY_SIMPLEX_INTERSECTIONS
    \n+
    183# if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
    \n+
    184 const Dune::GeometryType type = Dune::GeometryTypes::simplex(mydim);
    \n+
    185# else
    \n+
    186 const Dune::GeometryType type(Dune::GeometryType::simplex, mydim);
    \n+
    187# endif
    \n+
    188#else
    \n+
    189#error Not Implemented
    \n+
    190#endif
    \n+
    191 data.gridlocalgeom[par].emplace(type, corners_element_local);
    \n+
    192
    \n+
    193 // Add world geometry only for 0th parent
    \n+
    194 if (par == 0) {
    \n+
    195 typename GridGlue::template GridPatch<side>::Geometry
    \n+
    196 gridWorldGeometry = glue.template patch<side>().geometry(data.gridindices[par]);
    \n+
    197
    \n+
    198 // world coordinates of the remote intersection corners
    \n+
    199 std::array<Dune::FieldVector<ctype, GridGlue::template GridView<side>::dimensionworld>, nSimplexCorners> corners_global;
    \n+
    200
    \n+
    201 for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
    \n+
    202 corners_global[i] = gridWorldGeometry.global(corners_subEntity_local[i]);
    \n+
    203 }
    \n+
    204
    \n+
    205 data.gridgeom.emplace(type, corners_global);
    \n+
    206 }
    \n+
    207 }
    \n+
    208 }
    \n+
    209 }
    \n+
    210
    \n+
    212 template<typename P0, typename P1>
    \n+
    \n+
    213 IntersectionData<P0, P1>::IntersectionData(const GridGlue& glue, unsigned int mergeindex, unsigned int offset,
    \n+
    214 bool grid0local, bool grid1local)
    \n+
    215 : index_(mergeindex+offset)
    \n+
    216 {
    \n+
    217 // if an invalid index is given do not proceed!
    \n+
    218 // (happens when the parent GridGlue initializes the "end"-Intersection)
    \n+
    219 assert (0 <= mergeindex || mergeindex < glue.index__sz);
    \n+
    220
    \n+
    221 std::get<0>(sideData_).gridlocal = grid0local;
    \n+
    222 std::get<1>(sideData_).gridlocal = grid1local;
    \n+
    223
    \n+
    224 initializeGeometry<0>(glue, mergeindex);
    \n+
    225 initializeGeometry<1>(glue, mergeindex);
    \n+
    226 }
    \n+
    \n+
    227
    \n+
    232 template<typename P0, typename P1, int inside, int outside>
    \n+
    \n+\n+
    234 {
    \n+\n+\n+
    237
    \n+
    238 using InsideGridView = typename GridGlue::template GridView<inside>;
    \n+
    239 using OutsideGridView = typename GridGlue::template GridView<outside>;
    \n+
    240
    \n+
    241 using InsideLocalGeometry = typename IntersectionData::template GridLocalGeometry<inside>;
    \n+
    242 using OutsideLocalGeometry = typename IntersectionData::template GridLocalGeometry<outside>;
    \n+
    243
    \n+
    244 using Geometry = typename IntersectionData::template GridGeometry<inside>;
    \n+
    245 using OutsideGeometry = typename IntersectionData::template GridGeometry<outside>;
    \n+
    246
    \n+
    247 static constexpr auto coorddim = IntersectionData::coorddim;
    \n+
    248 static constexpr auto mydim = IntersectionData::mydim;
    \n+
    249 static constexpr int insidePatch = inside;
    \n+
    250 static constexpr int outsidePatch = outside;
    \n+
    251
    \n+
    252 using ctype = typename GridGlue::ctype;
    \n+
    253 using LocalCoordinate = Dune::FieldVector<ctype, mydim>;
    \n+
    254 using GlobalCoordinate = Dune::FieldVector<ctype, coorddim>;
    \n+
    255 };
    \n+
    \n+
    256
    \n+
    259 template<typename P0, typename P1, int I, int O>
    \n+
    \n+\n+
    261 {
    \n+
    262
    \n+
    263 public:
    \n+
    264
    \n+\n+
    266
    \n+
    267 typedef typename Traits::GridGlue GridGlue;
    \n+\n+
    269
    \n+
    270
    \n+\n+\n+
    273
    \n+\n+\n+\n+
    277
    \n+
    278 typedef typename Traits::Geometry Geometry;
    \n+
    279 typedef typename Traits::ctype ctype;
    \n+
    280
    \n+
    281 typedef typename InsideGridView::Traits::template Codim<0>::Entity InsideEntity;
    \n+
    282 typedef typename OutsideGridView::Traits::template Codim<0>::Entity OutsideEntity;
    \n+
    283
    \n+\n+\n+
    286
    \n+
    288 static constexpr auto coorddim = Traits::coorddim;
    \n+
    289
    \n+
    291 static constexpr auto mydim = Traits::mydim;
    \n+
    292
    \n+
    294 static constexpr int insidePatch = Traits::insidePatch;
    \n+
    295
    \n+
    297 static constexpr int outsidePatch = Traits::outsidePatch;
    \n+
    298
    \n+
    299 // typedef unsigned int IndexType;
    \n+
    300
    \n+
    301 private:
    \n+
    305 static constexpr int codimensionWorld = coorddim - mydim;
    \n+
    306
    \n+
    307 public:
    \n+
    308 /* C O N S T R U C T O R S */
    \n+
    309
    \n+
    \n+
    311 Intersection(const GridGlue* glue, const IntersectionData* i) :
    \n+
    312 glue_(glue), i_(i) {}
    \n+
    \n+
    313
    \n+
    314 /* F U N C T I O N A L I T Y */
    \n+
    315
    \n+\n+
    \n+
    319 inside(unsigned int parentId = 0) const
    \n+
    320 {
    \n+
    321 assert(self());
    \n+
    322 return glue_->template patch<I>().element(i_->template index<I>(parentId));
    \n+
    323 }
    \n+
    \n+
    324
    \n+\n+
    \n+
    328 outside(unsigned int parentId = 0) const
    \n+
    329 {
    \n+
    330 assert(neighbor());
    \n+
    331 return glue_->template patch<O>().element(i_->template index<O>(parentId));
    \n+
    332 }
    \n+
    \n+
    333
    \n+
    \n+
    335 bool conforming() const
    \n+
    336 {
    \n+
    337 throw Dune::NotImplemented();
    \n+
    338 }
    \n+
    \n+
    339
    \n+
    \n+
    342 const InsideLocalGeometry& geometryInInside(unsigned int parentId = 0) const
    \n+
    343 {
    \n+
    344 return i_->template localGeometry<I>(parentId);
    \n+
    345 }
    \n+
    \n+
    346
    \n+
    \n+
    349 const OutsideLocalGeometry& geometryInOutside(unsigned int parentId = 0) const
    \n+
    350 {
    \n+
    351 return i_->template localGeometry<O>(parentId);
    \n+
    352 }
    \n+
    \n+
    353
    \n+
    \n+
    360 const Geometry& geometry() const
    \n+
    361 {
    \n+
    362 return i_->template geometry<I>();
    \n+
    363 }
    \n+
    \n+
    364
    \n+
    \n+
    371 const OutsideGeometry& geometryOutside() const // DUNE_DEPRECATED
    \n+
    372 {
    \n+
    373 return i_->template geometry<O>();
    \n+
    374 }
    \n+
    \n+
    375
    \n+
    \n+
    377 Dune::GeometryType type() const
    \n+
    378 {
    \n+
    379 #ifdef ONLY_SIMPLEX_INTERSECTIONS
    \n+
    380 # if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
    \n+
    381 return Dune::GeometryTypes::simplex(mydim);
    \n+
    382 # else
    \n+
    383 static const Dune::GeometryType type(Dune::GeometryType::simplex, mydim);
    \n+
    384 return type;
    \n+
    385 # endif
    \n+
    386 #else
    \n+
    387 #error Not Implemented
    \n+
    388 #endif
    \n+
    389 }
    \n+
    \n+
    390
    \n+
    391
    \n+
    \n+
    393 bool self() const
    \n+
    394 {
    \n+
    395 return i_->template local<I>();
    \n+
    396 }
    \n+
    \n+
    397
    \n+
    \n+
    399 size_t neighbor(unsigned int g = 0) const
    \n+
    400 {
    \n+
    401 if (g == 0 && i_->template local<O>()) {
    \n+
    402 return i_->template parents<O>();
    \n+
    403 } else if (g == 1 && i_->template local<I>()) {
    \n+
    404 return i_->template parents<I>();
    \n+
    405 }
    \n+
    406 return 0;
    \n+
    407 }
    \n+
    \n+
    408
    \n+
    \n+
    410 int indexInInside(unsigned int parentId = 0) const
    \n+
    411 {
    \n+
    412 assert(self());
    \n+
    413 return glue_->template patch<I>().indexInInside(i_->template index<I>(parentId));
    \n+
    414 }
    \n+
    \n+
    415
    \n+
    \n+
    417 int indexInOutside(unsigned int parentId = 0) const
    \n+
    418 {
    \n+
    419 assert(neighbor());
    \n+
    420 return glue_->template patch<O>().indexInInside(i_->template index<O>(parentId));
    \n+
    421 }
    \n+
    \n+
    422
    \n+
    \n+\n+
    428 {
    \n+
    429 GlobalCoordinate normal;
    \n+
    430
    \n+
    431 if (codimensionWorld == 0)
    \n+
    432 DUNE_THROW(Dune::Exception, "There is no normal vector to a full-dimensional intersection");
    \n+
    433 else if (codimensionWorld == 1) {
    \n+
    434 /* TODO: Implement the general n-ary cross product here */
    \n+
    435 const auto jacobianTransposed = geometry().jacobianTransposed(local);
    \n+
    436 if (mydim==1) {
    \n+
    437 normal[0] = - jacobianTransposed[0][1];
    \n+
    438 normal[1] = jacobianTransposed[0][0];
    \n+
    439 } else if (mydim==2) {
    \n+
    440 normal[0] = (jacobianTransposed[0][1] * jacobianTransposed[1][2] - jacobianTransposed[0][2] * jacobianTransposed[1][1]);
    \n+
    441 normal[1] = - (jacobianTransposed[0][0] * jacobianTransposed[1][2] - jacobianTransposed[0][2] * jacobianTransposed[1][0]);
    \n+
    442 normal[2] = (jacobianTransposed[0][0] * jacobianTransposed[1][1] - jacobianTransposed[0][1] * jacobianTransposed[1][0]);
    \n+
    443 } else
    \n+
    444 DUNE_THROW(Dune::NotImplemented, "Remote intersections don't implement the 'outerNormal' method for " << mydim << "-dimensional intersections yet");
    \n+
    445 } else
    \n+
    446 DUNE_THROW(Dune::NotImplemented, "Remote intersections don't implement the 'outerNormal' method for intersections with codim >= 2 yet");
    \n+
    447
    \n+
    448 return normal;
    \n+
    449 }
    \n+
    \n+
    450
    \n+
    \n+\n+
    456 {
    \n+
    457 GlobalCoordinate normal = outerNormal(local);
    \n+
    458 normal /= normal.two_norm();
    \n+
    459 return normal;
    \n+
    460 }
    \n+
    \n+
    461
    \n+
    \n+\n+
    467 {
    \n+
    468 return (unitOuterNormal(local) *= geometry().integrationElement(local));
    \n+
    469 }
    \n+
    \n+
    470
    \n+
    \n+\n+
    476 {
    \n+
    477 return unitOuterNormal(ReferenceElements<ctype,mydim>::general(type()).position(0,0));
    \n+
    478 }
    \n+
    \n+
    479
    \n+
    \n+\n+
    484 {
    \n+
    485 return Intersection<P0,P1,O,I>(glue_,i_);
    \n+
    486 }
    \n+
    \n+
    487
    \n+
    488#ifdef QUICKHACK_INDEX
    \n+
    489 typedef typename GridGlue::IndexType IndexType;
    \n+
    490
    \n+
    491 IndexType index() const
    \n+
    492 {
    \n+
    493 return i_->index_;
    \n+
    494 }
    \n+
    495
    \n+
    496#endif
    \n+
    497
    \n+
    498 private:
    \n+
    499
    \n+
    500 friend class IntersectionIndexSet<P0,P1>;
    \n+
    501
    \n+
    502 /* M E M B E R V A R I A B L E S */
    \n+
    503
    \n+
    505 const GridGlue* glue_;
    \n+
    506
    \n+
    508 const IntersectionData* i_;
    \n+
    509 };
    \n+
    \n+
    510
    \n+
    511
    \n+
    512 } // end namespace GridGlue
    \n+
    513} // end namespace Dune
    \n+
    514
    \n+
    515#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH
    \n
    Central component of the module implementing the coupling of two grids.
    \n
    Definition gridglue.hh:37
    \n
    sequential adapter to couple two grids at specified close together boundaries
    Definition gridglue.hh:67
    \n-\n-
    Definition intersectioniterator.hh:25
    \n-
    ::Dune::GridGlue::GridGlue< P0, P1 > GridGlue
    Definition intersectioniterator.hh:28
    \n-
    const Intersection & dereference() const
    Definition intersectioniterator.hh:37
    \n-
    void increment()
    Definition intersectioniterator.hh:44
    \n-
    ::Dune::GridGlue::Intersection< P0, P1, inside, outside > Intersection
    Definition intersectioniterator.hh:29
    \n-
    IntersectionIterator(const GridGlue *glue, unsigned int i)
    Definition intersectioniterator.hh:31
    \n-
    bool equals(const IntersectionIterator &iter) const
    Definition intersectioniterator.hh:49
    \n+
    unsigned int IndexType
    Definition gridglue.hh:147
    \n+
    PromotionTraits< typenameGridView< 0 >::ctype, typenameGridView< 1 >::ctype >::PromotedType ctype
    The type used for coordinates.
    Definition gridglue.hh:171
    \n+
    static constexpr int dimworld
    export the world dimension This is the maximum of the extractors' world dimensions.
    Definition gridglue.hh:166
    \n+
    storage class for Dune::GridGlue::Intersection related data
    Definition intersection.hh:38
    \n+
    GridGlue::IndexType IndexType
    Definition intersection.hh:42
    \n+
    AffineGeometry< typename GridGlue::template GridView< side >::ctype, mydim, GridGlue::template GridView< side >::dimensionworld > GridGeometry
    Definition intersection.hh:65
    \n+
    const GridLocalGeometry< side > & localGeometry(unsigned int parentId=0) const
    Definition intersection.hh:85
    \n+
    static constexpr int coorddim
    Dimension of the world space of the intersection.
    Definition intersection.hh:45
    \n+
    GridGeometry< 0 > Grid0Geometry
    Definition intersection.hh:67
    \n+
    typename GridGlue::template GridView< side >::IndexSet::IndexType GridIndexType
    Definition intersection.hh:71
    \n+
    IndexType index(unsigned int parentId=0) const
    Definition intersection.hh:97
    \n+
    IndexType parents() const
    Definition intersection.hh:101
    \n+
    GridLocalGeometry< 1 > Grid1LocalGeometry
    Definition intersection.hh:61
    \n+
    const GridGeometry< side > & geometry() const
    Definition intersection.hh:89
    \n+
    bool local() const
    Definition intersection.hh:93
    \n+
    ::Dune::GridGlue::GridGlue< P0, P1 > GridGlue
    Definition intersection.hh:40
    \n+
    static constexpr int mydim
    Dimension of the intersection.
    Definition intersection.hh:54
    \n+
    AffineGeometry< typename GridGlue::template GridView< side >::ctype, mydim, GridGlue::template GridView< side >::dimension > GridLocalGeometry
    Definition intersection.hh:58
    \n+
    GridLocalGeometry< 0 > Grid0LocalGeometry
    Definition intersection.hh:60
    \n+
    IndexType index_
    index of this intersection after GridGlue interface
    Definition intersection.hh:112
    \n+
    GridIndexType< 1 > Grid1IndexType
    Definition intersection.hh:74
    \n+
    GridGeometry< 1 > Grid1Geometry
    Definition intersection.hh:68
    \n+
    GridIndexType< 0 > Grid0IndexType
    Definition intersection.hh:73
    \n+
    IntersectionData()=default
    Default Constructor.
    \n+
    The intersection of two entities of the two patches of a GridGlue.
    Definition intersection.hh:261
    \n+
    Traits::OutsideLocalGeometry OutsideLocalGeometry
    Definition intersection.hh:275
    \n+
    Intersection< P0, P1, O, I > flip() const
    Return a copy of the intersection with inside and outside switched.
    Definition intersection.hh:483
    \n+
    bool conforming() const
    Return true if intersection is conforming.
    Definition intersection.hh:335
    \n+
    InsideGridView::Traits::template Codim< 0 >::Entity InsideEntity
    Definition intersection.hh:281
    \n+
    Traits::GridGlue GridGlue
    Definition intersection.hh:267
    \n+
    int indexInOutside(unsigned int parentId=0) const
    Local number of codim 1 entity in outside() Entity where intersection is contained in.
    Definition intersection.hh:417
    \n+
    int indexInInside(unsigned int parentId=0) const
    Local number of codim 1 entity in the inside() Entity where intersection is contained in.
    Definition intersection.hh:410
    \n+
    bool self() const
    For parallel computations: Return true if inside() entity exists locally.
    Definition intersection.hh:393
    \n+
    static constexpr auto mydim
    dimension of the intersection
    Definition intersection.hh:291
    \n+
    static constexpr int outsidePatch
    outside patch
    Definition intersection.hh:297
    \n+
    Dune::GeometryType type() const
    Type of reference element for this intersection.
    Definition intersection.hh:377
    \n+
    InsideEntity inside(unsigned int parentId=0) const
    Return element on the inside of this intersection.
    Definition intersection.hh:319
    \n+
    Traits::LocalCoordinate LocalCoordinate
    Definition intersection.hh:284
    \n+
    const OutsideLocalGeometry & geometryInOutside(unsigned int parentId=0) const
    Geometric information about this intersection in local coordinates of the outside() element.
    Definition intersection.hh:349
    \n+
    GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
    Return a unit outer normal.
    Definition intersection.hh:455
    \n+
    Traits::ctype ctype
    Definition intersection.hh:279
    \n+
    IntersectionTraits< P0, P1, I, O > Traits
    Definition intersection.hh:265
    \n+
    Traits::IntersectionData IntersectionData
    Definition intersection.hh:268
    \n+
    Traits::GlobalCoordinate GlobalCoordinate
    Definition intersection.hh:285
    \n+
    Traits::OutsideGeometry OutsideGeometry
    Definition intersection.hh:276
    \n+
    size_t neighbor(unsigned int g=0) const
    Return number of embeddings into local grid0 (grid1) entities.
    Definition intersection.hh:399
    \n+
    Intersection(const GridGlue *glue, const IntersectionData *i)
    Constructor for a given Dataset.
    Definition intersection.hh:311
    \n+
    static constexpr int insidePatch
    inside patch
    Definition intersection.hh:294
    \n+
    Traits::Geometry Geometry
    Definition intersection.hh:278
    \n+
    OutsideGridView::Traits::template Codim< 0 >::Entity OutsideEntity
    Definition intersection.hh:282
    \n+
    OutsideEntity outside(unsigned int parentId=0) const
    Return element on the outside of this intersection.
    Definition intersection.hh:328
    \n+
    const Geometry & geometry() const
    Geometric information about this intersection as part of the inside grid.
    Definition intersection.hh:360
    \n+
    Traits::InsideLocalGeometry InsideLocalGeometry
    Definition intersection.hh:272
    \n+
    GlobalCoordinate outerNormal(const LocalCoordinate &local) const
    Return an outer normal (length not necessarily 1)
    Definition intersection.hh:427
    \n+
    const OutsideGeometry & geometryOutside() const
    Geometric information about this intersection as part of the outside grid.
    Definition intersection.hh:371
    \n+
    Traits::OutsideGridView OutsideGridView
    Definition intersection.hh:274
    \n+
    GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
    Return an outer normal with the length of the integration element.
    Definition intersection.hh:466
    \n+
    Traits::InsideGridView InsideGridView
    Definition intersection.hh:271
    \n+
    const InsideLocalGeometry & geometryInInside(unsigned int parentId=0) const
    Geometric information about this intersection in local coordinates of the inside() element.
    Definition intersection.hh:342
    \n+
    GlobalCoordinate centerUnitOuterNormal() const
    Unit outer normal at the center of the intersection.
    Definition intersection.hh:475
    \n+
    static constexpr auto coorddim
    dimension of the world space of the intersection
    Definition intersection.hh:288
    \n+
    Definition intersection.hh:234
    \n+
    static constexpr int insidePatch
    Definition intersection.hh:249
    \n+
    Dune::FieldVector< ctype, mydim > LocalCoordinate
    Definition intersection.hh:253
    \n+
    static constexpr auto coorddim
    Definition intersection.hh:247
    \n+
    typename IntersectionData::template GridGeometry< outside > OutsideGeometry
    Definition intersection.hh:245
    \n+
    typename GridGlue::ctype ctype
    Definition intersection.hh:252
    \n+
    typename GridGlue::template GridView< outside > OutsideGridView
    Definition intersection.hh:239
    \n+
    Dune::FieldVector< ctype, coorddim > GlobalCoordinate
    Definition intersection.hh:254
    \n+
    typename IntersectionData::template GridLocalGeometry< outside > OutsideLocalGeometry
    Definition intersection.hh:242
    \n+
    typename GridGlue::template GridView< inside > InsideGridView
    Definition intersection.hh:238
    \n+
    typename IntersectionData::template GridGeometry< inside > Geometry
    Definition intersection.hh:244
    \n+
    typename IntersectionData::template GridLocalGeometry< inside > InsideLocalGeometry
    Definition intersection.hh:241
    \n+
    static constexpr int outsidePatch
    Definition intersection.hh:250
    \n+
    static constexpr auto mydim
    Definition intersection.hh:248
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,99 +1,752 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\ba_\bd_\ba_\bp_\bt_\be_\br\n-intersectioniterator.hh\n+intersection.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-12#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH\n-13#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH\n-14\n-15#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n-16\n-17namespace _\bD_\bu_\bn_\be {\n-18 namespace GridGlue {\n-19\n-21 template\n-_\b2_\b2 class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br :\n-23 public Dune::ForwardIteratorFacade<\n-IntersectionIterator,\n-24 const Intersection >\n-25 {\n-26 public:\n-27\n-_\b2_\b8 typedef ::Dune::GridGlue::GridGlue _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be;\n-_\b2_\b9 typedef ::Dune::GridGlue::Intersection _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n-30\n-_\b3_\b1 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be * glue, unsigned int i)\n-32 : glue_(glue),\n-33 index_(i),\n-34 intersection_(glue_, & glue_->intersections_[index_])\n-35 {}\n-36\n-_\b3_\b7 const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn& _\bd_\be_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be() const\n+11#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH\n+12#define DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH\n+13\n+14#include \n+15#include \n+16#include \n+17\n+18#include \n+19#include \n+20#include \n+21#include \n+22#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n+23\n+_\b2_\b4#define ONLY_SIMPLEX_INTERSECTIONS\n+25\n+26namespace _\bD_\bu_\bn_\be {\n+27 namespace GridGlue {\n+28\n+29 // forward declaration\n+30 template\n+31 class IntersectionIndexSet;\n+32\n+36 template\n+_\b3_\b7 class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba\n 38 {\n-39 assert((\"never dereference the end iterator\" &&\n-40 index_ != glue_->index__sz));\n-41 return intersection_;\n-42 }\n+39 public:\n+_\b4_\b0 typedef ::Dune::GridGlue::GridGlue _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be;\n+41\n+_\b4_\b2 typedef typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be;\n 43\n-_\b4_\b4 void _\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt()\n-45 {\n-46 intersection_ = _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(glue_, & glue_->intersections_[++index_]);\n-47 }\n-48\n-_\b4_\b9 bool _\be_\bq_\bu_\ba_\bl_\bs(const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br& iter) const\n-50 {\n-51 return iter.index_ == index_;\n-52 }\n-53\n-54 private:\n+_\b4_\b5 static constexpr int _\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm = _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd;\n+46\n+47 private:\n+48 // intermediate quantities\n+49 template\n+50 static constexpr int dim() { return GridGlue::template GridView::\n+Grid::dimension - GridGlue::template GridPatch::codim; }\n+51\n+52 public:\n+_\b5_\b4 static constexpr int _\bm_\by_\bd_\bi_\bm = dim<0>() < dim<1>() ? dim<0>() : dim<1>();\n 55\n-56 const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be* glue_;\n-57 unsigned int index_;\n-58\n-59 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn intersection_;\n-60 };\n-61\n-62 } // end namespace GridGlue\n-63} // end namespace Dune\n-64\n-65#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH\n+56 template\n+_\b5_\b7 using _\bG_\br_\bi_\bd_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by = AffineGeometry<\n+58 typename GridGlue::template GridView::ctype, _\bm_\by_\bd_\bi_\bm, GridGlue::template\n+GridView::dimension>;\n+59\n+_\b6_\b0 using _\bG_\br_\bi_\bd_\b0_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by [[deprecated(\"please use GridLocalGeometry<0>\n+instead\")]] = _\bG_\br_\bi_\bd_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\b0_\b>;\n+_\b6_\b1 using _\bG_\br_\bi_\bd_\b1_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by [[deprecated(\"please use GridLocalGeometry<1>\n+instead\")]] = _\bG_\br_\bi_\bd_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\b1_\b>;\n+62\n+63 template\n+_\b6_\b4 using _\bG_\br_\bi_\bd_\bG_\be_\bo_\bm_\be_\bt_\br_\by = AffineGeometry<\n+65 typename GridGlue::template GridView::ctype, _\bm_\by_\bd_\bi_\bm, GridGlue::template\n+GridView::dimensionworld>;\n+66\n+_\b6_\b7 using _\bG_\br_\bi_\bd_\b0_\bG_\be_\bo_\bm_\be_\bt_\br_\by [[deprecated(\"please use GridGeometry<0> instead\")]] =\n+_\bG_\br_\bi_\bd_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\b0_\b>;\n+_\b6_\b8 using _\bG_\br_\bi_\bd_\b1_\bG_\be_\bo_\bm_\be_\bt_\br_\by [[deprecated(\"please use GridGeometry<1> instead\")]] =\n+_\bG_\br_\bi_\bd_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\b1_\b>;\n+69\n+70 template\n+_\b7_\b1 using _\bG_\br_\bi_\bd_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be = typename GridGlue::template GridView::IndexSet::\n+IndexType;\n+72\n+_\b7_\b3 using _\bG_\br_\bi_\bd_\b0_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be [[deprecated(\"please use GridIndexType<0> instead\")]] =\n+_\bG_\br_\bi_\bd_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be_\b<_\b0_\b>;\n+_\b7_\b4 using _\bG_\br_\bi_\bd_\b1_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be [[deprecated(\"please use GridIndexType<1> instead\")]] =\n+_\bG_\br_\bi_\bd_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be_\b<_\b1_\b>;\n+75\n+77 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be& glue, unsigned int mergeindex, unsigned int\n+offset, bool grid0local, bool grid1local);\n+78\n+_\b8_\b0 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba() = default;\n+81\n+82 /* Accessor Functions */\n+83\n+84 template\n+_\b8_\b5 const _\bG_\br_\bi_\bd_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\bs_\bi_\bd_\be_\b>& _\bl_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by(unsigned int parentId = 0)\n+const\n+86 { return *std::get(sideData_).gridlocalgeom[parentId]; }\n+87\n+88 template\n+_\b8_\b9 const _\bG_\br_\bi_\bd_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\bs_\bi_\bd_\be_\b>& _\bg_\be_\bo_\bm_\be_\bt_\br_\by() const\n+90 { return *std::get(sideData_).gridgeom; }\n+91\n+92 template\n+_\b9_\b3 bool _\bl_\bo_\bc_\ba_\bl() const\n+94 { return std::get(sideData_).gridlocal; }\n+95\n+96 template\n+_\b9_\b7 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bi_\bn_\bd_\be_\bx(unsigned int parentId = 0) const\n+98 { return std::get(sideData_).gridindices[parentId]; }\n+99\n+100 template\n+_\b1_\b0_\b1 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bp_\ba_\br_\be_\bn_\bt_\bs() const\n+102 { return std::get(sideData_).gridindices.size(); }\n+103\n+104 private:\n+105 template\n+106 void initializeGeometry(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be& glue, unsigned mergeindex);\n+107\n+108 /* M E M B E R V A R I A B L E S */\n+109\n+110 public:\n+_\b1_\b1_\b2 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bi_\bn_\bd_\be_\bx_\b_;\n+113\n+114 private:\n+115 template\n+116 struct SideData {\n+118 bool gridlocal = false;\n+119\n+121 std::vector< GridIndexType > gridindices;\n+122\n+124 std::vector< std::optional< GridLocalGeometry > > gridlocalgeom;\n+125\n+133 std::optional< GridGeometry > gridgeom;\n+134 };\n+135\n+136 std::tuple< SideData<0>, SideData<1> > sideData_;\n+137 };\n+138\n+139 template\n+140 template\n+141 void IntersectionData::initializeGeometry(const GridGlue& glue,\n+unsigned mergeindex)\n+142 {\n+143 auto& data = std::get(sideData_);\n+144\n+145 const unsigned n_parents = glue.merger_->template parents\n+(mergeindex);\n+146\n+147 // init containers\n+148 data.gridindices.resize(n_parents);\n+149 data.gridlocalgeom.resize(n_parents);\n+150\n+151 // default values\n+152 data.gridindices[0] = 0;\n+153\n+154 static constexpr int nSimplexCorners = mydim + 1;\n+155 using ctype = typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\bt_\by_\bp_\be;\n+156\n+157 // initialize the local and the global geometries of grid `side`\n+158\n+159 // compute the coordinates of the subface's corners in codim 0 entity local\n+coordinates\n+160 static constexpr int elementdim = GridGlue::template GridView::\n+template Codim<0>::Geometry::mydimension;\n+161\n+162 // coordinates within the subentity that contains the remote intersection\n+163 std::array() >, nSimplexCorners>\n+corners_subEntity_local;\n+164\n+165 for (unsigned int par = 0; par < n_parents; ++par) {\n+166 for (int i = 0; i < nSimplexCorners; ++i)\n+167 corners_subEntity_local[i] = glue.merger_->template parentLocal\n+(mergeindex, i, par);\n+168\n+169 // Coordinates of the remote intersection corners wrt the element\n+coordinate system\n+170 std::array, nSimplexCorners>\n+corners_element_local;\n+171\n+172 if (data.gridlocal) {\n+173 data.gridindices[par] = glue.merger_->template parent\n+(mergeindex,par);\n+174\n+175 typename GridGlue::template GridPatch::LocalGeometry\n+176 gridLocalGeometry = glue.template patch().geometryLocal\n+(data.gridindices[par]);\n+177 for (std::size_t i=0; i::Geometry\n+196 gridWorldGeometry = glue.template patch().geometry(data.gridindices\n+[par]);\n+197\n+198 // world coordinates of the remote intersection corners\n+199 std::array::\n+dimensionworld>, nSimplexCorners> corners_global;\n+200\n+201 for (std::size_t i=0; i\n+_\b2_\b1_\b3 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be& glue, unsigned\n+int mergeindex, unsigned int offset,\n+214 bool grid0local, bool grid1local)\n+215 : index_(mergeindex+offset)\n+216 {\n+217 // if an invalid index is given do not proceed!\n+218 // (happens when the parent GridGlue initializes the \"end\"-Intersection)\n+219 assert (0 <= mergeindex || mergeindex < glue.index__sz);\n+220\n+221 std::get<0>(sideData_).gridlocal = grid0local;\n+222 std::get<1>(sideData_).gridlocal = grid1local;\n+223\n+224 initializeGeometry<0>(glue, mergeindex);\n+225 initializeGeometry<1>(glue, mergeindex);\n+226 }\n+227\n+232 template\n+_\b2_\b3_\b3 struct _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs\n+234 {\n+_\b2_\b3_\b5 using _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be = _\b:_\b:_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>;\n+_\b2_\b3_\b6 using _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba = _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b<_\bP_\b0_\b,_\b _\bP_\b1_\b>;\n+237\n+_\b2_\b3_\b8 using _\bI_\bn_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw = typename GridGlue::template GridView;\n+_\b2_\b3_\b9 using _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw = typename GridGlue::template GridView;\n+240\n+_\b2_\b4_\b1 using _\bI_\bn_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by = typename IntersectionData::template\n+GridLocalGeometry;\n+_\b2_\b4_\b2 using _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by = typename IntersectionData::template\n+GridLocalGeometry;\n+243\n+_\b2_\b4_\b4 using _\bG_\be_\bo_\bm_\be_\bt_\br_\by = typename IntersectionData::template GridGeometry;\n+_\b2_\b4_\b5 using _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by = typename IntersectionData::template\n+GridGeometry;\n+246\n+_\b2_\b4_\b7 static constexpr auto _\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm = _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm;\n+_\b2_\b4_\b8 static constexpr auto _\bm_\by_\bd_\bi_\bm = _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bm_\by_\bd_\bi_\bm;\n+_\b2_\b4_\b9 static constexpr int _\bi_\bn_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh = inside;\n+_\b2_\b5_\b0 static constexpr int _\bo_\bu_\bt_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh = outside;\n+251\n+_\b2_\b5_\b2 using _\bc_\bt_\by_\bp_\be = typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\bt_\by_\bp_\be;\n+_\b2_\b5_\b3 using _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be = Dune::FieldVector;\n+_\b2_\b5_\b4 using _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be = Dune::FieldVector;\n+255 };\n+256\n+259 template\n+_\b2_\b6_\b0 class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+261 {\n+262\n+263 public:\n+264\n+_\b2_\b6_\b5 typedef _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b<_\bP_\b0_\b,_\bP_\b1_\b,_\bI_\b,_\bO_\b> _\bT_\br_\ba_\bi_\bt_\bs;\n+266\n+_\b2_\b6_\b7 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be;\n+_\b2_\b6_\b8 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba;\n+269\n+270\n+_\b2_\b7_\b1 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw _\bI_\bn_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw;\n+_\b2_\b7_\b2 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bI_\bn_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by;\n+273\n+_\b2_\b7_\b4 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw;\n+_\b2_\b7_\b5 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by;\n+_\b2_\b7_\b6 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by;\n+277\n+_\b2_\b7_\b8 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bG_\be_\bo_\bm_\be_\bt_\br_\by;\n+_\b2_\b7_\b9 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bc_\bt_\by_\bp_\be _\bc_\bt_\by_\bp_\be;\n+280\n+_\b2_\b8_\b1 typedef typename InsideGridView::Traits::template Codim<0>::Entity\n+_\bI_\bn_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by;\n+_\b2_\b8_\b2 typedef typename OutsideGridView::Traits::template Codim<0>::Entity\n+_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by;\n+283\n+_\b2_\b8_\b4 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be;\n+_\b2_\b8_\b5 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be;\n+286\n+_\b2_\b8_\b8 static constexpr auto _\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm = _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm;\n+289\n+_\b2_\b9_\b1 static constexpr auto _\bm_\by_\bd_\bi_\bm = _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bm_\by_\bd_\bi_\bm;\n+292\n+_\b2_\b9_\b4 static constexpr int _\bi_\bn_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh = _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bi_\bn_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh;\n+295\n+_\b2_\b9_\b7 static constexpr int _\bo_\bu_\bt_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh = _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bo_\bu_\bt_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh;\n+298\n+299 // typedef unsigned int IndexType;\n+300\n+301 private:\n+305 static constexpr int codimensionWorld = _\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm - _\bm_\by_\bd_\bi_\bm;\n+306\n+307 public:\n+308 /* C O N S T R U C T O R S */\n+309\n+_\b3_\b1_\b1 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be* glue, const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba* i) :\n+312 glue_(glue), i_(i) {}\n+313\n+314 /* F U N C T I O N A L I T Y */\n+315\n+318 _\bI_\bn_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by\n+_\b3_\b1_\b9 _\bi_\bn_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n+320 {\n+321 assert(_\bs_\be_\bl_\bf());\n+322 return glue_->template patch().element(i_->template index(parentId));\n+323 }\n+324\n+327 _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by\n+_\b3_\b2_\b8 _\bo_\bu_\bt_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n+329 {\n+330 assert(_\bn_\be_\bi_\bg_\bh_\bb_\bo_\br());\n+331 return glue_->template patch().element(i_->template index(parentId));\n+332 }\n+333\n+_\b3_\b3_\b5 bool _\bc_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg() const\n+336 {\n+337 throw Dune::NotImplemented();\n+338 }\n+339\n+_\b3_\b4_\b2 const _\bI_\bn_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by& _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be(unsigned int parentId = 0)\n+const\n+343 {\n+344 return i_->template localGeometry(parentId);\n+345 }\n+346\n+_\b3_\b4_\b9 const _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by& _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bI_\bn_\bO_\bu_\bt_\bs_\bi_\bd_\be(unsigned int parentId = 0)\n+const\n+350 {\n+351 return i_->template localGeometry(parentId);\n+352 }\n+353\n+_\b3_\b6_\b0 const _\bG_\be_\bo_\bm_\be_\bt_\br_\by& _\bg_\be_\bo_\bm_\be_\bt_\br_\by() const\n+361 {\n+362 return i_->template geometry();\n+363 }\n+364\n+_\b3_\b7_\b1 const _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by& _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bO_\bu_\bt_\bs_\bi_\bd_\be() const // DUNE_DEPRECATED\n+372 {\n+373 return i_->template geometry();\n+374 }\n+375\n+_\b3_\b7_\b7 Dune::GeometryType _\bt_\by_\bp_\be() const\n+378 {\n+379 #ifdef ONLY_SIMPLEX_INTERSECTIONS\n+380 # if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)\n+381 return Dune::GeometryTypes::simplex(_\bm_\by_\bd_\bi_\bm);\n+382 # else\n+383 static const Dune::GeometryType _\bt_\by_\bp_\be(Dune::GeometryType::simplex, _\bm_\by_\bd_\bi_\bm);\n+384 return _\bt_\by_\bp_\be;\n+385 # endif\n+386 #else\n+387 #error Not Implemented\n+388 #endif\n+389 }\n+390\n+391\n+_\b3_\b9_\b3 bool _\bs_\be_\bl_\bf() const\n+394 {\n+395 return i_->template local();\n+396 }\n+397\n+_\b3_\b9_\b9 size_t _\bn_\be_\bi_\bg_\bh_\bb_\bo_\br(unsigned int g = 0) const\n+400 {\n+401 if (g == 0 && i_->template local()) {\n+402 return i_->template parents();\n+403 } else if (g == 1 && i_->template local()) {\n+404 return i_->template parents();\n+405 }\n+406 return 0;\n+407 }\n+408\n+_\b4_\b1_\b0 int _\bi_\bn_\bd_\be_\bx_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n+411 {\n+412 assert(_\bs_\be_\bl_\bf());\n+413 return glue_->template patch().indexInInside(i_->template index\n+(parentId));\n+414 }\n+415\n+_\b4_\b1_\b7 int _\bi_\bn_\bd_\be_\bx_\bI_\bn_\bO_\bu_\bt_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n+418 {\n+419 assert(_\bn_\be_\bi_\bg_\bh_\bb_\bo_\br());\n+420 return glue_->template patch().indexInInside(i_->template index\n+(parentId));\n+421 }\n+422\n+_\b4_\b2_\b7 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be _\bo_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl(const _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be &local) const\n+428 {\n+429 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be normal;\n+430\n+431 if (codimensionWorld == 0)\n+432 DUNE_THROW(Dune::Exception, \"There is no normal vector to a full-\n+dimensional intersection\");\n+433 else if (codimensionWorld == 1) {\n+434 /* TODO: Implement the general n-ary cross product here */\n+435 const auto jacobianTransposed = _\bg_\be_\bo_\bm_\be_\bt_\br_\by().jacobianTransposed(local);\n+436 if (_\bm_\by_\bd_\bi_\bm==1) {\n+437 normal[0] = - jacobianTransposed[0][1];\n+438 normal[1] = jacobianTransposed[0][0];\n+439 } else if (_\bm_\by_\bd_\bi_\bm==2) {\n+440 normal[0] = (jacobianTransposed[0][1] * jacobianTransposed[1][2] -\n+jacobianTransposed[0][2] * jacobianTransposed[1][1]);\n+441 normal[1] = - (jacobianTransposed[0][0] * jacobianTransposed[1][2] -\n+jacobianTransposed[0][2] * jacobianTransposed[1][0]);\n+442 normal[2] = (jacobianTransposed[0][0] * jacobianTransposed[1][1] -\n+jacobianTransposed[0][1] * jacobianTransposed[1][0]);\n+443 } else\n+444 DUNE_THROW(Dune::NotImplemented, \"Remote intersections don't implement the\n+'outerNormal' method for \" << _\bm_\by_\bd_\bi_\bm << \"-dimensional intersections yet\");\n+445 } else\n+446 DUNE_THROW(Dune::NotImplemented, \"Remote intersections don't implement the\n+'outerNormal' method for intersections with codim >= 2 yet\");\n+447\n+448 return normal;\n+449 }\n+450\n+_\b4_\b5_\b5 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be _\bu_\bn_\bi_\bt_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl(const _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be &local) const\n+456 {\n+457 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be normal = _\bo_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl(local);\n+458 normal /= normal.two_norm();\n+459 return normal;\n+460 }\n+461\n+_\b4_\b6_\b6 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be _\bi_\bn_\bt_\be_\bg_\br_\ba_\bt_\bi_\bo_\bn_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl(const _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be &local) const\n+467 {\n+468 return (_\bu_\bn_\bi_\bt_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl(local) *= _\bg_\be_\bo_\bm_\be_\bt_\br_\by().integrationElement(local));\n+469 }\n+470\n+_\b4_\b7_\b5 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be _\bc_\be_\bn_\bt_\be_\br_\bU_\bn_\bi_\bt_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl () const\n+476 {\n+477 return _\bu_\bn_\bi_\bt_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl(ReferenceElements::general(_\bt_\by_\bp_\be\n+()).position(0,0));\n+478 }\n+479\n+_\b4_\b8_\b3 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bP_\b0_\b,_\bP_\b1_\b,_\bO_\b,_\bI_\b> _\bf_\bl_\bi_\bp() const\n+484 {\n+485 return _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bP_\b0_\b,_\bP_\b1_\b,_\bO_\b,_\bI_\b>(glue_,i_);\n+486 }\n+487\n+488#ifdef QUICKHACK_INDEX\n+489 typedef typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be IndexType;\n+490\n+491 IndexType index() const\n+492 {\n+493 return i_->_\bi_\bn_\bd_\be_\bx_\b_;\n+494 }\n+495\n+496#endif\n+497\n+498 private:\n+499\n+500 friend class IntersectionIndexSet;\n+501\n+502 /* M E M B E R V A R I A B L E S */\n+503\n+505 const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be* glue_;\n+506\n+508 const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba* i_;\n+509 };\n+510\n+511\n+512 } // end namespace GridGlue\n+513} // end namespace Dune\n+514\n+515#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH\n _\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh\n Central component of the module implementing the coupling of two grids.\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n sequential adapter to couple two grids at specified close together boundaries\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:67\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b,_\b _\bi_\bn_\bs_\bi_\bd_\be_\b,_\b _\bo_\bu_\bt_\bs_\bi_\bd_\be_\b _\b>\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:25\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n+unsigned int IndexType\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:147\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\bt_\by_\bp_\be\n+PromotionTraits< typenameGridView< 0 >::ctype, typenameGridView< 1 >::ctype >::\n+PromotedType ctype\n+The type used for coordinates.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:171\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd\n+static constexpr int dimworld\n+export the world dimension This is the maximum of the extractors' world\n+dimensions.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:166\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba\n+storage class for Dune::GridGlue::Intersection related data\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:38\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n+GridGlue::IndexType IndexType\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:42\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+AffineGeometry< typename GridGlue::template GridView< side >::ctype, mydim,\n+GridGlue::template GridView< side >::dimensionworld > GridGeometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:65\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bl_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+const GridLocalGeometry< side > & localGeometry(unsigned int parentId=0) const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:85\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm\n+static constexpr int coorddim\n+Dimension of the world space of the intersection.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:45\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\b0_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+GridGeometry< 0 > Grid0Geometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:67\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n+typename GridGlue::template GridView< side >::IndexSet::IndexType GridIndexType\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:71\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bi_\bn_\bd_\be_\bx\n+IndexType index(unsigned int parentId=0) const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:97\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs\n+IndexType parents() const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:101\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+GridLocalGeometry< 1 > Grid1LocalGeometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:61\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by\n+const GridGeometry< side > & geometry() const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:89\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bl_\bo_\bc_\ba_\bl\n+bool local() const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:93\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n ::Dune::GridGlue::GridGlue< P0, P1 > GridGlue\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:28\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bd_\be_\br_\be_\bf_\be_\br_\be_\bn_\bc_\be\n-const Intersection & dereference() const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt\n-void increment()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:44\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-::Dune::GridGlue::Intersection< P0, P1, inside, outside > Intersection\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:29\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br\n-IntersectionIterator(const GridGlue *glue, unsigned int i)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:31\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b:_\b:_\be_\bq_\bu_\ba_\bl_\bs\n-bool equals(const IntersectionIterator &iter) const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectioniterator.hh:49\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:40\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bm_\by_\bd_\bi_\bm\n+static constexpr int mydim\n+Dimension of the intersection.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:54\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+AffineGeometry< typename GridGlue::template GridView< side >::ctype, mydim,\n+GridGlue::template GridView< side >::dimension > GridLocalGeometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:58\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\b0_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+GridLocalGeometry< 0 > Grid0LocalGeometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:60\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bi_\bn_\bd_\be_\bx_\b_\n+IndexType index_\n+index of this intersection after GridGlue interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:112\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n+GridIndexType< 1 > Grid1IndexType\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:74\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+GridGeometry< 1 > Grid1Geometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:68\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bG_\br_\bi_\bd_\b0_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n+GridIndexType< 0 > Grid0IndexType\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:73\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba\n+IntersectionData()=default\n+Default Constructor.\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+The intersection of two entities of the two patches of a GridGlue.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:261\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+Traits::OutsideLocalGeometry OutsideLocalGeometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:275\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bf_\bl_\bi_\bp\n+Intersection< P0, P1, O, I > flip() const\n+Return a copy of the intersection with inside and outside switched.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:483\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg\n+bool conforming() const\n+Return true if intersection is conforming.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:335\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by\n+InsideGridView::Traits::template Codim< 0 >::Entity InsideEntity\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:281\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n+Traits::GridGlue GridGlue\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:267\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bd_\be_\bx_\bI_\bn_\bO_\bu_\bt_\bs_\bi_\bd_\be\n+int indexInOutside(unsigned int parentId=0) const\n+Local number of codim 1 entity in outside() Entity where intersection is\n+contained in.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:417\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bd_\be_\bx_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be\n+int indexInInside(unsigned int parentId=0) const\n+Local number of codim 1 entity in the inside() Entity where intersection is\n+contained in.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:410\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bs_\be_\bl_\bf\n+bool self() const\n+For parallel computations: Return true if inside() entity exists locally.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:393\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bm_\by_\bd_\bi_\bm\n+static constexpr auto mydim\n+dimension of the intersection\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:291\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bo_\bu_\bt_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh\n+static constexpr int outsidePatch\n+outside patch\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:297\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bt_\by_\bp_\be\n+Dune::GeometryType type() const\n+Type of reference element for this intersection.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:377\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bs_\bi_\bd_\be\n+InsideEntity inside(unsigned int parentId=0) const\n+Return element on the inside of this intersection.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:319\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be\n+Traits::LocalCoordinate LocalCoordinate\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:284\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bI_\bn_\bO_\bu_\bt_\bs_\bi_\bd_\be\n+const OutsideLocalGeometry & geometryInOutside(unsigned int parentId=0) const\n+Geometric information about this intersection in local coordinates of the\n+outside() element.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:349\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bu_\bn_\bi_\bt_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl\n+GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const\n+Return a unit outer normal.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:455\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bt_\by_\bp_\be\n+Traits::ctype ctype\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:279\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bT_\br_\ba_\bi_\bt_\bs\n+IntersectionTraits< P0, P1, I, O > Traits\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:265\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba\n+Traits::IntersectionData IntersectionData\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:268\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be\n+Traits::GlobalCoordinate GlobalCoordinate\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:285\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+Traits::OutsideGeometry OutsideGeometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:276\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bn_\be_\bi_\bg_\bh_\bb_\bo_\br\n+size_t neighbor(unsigned int g=0) const\n+Return number of embeddings into local grid0 (grid1) entities.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:399\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+Intersection(const GridGlue *glue, const IntersectionData *i)\n+Constructor for a given Dataset.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:311\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh\n+static constexpr int insidePatch\n+inside patch\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:294\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+Traits::Geometry Geometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:278\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by\n+OutsideGridView::Traits::template Codim< 0 >::Entity OutsideEntity\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:282\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bo_\bu_\bt_\bs_\bi_\bd_\be\n+OutsideEntity outside(unsigned int parentId=0) const\n+Return element on the outside of this intersection.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:328\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by\n+const Geometry & geometry() const\n+Geometric information about this intersection as part of the inside grid.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:360\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+Traits::InsideLocalGeometry InsideLocalGeometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:272\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bo_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl\n+GlobalCoordinate outerNormal(const LocalCoordinate &local) const\n+Return an outer normal (length not necessarily 1)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:427\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bO_\bu_\bt_\bs_\bi_\bd_\be\n+const OutsideGeometry & geometryOutside() const\n+Geometric information about this intersection as part of the outside grid.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:371\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw\n+Traits::OutsideGridView OutsideGridView\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:274\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bt_\be_\bg_\br_\ba_\bt_\bi_\bo_\bn_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl\n+GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const\n+Return an outer normal with the length of the integration element.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:466\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw\n+Traits::InsideGridView InsideGridView\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:271\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be\n+const InsideLocalGeometry & geometryInInside(unsigned int parentId=0) const\n+Geometric information about this intersection in local coordinates of the\n+inside() element.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:342\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\be_\bn_\bt_\be_\br_\bU_\bn_\bi_\bt_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl\n+GlobalCoordinate centerUnitOuterNormal() const\n+Unit outer normal at the center of the intersection.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:475\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm\n+static constexpr auto coorddim\n+dimension of the world space of the intersection\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:288\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:234\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bi_\bn_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh\n+static constexpr int insidePatch\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:249\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be\n+Dune::FieldVector< ctype, mydim > LocalCoordinate\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:253\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm\n+static constexpr auto coorddim\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:247\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+typename IntersectionData::template GridGeometry< outside > OutsideGeometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:245\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bc_\bt_\by_\bp_\be\n+typename GridGlue::ctype ctype\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:252\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw\n+typename GridGlue::template GridView< outside > OutsideGridView\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:239\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be\n+Dune::FieldVector< ctype, coorddim > GlobalCoordinate\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:254\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+typename IntersectionData::template GridLocalGeometry< outside >\n+OutsideLocalGeometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:242\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw\n+typename GridGlue::template GridView< inside > InsideGridView\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:238\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+typename IntersectionData::template GridGeometry< inside > Geometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:244\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bI_\bn_\bs_\bi_\bd_\be_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+typename IntersectionData::template GridLocalGeometry< inside >\n+InsideLocalGeometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:241\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bo_\bu_\bt_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh\n+static constexpr int outsidePatch\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:250\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bm_\by_\bd_\bi_\bm\n+static constexpr auto mydim\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:248\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00029.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00029.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: projectionwriter.hh File Reference\n+dune-grid-glue: projection_impl.hh File Reference\n \n \n \n \n \n \n \n@@ -72,45 +72,47 @@\n
  • dune
  • grid-glue
  • common
  • \n \n \n
    \n \n-
    projectionwriter.hh File Reference
    \n+
    projection_impl.hh File Reference
    \n
    \n
    \n-
    #include <iostream>
    \n-#include <string>
    \n-#include <dune/grid-glue/common/projection.hh>
    \n-#include "projectionwriter_impl.hh"
    \n+
    #include <dune/common/fmatrix.hh>
    \n+#include <cmath>
    \n
    \n

    Go to the source code of this file.

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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    namespace  Dune::GridGlue::ProjectionImplementation
     
    \n \n-\n-\n-\n-\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<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::write (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, std::ostream &out)
     write projection in VTK format
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::write (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, const std::string &filename)
     write projection in VTK format
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::print (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals)
     Print information about the projection to std::cout stream.
     
    template<typename Coordinate , typename Field >
    Coordinate Dune::GridGlue::ProjectionImplementation::corner (unsigned c)
     
    std::pair< unsigned, unsigned > Dune::GridGlue::ProjectionImplementation::edgeToCorners (unsigned edge)
     
    template<typename Coordinate , typename Corners >
    Corners::value_type Dune::GridGlue::ProjectionImplementation::interpolate (const Coordinate &x, const Corners &corners)
     
    template<typename Coordinate , typename Normals >
    Normals::value_type Dune::GridGlue::ProjectionImplementation::interpolate_unit_normals (const Coordinate &x, const Normals &normals)
     
    template<typename Coordinate , typename Field >
    bool Dune::GridGlue::ProjectionImplementation::inside (const Coordinate &x, const Field &epsilon)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,36 +2,43 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-projectionwriter.hh File Reference\n-#include \n-#include \n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n-#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n+projection_impl.hh File Reference\n+#include \n+#include \n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn\n+\u00a0\n F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n- Corners &corners, const Normals &normals, std::ostream &out)\n-\u00a0 write projection in VTK format\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n- Corners &corners, const Normals &normals, const std::string &filename)\n-\u00a0 write projection in VTK format\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n- Corners &corners, const Normals &normals)\n-\u00a0 Print information about the projection to std::cout stream.\n+template\n+ Coordinate\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n+ _\bc_\bo_\br_\bn_\be_\br (unsigned c)\n+\u00a0\n+std::pair< unsigned, unsigned >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n+ _\be_\bd_\bg_\be_\bT_\bo_\bC_\bo_\br_\bn_\be_\br_\bs (unsigned edge)\n+\u00a0\n+template\n+ Corners::value_type\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n+ _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be (const Coordinate &x, const\n+ Corners &corners)\n+\u00a0\n+template\n+ Normals::value_type\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n+ _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be_\b__\bu_\bn_\bi_\bt_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs (const Coordinate &x,\n+ const Normals &normals)\n+\u00a0\n+template\n+ bool\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n+ _\bi_\bn_\bs_\bi_\bd_\be (const Coordinate &x, const Field\n+ &epsilon)\n \u00a0\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00029_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00029_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: projectionwriter.hh Source File\n+dune-grid-glue: projection_impl.hh Source File\n \n \n \n \n \n \n \n@@ -74,57 +74,464 @@\n \n \n
    \n
    \n-
    projectionwriter.hh
    \n+
    projection_impl.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH
    \n-
    4#define DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH
    \n-
    5
    \n-
    6#include <iostream>
    \n-
    7#include <string>
    \n-
    8
    \n-\n-
    10
    \n-
    11namespace Dune {
    \n-
    12namespace GridGlue {
    \n-
    13
    \n-
    28template<typename Coordinate, typename Corners, typename Normals>
    \n-
    29void write(const Projection<Coordinate>& projection,
    \n-
    30 const Corners& corners,
    \n-
    31 const Normals& normals,
    \n-
    32 std::ostream& out);
    \n-
    33
    \n-
    40template<typename Coordinate, typename Corners, typename Normals>
    \n-
    41void write(const Projection<Coordinate>& projection,
    \n-
    42 const Corners& corners,
    \n-
    43 const Normals& normals,
    \n-
    44 const std::string& filename);
    \n-
    54template<typename Coordinate, typename Corners, typename Normals>
    \n-
    55void print(const Projection<Coordinate>& projection,
    \n-
    56 const Corners& corners,
    \n-
    57 const Normals& normals);
    \n-
    58
    \n-
    59} /* namespace GridGlue */
    \n-
    60} /* namespace Dune */
    \n-
    61
    \n-\n-
    63
    \n-
    64#endif
    \n-\n-\n+
    3#include <dune/common/fmatrix.hh>
    \n+
    4
    \n+
    5#include <cmath>
    \n+
    6
    \n+
    7namespace Dune {
    \n+
    8namespace GridGlue {
    \n+
    9
    \n+
    \n+
    10namespace ProjectionImplementation {
    \n+
    11
    \n+
    22template<typename Coordinate, typename Field>
    \n+
    23inline Coordinate
    \n+
    \n+
    24corner(unsigned c)
    \n+
    25{
    \n+
    26 Coordinate x(Field(0));
    \n+
    27 if (c == 0)
    \n+
    28 return x;
    \n+
    29 x[c-1] = Field(1);
    \n+
    30 return x;
    \n+
    31}
    \n+
    \n+
    32
    \n+
    42inline std::pair<unsigned, unsigned>
    \n+
    \n+
    43edgeToCorners(unsigned edge)
    \n+
    44{
    \n+
    45 switch(edge) {
    \n+
    46 case 0: return {0, 1};
    \n+
    47 case 1: return {0, 2};
    \n+
    48 case 2: return {1, 2};
    \n+
    49 }
    \n+
    50 DUNE_THROW(Dune::Exception, "Unexpected edge number.");
    \n+
    51}
    \n+
    \n+
    52
    \n+
    68template<typename Coordinate, typename Corners>
    \n+
    69inline typename Corners::value_type
    \n+
    \n+
    70interpolate(const Coordinate& x, const Corners& corners)
    \n+
    71{
    \n+
    72 auto y = corners[0];
    \n+
    73 for (unsigned i = 0; i < corners.size() - 1; ++i)
    \n+
    74 y.axpy(x[i], corners[i+1] - corners[0]);
    \n+
    75 return y;
    \n+
    76}
    \n+
    \n+
    77
    \n+
    89template<typename Coordinate, typename Normals>
    \n+
    90inline typename Normals::value_type
    \n+
    \n+
    91interpolate_unit_normals(const Coordinate& x, const Normals& normals)
    \n+
    92{
    \n+
    93 auto n = interpolate(x, normals);
    \n+
    94 n /= n.two_norm();
    \n+
    95 return n;
    \n+
    96}
    \n+
    \n+
    97
    \n+
    109template<typename Coordinate, typename Field>
    \n+
    110inline bool
    \n+
    \n+
    111inside(const Coordinate& x, const Field& epsilon)
    \n+
    112{
    \n+
    113 const unsigned dim = Coordinate::dimension;
    \n+
    114 Field sum(0);
    \n+
    115 for (unsigned i = 0; i < dim-1; ++i) {
    \n+
    116 if (x[i] < -epsilon)
    \n+
    117 return false;
    \n+
    118 sum += x[i];
    \n+
    119 }
    \n+
    120 /* If any x\u1d62 is NaN, sum will be NaN and this comparison false! */
    \n+
    121 if (sum <= Field(1) + epsilon)
    \n+
    122 return true;
    \n+
    123 return false;
    \n+
    124}
    \n+
    \n+
    125
    \n+
    126} /* namespace ProjectionImplementation */
    \n+
    \n+
    127
    \n+
    128template<typename Coordinate>
    \n+
    129Projection<Coordinate>
    \n+
    \n+
    130::Projection(const Field overlap, const Field max_normal_product)
    \n+
    131 : m_overlap(overlap)
    \n+
    132 , m_max_normal_product(max_normal_product)
    \n+
    133{
    \n+
    134 /* Nothing. */
    \n+
    135}
    \n+
    \n+
    136
    \n+
    137template<typename Coordinate>
    \n+
    138void
    \n+\n+
    \n+
    140::epsilon(const Field epsilon)
    \n+
    141{
    \n+
    142 m_epsilon = epsilon;
    \n+
    143}
    \n+
    \n+
    144
    \n+
    145template<typename Coordinate>
    \n+
    146template<typename Corners, typename Normals>
    \n+
    147void
    \n+\n+
    149::doProjection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals)
    \n+
    150{
    \n+
    151 /* Try to obtain \u03a6(x\u1d62) for each corner x\u1d62 of the preimage triangle.
    \n+
    152 * This means solving a linear system of equations
    \n+
    153 * \u03a6(x\u1d62) = (1-\u03b1-\u03b2) y\u2080 + \u03b1 y\u2081 + \u03b2 y\u2082 = x\u1d62 + \u03b4 n\u1d62
    \n+
    154 * or \u03b1 (y\u2081 - y\u2080) + \u03b2 (y\u2082 - y\u2080) - \u03b4 n\u1d62 = x\u1d62 - y\u2080
    \n+
    155 * to obtain the barycentric coordinates (\u03b1, \u03b2) of \u03a6(x\u1d62) in the image
    \n+
    156 * triangle and the distance \u03b4.
    \n+
    157 *
    \n+
    158 * In the matrix m corresponding to the system, only the third column and the
    \n+
    159 * right-hand side depend on i. The first two columns can be assembled before
    \n+
    160 * and reused.
    \n+
    161 */
    \n+
    162 using namespace ProjectionImplementation;
    \n+
    163 using std::get;
    \n+
    164 typedef Dune::FieldMatrix<Field, dim, dim> Matrix;
    \n+
    165 Matrix m;
    \n+
    166
    \n+
    167 const auto& origin = get<0>(corners);
    \n+
    168 const auto& origin_normals = get<0>(normals);
    \n+
    169 const auto& target = get<1>(corners);
    \n+
    170 const auto& target_normals = get<1>(normals);
    \n+
    171 auto& images = get<0>(m_images);
    \n+
    172 auto& success = get<0>(m_success);
    \n+
    173
    \n+
    174 /* directions\u1d62 = (y\u1d62 - y\u2080) / ||y\u1d62 - y\u2080||
    \n+
    175 * These are the first to columns of the system matrix; the rescaling is done
    \n+
    176 * to ensure all columns have a comparable norm (the last has the normal with norm 1.
    \n+
    177 */
    \n+
    178 std::array<Coordinate, dim-1> directions;
    \n+
    179 std::array<Field, dim-1> scales;
    \n+
    180 /* estimator for the diameter of the target face */
    \n+
    181 Field scaleSum(0);
    \n+
    182 for (unsigned i = 0; i < dim-1; ++i) {
    \n+
    183 directions[i] = target[i+1] - target[0];
    \n+
    184 scales[i] = directions[i].infinity_norm();
    \n+
    185 directions[i] /= scales[i];
    \n+
    186 scaleSum += scales[i];
    \n+
    187 }
    \n+
    188
    \n+
    189 for (unsigned i = 0; i < dim-1; ++i) {
    \n+
    190 for (unsigned j = 0; j < dim; ++j) {
    \n+
    191 m[j][i] = directions[i][j];
    \n+
    192 }
    \n+
    193 }
    \n+
    194
    \n+
    195 m_projection_valid = true;
    \n+
    196 success.reset();
    \n+
    197
    \n+
    198 /* Now project x\u1d62 for each i */
    \n+
    199 for (unsigned i = 0; i < origin.size(); ++i) {
    \n+
    200 for (unsigned j = 0; j < dim; ++j)
    \n+
    201 m[j][dim-1] = origin_normals[i][j];
    \n+
    202
    \n+
    203 const Coordinate rhs = origin[i] - target[0];
    \n+
    204
    \n+
    205 try {
    \n+
    206 /* y = (\u03b1, \u03b2, \u03b4) */
    \n+
    207 auto& y = images[i];
    \n+
    208 m.solve(y, rhs);
    \n+
    209 for (unsigned j = 0; j < dim-1; ++j)
    \n+
    210 y[j] /= scales[j];
    \n+
    211 /* Solving gave us -\u03b4 as the term is "-\u03b4 n\u1d62". */
    \n+
    212 y[dim-1] *= Field(-1);
    \n+
    213
    \n+
    214 /* If the forward projection is too far in the wrong direction
    \n+
    215 * then this might result in artificial inverse projections or
    \n+
    216 * edge intersections. To prevent these wrong cases but not
    \n+
    217 * dismiss feasible intersections, the projection is dismissed
    \n+
    218 * if the forward projection is further than two times the
    \n+
    219 * approximate diameter of the image triangle.
    \n+
    220 */
    \n+
    221 if(y[dim-1] < -2*scaleSum) {
    \n+
    222 success.set(i,false);
    \n+
    223 m_projection_valid = false;
    \n+
    224 return;
    \n+
    225 }
    \n+
    226
    \n+
    227 const bool feasible = projectionFeasible(origin[i], origin_normals[i], y, target, target_normals);
    \n+
    228 success.set(i, feasible);
    \n+
    229 }
    \n+
    230 catch (const Dune::FMatrixError&) {
    \n+
    231 success.set(i, false);
    \n+
    232 m_projection_valid = false;
    \n+
    233 }
    \n+
    234 }
    \n+
    235}
    \n+
    236
    \n+
    237template<typename Coordinate>
    \n+
    238template<typename Corners, typename Normals>
    \n+
    239void
    \n+
    240Projection<Coordinate>
    \n+
    241::doInverseProjection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals)
    \n+
    242{
    \n+
    243 /* Try to obtain \u03a6\u207b\u00b9(y\u1d62) for each corner y\u1d62 of the image triangle.
    \n+
    244 * Instead of solving the problem directly (which would lead to
    \n+
    245 * non-linear equations), we make use of the forward projection \u03a6
    \n+
    246 * which projects the preimage triangle on the plane spanned by the
    \n+
    247 * image triangle. The inverse projection is then given by finding
    \n+
    248 * the barycentric coordinates of y\u1d62 with respect to the triangle
    \n+
    249 * with the corners \u03a6(x\u1d62). This way we only have to solve linear
    \n+
    250 * equations.
    \n+
    251 */
    \n+
    252
    \n+
    253 using namespace ProjectionImplementation;
    \n+
    254 using std::get;
    \n+
    255 typedef Dune::FieldMatrix<Field, dim-1, dim-1> Matrix;
    \n+
    256 typedef Dune::FieldVector<Field, dim-1> Vector;
    \n+
    257
    \n+
    258 /* The inverse projection can only be computed if the forward projection
    \n+
    259 * managed to project all x\u1d62 on the plane spanned by the y\u1d62
    \n+
    260 */
    \n+
    261 if (!m_projection_valid) {
    \n+
    262 get<1>(m_success).reset();
    \n+
    263 return;
    \n+
    264 }
    \n+
    265
    \n+
    266 const auto& images = get<0>(m_images);
    \n+
    267 const auto& target_corners = get<1>(corners);
    \n+
    268 auto& preimages = get<1>(m_images);
    \n+
    269 auto& success = get<1>(m_success);
    \n+
    270
    \n+
    271 std::array<Coordinate, dim> v;
    \n+
    272 for (unsigned i = 0; i < dim-1; ++i) {
    \n+
    273 v[i] = interpolate(images[i+1], target_corners);
    \n+
    274 v[i] -= interpolate(images[0], target_corners);
    \n+
    275 }
    \n+
    276
    \n+
    277 Matrix m;
    \n+
    278 for (unsigned i = 0; i < dim-1; ++i) {
    \n+
    279 for (unsigned j = 0; j < dim-1; ++j) {
    \n+
    280 m[i][j] = v[i]*v[j];
    \n+
    281 }
    \n+
    282 }
    \n+
    283
    \n+
    284 for (unsigned i = 0; i < dim; ++i) {
    \n+
    285 /* Convert y\u1d62 to barycentric coordinates with respect to \u03a6(x\u2c7c) */
    \n+
    286 v[dim-1] = target_corners[i];
    \n+
    287 v[dim-1] -= interpolate(images[0], target_corners);
    \n+
    288
    \n+
    289 Vector rhs, z;
    \n+
    290 for (unsigned j = 0; j < dim-1; ++j)
    \n+
    291 rhs[j] = v[dim-1]*v[j];
    \n+
    292 m.solve(z, rhs);
    \n+
    293
    \n+
    294 for (unsigned j = 0; j < dim-1; ++j)
    \n+
    295 preimages[i][j] = z[j];
    \n+
    296
    \n+
    297 /* Calculate distance along normal direction */
    \n+
    298 const auto x = interpolate(z, get<0>(corners));
    \n+
    299 preimages[i][dim-1] = (x - target_corners[i]) * get<1>(normals)[i];
    \n+
    300
    \n+
    301 /* Check y_i lies inside the \u03a6(x\u2c7c) */
    \n+
    302 const bool feasible = projectionFeasible(target_corners[i], get<1>(normals)[i], preimages[i], get<0>(corners), get<0>(normals));
    \n+
    303 success.set(i, feasible);
    \n+
    304 }
    \n+
    305}
    \n+
    306
    \n+
    307template<typename Coordinate>
    \n+
    308template<typename Corners, typename Normals>
    \n+
    309void
    \n+
    310Projection<Coordinate>
    \n+
    311::doEdgeIntersection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals)
    \n+
    312{
    \n+
    313 using namespace ProjectionImplementation;
    \n+
    314 using std::get;
    \n+
    315
    \n+
    316 m_number_of_edge_intersections = 0;
    \n+
    317
    \n+
    318 /* There are no edge intersections for 2d, only for 3d */
    \n+
    319 if (dim != 3)
    \n+
    320 return;
    \n+
    321
    \n+
    322 /* There are no edge intersections
    \n+
    323 * - when the projection is invalid,
    \n+
    324 * - when the projected triangle lies fully in the target triangle,
    \n+
    325 * - or when the target triangle lies fully in the projected triangle.
    \n+
    326 */
    \n+
    327 if (!m_projection_valid || get<0>(m_success).all() || get<1>(m_success).all()) {
    \n+
    328 return;
    \n+
    329 }
    \n+
    330
    \n+
    331 const auto& images = get<0>(m_images);
    \n+
    332 const auto& ys = get<1>(corners);
    \n+
    333
    \n+
    334 /* Intersect line through \u03a6(x\u1d62), \u03a6(x\u2c7c) with line through y\u2096, y\u2097:
    \n+
    335 We want \u03b1, \u03b2 \u2208 \u211d such that
    \n+
    336 \u03a6(x\u1d62) + \u03b1 (\u03a6(x\u2c7c) - \u03a6(x\u1d62)) = y\u2096 + \u03b2 (y\u2097 - y\u2096)
    \n+
    337 or
    \n+
    338 \u03b1 (\u03a6(x\u2c7c)-\u03a6(x\u1d62)) + \u03b2 (y\u2097-y\u2096) = y\u2096-\u03a6(x\u1d62)
    \n+
    339 To get a 2\u00d72 system of equations, multiply with y\u2098-y\u2080 for
    \n+
    340 m \u2208 {1,\u0323\u03232} which are linear indep. (and so the system is
    \n+
    341 equivalent to the original 3\u00d72 system)
    \n+
    342 */
    \n+
    343 for (unsigned edgex = 0; edgex < dim; ++edgex) {
    \n+
    344 unsigned i, j;
    \n+
    345 std::tie(i, j) = edgeToCorners(edgex);
    \n+
    346
    \n+
    347 /* Both sides of edgex lie in the target triangle means no edge intersection */
    \n+
    348 if (get<0>(m_success)[i] && get<0>(m_success)[j])
    \n+
    349 continue;
    \n+
    350
    \n+
    351 const auto pxi = interpolate(images[i], ys);
    \n+
    352 const auto pxj = interpolate(images[j], ys);
    \n+
    353 const auto pxjpxi = pxj - pxi;
    \n+
    354
    \n+
    355 typedef Dune::FieldMatrix<Field, dim-1, dim-1> Matrix;
    \n+
    356 typedef Dune::FieldVector<Field, dim-1> Vector;
    \n+
    357
    \n+
    358 for (unsigned edgey = 0; edgey < dim; ++edgey) {
    \n+
    359 unsigned k, l;
    \n+
    360 std::tie(k, l) = edgeToCorners(edgey);
    \n+
    361
    \n+
    362 /* Both sides of edgey lie in the projected triangle means no edge intersection */
    \n+
    363 if (get<1>(m_success)[k] && get<1>(m_success)[l])
    \n+
    364 continue;
    \n+
    365
    \n+
    366 const auto ykyl = ys[k] - ys[l];
    \n+
    367 const auto ykpxi = ys[k] - pxi;
    \n+
    368
    \n+
    369 /* If edges are parallel then the intersection is already computed by vertex projections. */
    \n+
    370 bool parallel = true;
    \n+
    371 for (unsigned h=0; h<3; h++)
    \n+
    372 parallel &= std::abs(ykyl[(h+1)%3]*pxjpxi[(h+2)%3] - ykyl[(h+2)%3]*pxjpxi[(h+1)%3])<1e-14;
    \n+
    373 if (parallel)
    \n+
    374 continue;
    \n+
    375
    \n+
    376 Matrix mat;
    \n+
    377 Vector rhs, z;
    \n+
    378
    \n+
    379 for (unsigned m = 0; m < dim-1; ++m) {
    \n+
    380 const auto ym1y0 = ys[m+1] - ys[0];
    \n+
    381 mat[m][0] = pxjpxi * ym1y0;
    \n+
    382 mat[m][1] = ykyl * ym1y0;
    \n+
    383 rhs[m] = ykpxi * ym1y0;
    \n+
    384 }
    \n+
    385
    \n+
    386 try {
    \n+
    387 using std::isfinite;
    \n+
    388
    \n+
    389 mat.solve(z, rhs);
    \n+
    390
    \n+
    391 /* If solving the system gives a NaN, the edges are probably parallel. */
    \n+
    392 if (!isfinite(z[0]) || !isfinite(z[1]))
    \n+
    393 continue;
    \n+
    394
    \n+
    395 /* Filter out corner (pre)images. We only want "real" edge-edge intersections here. */
    \n+
    396 if (z[0] < m_epsilon || z[0] > Field(1) - m_epsilon
    \n+
    397 || z[1] < m_epsilon || z[1] > Field(1) - m_epsilon)
    \n+
    398 continue;
    \n+
    399
    \n+
    400 Coordinate local_x = corner<Coordinate, Field>(i);
    \n+
    401 local_x.axpy(z[0], corner<Coordinate, Field>(j) - corner<Coordinate, Field>(i));
    \n+
    402 Coordinate local_y = corner<Coordinate, Field>(k);
    \n+
    403 local_y.axpy(z[1], corner<Coordinate, Field>(l) - corner<Coordinate, Field>(k));
    \n+
    404
    \n+
    405 /* Make sure the intersection is in the triangle. */
    \n+
    406 if (!inside(local_x, m_epsilon) || !inside(local_y, m_epsilon))
    \n+
    407 continue;
    \n+
    408
    \n+
    409 /* Make sure the intersection respects overlap. */
    \n+
    410 auto xy = interpolate(local_x, get<0>(corners));
    \n+
    411 xy -= interpolate(local_y, get<1>(corners));
    \n+
    412 const auto nx = interpolate_unit_normals(local_x, get<0>(normals));
    \n+
    413 const auto ny = interpolate_unit_normals(local_y, get<1>(normals));
    \n+
    414 local_x[dim-1] = -(xy*nx);
    \n+
    415 local_y[dim-1] = xy*ny;
    \n+
    416
    \n+
    417 if (local_x[dim-1] < -m_overlap-m_epsilon || local_y[dim-1] < -m_overlap-m_epsilon)
    \n+
    418 continue;
    \n+
    419
    \n+
    420 /* Normals should be opposing. */
    \n+
    421 if (nx*ny > m_max_normal_product + m_epsilon)
    \n+
    422 continue;
    \n+
    423
    \n+
    424 /* Intersection is feasible. Store it. */
    \n+
    425 auto& intersection = m_edge_intersections[m_number_of_edge_intersections++];
    \n+
    426 intersection = { {{edgex, edgey}}, {{local_x, local_y}} };
    \n+
    427 }
    \n+
    428 catch(const Dune::FMatrixError&) {
    \n+
    429 /* Edges might be parallel, ignore and continue with next edge */
    \n+
    430 }
    \n+
    431 }
    \n+
    432 }
    \n+
    433}
    \n+
    434
    \n+
    435template<typename Coordinate>
    \n+
    436template<typename Corners, typename Normals>
    \n+
    437bool Projection<Coordinate>
    \n+
    438::projectionFeasible(const Coordinate& x, const Coordinate& nx, const Coordinate& px, const Corners& corners, const Normals& normals) const
    \n+
    439{
    \n+
    440 using namespace ProjectionImplementation;
    \n+
    441
    \n+
    442 /* Image must be within simplex. */
    \n+
    443 if (!inside(px, m_epsilon))
    \n+
    444 return false;
    \n+
    445
    \n+
    446 /* Distance along normal must not be smaller than -overlap. */
    \n+
    447 if (px[dim-1] < -m_overlap-m_epsilon)
    \n+
    448 return false;
    \n+
    449
    \n+
    450 /* Distance along normal at image must not be smaller than -overlap. */
    \n+
    451 auto xmy = x;
    \n+
    452 xmy -= interpolate(px, corners);
    \n+
    453 const auto n = interpolate_unit_normals(px, normals);
    \n+
    454 const auto d = xmy * n;
    \n+
    455 if (d < -m_overlap-m_epsilon)
    \n+
    456 return false;
    \n+
    457
    \n+
    458 /* Normals at x and \u03a6(x) are opposing. */
    \n+
    459 if (nx * n > m_max_normal_product + m_epsilon)
    \n+
    460 return false;
    \n+
    461
    \n+
    462 /* Okay, projection is feasible. */
    \n+
    463 return true;
    \n+
    464}
    \n+
    465
    \n+
    466template<typename Coordinate>
    \n+
    467template<typename Corners, typename Normals>
    \n+
    468void Projection<Coordinate>
    \n+
    \n+
    469::project(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals)
    \n+
    470{
    \n+
    471 doProjection(corners, normals);
    \n+
    472 doInverseProjection(corners, normals);
    \n+
    473 doEdgeIntersection(corners, normals);
    \n+
    474}
    \n+
    \n+
    475
    \n+
    476} /* namespace GridGlue */
    \n+
    477} /* namespace Dune */
    \n
    Definition gridglue.hh:37
    \n-
    void write(const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, std::ostream &out)
    write projection in VTK format
    Definition projectionwriter_impl.hh:86
    \n-
    void print(const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals)
    Print information about the projection to std::cout stream.
    Definition projectionwriter_impl.hh:140
    \n+
    Corners::value_type interpolate(const Coordinate &x, const Corners &corners)
    Definition projection_impl.hh:70
    \n+
    bool inside(const Coordinate &x, const Field &epsilon)
    Definition projection_impl.hh:111
    \n+
    std::pair< unsigned, unsigned > edgeToCorners(unsigned edge)
    Definition projection_impl.hh:43
    \n+
    Coordinate corner(unsigned c)
    Definition projection_impl.hh:24
    \n+
    Normals::value_type interpolate_unit_normals(const Coordinate &x, const Normals &normals)
    Definition projection_impl.hh:91
    \n+
    Projection of a line (triangle) on another line (triangle).
    Definition projection.hh:21
    \n+
    Coordinate::field_type Field
    Scalar type.
    Definition projection.hh:61
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,62 +1,480 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-projectionwriter.hh\n+projection_impl.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH\n-4#define DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH\n-5\n-6#include \n-7#include \n-8\n-9#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n-10\n-11namespace _\bD_\bu_\bn_\be {\n-12namespace GridGlue {\n-13\n-28template\n-29void _\bw_\br_\bi_\bt_\be(const Projection& projection,\n-30 const Corners& corners,\n-31 const Normals& normals,\n-32 std::ostream& out);\n-33\n-40template\n-41void _\bw_\br_\bi_\bt_\be(const Projection& projection,\n-42 const Corners& corners,\n-43 const Normals& normals,\n-44 const std::string& filename);\n-54template\n-55void _\bp_\br_\bi_\bn_\bt(const Projection& projection,\n-56 const Corners& corners,\n-57 const Normals& normals);\n-58\n-59} /* namespace GridGlue */\n-60} /* namespace Dune */\n-61\n-62#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n-63\n-64#endif\n-_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\n-_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n+3#include \n+4\n+5#include \n+6\n+7namespace _\bD_\bu_\bn_\be {\n+8namespace GridGlue {\n+9\n+_\b1_\b0namespace ProjectionImplementation {\n+11\n+22template\n+23inline Coordinate\n+_\b2_\b4_\bc_\bo_\br_\bn_\be_\br(unsigned c)\n+25{\n+26 Coordinate x(Field(0));\n+27 if (c == 0)\n+28 return x;\n+29 x[c-1] = Field(1);\n+30 return x;\n+31}\n+32\n+42inline std::pair\n+_\b4_\b3_\be_\bd_\bg_\be_\bT_\bo_\bC_\bo_\br_\bn_\be_\br_\bs(unsigned edge)\n+44{\n+45 switch(edge) {\n+46 case 0: return {0, 1};\n+47 case 1: return {0, 2};\n+48 case 2: return {1, 2};\n+49 }\n+50 DUNE_THROW(Dune::Exception, \"Unexpected edge number.\");\n+51}\n+52\n+68template\n+69inline typename Corners::value_type\n+_\b7_\b0_\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(const Coordinate& x, const Corners& corners)\n+71{\n+72 auto y = corners[0];\n+73 for (unsigned i = 0; i < corners.size() - 1; ++i)\n+74 y.axpy(x[i], corners[i+1] - corners[0]);\n+75 return y;\n+76}\n+77\n+89template\n+90inline typename Normals::value_type\n+_\b9_\b1_\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be_\b__\bu_\bn_\bi_\bt_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs(const Coordinate& x, const Normals& normals)\n+92{\n+93 auto n = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(x, normals);\n+94 n /= n.two_norm();\n+95 return n;\n+96}\n+97\n+109template\n+110inline bool\n+_\b1_\b1_\b1_\bi_\bn_\bs_\bi_\bd_\be(const Coordinate& x, const Field& epsilon)\n+112{\n+113 const unsigned dim = Coordinate::dimension;\n+114 Field sum(0);\n+115 for (unsigned i = 0; i < dim-1; ++i) {\n+116 if (x[i] < -epsilon)\n+117 return false;\n+118 sum += x[i];\n+119 }\n+120 /* If any x\u00e1\u00b5\u00a2 is NaN, sum will be NaN and this comparison false! */\n+121 if (sum <= Field(1) + epsilon)\n+122 return true;\n+123 return false;\n+124}\n+125\n+126} /* namespace ProjectionImplementation */\n+127\n+128template\n+129Projection\n+_\b1_\b3_\b0::Projection(const _\bF_\bi_\be_\bl_\bd overlap, const _\bF_\bi_\be_\bl_\bd max_normal_product)\n+131 : m_overlap(overlap)\n+132 , m_max_normal_product(max_normal_product)\n+133{\n+134 /* Nothing. */\n+135}\n+136\n+137template\n+138void\n+139_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>\n+_\b1_\b4_\b0_\b:_\b:_\be_\bp_\bs_\bi_\bl_\bo_\bn(const _\bF_\bi_\be_\bl_\bd epsilon)\n+141{\n+142 m_epsilon = epsilon;\n+143}\n+144\n+145template\n+146template\n+147void\n+148_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>\n+149_\b:_\b:_\bd_\bo_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn(const std::tuple& corners, const std::\n+tuple& normals)\n+150{\n+151 /* Try to obtain \u00ce\u00a6(x\u00e1\u00b5\u00a2) for each corner x\u00e1\u00b5\u00a2 of the preimage triangle.\n+152 * This means solving a linear system of equations\n+153 * \u00ce\u00a6(x\u00e1\u00b5\u00a2) = (1-\u00ce\u00b1-\u00ce\u00b2) y\u00e2\u0082\u0080 + \u00ce\u00b1 y\u00e2\u0082\u0081 + \u00ce\u00b2 y\u00e2\u0082\u0082 = x\u00e1\u00b5\u00a2 + \u00ce\u00b4 n\u00e1\u00b5\u00a2\n+154 * or \u00ce\u00b1 (y\u00e2\u0082\u0081 - y\u00e2\u0082\u0080) + \u00ce\u00b2 (y\u00e2\u0082\u0082 - y\u00e2\u0082\u0080) - \u00ce\u00b4 n\u00e1\u00b5\u00a2 = x\u00e1\u00b5\u00a2 - y\u00e2\u0082\u0080\n+155 * to obtain the barycentric coordinates (\u00ce\u00b1, \u00ce\u00b2) of \u00ce\u00a6(x\u00e1\u00b5\u00a2) in the image\n+156 * triangle and the distance \u00ce\u00b4.\n+157 *\n+158 * In the matrix m corresponding to the system, only the third column and\n+the\n+159 * right-hand side depend on i. The first two columns can be assembled\n+before\n+160 * and reused.\n+161 */\n+162 using namespace ProjectionImplementation;\n+163 using std::get;\n+164 typedef Dune::FieldMatrix Matrix;\n+165 Matrix m;\n+166\n+167 const auto& origin = get<0>(corners);\n+168 const auto& origin_normals = get<0>(normals);\n+169 const auto& target = get<1>(corners);\n+170 const auto& target_normals = get<1>(normals);\n+171 auto& images = get<0>(m_images);\n+172 auto& success = get<0>(m_success);\n+173\n+174 /* directions\u00e1\u00b5\u00a2 = (y\u00e1\u00b5\u00a2 - y\u00e2\u0082\u0080) / ||y\u00e1\u00b5\u00a2 - y\u00e2\u0082\u0080||\n+175 * These are the first to columns of the system matrix; the rescaling is\n+done\n+176 * to ensure all columns have a comparable norm (the last has the normal\n+with norm 1.\n+177 */\n+178 std::array directions;\n+179 std::array scales;\n+180 /* estimator for the diameter of the target face */\n+181 Field scaleSum(0);\n+182 for (unsigned i = 0; i < dim-1; ++i) {\n+183 directions[i] = target[i+1] - target[0];\n+184 scales[i] = directions[i].infinity_norm();\n+185 directions[i] /= scales[i];\n+186 scaleSum += scales[i];\n+187 }\n+188\n+189 for (unsigned i = 0; i < dim-1; ++i) {\n+190 for (unsigned j = 0; j < dim; ++j) {\n+191 m[j][i] = directions[i][j];\n+192 }\n+193 }\n+194\n+195 m_projection_valid = true;\n+196 success.reset();\n+197\n+198 /* Now project x\u00e1\u00b5\u00a2 for each i */\n+199 for (unsigned i = 0; i < origin.size(); ++i) {\n+200 for (unsigned j = 0; j < dim; ++j)\n+201 m[j][dim-1] = origin_normals[i][j];\n+202\n+203 const Coordinate rhs = origin[i] - target[0];\n+204\n+205 try {\n+206 /* y = (\u00ce\u00b1, \u00ce\u00b2, \u00ce\u00b4) */\n+207 auto& y = images[i];\n+208 m.solve(y, rhs);\n+209 for (unsigned j = 0; j < dim-1; ++j)\n+210 y[j] /= scales[j];\n+211 /* Solving gave us -\u00ce\u00b4 as the term is \"-\u00ce\u00b4 n\u00e1\u00b5\u00a2\". */\n+212 y[dim-1] *= Field(-1);\n+213\n+214 /* If the forward projection is too far in the wrong direction\n+215 * then this might result in artificial inverse projections or\n+216 * edge intersections. To prevent these wrong cases but not\n+217 * dismiss feasible intersections, the projection is dismissed\n+218 * if the forward projection is further than two times the\n+219 * approximate diameter of the image triangle.\n+220 */\n+221 if(y[dim-1] < -2*scaleSum) {\n+222 success.set(i,false);\n+223 m_projection_valid = false;\n+224 return;\n+225 }\n+226\n+227 const bool feasible = projectionFeasible(origin[i], origin_normals[i], y,\n+target, target_normals);\n+228 success.set(i, feasible);\n+229 }\n+230 catch (const Dune::FMatrixError&) {\n+231 success.set(i, false);\n+232 m_projection_valid = false;\n+233 }\n+234 }\n+235}\n+236\n+237template\n+238template\n+239void\n+240Projection\n+241::doInverseProjection(const std::tuple& corners, const\n+std::tuple& normals)\n+242{\n+243 /* Try to obtain \u00ce\u00a6\u00e2\u0081\u00bb\u00c2\u00b9(y\u00e1\u00b5\u00a2) for each corner y\u00e1\u00b5\u00a2 of the image triangle.\n+244 * Instead of solving the problem directly (which would lead to\n+245 * non-linear equations), we make use of the forward projection \u00ce\u00a6\n+246 * which projects the preimage triangle on the plane spanned by the\n+247 * image triangle. The inverse projection is then given by finding\n+248 * the barycentric coordinates of y\u00e1\u00b5\u00a2 with respect to the triangle\n+249 * with the corners \u00ce\u00a6(x\u00e1\u00b5\u00a2). This way we only have to solve linear\n+250 * equations.\n+251 */\n+252\n+253 using namespace ProjectionImplementation;\n+254 using std::get;\n+255 typedef Dune::FieldMatrix Matrix;\n+256 typedef Dune::FieldVector Vector;\n+257\n+258 /* The inverse projection can only be computed if the forward projection\n+259 * managed to project all x\u00e1\u00b5\u00a2 on the plane spanned by the y\u00e1\u00b5\u00a2\n+260 */\n+261 if (!m_projection_valid) {\n+262 get<1>(m_success).reset();\n+263 return;\n+264 }\n+265\n+266 const auto& images = get<0>(m_images);\n+267 const auto& target_corners = get<1>(corners);\n+268 auto& preimages = get<1>(m_images);\n+269 auto& success = get<1>(m_success);\n+270\n+271 std::array v;\n+272 for (unsigned i = 0; i < dim-1; ++i) {\n+273 v[i] = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(images[i+1], target_corners);\n+274 v[i] -= _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(images[0], target_corners);\n+275 }\n+276\n+277 Matrix m;\n+278 for (unsigned i = 0; i < dim-1; ++i) {\n+279 for (unsigned j = 0; j < dim-1; ++j) {\n+280 m[i][j] = v[i]*v[j];\n+281 }\n+282 }\n+283\n+284 for (unsigned i = 0; i < dim; ++i) {\n+285 /* Convert y\u00e1\u00b5\u00a2 to barycentric coordinates with respect to \u00ce\u00a6(x\u00e2\u00b1\u00bc) */\n+286 v[dim-1] = target_corners[i];\n+287 v[dim-1] -= _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(images[0], target_corners);\n+288\n+289 Vector rhs, z;\n+290 for (unsigned j = 0; j < dim-1; ++j)\n+291 rhs[j] = v[dim-1]*v[j];\n+292 m.solve(z, rhs);\n+293\n+294 for (unsigned j = 0; j < dim-1; ++j)\n+295 preimages[i][j] = z[j];\n+296\n+297 /* Calculate distance along normal direction */\n+298 const auto x = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(z, get<0>(corners));\n+299 preimages[i][dim-1] = (x - target_corners[i]) * get<1>(normals)[i];\n+300\n+301 /* Check y_i lies inside the \u00ce\u00a6(x\u00e2\u00b1\u00bc) */\n+302 const bool feasible = projectionFeasible(target_corners[i], get<1>(normals)\n+[i], preimages[i], get<0>(corners), get<0>(normals));\n+303 success.set(i, feasible);\n+304 }\n+305}\n+306\n+307template\n+308template\n+309void\n+310Projection\n+311::doEdgeIntersection(const std::tuple& corners, const\n+std::tuple& normals)\n+312{\n+313 using namespace ProjectionImplementation;\n+314 using std::get;\n+315\n+316 m_number_of_edge_intersections = 0;\n+317\n+318 /* There are no edge intersections for 2d, only for 3d */\n+319 if (dim != 3)\n+320 return;\n+321\n+322 /* There are no edge intersections\n+323 * - when the projection is invalid,\n+324 * - when the projected triangle lies fully in the target triangle,\n+325 * - or when the target triangle lies fully in the projected triangle.\n+326 */\n+327 if (!m_projection_valid || get<0>(m_success).all() || get<1>(m_success).all\n+()) {\n+328 return;\n+329 }\n+330\n+331 const auto& images = get<0>(m_images);\n+332 const auto& ys = get<1>(corners);\n+333\n+334 /* Intersect line through \u00ce\u00a6(x\u00e1\u00b5\u00a2), \u00ce\u00a6(x\u00e2\u00b1\u00bc) with line through y\u00e2\u0082\u0096, y\u00e2\u0082\u0097:\n+335 We want \u00ce\u00b1, \u00ce\u00b2 \u00e2\u0088\u0088 \u00e2\u0084\u009d such that\n+336 \u00ce\u00a6(x\u00e1\u00b5\u00a2) + \u00ce\u00b1 (\u00ce\u00a6(x\u00e2\u00b1\u00bc) - \u00ce\u00a6(x\u00e1\u00b5\u00a2)) = y\u00e2\u0082\u0096 + \u00ce\u00b2 (y\u00e2\u0082\u0097 - y\u00e2\u0082\u0096)\n+337 or\n+338 \u00ce\u00b1 (\u00ce\u00a6(x\u00e2\u00b1\u00bc)-\u00ce\u00a6(x\u00e1\u00b5\u00a2)) + \u00ce\u00b2 (y\u00e2\u0082\u0097-y\u00e2\u0082\u0096) = y\u00e2\u0082\u0096-\u00ce\u00a6(x\u00e1\u00b5\u00a2)\n+339 To get a 2\u00c3\u00972 system of equations, multiply with y\u00e2\u0082\u0098-y\u00e2\u0082\u0080 for\n+340 m \u00e2\u0088\u0088 {1,\u00cc\u00a3\u00cc\u00a32} which are linear indep. (and so the system is\n+341 equivalent to the original 3\u00c3\u00972 system)\n+342 */\n+343 for (unsigned edgex = 0; edgex < dim; ++edgex) {\n+344 unsigned i, j;\n+345 std::tie(i, j) = _\be_\bd_\bg_\be_\bT_\bo_\bC_\bo_\br_\bn_\be_\br_\bs(edgex);\n+346\n+347 /* Both sides of edgex lie in the target triangle means no edge\n+intersection */\n+348 if (get<0>(m_success)[i] && get<0>(m_success)[j])\n+349 continue;\n+350\n+351 const auto pxi = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(images[i], ys);\n+352 const auto pxj = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(images[j], ys);\n+353 const auto pxjpxi = pxj - pxi;\n+354\n+355 typedef Dune::FieldMatrix Matrix;\n+356 typedef Dune::FieldVector Vector;\n+357\n+358 for (unsigned edgey = 0; edgey < dim; ++edgey) {\n+359 unsigned k, l;\n+360 std::tie(k, l) = _\be_\bd_\bg_\be_\bT_\bo_\bC_\bo_\br_\bn_\be_\br_\bs(edgey);\n+361\n+362 /* Both sides of edgey lie in the projected triangle means no edge\n+intersection */\n+363 if (get<1>(m_success)[k] && get<1>(m_success)[l])\n+364 continue;\n+365\n+366 const auto ykyl = ys[k] - ys[l];\n+367 const auto ykpxi = ys[k] - pxi;\n+368\n+369 /* If edges are parallel then the intersection is already computed by\n+vertex projections. */\n+370 bool parallel = true;\n+371 for (unsigned h=0; h<3; h++)\n+372 parallel &= std::abs(ykyl[(h+1)%3]*pxjpxi[(h+2)%3] - ykyl[(h+2)%3]*pxjpxi[\n+(h+1)%3])<1e-14;\n+373 if (parallel)\n+374 continue;\n+375\n+376 Matrix mat;\n+377 Vector rhs, z;\n+378\n+379 for (unsigned m = 0; m < dim-1; ++m) {\n+380 const auto ym1y0 = ys[m+1] - ys[0];\n+381 mat[m][0] = pxjpxi * ym1y0;\n+382 mat[m][1] = ykyl * ym1y0;\n+383 rhs[m] = ykpxi * ym1y0;\n+384 }\n+385\n+386 try {\n+387 using std::isfinite;\n+388\n+389 mat.solve(z, rhs);\n+390\n+391 /* If solving the system gives a NaN, the edges are probably parallel. */\n+392 if (!isfinite(z[0]) || !isfinite(z[1]))\n+393 continue;\n+394\n+395 /* Filter out corner (pre)images. We only want \"real\" edge-edge\n+intersections here. */\n+396 if (z[0] < m_epsilon || z[0] > Field(1) - m_epsilon\n+397 || z[1] < m_epsilon || z[1] > Field(1) - m_epsilon)\n+398 continue;\n+399\n+400 Coordinate local_x = corner(i);\n+401 local_x.axpy(z[0], corner(j) - corner\n+(i));\n+402 Coordinate local_y = corner(k);\n+403 local_y.axpy(z[1], corner(l) - corner\n+(k));\n+404\n+405 /* Make sure the intersection is in the triangle. */\n+406 if (!_\bi_\bn_\bs_\bi_\bd_\be(local_x, m_epsilon) || !_\bi_\bn_\bs_\bi_\bd_\be(local_y, m_epsilon))\n+407 continue;\n+408\n+409 /* Make sure the intersection respects overlap. */\n+410 auto xy = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(local_x, get<0>(corners));\n+411 xy -= _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(local_y, get<1>(corners));\n+412 const auto nx = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be_\b__\bu_\bn_\bi_\bt_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs(local_x, get<0>(normals));\n+413 const auto ny = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be_\b__\bu_\bn_\bi_\bt_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs(local_y, get<1>(normals));\n+414 local_x[dim-1] = -(xy*nx);\n+415 local_y[dim-1] = xy*ny;\n+416\n+417 if (local_x[dim-1] < -m_overlap-m_epsilon || local_y[dim-1] < -m_overlap-\n+m_epsilon)\n+418 continue;\n+419\n+420 /* Normals should be opposing. */\n+421 if (nx*ny > m_max_normal_product + m_epsilon)\n+422 continue;\n+423\n+424 /* Intersection is feasible. Store it. */\n+425 auto& intersection = m_edge_intersections\n+[m_number_of_edge_intersections++];\n+426 intersection = { {{edgex, edgey}}, {{local_x, local_y}} };\n+427 }\n+428 catch(const Dune::FMatrixError&) {\n+429 /* Edges might be parallel, ignore and continue with next edge */\n+430 }\n+431 }\n+432 }\n+433}\n+434\n+435template\n+436template\n+437bool Projection\n+438::projectionFeasible(const Coordinate& x, const Coordinate& nx, const\n+Coordinate& px, const Corners& corners, const Normals& normals) const\n+439{\n+440 using namespace ProjectionImplementation;\n+441\n+442 /* Image must be within simplex. */\n+443 if (!_\bi_\bn_\bs_\bi_\bd_\be(px, m_epsilon))\n+444 return false;\n+445\n+446 /* Distance along normal must not be smaller than -overlap. */\n+447 if (px[dim-1] < -m_overlap-m_epsilon)\n+448 return false;\n+449\n+450 /* Distance along normal at image must not be smaller than -overlap. */\n+451 auto xmy = x;\n+452 xmy -= _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(px, corners);\n+453 const auto n = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be_\b__\bu_\bn_\bi_\bt_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs(px, normals);\n+454 const auto d = xmy * n;\n+455 if (d < -m_overlap-m_epsilon)\n+456 return false;\n+457\n+458 /* Normals at x and \u00ce\u00a6(x) are opposing. */\n+459 if (nx * n > m_max_normal_product + m_epsilon)\n+460 return false;\n+461\n+462 /* Okay, projection is feasible. */\n+463 return true;\n+464}\n+465\n+466template\n+467template\n+468void Projection\n+_\b4_\b6_\b9::project(const std::tuple& corners, const std::\n+tuple& normals)\n+470{\n+471 doProjection(corners, normals);\n+472 doInverseProjection(corners, normals);\n+473 doEdgeIntersection(corners, normals);\n+474}\n+475\n+476} /* namespace GridGlue */\n+477} /* namespace Dune */\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be\n-void write(const Projection< Coordinate > &projection, const Corners &corners,\n-const Normals &normals, std::ostream &out)\n-write projection in VTK format\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:86\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt\n-void print(const Projection< Coordinate > &projection, const Corners &corners,\n-const Normals &normals)\n-Print information about the projection to std::cout stream.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:140\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be\n+Corners::value_type interpolate(const Coordinate &x, const Corners &corners)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:70\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bs_\bi_\bd_\be\n+bool inside(const Coordinate &x, const Field &epsilon)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:111\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bd_\bg_\be_\bT_\bo_\bC_\bo_\br_\bn_\be_\br_\bs\n+std::pair< unsigned, unsigned > edgeToCorners(unsigned edge)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:43\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\br_\bn_\be_\br\n+Coordinate corner(unsigned c)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:24\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be_\b__\bu_\bn_\bi_\bt_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs\n+Normals::value_type interpolate_unit_normals(const Coordinate &x, const Normals\n+&normals)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:91\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn\n+Projection of a line (triangle) on another line (triangle).\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:21\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bF_\bi_\be_\bl_\bd\n+Coordinate::field_type Field\n+Scalar type.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:61\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00032.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00032.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: crossproduct.hh File Reference\n+dune-grid-glue: ringcomm.hh File Reference\n \n \n \n \n \n \n \n@@ -71,35 +71,77 @@\n \n \n \n
    \n \n-
    crossproduct.hh File Reference
    \n+
    ringcomm.hh File Reference
    \n
    \n
    \n-\n+
    #include <mpi.h>
    \n+#include <functional>
    \n+#include <utility>
    \n+#include <dune/common/fvector.hh>
    \n+#include <dune/common/hybridutilities.hh>
    \n+#include <dune/geometry/type.hh>
    \n+
    \n

    Go to the source code of this file.

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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
    namespace  Dune::Parallel
     
    \n+\n+\n+\n+

    \n+Macros

    #define CheckMPIStatus(A, B)   {}
     
    \n \n-\n-\n-\n-\n+\n+\n+\n+\n

    \n Functions

    template<class T , int dim>
    static Dune::FieldVector< T, dim > Dune::GridGlue::crossProduct (const Dune::FieldVector< T, dim > &a, const Dune::FieldVector< T, dim > &b)
     compute cross product
     
    template<typename OP , typename... Args>
    void Dune::Parallel::MPI_AllApply (MPI_Comm mpicomm, OP &&op, const Args &... data)
     apply an operator locally to a difstributed data set
     
    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ CheckMPIStatus

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+
    #define CheckMPIStatus( A,
     
    )   {}
    \n+
    \n+
    Todo:
    Implement MPI Status check with exception handling
    \n+\n+
    \n+
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,24 +1,39 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-crossproduct.hh File Reference\n+_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n+ringcomm.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n-namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n+namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bP_\ba_\br_\ba_\bl_\bl_\be_\bl\n+\u00a0\n+M\bMa\bac\bcr\bro\bos\bs\n+#define\u00a0 _\bC_\bh_\be_\bc_\bk_\bM_\bP_\bI_\bS_\bt_\ba_\bt_\bu_\bs(A, B)\u00a0\u00a0\u00a0{}\n \u00a0\n F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-template\n-static Dune::FieldVector< T, dim >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt (const Dune::\n- FieldVector< T, dim > &a, const Dune::\n- FieldVector< T, dim > &b)\n-\u00a0 compute cross product\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bP_\ba_\br_\ba_\bl_\bl_\be_\bl_\b:_\b:_\bM_\bP_\bI_\b__\bA_\bl_\bl_\bA_\bp_\bp_\bl_\by (MPI_Comm mpicomm, OP &&op, const Args &...\n+ data)\n+\u00a0 apply an operator locally to a difstributed data set\n \u00a0\n+*\b**\b**\b**\b**\b* M\bMa\bac\bcr\bro\bo D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn D\bDo\boc\bcu\bum\bme\ben\bnt\bta\bat\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n+*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0C\bCh\bhe\bec\bck\bkM\bMP\bPI\bIS\bSt\bta\bat\btu\bus\bs *\b**\b**\b**\b**\b*\n+#define CheckMPIStatus ( \u00a0 A,\n+ \u00a0 B\u00a0\n+ ) \u00a0\u00a0\u00a0{}\n+ _\bT\bT_\bo\bo_\bd\bd_\bo\bo_\b:\b:\n+ Implement MPI Status check with exception handling\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00032_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00032_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: crossproduct.hh Source File\n+dune-grid-glue: ringcomm.hh Source File\n \n \n \n \n \n \n \n@@ -74,48 +74,309 @@\n \n \n \n
    \n-
    crossproduct.hh
    \n+
    ringcomm.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n-
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#ifndef DUNE_GRIDGLUE_COMMON_CROSSPRODUCT_HH
    \n-
    4#define DUNE_GRIDGLUE_COMMON_CROSSPRODUCT_HH 1
    \n-
    5
    \n-
    6namespace Dune {
    \n-
    7namespace GridGlue {
    \n-
    8
    \n-
    14template <class T, int dim>
    \n-
    \n-
    15static Dune::FieldVector<T,dim> crossProduct(const Dune::FieldVector<T,dim>& a,
    \n-
    16 const Dune::FieldVector<T,dim>& b)
    \n-
    17{
    \n-
    18 if (dim!=3)
    \n-
    19 DUNE_THROW(Dune::NotImplemented, "crossProduct does not work for dimension " << dim);
    \n-
    20
    \n-
    21 Dune::FieldVector<T,dim> c;
    \n-
    22 c[0] = a[1]*b[2] - a[2]*b[1];
    \n-
    23 c[1] = a[2]*b[0] - a[0]*b[2];
    \n-
    24 c[2] = a[0]*b[1] - a[1]*b[0];
    \n-
    25
    \n-
    26 return c;
    \n-
    27}
    \n-
    \n-
    28
    \n-
    29} /* namespace GridGlue */
    \n-
    30} /* namespace Dune */
    \n-
    31
    \n-
    32#endif
    \n+Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+
    2// vi: set et ts=4 sw=2 sts=2:
    \n+
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n+
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+
    5/* IMPLEMENTATION OF CLASS G R I D G L U E */
    \n+
    6
    \n+
    8#define CheckMPIStatus(A,B) {}
    \n+
    9
    \n+
    10#include <mpi.h>
    \n+
    11#include <functional>
    \n+
    12#include <utility>
    \n+
    13
    \n+
    14#include <dune/common/fvector.hh>
    \n+
    15#include <dune/common/hybridutilities.hh>
    \n+
    16
    \n+
    17#include <dune/geometry/type.hh>
    \n+
    18
    \n+
    19namespace Dune {
    \n+
    \n+
    20namespace Parallel {
    \n+
    21
    \n+
    22 namespace Impl {
    \n+
    23
    \n+
    25 template<typename T>
    \n+
    26 struct MPITypeInfo {};
    \n+
    27
    \n+
    28 template<>
    \n+
    29 struct MPITypeInfo< int >
    \n+
    30 {
    \n+
    31 static const unsigned int size = 1;
    \n+
    32 static inline MPI_Datatype getType()
    \n+
    33 {
    \n+
    34 return MPI_INT;
    \n+
    35 }
    \n+
    36 };
    \n+
    37
    \n+
    38 template<typename K, int N>
    \n+
    39 struct MPITypeInfo< Dune::FieldVector<K,N> >
    \n+
    40 {
    \n+
    41 static const unsigned int size = N;
    \n+
    42 static inline MPI_Datatype getType()
    \n+
    43 {
    \n+
    44 return Dune::MPITraits<K>::getType();
    \n+
    45 }
    \n+
    46 };
    \n+
    47
    \n+
    48 template<>
    \n+
    49 struct MPITypeInfo< unsigned int >
    \n+
    50 {
    \n+
    51 static const unsigned int size = 1;
    \n+
    52 static inline MPI_Datatype getType()
    \n+
    53 {
    \n+
    54 return MPI_UNSIGNED;
    \n+
    55 }
    \n+
    56 };
    \n+
    57
    \n+
    58 template<>
    \n+
    59 struct MPITypeInfo< Dune::GeometryType >
    \n+
    60 {
    \n+
    61 static const unsigned int size = 1;
    \n+
    62 static inline MPI_Datatype getType()
    \n+
    63 {
    \n+
    64 return Dune::MPITraits< Dune::GeometryType >::getType();
    \n+
    65 }
    \n+
    66 };
    \n+
    67
    \n+
    68 template<typename T>
    \n+
    69 void MPI_SetVectorSize(
    \n+
    70 std::vector<T> & data,
    \n+
    71 MPI_Status & status)
    \n+
    72 {
    \n+
    73 typedef MPITypeInfo<T> Info;
    \n+
    74 int sz;
    \n+
    75 MPI_Get_count(&status, Info::getType(), &sz);
    \n+
    76 assert(sz%Info::size == 0);
    \n+
    77 data.resize(sz/Info::size);
    \n+
    78 }
    \n+
    79
    \n+
    89 template<typename T>
    \n+
    90 void MPI_SendVectorInRing(
    \n+
    91 std::vector<T> & data,
    \n+
    92 std::vector<T> & next,
    \n+
    93 int tag,
    \n+
    94 int rightrank,
    \n+
    95 int leftrank,
    \n+
    96 MPI_Comm comm,
    \n+
    97 MPI_Request& r_send,
    \n+
    98 MPI_Request& r_recv
    \n+
    99 )
    \n+
    100 {
    \n+
    101 // mpi status stuff
    \n+
    102 [[maybe_unused]] int result = 0;
    \n+
    103 typedef MPITypeInfo<T> Info;
    \n+
    104 // resize next buffer to maximum size
    \n+
    105 next.resize(next.capacity());
    \n+
    106 // send data (explicitly send data.size elements)
    \n+
    107 result =
    \n+
    108 MPI_Isend(
    \n+
    109 &(data[0]), Info::size*data.size(), Info::getType(), rightrank, tag,
    \n+
    110 comm, &r_send);
    \n+
    111 // receive up to maximum size. The acutal size is stored in the status
    \n+
    112 result =
    \n+
    113 MPI_Irecv(
    \n+
    114 &(next[0]), Info::size*next.size(), Info::getType(), leftrank, tag,
    \n+
    115 comm, &r_recv);
    \n+
    116 // // check result
    \n+
    117 // MPI_Status status;
    \n+
    118 // CheckMPIStatus(result, status);
    \n+
    119 }
    \n+
    120
    \n+
    121 template<typename T>
    \n+
    122 using ptr_t = T*;
    \n+
    123
    \n+
    124 /* these helper structs are needed as long as we still support
    \n+
    125 C++11, as we can't use variadic lambdas */
    \n+
    126 template<typename... Args>
    \n+
    127 struct call_MPI_SendVectorInRing
    \n+
    128 {
    \n+
    129 std::tuple<Args...> & remotedata;
    \n+
    130 std::tuple<Args...> & nextdata;
    \n+
    131 int & tag;
    \n+
    132 int & rightrank;
    \n+
    133 int & leftrank;
    \n+
    134 MPI_Comm & mpicomm;
    \n+
    135 std::array<MPI_Request,sizeof...(Args)> & requests_send;
    \n+
    136 std::array<MPI_Request,sizeof...(Args)> & requests_recv;
    \n+
    137
    \n+
    138 template<typename I>
    \n+
    139 void operator()(I i)
    \n+
    140 {
    \n+
    141 MPI_SendVectorInRing(
    \n+
    142 std::get<i>(remotedata),
    \n+
    143 std::get<i>(nextdata),
    \n+
    144 tag+i,
    \n+
    145 rightrank, leftrank, mpicomm,
    \n+
    146 requests_send[i],
    \n+
    147 requests_recv[i]);
    \n+
    148 }
    \n+
    149 };
    \n+
    150 template<typename... Args>
    \n+
    151 struct call_MPI_SetVectorSize
    \n+
    152 {
    \n+
    153 std::tuple<Args...> & nextdata;
    \n+
    154 std::array<MPI_Status,sizeof...(Args)> & status_recv;
    \n+
    155
    \n+
    156 template<typename I>
    \n+
    157 void operator()(I i)
    \n+
    158 {
    \n+
    159 MPI_SetVectorSize(std::get<i>(nextdata),status_recv[i]);
    \n+
    160 }
    \n+
    161 };
    \n+
    162
    \n+
    163 template<typename OP, std::size_t... Indices, typename... Args>
    \n+
    164 void MPI_AllApply_impl(MPI_Comm mpicomm,
    \n+
    165 OP && op,
    \n+
    166 std::index_sequence<Indices...> indices,
    \n+
    167 const Args&... data)
    \n+
    168 {
    \n+
    169 constexpr std::size_t N = sizeof...(Args);
    \n+
    170 int myrank = 0;
    \n+
    171 int commsize = 0;
    \n+
    172#if HAVE_MPI
    \n+
    173 MPI_Comm_rank(mpicomm, &myrank);
    \n+
    174 MPI_Comm_size(mpicomm, &commsize);
    \n+
    175#endif // HAVE_MPI
    \n+
    176
    \n+
    177 if (commsize > 1)
    \n+
    178 {
    \n+
    179#ifdef DEBUG_GRIDGLUE_PARALLELMERGE
    \n+
    180 std::cout << myrank << " Start Communication, size " << commsize << std::endl;
    \n+
    181#endif
    \n+
    182
    \n+
    183 // get data sizes
    \n+
    184 std::array<unsigned int, N> size({ ((unsigned int)data.size())... });
    \n+
    185
    \n+
    186 // communicate max data size
    \n+
    187 std::array<unsigned int, N> maxSize;
    \n+
    188 MPI_Allreduce(&size, &maxSize,
    \n+
    189 size.size(), MPI_UNSIGNED, MPI_MAX, mpicomm);
    \n+
    190#ifdef DEBUG_GRIDGLUE_PARALLELMERGE
    \n+
    191 std::cout << myrank << " maxSize " << "done... " << std::endl;
    \n+
    192#endif
    \n+
    193
    \n+
    194 // allocate receiving buffers with maxsize to ensure sufficient buffer size for communication
    \n+
    195 std::tuple<Args...> remotedata { Args(maxSize[Indices])... };
    \n+
    196
    \n+
    197 // copy local data to receiving buffer
    \n+
    198 remotedata = std::tie(data...);
    \n+
    199
    \n+
    200 // allocate second set of receiving buffers necessary for async communication
    \n+
    201 std::tuple<Args...> nextdata { Args(maxSize[Indices])... };
    \n+
    202
    \n+
    203 // communicate data in the ring
    \n+
    204 int rightrank = (myrank + 1 + commsize) % commsize;
    \n+
    205 int leftrank = (myrank - 1 + commsize) % commsize;
    \n+
    206
    \n+
    207 std::cout << myrank << ": size = " << commsize << std::endl;
    \n+
    208 std::cout << myrank << ": left = " << leftrank
    \n+
    209 << " right = " << rightrank << std::endl;
    \n+
    210
    \n+
    211 // currently the remote data is our own data
    \n+
    212 int remoterank = myrank;
    \n+
    213
    \n+
    214 for (int i=1; i<commsize; i++)
    \n+
    215 {
    \n+
    216 // in this iteration we will receive data from nextrank
    \n+
    217 int nextrank = (myrank - i + commsize) % commsize;
    \n+
    218
    \n+
    219 std::cout << myrank << ": next = " << nextrank << std::endl;
    \n+
    220
    \n+
    221 // send remote data to right neighbor and receive from left neighbor
    \n+
    222 std::array<MPI_Request,N> requests_send;
    \n+
    223 std::array<MPI_Request,N> requests_recv;
    \n+
    224
    \n+
    225 int tag = 0;
    \n+
    226 Dune::Hybrid::forEach(indices,
    \n+
    227 // [&](auto i){
    \n+
    228 // MPI_SendVectorInRing(
    \n+
    229 // std::get<i>(remotedata),
    \n+
    230 // std::get<i>(nextdata),
    \n+
    231 // tag+i,
    \n+
    232 // rightrank, leftrank, mpicomm,
    \n+
    233 // requests_send[i],
    \n+
    234 // requests_recv[i]);
    \n+
    235 // });
    \n+
    236 call_MPI_SendVectorInRing<Args...>({
    \n+
    237 remotedata,
    \n+
    238 nextdata,
    \n+
    239 tag,
    \n+
    240 rightrank, leftrank, mpicomm,
    \n+
    241 requests_send,
    \n+
    242 requests_recv
    \n+
    243 }));
    \n+
    244
    \n+
    245 // apply operator
    \n+
    246 op(remoterank,std::get<Indices>(remotedata)...);
    \n+
    247
    \n+
    248 // wait for communication to finalize
    \n+
    249 std::array<MPI_Status,N> status_send;
    \n+
    250 std::array<MPI_Status,N> status_recv;
    \n+
    251 MPI_Waitall(N,&requests_recv[0],&status_recv[0]);
    \n+
    252
    \n+
    253 // we finished receiving from nextrank and thus remoterank = nextrank
    \n+
    254 remoterank = nextrank;
    \n+
    255
    \n+
    256 // get current data sizes
    \n+
    257 // and resize vectors
    \n+
    258 Dune::Hybrid::forEach(indices,
    \n+
    259 // [&](auto i){
    \n+
    260 // MPI_SetVectorSize(std::get<i>(nextdata),status_recv[i]);
    \n+
    261 // });
    \n+
    262 call_MPI_SetVectorSize<Args...>({
    \n+
    263 nextdata, status_recv
    \n+
    264 }));
    \n+
    265
    \n+
    266 MPI_Waitall(N,&requests_send[0],&status_send[0]);
    \n+
    267
    \n+
    268 // swap the communication buffers
    \n+
    269 std::swap(remotedata,nextdata);
    \n+
    270 }
    \n+
    271
    \n+
    272 // last apply (or the only one in the case of sequential application)
    \n+
    273 op(remoterank,std::get<Indices>(remotedata)...);
    \n+
    274 }
    \n+
    275 else // sequential
    \n+
    276 {
    \n+
    277 op(myrank,data...);
    \n+
    278 }
    \n+
    279 }
    \n+
    280
    \n+
    281 } // end namespace Impl
    \n+
    282
    \n+
    296template<typename OP, typename... Args>
    \n+
    \n+
    297void MPI_AllApply(MPI_Comm mpicomm,
    \n+
    298 OP && op,
    \n+
    299 const Args& ... data)
    \n+
    300{
    \n+
    301 Impl::MPI_AllApply_impl(
    \n+
    302 mpicomm,
    \n+
    303 std::forward<OP>(op),
    \n+
    304 std::make_index_sequence<sizeof...(Args)>(),
    \n+
    305 data...
    \n+
    306 );
    \n+
    307}
    \n+
    \n+
    308
    \n+
    309} // end namespace Parallel
    \n+
    \n+
    310} // end namespace Dune
    \n
    Definition gridglue.hh:37
    \n-
    static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim > &a, const Dune::FieldVector< T, dim > &b)
    compute cross product
    Definition crossproduct.hh:15
    \n+
    void MPI_AllApply(MPI_Comm mpicomm, OP &&op, const Args &... data)
    apply an operator locally to a difstributed data set
    Definition ringcomm.hh:297
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,49 +1,308 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-crossproduct.hh\n+ringcomm.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n+1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n+2// vi: set et ts=4 sw=2 sts=2:\n+3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n-2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n+4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-3#ifndef DUNE_GRIDGLUE_COMMON_CROSSPRODUCT_HH\n-4#define DUNE_GRIDGLUE_COMMON_CROSSPRODUCT_HH 1\n-5\n-6namespace _\bD_\bu_\bn_\be {\n-7namespace GridGlue {\n-8\n-14template \n-_\b1_\b5static Dune::FieldVector _\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt(const Dune::FieldVector&\n-a,\n-16 const Dune::FieldVector& b)\n-17{\n-18 if (dim!=3)\n-19 DUNE_THROW(Dune::NotImplemented, \"crossProduct does not work for dimension \"\n-<< dim);\n-20\n-21 Dune::FieldVector c;\n-22 c[0] = a[1]*b[2] - a[2]*b[1];\n-23 c[1] = a[2]*b[0] - a[0]*b[2];\n-24 c[2] = a[0]*b[1] - a[1]*b[0];\n-25\n-26 return c;\n-27}\n-28\n-29} /* namespace GridGlue */\n-30} /* namespace Dune */\n-31\n-32#endif\n+5/* IMPLEMENTATION OF CLASS G R I D G L U E */\n+6\n+_\b8#define CheckMPIStatus(A,B) {}\n+9\n+10#include \n+11#include \n+12#include \n+13\n+14#include \n+15#include \n+16\n+17#include \n+18\n+19namespace _\bD_\bu_\bn_\be {\n+_\b2_\b0namespace Parallel {\n+21\n+22 namespace Impl {\n+23\n+25 template\n+26 struct MPITypeInfo {};\n+27\n+28 template<>\n+29 struct MPITypeInfo< int >\n+30 {\n+31 static const unsigned int size = 1;\n+32 static inline MPI_Datatype getType()\n+33 {\n+34 return MPI_INT;\n+35 }\n+36 };\n+37\n+38 template\n+39 struct MPITypeInfo< _\bD_\bu_\bn_\be::FieldVector >\n+40 {\n+41 static const unsigned int size = N;\n+42 static inline MPI_Datatype getType()\n+43 {\n+44 return Dune::MPITraits::getType();\n+45 }\n+46 };\n+47\n+48 template<>\n+49 struct MPITypeInfo< unsigned int >\n+50 {\n+51 static const unsigned int size = 1;\n+52 static inline MPI_Datatype getType()\n+53 {\n+54 return MPI_UNSIGNED;\n+55 }\n+56 };\n+57\n+58 template<>\n+59 struct MPITypeInfo< _\bD_\bu_\bn_\be::GeometryType >\n+60 {\n+61 static const unsigned int size = 1;\n+62 static inline MPI_Datatype getType()\n+63 {\n+64 return Dune::MPITraits< Dune::GeometryType >::getType();\n+65 }\n+66 };\n+67\n+68 template\n+69 void MPI_SetVectorSize(\n+70 std::vector & data,\n+71 MPI_Status & status)\n+72 {\n+73 typedef MPITypeInfo Info;\n+74 int sz;\n+75 MPI_Get_count(&status, Info::getType(), &sz);\n+76 assert(sz%Info::size == 0);\n+77 data.resize(sz/Info::size);\n+78 }\n+79\n+89 template\n+90 void MPI_SendVectorInRing(\n+91 std::vector & data,\n+92 std::vector & next,\n+93 int tag,\n+94 int rightrank,\n+95 int leftrank,\n+96 MPI_Comm comm,\n+97 MPI_Request& r_send,\n+98 MPI_Request& r_recv\n+99 )\n+100 {\n+101 // mpi status stuff\n+102 [[maybe_unused]] int result = 0;\n+103 typedef MPITypeInfo Info;\n+104 // resize next buffer to maximum size\n+105 next.resize(next.capacity());\n+106 // send data (explicitly send data.size elements)\n+107 result =\n+108 MPI_Isend(\n+109 &(data[0]), Info::size*data.size(), Info::getType(), rightrank, tag,\n+110 comm, &r_send);\n+111 // receive up to maximum size. The acutal size is stored in the status\n+112 result =\n+113 MPI_Irecv(\n+114 &(next[0]), Info::size*next.size(), Info::getType(), leftrank, tag,\n+115 comm, &r_recv);\n+116 // // check result\n+117 // MPI_Status status;\n+118 // CheckMPIStatus(result, status);\n+119 }\n+120\n+121 template\n+122 using ptr_t = T*;\n+123\n+124 /* these helper structs are needed as long as we still support\n+125 C++11, as we can't use variadic lambdas */\n+126 template\n+127 struct call_MPI_SendVectorInRing\n+128 {\n+129 std::tuple & remotedata;\n+130 std::tuple & nextdata;\n+131 int & tag;\n+132 int & rightrank;\n+133 int & leftrank;\n+134 MPI_Comm & mpicomm;\n+135 std::array & requests_send;\n+136 std::array & requests_recv;\n+137\n+138 template\n+139 void operator()(I i)\n+140 {\n+141 MPI_SendVectorInRing(\n+142 std::get(remotedata),\n+143 std::get(nextdata),\n+144 tag+i,\n+145 rightrank, leftrank, mpicomm,\n+146 requests_send[i],\n+147 requests_recv[i]);\n+148 }\n+149 };\n+150 template\n+151 struct call_MPI_SetVectorSize\n+152 {\n+153 std::tuple & nextdata;\n+154 std::array & status_recv;\n+155\n+156 template\n+157 void operator()(I i)\n+158 {\n+159 MPI_SetVectorSize(std::get(nextdata),status_recv[i]);\n+160 }\n+161 };\n+162\n+163 template\n+164 void MPI_AllApply_impl(MPI_Comm mpicomm,\n+165 OP && op,\n+166 std::index_sequence indices,\n+167 const Args&... data)\n+168 {\n+169 constexpr std::size_t N = sizeof...(Args);\n+170 int myrank = 0;\n+171 int commsize = 0;\n+172#if HAVE_MPI\n+173 MPI_Comm_rank(mpicomm, &myrank);\n+174 MPI_Comm_size(mpicomm, &commsize);\n+175#endif // HAVE_MPI\n+176\n+177 if (commsize > 1)\n+178 {\n+179#ifdef DEBUG_GRIDGLUE_PARALLELMERGE\n+180 std::cout << myrank << \" Start Communication, size \" << commsize << std::\n+endl;\n+181#endif\n+182\n+183 // get data sizes\n+184 std::array size({ ((unsigned int)data.size())... });\n+185\n+186 // communicate max data size\n+187 std::array maxSize;\n+188 MPI_Allreduce(&size, &maxSize,\n+189 size.size(), MPI_UNSIGNED, MPI_MAX, mpicomm);\n+190#ifdef DEBUG_GRIDGLUE_PARALLELMERGE\n+191 std::cout << myrank << \" maxSize \" << \"done... \" << std::endl;\n+192#endif\n+193\n+194 // allocate receiving buffers with maxsize to ensure sufficient buffer size\n+for communication\n+195 std::tuple remotedata { Args(maxSize[Indices])... };\n+196\n+197 // copy local data to receiving buffer\n+198 remotedata = std::tie(data...);\n+199\n+200 // allocate second set of receiving buffers necessary for async\n+communication\n+201 std::tuple nextdata { Args(maxSize[Indices])... };\n+202\n+203 // communicate data in the ring\n+204 int rightrank = (myrank + 1 + commsize) % commsize;\n+205 int leftrank = (myrank - 1 + commsize) % commsize;\n+206\n+207 std::cout << myrank << \": size = \" << commsize << std::endl;\n+208 std::cout << myrank << \": left = \" << leftrank\n+209 << \" right = \" << rightrank << std::endl;\n+210\n+211 // currently the remote data is our own data\n+212 int remoterank = myrank;\n+213\n+214 for (int i=1; i requests_send;\n+223 std::array requests_recv;\n+224\n+225 int tag = 0;\n+226 Dune::Hybrid::forEach(indices,\n+227 // [&](auto i){\n+228 // MPI_SendVectorInRing(\n+229 // std::get(remotedata),\n+230 // std::get(nextdata),\n+231 // tag+i,\n+232 // rightrank, leftrank, mpicomm,\n+233 // requests_send[i],\n+234 // requests_recv[i]);\n+235 // });\n+236 call_MPI_SendVectorInRing({\n+237 remotedata,\n+238 nextdata,\n+239 tag,\n+240 rightrank, leftrank, mpicomm,\n+241 requests_send,\n+242 requests_recv\n+243 }));\n+244\n+245 // apply operator\n+246 op(remoterank,std::get(remotedata)...);\n+247\n+248 // wait for communication to finalize\n+249 std::array status_send;\n+250 std::array status_recv;\n+251 MPI_Waitall(N,&requests_recv[0],&status_recv[0]);\n+252\n+253 // we finished receiving from nextrank and thus remoterank = nextrank\n+254 remoterank = nextrank;\n+255\n+256 // get current data sizes\n+257 // and resize vectors\n+258 Dune::Hybrid::forEach(indices,\n+259 // [&](auto i){\n+260 // MPI_SetVectorSize(std::get(nextdata),status_recv[i]);\n+261 // });\n+262 call_MPI_SetVectorSize({\n+263 nextdata, status_recv\n+264 }));\n+265\n+266 MPI_Waitall(N,&requests_send[0],&status_send[0]);\n+267\n+268 // swap the communication buffers\n+269 std::swap(remotedata,nextdata);\n+270 }\n+271\n+272 // last apply (or the only one in the case of sequential application)\n+273 op(remoterank,std::get(remotedata)...);\n+274 }\n+275 else // sequential\n+276 {\n+277 op(myrank,data...);\n+278 }\n+279 }\n+280\n+281 } // end namespace Impl\n+282\n+296template\n+_\b2_\b9_\b7void _\bM_\bP_\bI_\b__\bA_\bl_\bl_\bA_\bp_\bp_\bl_\by(MPI_Comm mpicomm,\n+298 OP && op,\n+299 const Args& ... data)\n+300{\n+301 Impl::MPI_AllApply_impl(\n+302 mpicomm,\n+303 std::forward(op),\n+304 std::make_index_sequence(),\n+305 data...\n+306 );\n+307}\n+308\n+309} // end namespace Parallel\n+310} // end namespace Dune\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt\n-static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim\n-> &a, const Dune::FieldVector< T, dim > &b)\n-compute cross product\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn crossproduct.hh:15\n+_\bD_\bu_\bn_\be_\b:_\b:_\bP_\ba_\br_\ba_\bl_\bl_\be_\bl_\b:_\b:_\bM_\bP_\bI_\b__\bA_\bl_\bl_\bA_\bp_\bp_\bl_\by\n+void MPI_AllApply(MPI_Comm mpicomm, OP &&op, const Args &... data)\n+apply an operator locally to a difstributed data set\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn ringcomm.hh:297\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00035.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00035.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: projectionwriter_impl.hh File Reference\n+dune-grid-glue: areawriter.hh File Reference\n \n \n \n \n \n \n \n@@ -72,59 +72,41 @@\n
  • dune
  • grid-glue
  • common
  • \n
    \n \n
    \n \n-
    projectionwriter_impl.hh File Reference
    \n+
    areawriter.hh File Reference
    \n
    \n
    \n-
    #include <fstream>
    \n+
    #include <ostream>
    \n+#include <string>
    \n+#include "areawriter_impl.hh"
    \n
    \n

    Go to the source code of this file.

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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    namespace  Dune::GridGlue::ProjectionWriterImplementation
     
    \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\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<unsigned side, typename Coordinate , typename Corners >
    void Dune::GridGlue::ProjectionWriterImplementation::write_points (const Projection< Coordinate > &projection, const Corners &corners, std::ostream &out)
     
    template<unsigned side, typename Coordinate , typename Normals >
    void Dune::GridGlue::ProjectionWriterImplementation::write_normals (const Projection< Coordinate > &projection, const Normals &normals, std::ostream &out)
     
    template<typename Coordinate , typename Corners >
    void Dune::GridGlue::ProjectionWriterImplementation::write_edge_intersection_points (const Projection< Coordinate > &projection, const Corners &corners, std::ostream &out)
     
    template<typename Coordinate , typename Normals >
    void Dune::GridGlue::ProjectionWriterImplementation::write_edge_intersection_normals (const Projection< Coordinate > &projection, const Normals &normals, std::ostream &out)
     
    template<unsigned side, typename Coordinate >
    void Dune::GridGlue::ProjectionWriterImplementation::write_success (const Projection< Coordinate > &projection, std::ostream &out)
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::write (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, std::ostream &out)
     write projection in VTK format
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::write (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, const std::string &filename)
     write projection in VTK format
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::print (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals)
     Print information about the projection to std::cout stream.
     
    template<int side, typename Glue >
    void Dune::GridGlue::write_glue_area_vtk (const Glue &glue, std::ostream &out)
     
    template<int side, typename Glue >
    void Dune::GridGlue::write_glue_area_vtk (const Glue &glue, const std::string &filename)
     
    template<typename Glue >
    void Dune::GridGlue::write_glue_areas_vtk (const Glue &glue, const std::string &base)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,59 +2,31 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-projectionwriter_impl.hh File Reference\n-#include \n+areawriter.hh File Reference\n+#include \n+#include \n+#include \"_\ba_\br_\be_\ba_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n-namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn\n-\u00a0\n F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bp_\bo_\bi_\bn_\bt_\bs (const\n- _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const Corners &corners, std::\n- ostream &out)\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs (const\n- _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const Normals &normals, std::\n- ostream &out)\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n- _\bw_\br_\bi_\bt_\be_\b__\be_\bd_\bg_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b__\bp_\bo_\bi_\bn_\bt_\bs (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate >\n- &projection, const Corners &corners, std::ostream &out)\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n- _\bw_\br_\bi_\bt_\be_\b__\be_\bd_\bg_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate >\n- &projection, const Normals &normals, std::ostream &out)\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bs_\bu_\bc_\bc_\be_\bs_\bs (const\n- _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, std::ostream &out)\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n- Corners &corners, const Normals &normals, std::ostream &out)\n-\u00a0 write projection in VTK format\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n- Corners &corners, const Normals &normals, const std::string &filename)\n-\u00a0 write projection in VTK format\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk (const Glue &glue, std::ostream &out)\n \u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n- Corners &corners, const Normals &normals)\n-\u00a0 Print information about the projection to std::cout stream.\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk (const Glue &glue, const std::string\n+ &filename)\n+\u00a0\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\bs_\b__\bv_\bt_\bk (const Glue &glue, const std::string\n+ &base)\n \u00a0\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00035_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00035_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: projectionwriter_impl.hh Source File\n+dune-grid-glue: areawriter.hh Source File\n \n \n \n \n \n \n \n@@ -74,211 +74,47 @@\n \n \n
    \n
    \n-
    projectionwriter_impl.hh
    \n+
    areawriter.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#include <fstream>
    \n-
    4
    \n-
    5namespace Dune {
    \n-
    6namespace GridGlue {
    \n-
    7
    \n-
    \n-
    8namespace ProjectionWriterImplementation {
    \n-
    9
    \n-
    10template<unsigned side, typename Coordinate, typename Corners>
    \n-
    \n-
    11void write_points(const Projection<Coordinate>& projection, const Corners& corners, std::ostream& out)
    \n-
    12{
    \n-
    13 using namespace ProjectionImplementation;
    \n-
    14 using std::get;
    \n-
    15 const unsigned other_side = 1 - side;
    \n-
    16
    \n-
    17 for (const auto& c : get<side>(corners))
    \n-
    18 out << c << "\\n";
    \n-
    19
    \n-
    20 for (const auto& i : get<side>(projection.images())) {
    \n-
    21 const auto global = interpolate(i, get<other_side>(corners));
    \n-
    22 out << global << "\\n";
    \n-
    23 }
    \n-
    24}
    \n-
    \n-
    25
    \n-
    26template<unsigned side, typename Coordinate, typename Normals>
    \n-
    \n-
    27void write_normals(const Projection<Coordinate>& projection, const Normals& normals, std::ostream& out)
    \n-
    28{
    \n-
    29 using namespace ProjectionImplementation;
    \n-
    30 using std::get;
    \n-
    31 const unsigned other_side = 1 - side;
    \n-
    32
    \n-
    33 for (const auto& n : get<side>(normals))
    \n-
    34 out << n << "\\n";
    \n-
    35
    \n-
    36 for (const auto& x : get<side>(projection.images())) {
    \n-
    37 const auto n = interpolate_unit_normals(x, get<other_side>(normals));
    \n-
    38 out << n << "\\n";
    \n-
    39 }
    \n-
    40}
    \n-
    \n-
    41
    \n-
    42template<typename Coordinate, typename Corners>
    \n-
    \n-
    43void write_edge_intersection_points(const Projection<Coordinate>& projection, const Corners& corners, std::ostream& out)
    \n-
    44{
    \n-
    45 using namespace ProjectionImplementation;
    \n-
    46 using std::get;
    \n-
    47
    \n-
    48 for (std::size_t i = 0; i < projection.numberOfEdgeIntersections(); ++i) {
    \n-
    49 const auto& local = projection.edgeIntersections()[i].local;
    \n-
    50 out << interpolate(local[0], get<0>(corners)) << "\\n"
    \n-
    51 << interpolate(local[1], get<1>(corners)) << "\\n";
    \n-
    52 }
    \n-
    53}
    \n-
    \n-
    54
    \n-
    55template<typename Coordinate, typename Normals>
    \n-
    \n-
    56void write_edge_intersection_normals(const Projection<Coordinate>& projection, const Normals& normals, std::ostream& out)
    \n-
    57{
    \n-
    58 using namespace ProjectionImplementation;
    \n-
    59 using std::get;
    \n-
    60
    \n-
    61 for (std::size_t i = 0; i < projection.numberOfEdgeIntersections(); ++i) {
    \n-
    62 const auto& local = projection.edgeIntersections()[i].local;
    \n-
    63 const auto n0 = interpolate_unit_normals(local[0], get<0>(normals));
    \n-
    64 const auto n1 = interpolate_unit_normals(local[1], get<1>(normals));
    \n-
    65
    \n-
    66 out << n0 << "\\n"
    \n-
    67 << n1 << "\\n";
    \n-
    68 }
    \n-
    69}
    \n-
    \n-
    70
    \n-
    71template<unsigned side, typename Coordinate>
    \n-
    \n-
    72void write_success(const Projection<Coordinate>& projection, std::ostream& out)
    \n-
    73{
    \n-
    74 using std::get;
    \n-
    75
    \n-
    76 out << side << "\\n";
    \n-
    77
    \n-
    78 const auto& success = get<side>(projection.success());
    \n-
    79 for (std::size_t i = 0; i < success.size(); ++i)
    \n-
    80 out << (success[i] ? "1\\n" : "0\\n");
    \n-
    81}
    \n-
    \n-
    82
    \n-
    83} /* namespace ProjectionWriterImplementation */
    \n-
    \n-
    84
    \n-
    85template<typename Coordinate, typename Corners, typename Normals>
    \n-
    \n-
    86void write(const Projection<Coordinate>& projection,
    \n-
    87 const Corners& corners,
    \n-
    88 const Normals& normals,
    \n-
    89 std::ostream& out)
    \n-
    90{
    \n-
    91 using namespace ProjectionWriterImplementation;
    \n-
    92
    \n-
    93 const auto numberOfEdgeIntersections = projection.numberOfEdgeIntersections();
    \n-
    94 const auto nPoints = 12 + 2 * numberOfEdgeIntersections;
    \n-
    95
    \n-
    96 out << "# vtk DataFile Version2.0\\n"
    \n-
    97 << "Filename: projection\\n"
    \n-
    98 << "ASCII\\n"
    \n-
    99 << "DATASET UNSTRUCTURED_GRID\\n"
    \n-
    100 << "POINTS " << nPoints << " double\\n";
    \n-
    101 write_points<0>(projection, corners, out);
    \n-
    102 write_points<1>(projection, corners, out);
    \n-
    103 write_edge_intersection_points(projection, corners, out);
    \n-
    104 out << "CELLS " << (8 + numberOfEdgeIntersections) << " " << (26 + 3 * numberOfEdgeIntersections) << "\\n";
    \n-
    105 out << "3 0 1 2\\n" "2 0 3\\n" "2 1 4\\n" "2 2 5\\n"
    \n-
    106 << "3 6 7 8\\n" "2 6 9\\n" "2 7 10\\n" "2 8 11\\n";
    \n-
    107 for (std::size_t i = 0; i < numberOfEdgeIntersections; ++i)
    \n-
    108 out << "2 " << (12 + 2*i) << " " << (12 + 2*i + 1) << "\\n";
    \n-
    109 out << "CELL_TYPES " << (8 + numberOfEdgeIntersections) << "\\n" "5\\n3\\n3\\n3\\n" "5\\n3\\n3\\n3\\n";
    \n-
    110 for (std::size_t i = 0; i < numberOfEdgeIntersections; ++i)
    \n-
    111 out << "3\\n";
    \n-
    112 out << "CELL_DATA " << (8 + numberOfEdgeIntersections) << "\\n";
    \n-
    113 out << "SCALARS success int 1\\n"
    \n-
    114 << "LOOKUP_TABLE success\\n";
    \n-
    115 write_success<0>(projection, out);
    \n-
    116 write_success<1>(projection, out);
    \n-
    117 for (std::size_t i = 0; i < numberOfEdgeIntersections; ++i)
    \n-
    118 out << "2\\n";
    \n-
    119 out << "LOOKUP_TABLE success 2\\n"
    \n-
    120 << "1.0 0.0 0.0 1.0\\n"
    \n-
    121 << "0.0 1.0 0.0 1.0\\n";
    \n-
    122 out << "POINT_DATA " << nPoints << "\\n"
    \n-
    123 << "NORMALS normals double\\n";
    \n-
    124 write_normals<0>(projection, normals, out);
    \n-
    125 write_normals<1>(projection, normals, out);
    \n-
    126 write_edge_intersection_normals(projection, normals, out);
    \n-
    127}
    \n-
    \n-
    128
    \n-
    129template<typename Coordinate, typename Corners, typename Normals>
    \n-
    \n-
    130void write(const Projection<Coordinate>& projection,
    \n-
    131 const Corners& corners,
    \n-
    132 const Normals& normals,
    \n-
    133 const std::string& filename)
    \n-
    134{
    \n-
    135 std::ofstream out(filename.c_str());
    \n-
    136 write(projection, corners, normals, out);
    \n-
    137}
    \n-
    \n-
    138
    \n-
    139template<typename Coordinate, typename Corners, typename Normals>
    \n-
    \n-
    140void print(const Projection<Coordinate>& projection,
    \n-
    141 const Corners& corners,
    \n-
    142 const Normals& normals)
    \n-
    143{
    \n-
    144 using namespace ProjectionWriterImplementation;
    \n-
    145
    \n-
    146 std::cout << "Side 0 corners and images:\\n";
    \n-
    147 write_points<0>(projection, corners, std::cout);
    \n-
    148 std::cout << "Side 0 success:\\n";
    \n-
    149 write_success<0>(projection, std::cout);
    \n-
    150 std::cout << "Side 1 corners and images:\\n";
    \n-
    151 write_points<1>(projection, corners, std::cout);
    \n-
    152 std::cout << "Side 1 success:\\n";
    \n-
    153 write_success<1>(projection, std::cout);
    \n-
    154 std::cout << "Side 0 normals and projected normals:\\n";
    \n-
    155 write_normals<0>(projection, normals, std::cout);
    \n-
    156 std::cout << "Side 1 normals and projected normals:\\n";
    \n-
    157 write_normals<1>(projection, normals, std::cout);
    \n-
    158 std::cout << projection.numberOfEdgeIntersections() << " edge intersections:\\n";
    \n-
    159 write_edge_intersection_points(projection, corners, std::cout);
    \n-
    160}
    \n-
    \n-
    161
    \n-
    162} /* namespace GridGlue */
    \n-
    163} /* namespace Dune */
    \n+
    3#ifndef DUNE_GRIDGLUE_COMMON_AREAWRITER_HH
    \n+
    4#define DUNE_GRIDGLUE_COMMON_AREAWRITER_HH
    \n+
    5
    \n+
    6#include <ostream>
    \n+
    7#include <string>
    \n+
    8
    \n+
    9namespace Dune {
    \n+
    10namespace GridGlue {
    \n+
    11
    \n+
    12template<int side, typename Glue>
    \n+
    13void write_glue_area_vtk(const Glue& glue, std::ostream& out);
    \n+
    14
    \n+
    15template<int side, typename Glue>
    \n+
    16void write_glue_area_vtk(const Glue& glue, const std::string& filename);
    \n+
    17
    \n+
    37template<typename Glue>
    \n+
    38void write_glue_areas_vtk(const Glue& glue, const std::string& base);
    \n+
    39
    \n+
    40} /* namespace GridGlue */
    \n+
    41} /* namespace Dune */
    \n+
    42
    \n+
    43#include "areawriter_impl.hh"
    \n+
    44
    \n+
    45#endif
    \n+\n
    Definition gridglue.hh:37
    \n-
    void write(const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, std::ostream &out)
    write projection in VTK format
    Definition projectionwriter_impl.hh:86
    \n-
    void print(const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals)
    Print information about the projection to std::cout stream.
    Definition projectionwriter_impl.hh:140
    \n-
    void write_normals(const Projection< Coordinate > &projection, const Normals &normals, std::ostream &out)
    Definition projectionwriter_impl.hh:27
    \n-
    void write_points(const Projection< Coordinate > &projection, const Corners &corners, std::ostream &out)
    Definition projectionwriter_impl.hh:11
    \n-
    void write_success(const Projection< Coordinate > &projection, std::ostream &out)
    Definition projectionwriter_impl.hh:72
    \n-
    void write_edge_intersection_points(const Projection< Coordinate > &projection, const Corners &corners, std::ostream &out)
    Definition projectionwriter_impl.hh:43
    \n-
    void write_edge_intersection_normals(const Projection< Coordinate > &projection, const Normals &normals, std::ostream &out)
    Definition projectionwriter_impl.hh:56
    \n-
    Projection of a line (triangle) on another line (triangle).
    Definition projection.hh:21
    \n-
    const std::tuple< std::bitset< dim >, std::bitset< dim > > & success() const
    Indicate whether projection (inverse projection) is valid for each corner or not.
    Definition projection.hh:252
    \n-
    unsigned numberOfEdgeIntersections() const
    Number of edge intersections.
    Definition projection.hh:262
    \n-
    const std::tuple< Images, Preimages > & images() const
    Images and preimages of corners.
    Definition projection.hh:235
    \n-
    const std::array< EdgeIntersection, maxEdgeIntersections > & edgeIntersections() const
    Edge-edge intersections.
    Definition projection.hh:273
    \n+
    void write_glue_area_vtk(const Glue &glue, std::ostream &out)
    Definition areawriter_impl.hh:84
    \n+
    void write_glue_areas_vtk(const Glue &glue, const std::string &base)
    Definition areawriter_impl.hh:129
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,238 +1,48 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-projectionwriter_impl.hh\n+areawriter.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-3#include \n-4\n-5namespace _\bD_\bu_\bn_\be {\n-6namespace GridGlue {\n-7\n-_\b8namespace ProjectionWriterImplementation {\n-9\n-10template\n-_\b1_\b1void _\bw_\br_\bi_\bt_\be_\b__\bp_\bo_\bi_\bn_\bt_\bs(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection, const Corners&\n-corners, std::ostream& out)\n-12{\n-13 using namespace ProjectionImplementation;\n-14 using std::get;\n-15 const unsigned other_side = 1 - side;\n-16\n-17 for (const auto& c : get(corners))\n-18 out << c << \"\\n\";\n-19\n-20 for (const auto& i : get(projection._\bi_\bm_\ba_\bg_\be_\bs())) {\n-21 const auto global = interpolate(i, get(corners));\n-22 out << global << \"\\n\";\n-23 }\n-24}\n-25\n-26template\n-_\b2_\b7void _\bw_\br_\bi_\bt_\be_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection, const Normals&\n-normals, std::ostream& out)\n-28{\n-29 using namespace ProjectionImplementation;\n-30 using std::get;\n-31 const unsigned other_side = 1 - side;\n-32\n-33 for (const auto& n : get(normals))\n-34 out << n << \"\\n\";\n-35\n-36 for (const auto& x : get(projection._\bi_\bm_\ba_\bg_\be_\bs())) {\n-37 const auto n = interpolate_unit_normals(x, get(normals));\n-38 out << n << \"\\n\";\n-39 }\n-40}\n-41\n-42template\n-_\b4_\b3void _\bw_\br_\bi_\bt_\be_\b__\be_\bd_\bg_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b__\bp_\bo_\bi_\bn_\bt_\bs(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection,\n-const Corners& corners, std::ostream& out)\n-44{\n-45 using namespace ProjectionImplementation;\n-46 using std::get;\n-47\n-48 for (std::size_t i = 0; i < projection._\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(); ++i) {\n-49 const auto& local = projection._\be_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].local;\n-50 out << interpolate(local[0], get<0>(corners)) << \"\\n\"\n-51 << interpolate(local[1], get<1>(corners)) << \"\\n\";\n-52 }\n-53}\n-54\n-55template\n-_\b5_\b6void _\bw_\br_\bi_\bt_\be_\b__\be_\bd_\bg_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>&\n-projection, const Normals& normals, std::ostream& out)\n-57{\n-58 using namespace ProjectionImplementation;\n-59 using std::get;\n-60\n-61 for (std::size_t i = 0; i < projection._\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(); ++i) {\n-62 const auto& local = projection._\be_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].local;\n-63 const auto n0 = interpolate_unit_normals(local[0], get<0>(normals));\n-64 const auto n1 = interpolate_unit_normals(local[1], get<1>(normals));\n-65\n-66 out << n0 << \"\\n\"\n-67 << n1 << \"\\n\";\n-68 }\n-69}\n-70\n-71template\n-_\b7_\b2void _\bw_\br_\bi_\bt_\be_\b__\bs_\bu_\bc_\bc_\be_\bs_\bs(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection, std::ostream&\n-out)\n-73{\n-74 using std::get;\n-75\n-76 out << side << \"\\n\";\n-77\n-78 const auto& success = get(projection._\bs_\bu_\bc_\bc_\be_\bs_\bs());\n-79 for (std::size_t i = 0; i < success.size(); ++i)\n-80 out << (success[i] ? \"1\\n\" : \"0\\n\");\n-81}\n-82\n-83} /* namespace ProjectionWriterImplementation */\n-84\n-85template\n-_\b8_\b6void _\bw_\br_\bi_\bt_\be(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection,\n-87 const Corners& corners,\n-88 const Normals& normals,\n-89 std::ostream& out)\n-90{\n-91 using namespace ProjectionWriterImplementation;\n-92\n-93 const auto numberOfEdgeIntersections = projection._\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-();\n-94 const auto nPoints = 12 + 2 * numberOfEdgeIntersections;\n-95\n-96 out << \"# vtk DataFile Version2.0\\n\"\n-97 << \"Filename: projection\\n\"\n-98 << \"ASCII\\n\"\n-99 << \"DATASET UNSTRUCTURED_GRID\\n\"\n-100 << \"POINTS \" << nPoints << \" double\\n\";\n-101 write_points<0>(projection, corners, out);\n-102 write_points<1>(projection, corners, out);\n-103 write_edge_intersection_points(projection, corners, out);\n-104 out << \"CELLS \" << (8 + numberOfEdgeIntersections) << \" \" << (26 + 3 *\n-numberOfEdgeIntersections) << \"\\n\";\n-105 out << \"3 0 1 2\\n\" \"2 0 3\\n\" \"2 1 4\\n\" \"2 2 5\\n\"\n-106 << \"3 6 7 8\\n\" \"2 6 9\\n\" \"2 7 10\\n\" \"2 8 11\\n\";\n-107 for (std::size_t i = 0; i < numberOfEdgeIntersections; ++i)\n-108 out << \"2 \" << (12 + 2*i) << \" \" << (12 + 2*i + 1) << \"\\n\";\n-109 out << \"CELL_TYPES \" << (8 + numberOfEdgeIntersections) << \"\\n\"\n-\"5\\n3\\n3\\n3\\n\" \"5\\n3\\n3\\n3\\n\";\n-110 for (std::size_t i = 0; i < numberOfEdgeIntersections; ++i)\n-111 out << \"3\\n\";\n-112 out << \"CELL_DATA \" << (8 + numberOfEdgeIntersections) << \"\\n\";\n-113 out << \"SCALARS success int 1\\n\"\n-114 << \"LOOKUP_TABLE success\\n\";\n-115 write_success<0>(projection, out);\n-116 write_success<1>(projection, out);\n-117 for (std::size_t i = 0; i < numberOfEdgeIntersections; ++i)\n-118 out << \"2\\n\";\n-119 out << \"LOOKUP_TABLE success 2\\n\"\n-120 << \"1.0 0.0 0.0 1.0\\n\"\n-121 << \"0.0 1.0 0.0 1.0\\n\";\n-122 out << \"POINT_DATA \" << nPoints << \"\\n\"\n-123 << \"NORMALS normals double\\n\";\n-124 write_normals<0>(projection, normals, out);\n-125 write_normals<1>(projection, normals, out);\n-126 write_edge_intersection_normals(projection, normals, out);\n-127}\n-128\n-129template\n-_\b1_\b3_\b0void _\bw_\br_\bi_\bt_\be(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection,\n-131 const Corners& corners,\n-132 const Normals& normals,\n-133 const std::string& filename)\n-134{\n-135 std::ofstream out(filename.c_str());\n-136 _\bw_\br_\bi_\bt_\be(projection, corners, normals, out);\n-137}\n-138\n-139template\n-_\b1_\b4_\b0void _\bp_\br_\bi_\bn_\bt(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection,\n-141 const Corners& corners,\n-142 const Normals& normals)\n-143{\n-144 using namespace ProjectionWriterImplementation;\n-145\n-146 std::cout << \"Side 0 corners and images:\\n\";\n-147 write_points<0>(projection, corners, std::cout);\n-148 std::cout << \"Side 0 success:\\n\";\n-149 write_success<0>(projection, std::cout);\n-150 std::cout << \"Side 1 corners and images:\\n\";\n-151 write_points<1>(projection, corners, std::cout);\n-152 std::cout << \"Side 1 success:\\n\";\n-153 write_success<1>(projection, std::cout);\n-154 std::cout << \"Side 0 normals and projected normals:\\n\";\n-155 write_normals<0>(projection, normals, std::cout);\n-156 std::cout << \"Side 1 normals and projected normals:\\n\";\n-157 write_normals<1>(projection, normals, std::cout);\n-158 std::cout << projection._\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs() << \" edge\n-intersections:\\n\";\n-159 write_edge_intersection_points(projection, corners, std::cout);\n-160}\n-161\n-162} /* namespace GridGlue */\n-163} /* namespace Dune */\n+3#ifndef DUNE_GRIDGLUE_COMMON_AREAWRITER_HH\n+4#define DUNE_GRIDGLUE_COMMON_AREAWRITER_HH\n+5\n+6#include \n+7#include \n+8\n+9namespace _\bD_\bu_\bn_\be {\n+10namespace GridGlue {\n+11\n+12template\n+13void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk(const Glue& glue, std::ostream& out);\n+14\n+15template\n+16void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk(const Glue& glue, const std::string& filename);\n+17\n+37template\n+38void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\bs_\b__\bv_\bt_\bk(const Glue& glue, const std::string& base);\n+39\n+40} /* namespace GridGlue */\n+41} /* namespace Dune */\n+42\n+43#include \"_\ba_\br_\be_\ba_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n+44\n+45#endif\n+_\ba_\br_\be_\ba_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be\n-void write(const Projection< Coordinate > &projection, const Corners &corners,\n-const Normals &normals, std::ostream &out)\n-write projection in VTK format\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:86\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt\n-void print(const Projection< Coordinate > &projection, const Corners &corners,\n-const Normals &normals)\n-Print information about the projection to std::cout stream.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:140\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs\n-void write_normals(const Projection< Coordinate > &projection, const Normals\n-&normals, std::ostream &out)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:27\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bp_\bo_\bi_\bn_\bt_\bs\n-void write_points(const Projection< Coordinate > &projection, const Corners\n-&corners, std::ostream &out)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:11\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bs_\bu_\bc_\bc_\be_\bs_\bs\n-void write_success(const Projection< Coordinate > &projection, std::ostream\n-&out)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:72\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\be_\bd_\bg_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b__\bp_\bo_\bi_\bn_\bt_\bs\n-void write_edge_intersection_points(const Projection< Coordinate > &projection,\n-const Corners &corners, std::ostream &out)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:43\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\be_\bd_\bg_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs\n-void write_edge_intersection_normals(const Projection< Coordinate >\n-&projection, const Normals &normals, std::ostream &out)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:56\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn\n-Projection of a line (triangle) on another line (triangle).\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:21\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bs_\bu_\bc_\bc_\be_\bs_\bs\n-const std::tuple< std::bitset< dim >, std::bitset< dim > > & success() const\n-Indicate whether projection (inverse projection) is valid for each corner or\n-not.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:252\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-unsigned numberOfEdgeIntersections() const\n-Number of edge intersections.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:262\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bm_\ba_\bg_\be_\bs\n-const std::tuple< Images, Preimages > & images() const\n-Images and preimages of corners.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:235\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-const std::array< EdgeIntersection, maxEdgeIntersections > & edgeIntersections\n-() const\n-Edge-edge intersections.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:273\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk\n+void write_glue_area_vtk(const Glue &glue, std::ostream &out)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn areawriter_impl.hh:84\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\bs_\b__\bv_\bt_\bk\n+void write_glue_areas_vtk(const Glue &glue, const std::string &base)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn areawriter_impl.hh:129\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: areawriter.hh File Reference\n+dune-grid-glue: areawriter_impl.hh File Reference\n \n \n \n \n \n \n \n@@ -70,34 +70,47 @@\n \n \n
    \n \n-
    areawriter.hh File Reference
    \n+
    areawriter_impl.hh File Reference
    \n
    \n
    \n-
    #include <ostream>
    \n-#include <string>
    \n-#include "areawriter_impl.hh"
    \n+
    #include <fstream>
    \n+#include <vector>
    \n+#include <dune/common/fvector.hh>
    \n+#include <dune/geometry/type.hh>
    \n+#include <dune/grid/common/mcmgmapper.hh>
    \n
    \n

    Go to the source code of this file.

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

    \n+Classes

    struct  Dune::GridGlue::AreaWriterImplementation::FacetLayout< dimgrid >
     
    \n \n \n \n \n \n+\n+\n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    namespace  Dune::GridGlue::AreaWriterImplementation
     
    \n \n+\n+\n+\n \n \n \n \n \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,26 +1,37 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-areawriter.hh File Reference\n-#include \n-#include \n-#include \"_\ba_\br_\be_\ba_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n+areawriter_impl.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n+C\bCl\bla\bas\bss\bse\bes\bs\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bF_\ba_\bc_\be_\bt_\bL_\ba_\by_\bo_\bu_\bt_\b<_\b _\bd_\bi_\bm_\bg_\br_\bi_\bd_\b _\b>\n+\u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn\n+\u00a0\n F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bf_\ba_\bc_\be_\bt_\b__\bg_\be_\bo_\bm_\be_\bt_\br_\by (const\n+ GridView &gv, std::ostream &out)\n+\u00a0\n template\n void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk (const Glue &glue, std::ostream &out)\n \u00a0\n template\n void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk (const Glue &glue, const std::string\n &filename)\n \u00a0\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: areawriter.hh Source File\n+dune-grid-glue: areawriter_impl.hh Source File\n \n \n \n \n \n \n \n@@ -74,47 +74,183 @@\n \n \n \n
    \n-
    areawriter.hh
    \n+
    areawriter_impl.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#ifndef DUNE_GRIDGLUE_COMMON_AREAWRITER_HH
    \n-
    4#define DUNE_GRIDGLUE_COMMON_AREAWRITER_HH
    \n+
    3#include <fstream>
    \n+
    4#include <vector>
    \n
    5
    \n-
    6#include <ostream>
    \n-
    7#include <string>
    \n-
    8
    \n-
    9namespace Dune {
    \n-
    10namespace GridGlue {
    \n-
    11
    \n-
    12template<int side, typename Glue>
    \n-
    13void write_glue_area_vtk(const Glue& glue, std::ostream& out);
    \n+
    6#include <dune/common/fvector.hh>
    \n+
    7#include <dune/geometry/type.hh>
    \n+
    8#include <dune/grid/common/mcmgmapper.hh>
    \n+
    9
    \n+
    10namespace Dune {
    \n+
    11namespace GridGlue {
    \n+
    12
    \n+
    \n+
    13namespace AreaWriterImplementation {
    \n
    14
    \n-
    15template<int side, typename Glue>
    \n-
    16void write_glue_area_vtk(const Glue& glue, const std::string& filename);
    \n-
    17
    \n-
    37template<typename Glue>
    \n-
    38void write_glue_areas_vtk(const Glue& glue, const std::string& base);
    \n-
    39
    \n-
    40} /* namespace GridGlue */
    \n-
    41} /* namespace Dune */
    \n-
    42
    \n-
    43#include "areawriter_impl.hh"
    \n-
    44
    \n-
    45#endif
    \n-\n+
    15template<int dimgrid>
    \n+
    \n+\n+
    17{
    \n+
    \n+
    18 bool contains(Dune::GeometryType gt) const
    \n+
    19 {
    \n+
    20 return gt.dim() == dimgrid - 1;
    \n+
    21 }
    \n+
    \n+
    22};
    \n+
    \n+
    23
    \n+
    24template<typename GridView>
    \n+
    \n+
    25void write_facet_geometry(const GridView& gv, std::ostream& out)
    \n+
    26{
    \n+
    27 using Coordinate = Dune::FieldVector<double, 3>;
    \n+
    28
    \n+
    29 std::vector<Coordinate> corners;
    \n+
    30 for (const auto& facet : facets(gv)) {
    \n+
    31 const auto geometry = facet.geometry();
    \n+
    32 for (int i = 0; i < geometry.corners(); ++i) {
    \n+
    33 /* VTK always needs 3-dim coordinates... */
    \n+
    34 const auto c0 = geometry.corner(i);
    \n+
    35 Coordinate c1;
    \n+
    36 for (int d = 0; d < GridView::dimensionworld; ++d)
    \n+
    37 c1[d] = c0[d];
    \n+
    38 for (int d = GridView::dimensionworld; d < Coordinate::dimension; ++d)
    \n+
    39 c1[d] = double(0);
    \n+
    40 corners.push_back(c1);
    \n+
    41 }
    \n+
    42 }
    \n+
    43
    \n+
    44 {
    \n+
    45 out << "DATASET UNSTRUCTURED_GRID\\n"
    \n+
    46 << "POINTS " << corners.size() << " double\\n";
    \n+
    47 for (const auto& c : corners)
    \n+
    48 out << c << "\\n";
    \n+
    49 }
    \n+
    50 {
    \n+
    51 out << "CELLS " << gv.size(1) << " " << (gv.size(1) + corners.size()) << "\\n";
    \n+
    52 std::size_t c = 0;
    \n+
    53 for (const auto& facet : facets(gv)) {
    \n+
    54 const auto geometry = facet.geometry();
    \n+
    55 out << geometry.corners();
    \n+
    56 for (int i = 0; i < geometry.corners(); ++i, ++c)
    \n+
    57 out << " " << c;
    \n+
    58 out << "\\n";
    \n+
    59 }
    \n+
    60 }
    \n+
    61 {
    \n+
    62 out << "CELL_TYPES " << gv.size(1) << "\\n";
    \n+
    63 for (const auto& facet : facets(gv)) {
    \n+
    64 const auto type = facet.type();
    \n+
    65 if (type.isVertex())
    \n+
    66 out << "1\\n";
    \n+
    67 else if (type.isLine())
    \n+
    68 out << "2\\n";
    \n+
    69 else if (type.isTriangle())
    \n+
    70 out << "5\\n";
    \n+
    71 else if (type.isQuadrilateral())
    \n+
    72 out << "9\\n";
    \n+
    73 else if (type.isTetrahedron())
    \n+
    74 out << "10\\n";
    \n+
    75 else
    \n+
    76 DUNE_THROW(Dune::Exception, "Unhandled geometry type");
    \n+
    77 }
    \n+
    78 }
    \n+
    79}
    \n+
    \n+
    80
    \n+
    81} /* namespace AreaWriterImplementation */
    \n+
    \n+
    82
    \n+
    83template<int side, typename Glue>
    \n+
    \n+
    84void write_glue_area_vtk(const Glue& glue, std::ostream& out)
    \n+
    85{
    \n+
    86 using GridView = typename std::decay< decltype(glue.template gridView<side>()) >::type;
    \n+
    87 using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, AreaWriterImplementation::FacetLayout>;
    \n+
    88 using ctype = typename GridView::ctype;
    \n+
    89
    \n+
    90 const GridView gv = glue.template gridView<side>();
    \n+
    91 Mapper mapper(gv);
    \n+
    92 std::vector<ctype> coveredArea(mapper.size(), ctype(0));
    \n+
    93 std::vector<ctype> totalArea(mapper.size(), ctype(1));
    \n+
    94
    \n+
    95 for (const auto& in : intersections(glue, Reverse<side == 1>())) {
    \n+
    96 const auto element = in.inside();
    \n+
    97 const auto index = mapper.subIndex(element, in.indexInInside(), 1);
    \n+
    98 coveredArea[index] += in.geometryInInside().volume();
    \n+
    99
    \n+
    100 const auto& refElement = Dune::ReferenceElements<ctype, GridView::dimension>::general(element.type());
    \n+
    101 const auto& subGeometry = refElement.template geometry<1>(in.indexInInside());
    \n+
    102 totalArea[index] = subGeometry.volume();
    \n+
    103 }
    \n+
    104
    \n+
    105 for (std::size_t i = 0; i < coveredArea.size(); ++i)
    \n+
    106 coveredArea[i] /= totalArea[i];
    \n+
    107
    \n+
    108 out << "# vtk DataFile Version 2.0\\n"
    \n+
    109 << "Filename: Glue Area\\n"
    \n+
    110 << "ASCII\\n";
    \n+
    111
    \n+\n+
    113
    \n+
    114 out << "CELL_DATA " << coveredArea.size() << "\\n"
    \n+
    115 << "SCALARS CoveredArea double 1\\n"
    \n+
    116 << "LOOKUP_TABLE default\\n";
    \n+
    117 for (const auto& value : coveredArea)
    \n+
    118 out << value << "\\n";
    \n+
    119}
    \n+
    \n+
    120
    \n+
    121template<int side, typename Glue>
    \n+
    \n+
    122void write_glue_area_vtk(const Glue& glue, const std::string& filename)
    \n+
    123{
    \n+
    124 std::ofstream out(filename.c_str());
    \n+
    125 write_glue_area_vtk<side>(glue, out);
    \n+
    126}
    \n+
    \n+
    127
    \n+
    128template<typename Glue>
    \n+
    \n+
    129void write_glue_areas_vtk(const Glue& glue, const std::string& base)
    \n+
    130{
    \n+
    131 {
    \n+
    132 std::string filename = base;
    \n+
    133 filename += "-inside.vtk";
    \n+
    134 write_glue_area_vtk<0>(glue, filename);
    \n+
    135 }
    \n+
    136 {
    \n+
    137 std::string filename = base;
    \n+
    138 filename += "-outside.vtk";
    \n+
    139 write_glue_area_vtk<1>(glue, filename);
    \n+
    140 }
    \n+
    141}
    \n+
    \n+
    142
    \n+
    143} /* namespace GridGlue */
    \n+
    144} /* namespace Dune */
    \n
    Definition gridglue.hh:37
    \n
    void write_glue_area_vtk(const Glue &glue, std::ostream &out)
    Definition areawriter_impl.hh:84
    \n
    void write_glue_areas_vtk(const Glue &glue, const std::string &base)
    Definition areawriter_impl.hh:129
    \n+
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n+
    void write_facet_geometry(const GridView &gv, std::ostream &out)
    Definition areawriter_impl.hh:25
    \n+
    Definition rangegenerators.hh:17
    \n+\n+
    bool contains(Dune::GeometryType gt) const
    Definition areawriter_impl.hh:18
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,48 +1,184 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-areawriter.hh\n+areawriter_impl.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-3#ifndef DUNE_GRIDGLUE_COMMON_AREAWRITER_HH\n-4#define DUNE_GRIDGLUE_COMMON_AREAWRITER_HH\n+3#include \n+4#include \n 5\n-6#include \n-7#include \n-8\n-9namespace _\bD_\bu_\bn_\be {\n-10namespace GridGlue {\n-11\n-12template\n-13void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk(const Glue& glue, std::ostream& out);\n+6#include \n+7#include \n+8#include \n+9\n+10namespace _\bD_\bu_\bn_\be {\n+11namespace GridGlue {\n+12\n+_\b1_\b3namespace AreaWriterImplementation {\n 14\n-15template\n-16void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk(const Glue& glue, const std::string& filename);\n-17\n-37template\n-38void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\bs_\b__\bv_\bt_\bk(const Glue& glue, const std::string& base);\n-39\n-40} /* namespace GridGlue */\n-41} /* namespace Dune */\n-42\n-43#include \"_\ba_\br_\be_\ba_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n-44\n-45#endif\n-_\ba_\br_\be_\ba_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\n+15template\n+_\b1_\b6struct _\bF_\ba_\bc_\be_\bt_\bL_\ba_\by_\bo_\bu_\bt\n+17{\n+_\b1_\b8 bool _\bc_\bo_\bn_\bt_\ba_\bi_\bn_\bs(Dune::GeometryType gt) const\n+19 {\n+20 return gt.dim() == dimgrid - 1;\n+21 }\n+22};\n+23\n+24template\n+_\b2_\b5void _\bw_\br_\bi_\bt_\be_\b__\bf_\ba_\bc_\be_\bt_\b__\bg_\be_\bo_\bm_\be_\bt_\br_\by(const GridView& gv, std::ostream& out)\n+26{\n+27 using Coordinate = Dune::FieldVector;\n+28\n+29 std::vector corners;\n+30 for (const auto& facet : facets(gv)) {\n+31 const auto geometry = facet.geometry();\n+32 for (int i = 0; i < geometry.corners(); ++i) {\n+33 /* VTK always needs 3-dim coordinates... */\n+34 const auto c0 = geometry.corner(i);\n+35 Coordinate c1;\n+36 for (int d = 0; d < GridView::dimensionworld; ++d)\n+37 c1[d] = c0[d];\n+38 for (int d = GridView::dimensionworld; d < Coordinate::dimension; ++d)\n+39 c1[d] = double(0);\n+40 corners.push_back(c1);\n+41 }\n+42 }\n+43\n+44 {\n+45 out << \"DATASET UNSTRUCTURED_GRID\\n\"\n+46 << \"POINTS \" << corners.size() << \" double\\n\";\n+47 for (const auto& c : corners)\n+48 out << c << \"\\n\";\n+49 }\n+50 {\n+51 out << \"CELLS \" << gv.size(1) << \" \" << (gv.size(1) + corners.size()) <<\n+\"\\n\";\n+52 std::size_t c = 0;\n+53 for (const auto& facet : facets(gv)) {\n+54 const auto geometry = facet.geometry();\n+55 out << geometry.corners();\n+56 for (int i = 0; i < geometry.corners(); ++i, ++c)\n+57 out << \" \" << c;\n+58 out << \"\\n\";\n+59 }\n+60 }\n+61 {\n+62 out << \"CELL_TYPES \" << gv.size(1) << \"\\n\";\n+63 for (const auto& facet : facets(gv)) {\n+64 const auto type = facet.type();\n+65 if (type.isVertex())\n+66 out << \"1\\n\";\n+67 else if (type.isLine())\n+68 out << \"2\\n\";\n+69 else if (type.isTriangle())\n+70 out << \"5\\n\";\n+71 else if (type.isQuadrilateral())\n+72 out << \"9\\n\";\n+73 else if (type.isTetrahedron())\n+74 out << \"10\\n\";\n+75 else\n+76 DUNE_THROW(Dune::Exception, \"Unhandled geometry type\");\n+77 }\n+78 }\n+79}\n+80\n+81} /* namespace AreaWriterImplementation */\n+82\n+83template\n+_\b8_\b4void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk(const Glue& glue, std::ostream& out)\n+85{\n+86 using GridView = typename std::decay< decltype(glue.template gridView\n+()) >::type;\n+87 using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper;\n+88 using ctype = typename GridView::ctype;\n+89\n+90 const GridView gv = glue.template gridView();\n+91 Mapper mapper(gv);\n+92 std::vector coveredArea(mapper.size(), ctype(0));\n+93 std::vector totalArea(mapper.size(), ctype(1));\n+94\n+95 for (const auto& in : _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(glue, _\bR_\be_\bv_\be_\br_\bs_\be_\b<_\bs_\bi_\bd_\be_\b _\b=_\b=_\b _\b1_\b>())) {\n+96 const auto element = in.inside();\n+97 const auto index = mapper.subIndex(element, in.indexInInside(), 1);\n+98 coveredArea[index] += in.geometryInInside().volume();\n+99\n+100 const auto& refElement = Dune::ReferenceElements::general(element.type());\n+101 const auto& subGeometry = refElement.template geometry<1>(in.indexInInside\n+());\n+102 totalArea[index] = subGeometry.volume();\n+103 }\n+104\n+105 for (std::size_t i = 0; i < coveredArea.size(); ++i)\n+106 coveredArea[i] /= totalArea[i];\n+107\n+108 out << \"# vtk DataFile Version 2.0\\n\"\n+109 << \"Filename: Glue Area\\n\"\n+110 << \"ASCII\\n\";\n+111\n+112 _\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bf_\ba_\bc_\be_\bt_\b__\bg_\be_\bo_\bm_\be_\bt_\br_\by(gv, out);\n+113\n+114 out << \"CELL_DATA \" << coveredArea.size() << \"\\n\"\n+115 << \"SCALARS CoveredArea double 1\\n\"\n+116 << \"LOOKUP_TABLE default\\n\";\n+117 for (const auto& value : coveredArea)\n+118 out << value << \"\\n\";\n+119}\n+120\n+121template\n+_\b1_\b2_\b2void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk(const Glue& glue, const std::string& filename)\n+123{\n+124 std::ofstream out(filename.c_str());\n+125 write_glue_area_vtk(glue, out);\n+126}\n+127\n+128template\n+_\b1_\b2_\b9void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\bs_\b__\bv_\bt_\bk(const Glue& glue, const std::string& base)\n+130{\n+131 {\n+132 std::string filename = base;\n+133 filename += \"-inside.vtk\";\n+134 write_glue_area_vtk<0>(glue, filename);\n+135 }\n+136 {\n+137 std::string filename = base;\n+138 filename += \"-outside.vtk\";\n+139 write_glue_area_vtk<1>(glue, filename);\n+140 }\n+141}\n+142\n+143} /* namespace GridGlue */\n+144} /* namespace Dune */\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk\n void write_glue_area_vtk(const Glue &glue, std::ostream &out)\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn areawriter_impl.hh:84\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\bs_\b__\bv_\bt_\bk\n void write_glue_areas_vtk(const Glue &glue, const std::string &base)\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn areawriter_impl.hh:129\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n+> &reverse=!reversed)\n+Iterate over all intersections of a GridGlue.\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bf_\ba_\bc_\be_\bt_\b__\bg_\be_\bo_\bm_\be_\bt_\br_\by\n+void write_facet_geometry(const GridView &gv, std::ostream &out)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn areawriter_impl.hh:25\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\be_\bv_\be_\br_\bs_\be\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn rangegenerators.hh:17\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bF_\ba_\bc_\be_\bt_\bL_\ba_\by_\bo_\bu_\bt\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn areawriter_impl.hh:17\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bF_\ba_\bc_\be_\bt_\bL_\ba_\by_\bo_\bu_\bt_\b:_\b:_\bc_\bo_\bn_\bt_\ba_\bi_\bn_\bs\n+bool contains(Dune::GeometryType gt) const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn areawriter_impl.hh:18\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00041.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00041.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: projection_impl.hh File Reference\n+dune-grid-glue: projectionwriter_impl.hh File Reference\n \n \n \n \n \n \n \n@@ -72,47 +72,59 @@\n
  • dune
  • grid-glue
  • common
  • \n \n \n
    \n \n-
    projection_impl.hh File Reference
    \n+
    projectionwriter_impl.hh File Reference
    \n
    \n
    \n-
    #include <dune/common/fmatrix.hh>
    \n-#include <cmath>
    \n+
    #include <fstream>
    \n
    \n

    Go to the source code of this file.

    \n

    \n Functions

    template<typename GridView >
    void Dune::GridGlue::AreaWriterImplementation::write_facet_geometry (const GridView &gv, std::ostream &out)
     
    template<int side, typename Glue >
    void Dune::GridGlue::write_glue_area_vtk (const Glue &glue, std::ostream &out)
     
    template<int side, typename Glue >
    void Dune::GridGlue::write_glue_area_vtk (const Glue &glue, const std::string &filename)
     
    template<typename Glue >
    \n \n \n \n \n \n-\n+\n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    namespace  Dune::GridGlue::ProjectionImplementation
    namespace  Dune::GridGlue::ProjectionWriterImplementation
     
    \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\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<typename Coordinate , typename Field >
    Coordinate Dune::GridGlue::ProjectionImplementation::corner (unsigned c)
     
    std::pair< unsigned, unsigned > Dune::GridGlue::ProjectionImplementation::edgeToCorners (unsigned edge)
     
    template<typename Coordinate , typename Corners >
    Corners::value_type Dune::GridGlue::ProjectionImplementation::interpolate (const Coordinate &x, const Corners &corners)
     
    template<typename Coordinate , typename Normals >
    Normals::value_type Dune::GridGlue::ProjectionImplementation::interpolate_unit_normals (const Coordinate &x, const Normals &normals)
     
    template<typename Coordinate , typename Field >
    bool Dune::GridGlue::ProjectionImplementation::inside (const Coordinate &x, const Field &epsilon)
     
    template<unsigned side, typename Coordinate , typename Corners >
    void Dune::GridGlue::ProjectionWriterImplementation::write_points (const Projection< Coordinate > &projection, const Corners &corners, std::ostream &out)
     
    template<unsigned side, typename Coordinate , typename Normals >
    void Dune::GridGlue::ProjectionWriterImplementation::write_normals (const Projection< Coordinate > &projection, const Normals &normals, std::ostream &out)
     
    template<typename Coordinate , typename Corners >
    void Dune::GridGlue::ProjectionWriterImplementation::write_edge_intersection_points (const Projection< Coordinate > &projection, const Corners &corners, std::ostream &out)
     
    template<typename Coordinate , typename Normals >
    void Dune::GridGlue::ProjectionWriterImplementation::write_edge_intersection_normals (const Projection< Coordinate > &projection, const Normals &normals, std::ostream &out)
     
    template<unsigned side, typename Coordinate >
    void Dune::GridGlue::ProjectionWriterImplementation::write_success (const Projection< Coordinate > &projection, std::ostream &out)
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::write (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, std::ostream &out)
     write projection in VTK format
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::write (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, const std::string &filename)
     write projection in VTK format
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::print (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals)
     Print information about the projection to std::cout stream.
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,43 +2,59 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-projection_impl.hh File Reference\n-#include \n-#include \n+projectionwriter_impl.hh File Reference\n+#include \n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n-namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn\n+namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn\n \u00a0\n F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-template\n- Coordinate\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n- _\bc_\bo_\br_\bn_\be_\br (unsigned c)\n-\u00a0\n-std::pair< unsigned, unsigned >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n- _\be_\bd_\bg_\be_\bT_\bo_\bC_\bo_\br_\bn_\be_\br_\bs (unsigned edge)\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bp_\bo_\bi_\bn_\bt_\bs (const\n+ _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const Corners &corners, std::\n+ ostream &out)\n+\u00a0\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs (const\n+ _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const Normals &normals, std::\n+ ostream &out)\n \u00a0\n template\n- Corners::value_type\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n- _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be (const Coordinate &x, const\n- Corners &corners)\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n+ _\bw_\br_\bi_\bt_\be_\b__\be_\bd_\bg_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b__\bp_\bo_\bi_\bn_\bt_\bs (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate >\n+ &projection, const Corners &corners, std::ostream &out)\n \u00a0\n template\n- Normals::value_type\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n- _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be_\b__\bu_\bn_\bi_\bt_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs (const Coordinate &x,\n- const Normals &normals)\n-\u00a0\n-template\n- bool\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n- _\bi_\bn_\bs_\bi_\bd_\be (const Coordinate &x, const Field\n- &epsilon)\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:\n+ _\bw_\br_\bi_\bt_\be_\b__\be_\bd_\bg_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate >\n+ &projection, const Normals &normals, std::ostream &out)\n+\u00a0\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bs_\bu_\bc_\bc_\be_\bs_\bs (const\n+ _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, std::ostream &out)\n+\u00a0\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n+ Corners &corners, const Normals &normals, std::ostream &out)\n+\u00a0 write projection in VTK format\n+\u00a0\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n+ Corners &corners, const Normals &normals, const std::string &filename)\n+\u00a0 write projection in VTK format\n+\u00a0\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n+ Corners &corners, const Normals &normals)\n+\u00a0 Print information about the projection to std::cout stream.\n \u00a0\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00041_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00041_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: projection_impl.hh Source File\n+dune-grid-glue: projectionwriter_impl.hh Source File\n \n \n \n \n \n \n \n@@ -74,464 +74,211 @@\n \n \n
    \n
    \n-
    projection_impl.hh
    \n+
    projectionwriter_impl.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#include <dune/common/fmatrix.hh>
    \n+
    3#include <fstream>
    \n
    4
    \n-
    5#include <cmath>
    \n-
    6
    \n-
    7namespace Dune {
    \n-
    8namespace GridGlue {
    \n+
    5namespace Dune {
    \n+
    6namespace GridGlue {
    \n+
    7
    \n+
    \n+
    8namespace ProjectionWriterImplementation {
    \n
    9
    \n-
    \n-
    10namespace ProjectionImplementation {
    \n-
    11
    \n-
    22template<typename Coordinate, typename Field>
    \n-
    23inline Coordinate
    \n-
    \n-
    24corner(unsigned c)
    \n-
    25{
    \n-
    26 Coordinate x(Field(0));
    \n-
    27 if (c == 0)
    \n-
    28 return x;
    \n-
    29 x[c-1] = Field(1);
    \n-
    30 return x;
    \n-
    31}
    \n-
    \n+
    10template<unsigned side, typename Coordinate, typename Corners>
    \n+
    \n+
    11void write_points(const Projection<Coordinate>& projection, const Corners& corners, std::ostream& out)
    \n+
    12{
    \n+
    13 using namespace ProjectionImplementation;
    \n+
    14 using std::get;
    \n+
    15 const unsigned other_side = 1 - side;
    \n+
    16
    \n+
    17 for (const auto& c : get<side>(corners))
    \n+
    18 out << c << "\\n";
    \n+
    19
    \n+
    20 for (const auto& i : get<side>(projection.images())) {
    \n+
    21 const auto global = interpolate(i, get<other_side>(corners));
    \n+
    22 out << global << "\\n";
    \n+
    23 }
    \n+
    24}
    \n+
    \n+
    25
    \n+
    26template<unsigned side, typename Coordinate, typename Normals>
    \n+
    \n+
    27void write_normals(const Projection<Coordinate>& projection, const Normals& normals, std::ostream& out)
    \n+
    28{
    \n+
    29 using namespace ProjectionImplementation;
    \n+
    30 using std::get;
    \n+
    31 const unsigned other_side = 1 - side;
    \n
    32
    \n-
    42inline std::pair<unsigned, unsigned>
    \n+
    33 for (const auto& n : get<side>(normals))
    \n+
    34 out << n << "\\n";
    \n+
    35
    \n+
    36 for (const auto& x : get<side>(projection.images())) {
    \n+
    37 const auto n = interpolate_unit_normals(x, get<other_side>(normals));
    \n+
    38 out << n << "\\n";
    \n+
    39 }
    \n+
    40}
    \n+
    \n+
    41
    \n+
    42template<typename Coordinate, typename Corners>
    \n
    \n-
    43edgeToCorners(unsigned edge)
    \n+
    43void write_edge_intersection_points(const Projection<Coordinate>& projection, const Corners& corners, std::ostream& out)
    \n
    44{
    \n-
    45 switch(edge) {
    \n-
    46 case 0: return {0, 1};
    \n-
    47 case 1: return {0, 2};
    \n-
    48 case 2: return {1, 2};
    \n-
    49 }
    \n-
    50 DUNE_THROW(Dune::Exception, "Unexpected edge number.");
    \n-
    51}
    \n-
    \n-
    52
    \n-
    68template<typename Coordinate, typename Corners>
    \n-
    69inline typename Corners::value_type
    \n-
    \n-
    70interpolate(const Coordinate& x, const Corners& corners)
    \n-
    71{
    \n-
    72 auto y = corners[0];
    \n-
    73 for (unsigned i = 0; i < corners.size() - 1; ++i)
    \n-
    74 y.axpy(x[i], corners[i+1] - corners[0]);
    \n-
    75 return y;
    \n-
    76}
    \n-
    \n+
    45 using namespace ProjectionImplementation;
    \n+
    46 using std::get;
    \n+
    47
    \n+
    48 for (std::size_t i = 0; i < projection.numberOfEdgeIntersections(); ++i) {
    \n+
    49 const auto& local = projection.edgeIntersections()[i].local;
    \n+
    50 out << interpolate(local[0], get<0>(corners)) << "\\n"
    \n+
    51 << interpolate(local[1], get<1>(corners)) << "\\n";
    \n+
    52 }
    \n+
    53}
    \n+
    \n+
    54
    \n+
    55template<typename Coordinate, typename Normals>
    \n+
    \n+
    56void write_edge_intersection_normals(const Projection<Coordinate>& projection, const Normals& normals, std::ostream& out)
    \n+
    57{
    \n+
    58 using namespace ProjectionImplementation;
    \n+
    59 using std::get;
    \n+
    60
    \n+
    61 for (std::size_t i = 0; i < projection.numberOfEdgeIntersections(); ++i) {
    \n+
    62 const auto& local = projection.edgeIntersections()[i].local;
    \n+
    63 const auto n0 = interpolate_unit_normals(local[0], get<0>(normals));
    \n+
    64 const auto n1 = interpolate_unit_normals(local[1], get<1>(normals));
    \n+
    65
    \n+
    66 out << n0 << "\\n"
    \n+
    67 << n1 << "\\n";
    \n+
    68 }
    \n+
    69}
    \n+
    \n+
    70
    \n+
    71template<unsigned side, typename Coordinate>
    \n+
    \n+
    72void write_success(const Projection<Coordinate>& projection, std::ostream& out)
    \n+
    73{
    \n+
    74 using std::get;
    \n+
    75
    \n+
    76 out << side << "\\n";
    \n
    77
    \n-
    89template<typename Coordinate, typename Normals>
    \n-
    90inline typename Normals::value_type
    \n-
    \n-
    91interpolate_unit_normals(const Coordinate& x, const Normals& normals)
    \n-
    92{
    \n-
    93 auto n = interpolate(x, normals);
    \n-
    94 n /= n.two_norm();
    \n-
    95 return n;
    \n-
    96}
    \n-
    \n-
    97
    \n-
    109template<typename Coordinate, typename Field>
    \n-
    110inline bool
    \n-
    \n-
    111inside(const Coordinate& x, const Field& epsilon)
    \n-
    112{
    \n-
    113 const unsigned dim = Coordinate::dimension;
    \n-
    114 Field sum(0);
    \n-
    115 for (unsigned i = 0; i < dim-1; ++i) {
    \n-
    116 if (x[i] < -epsilon)
    \n-
    117 return false;
    \n-
    118 sum += x[i];
    \n-
    119 }
    \n-
    120 /* If any x\u1d62 is NaN, sum will be NaN and this comparison false! */
    \n-
    121 if (sum <= Field(1) + epsilon)
    \n-
    122 return true;
    \n-
    123 return false;
    \n-
    124}
    \n-
    \n-
    125
    \n-
    126} /* namespace ProjectionImplementation */
    \n-
    \n-
    127
    \n-
    128template<typename Coordinate>
    \n-
    129Projection<Coordinate>
    \n+
    78 const auto& success = get<side>(projection.success());
    \n+
    79 for (std::size_t i = 0; i < success.size(); ++i)
    \n+
    80 out << (success[i] ? "1\\n" : "0\\n");
    \n+
    81}
    \n+
    \n+
    82
    \n+
    83} /* namespace ProjectionWriterImplementation */
    \n+
    \n+
    84
    \n+
    85template<typename Coordinate, typename Corners, typename Normals>
    \n+
    \n+
    86void write(const Projection<Coordinate>& projection,
    \n+
    87 const Corners& corners,
    \n+
    88 const Normals& normals,
    \n+
    89 std::ostream& out)
    \n+
    90{
    \n+
    91 using namespace ProjectionWriterImplementation;
    \n+
    92
    \n+
    93 const auto numberOfEdgeIntersections = projection.numberOfEdgeIntersections();
    \n+
    94 const auto nPoints = 12 + 2 * numberOfEdgeIntersections;
    \n+
    95
    \n+
    96 out << "# vtk DataFile Version2.0\\n"
    \n+
    97 << "Filename: projection\\n"
    \n+
    98 << "ASCII\\n"
    \n+
    99 << "DATASET UNSTRUCTURED_GRID\\n"
    \n+
    100 << "POINTS " << nPoints << " double\\n";
    \n+
    101 write_points<0>(projection, corners, out);
    \n+
    102 write_points<1>(projection, corners, out);
    \n+
    103 write_edge_intersection_points(projection, corners, out);
    \n+
    104 out << "CELLS " << (8 + numberOfEdgeIntersections) << " " << (26 + 3 * numberOfEdgeIntersections) << "\\n";
    \n+
    105 out << "3 0 1 2\\n" "2 0 3\\n" "2 1 4\\n" "2 2 5\\n"
    \n+
    106 << "3 6 7 8\\n" "2 6 9\\n" "2 7 10\\n" "2 8 11\\n";
    \n+
    107 for (std::size_t i = 0; i < numberOfEdgeIntersections; ++i)
    \n+
    108 out << "2 " << (12 + 2*i) << " " << (12 + 2*i + 1) << "\\n";
    \n+
    109 out << "CELL_TYPES " << (8 + numberOfEdgeIntersections) << "\\n" "5\\n3\\n3\\n3\\n" "5\\n3\\n3\\n3\\n";
    \n+
    110 for (std::size_t i = 0; i < numberOfEdgeIntersections; ++i)
    \n+
    111 out << "3\\n";
    \n+
    112 out << "CELL_DATA " << (8 + numberOfEdgeIntersections) << "\\n";
    \n+
    113 out << "SCALARS success int 1\\n"
    \n+
    114 << "LOOKUP_TABLE success\\n";
    \n+
    115 write_success<0>(projection, out);
    \n+
    116 write_success<1>(projection, out);
    \n+
    117 for (std::size_t i = 0; i < numberOfEdgeIntersections; ++i)
    \n+
    118 out << "2\\n";
    \n+
    119 out << "LOOKUP_TABLE success 2\\n"
    \n+
    120 << "1.0 0.0 0.0 1.0\\n"
    \n+
    121 << "0.0 1.0 0.0 1.0\\n";
    \n+
    122 out << "POINT_DATA " << nPoints << "\\n"
    \n+
    123 << "NORMALS normals double\\n";
    \n+
    124 write_normals<0>(projection, normals, out);
    \n+
    125 write_normals<1>(projection, normals, out);
    \n+
    126 write_edge_intersection_normals(projection, normals, out);
    \n+
    127}
    \n+
    \n+
    128
    \n+
    129template<typename Coordinate, typename Corners, typename Normals>
    \n
    \n-
    130::Projection(const Field overlap, const Field max_normal_product)
    \n-
    131 : m_overlap(overlap)
    \n-
    132 , m_max_normal_product(max_normal_product)
    \n-
    133{
    \n-
    134 /* Nothing. */
    \n-
    135}
    \n-
    \n-
    136
    \n-
    137template<typename Coordinate>
    \n-
    138void
    \n-\n+
    130void write(const Projection<Coordinate>& projection,
    \n+
    131 const Corners& corners,
    \n+
    132 const Normals& normals,
    \n+
    133 const std::string& filename)
    \n+
    134{
    \n+
    135 std::ofstream out(filename.c_str());
    \n+
    136 write(projection, corners, normals, out);
    \n+
    137}
    \n+
    \n+
    138
    \n+
    139template<typename Coordinate, typename Corners, typename Normals>
    \n
    \n-
    140::epsilon(const Field epsilon)
    \n-
    141{
    \n-
    142 m_epsilon = epsilon;
    \n-
    143}
    \n-
    \n-
    144
    \n-
    145template<typename Coordinate>
    \n-
    146template<typename Corners, typename Normals>
    \n-
    147void
    \n-\n-
    149::doProjection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals)
    \n-
    150{
    \n-
    151 /* Try to obtain \u03a6(x\u1d62) for each corner x\u1d62 of the preimage triangle.
    \n-
    152 * This means solving a linear system of equations
    \n-
    153 * \u03a6(x\u1d62) = (1-\u03b1-\u03b2) y\u2080 + \u03b1 y\u2081 + \u03b2 y\u2082 = x\u1d62 + \u03b4 n\u1d62
    \n-
    154 * or \u03b1 (y\u2081 - y\u2080) + \u03b2 (y\u2082 - y\u2080) - \u03b4 n\u1d62 = x\u1d62 - y\u2080
    \n-
    155 * to obtain the barycentric coordinates (\u03b1, \u03b2) of \u03a6(x\u1d62) in the image
    \n-
    156 * triangle and the distance \u03b4.
    \n-
    157 *
    \n-
    158 * In the matrix m corresponding to the system, only the third column and the
    \n-
    159 * right-hand side depend on i. The first two columns can be assembled before
    \n-
    160 * and reused.
    \n-
    161 */
    \n-
    162 using namespace ProjectionImplementation;
    \n-
    163 using std::get;
    \n-
    164 typedef Dune::FieldMatrix<Field, dim, dim> Matrix;
    \n-
    165 Matrix m;
    \n-
    166
    \n-
    167 const auto& origin = get<0>(corners);
    \n-
    168 const auto& origin_normals = get<0>(normals);
    \n-
    169 const auto& target = get<1>(corners);
    \n-
    170 const auto& target_normals = get<1>(normals);
    \n-
    171 auto& images = get<0>(m_images);
    \n-
    172 auto& success = get<0>(m_success);
    \n-
    173
    \n-
    174 /* directions\u1d62 = (y\u1d62 - y\u2080) / ||y\u1d62 - y\u2080||
    \n-
    175 * These are the first to columns of the system matrix; the rescaling is done
    \n-
    176 * to ensure all columns have a comparable norm (the last has the normal with norm 1.
    \n-
    177 */
    \n-
    178 std::array<Coordinate, dim-1> directions;
    \n-
    179 std::array<Field, dim-1> scales;
    \n-
    180 /* estimator for the diameter of the target face */
    \n-
    181 Field scaleSum(0);
    \n-
    182 for (unsigned i = 0; i < dim-1; ++i) {
    \n-
    183 directions[i] = target[i+1] - target[0];
    \n-
    184 scales[i] = directions[i].infinity_norm();
    \n-
    185 directions[i] /= scales[i];
    \n-
    186 scaleSum += scales[i];
    \n-
    187 }
    \n-
    188
    \n-
    189 for (unsigned i = 0; i < dim-1; ++i) {
    \n-
    190 for (unsigned j = 0; j < dim; ++j) {
    \n-
    191 m[j][i] = directions[i][j];
    \n-
    192 }
    \n-
    193 }
    \n-
    194
    \n-
    195 m_projection_valid = true;
    \n-
    196 success.reset();
    \n-
    197
    \n-
    198 /* Now project x\u1d62 for each i */
    \n-
    199 for (unsigned i = 0; i < origin.size(); ++i) {
    \n-
    200 for (unsigned j = 0; j < dim; ++j)
    \n-
    201 m[j][dim-1] = origin_normals[i][j];
    \n-
    202
    \n-
    203 const Coordinate rhs = origin[i] - target[0];
    \n-
    204
    \n-
    205 try {
    \n-
    206 /* y = (\u03b1, \u03b2, \u03b4) */
    \n-
    207 auto& y = images[i];
    \n-
    208 m.solve(y, rhs);
    \n-
    209 for (unsigned j = 0; j < dim-1; ++j)
    \n-
    210 y[j] /= scales[j];
    \n-
    211 /* Solving gave us -\u03b4 as the term is "-\u03b4 n\u1d62". */
    \n-
    212 y[dim-1] *= Field(-1);
    \n-
    213
    \n-
    214 /* If the forward projection is too far in the wrong direction
    \n-
    215 * then this might result in artificial inverse projections or
    \n-
    216 * edge intersections. To prevent these wrong cases but not
    \n-
    217 * dismiss feasible intersections, the projection is dismissed
    \n-
    218 * if the forward projection is further than two times the
    \n-
    219 * approximate diameter of the image triangle.
    \n-
    220 */
    \n-
    221 if(y[dim-1] < -2*scaleSum) {
    \n-
    222 success.set(i,false);
    \n-
    223 m_projection_valid = false;
    \n-
    224 return;
    \n-
    225 }
    \n-
    226
    \n-
    227 const bool feasible = projectionFeasible(origin[i], origin_normals[i], y, target, target_normals);
    \n-
    228 success.set(i, feasible);
    \n-
    229 }
    \n-
    230 catch (const Dune::FMatrixError&) {
    \n-
    231 success.set(i, false);
    \n-
    232 m_projection_valid = false;
    \n-
    233 }
    \n-
    234 }
    \n-
    235}
    \n-
    236
    \n-
    237template<typename Coordinate>
    \n-
    238template<typename Corners, typename Normals>
    \n-
    239void
    \n-
    240Projection<Coordinate>
    \n-
    241::doInverseProjection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals)
    \n-
    242{
    \n-
    243 /* Try to obtain \u03a6\u207b\u00b9(y\u1d62) for each corner y\u1d62 of the image triangle.
    \n-
    244 * Instead of solving the problem directly (which would lead to
    \n-
    245 * non-linear equations), we make use of the forward projection \u03a6
    \n-
    246 * which projects the preimage triangle on the plane spanned by the
    \n-
    247 * image triangle. The inverse projection is then given by finding
    \n-
    248 * the barycentric coordinates of y\u1d62 with respect to the triangle
    \n-
    249 * with the corners \u03a6(x\u1d62). This way we only have to solve linear
    \n-
    250 * equations.
    \n-
    251 */
    \n-
    252
    \n-
    253 using namespace ProjectionImplementation;
    \n-
    254 using std::get;
    \n-
    255 typedef Dune::FieldMatrix<Field, dim-1, dim-1> Matrix;
    \n-
    256 typedef Dune::FieldVector<Field, dim-1> Vector;
    \n-
    257
    \n-
    258 /* The inverse projection can only be computed if the forward projection
    \n-
    259 * managed to project all x\u1d62 on the plane spanned by the y\u1d62
    \n-
    260 */
    \n-
    261 if (!m_projection_valid) {
    \n-
    262 get<1>(m_success).reset();
    \n-
    263 return;
    \n-
    264 }
    \n-
    265
    \n-
    266 const auto& images = get<0>(m_images);
    \n-
    267 const auto& target_corners = get<1>(corners);
    \n-
    268 auto& preimages = get<1>(m_images);
    \n-
    269 auto& success = get<1>(m_success);
    \n-
    270
    \n-
    271 std::array<Coordinate, dim> v;
    \n-
    272 for (unsigned i = 0; i < dim-1; ++i) {
    \n-
    273 v[i] = interpolate(images[i+1], target_corners);
    \n-
    274 v[i] -= interpolate(images[0], target_corners);
    \n-
    275 }
    \n-
    276
    \n-
    277 Matrix m;
    \n-
    278 for (unsigned i = 0; i < dim-1; ++i) {
    \n-
    279 for (unsigned j = 0; j < dim-1; ++j) {
    \n-
    280 m[i][j] = v[i]*v[j];
    \n-
    281 }
    \n-
    282 }
    \n-
    283
    \n-
    284 for (unsigned i = 0; i < dim; ++i) {
    \n-
    285 /* Convert y\u1d62 to barycentric coordinates with respect to \u03a6(x\u2c7c) */
    \n-
    286 v[dim-1] = target_corners[i];
    \n-
    287 v[dim-1] -= interpolate(images[0], target_corners);
    \n-
    288
    \n-
    289 Vector rhs, z;
    \n-
    290 for (unsigned j = 0; j < dim-1; ++j)
    \n-
    291 rhs[j] = v[dim-1]*v[j];
    \n-
    292 m.solve(z, rhs);
    \n-
    293
    \n-
    294 for (unsigned j = 0; j < dim-1; ++j)
    \n-
    295 preimages[i][j] = z[j];
    \n-
    296
    \n-
    297 /* Calculate distance along normal direction */
    \n-
    298 const auto x = interpolate(z, get<0>(corners));
    \n-
    299 preimages[i][dim-1] = (x - target_corners[i]) * get<1>(normals)[i];
    \n-
    300
    \n-
    301 /* Check y_i lies inside the \u03a6(x\u2c7c) */
    \n-
    302 const bool feasible = projectionFeasible(target_corners[i], get<1>(normals)[i], preimages[i], get<0>(corners), get<0>(normals));
    \n-
    303 success.set(i, feasible);
    \n-
    304 }
    \n-
    305}
    \n-
    306
    \n-
    307template<typename Coordinate>
    \n-
    308template<typename Corners, typename Normals>
    \n-
    309void
    \n-
    310Projection<Coordinate>
    \n-
    311::doEdgeIntersection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals)
    \n-
    312{
    \n-
    313 using namespace ProjectionImplementation;
    \n-
    314 using std::get;
    \n-
    315
    \n-
    316 m_number_of_edge_intersections = 0;
    \n-
    317
    \n-
    318 /* There are no edge intersections for 2d, only for 3d */
    \n-
    319 if (dim != 3)
    \n-
    320 return;
    \n-
    321
    \n-
    322 /* There are no edge intersections
    \n-
    323 * - when the projection is invalid,
    \n-
    324 * - when the projected triangle lies fully in the target triangle,
    \n-
    325 * - or when the target triangle lies fully in the projected triangle.
    \n-
    326 */
    \n-
    327 if (!m_projection_valid || get<0>(m_success).all() || get<1>(m_success).all()) {
    \n-
    328 return;
    \n-
    329 }
    \n-
    330
    \n-
    331 const auto& images = get<0>(m_images);
    \n-
    332 const auto& ys = get<1>(corners);
    \n-
    333
    \n-
    334 /* Intersect line through \u03a6(x\u1d62), \u03a6(x\u2c7c) with line through y\u2096, y\u2097:
    \n-
    335 We want \u03b1, \u03b2 \u2208 \u211d such that
    \n-
    336 \u03a6(x\u1d62) + \u03b1 (\u03a6(x\u2c7c) - \u03a6(x\u1d62)) = y\u2096 + \u03b2 (y\u2097 - y\u2096)
    \n-
    337 or
    \n-
    338 \u03b1 (\u03a6(x\u2c7c)-\u03a6(x\u1d62)) + \u03b2 (y\u2097-y\u2096) = y\u2096-\u03a6(x\u1d62)
    \n-
    339 To get a 2\u00d72 system of equations, multiply with y\u2098-y\u2080 for
    \n-
    340 m \u2208 {1,\u0323\u03232} which are linear indep. (and so the system is
    \n-
    341 equivalent to the original 3\u00d72 system)
    \n-
    342 */
    \n-
    343 for (unsigned edgex = 0; edgex < dim; ++edgex) {
    \n-
    344 unsigned i, j;
    \n-
    345 std::tie(i, j) = edgeToCorners(edgex);
    \n-
    346
    \n-
    347 /* Both sides of edgex lie in the target triangle means no edge intersection */
    \n-
    348 if (get<0>(m_success)[i] && get<0>(m_success)[j])
    \n-
    349 continue;
    \n-
    350
    \n-
    351 const auto pxi = interpolate(images[i], ys);
    \n-
    352 const auto pxj = interpolate(images[j], ys);
    \n-
    353 const auto pxjpxi = pxj - pxi;
    \n-
    354
    \n-
    355 typedef Dune::FieldMatrix<Field, dim-1, dim-1> Matrix;
    \n-
    356 typedef Dune::FieldVector<Field, dim-1> Vector;
    \n-
    357
    \n-
    358 for (unsigned edgey = 0; edgey < dim; ++edgey) {
    \n-
    359 unsigned k, l;
    \n-
    360 std::tie(k, l) = edgeToCorners(edgey);
    \n-
    361
    \n-
    362 /* Both sides of edgey lie in the projected triangle means no edge intersection */
    \n-
    363 if (get<1>(m_success)[k] && get<1>(m_success)[l])
    \n-
    364 continue;
    \n-
    365
    \n-
    366 const auto ykyl = ys[k] - ys[l];
    \n-
    367 const auto ykpxi = ys[k] - pxi;
    \n-
    368
    \n-
    369 /* If edges are parallel then the intersection is already computed by vertex projections. */
    \n-
    370 bool parallel = true;
    \n-
    371 for (unsigned h=0; h<3; h++)
    \n-
    372 parallel &= std::abs(ykyl[(h+1)%3]*pxjpxi[(h+2)%3] - ykyl[(h+2)%3]*pxjpxi[(h+1)%3])<1e-14;
    \n-
    373 if (parallel)
    \n-
    374 continue;
    \n-
    375
    \n-
    376 Matrix mat;
    \n-
    377 Vector rhs, z;
    \n-
    378
    \n-
    379 for (unsigned m = 0; m < dim-1; ++m) {
    \n-
    380 const auto ym1y0 = ys[m+1] - ys[0];
    \n-
    381 mat[m][0] = pxjpxi * ym1y0;
    \n-
    382 mat[m][1] = ykyl * ym1y0;
    \n-
    383 rhs[m] = ykpxi * ym1y0;
    \n-
    384 }
    \n-
    385
    \n-
    386 try {
    \n-
    387 using std::isfinite;
    \n-
    388
    \n-
    389 mat.solve(z, rhs);
    \n-
    390
    \n-
    391 /* If solving the system gives a NaN, the edges are probably parallel. */
    \n-
    392 if (!isfinite(z[0]) || !isfinite(z[1]))
    \n-
    393 continue;
    \n-
    394
    \n-
    395 /* Filter out corner (pre)images. We only want "real" edge-edge intersections here. */
    \n-
    396 if (z[0] < m_epsilon || z[0] > Field(1) - m_epsilon
    \n-
    397 || z[1] < m_epsilon || z[1] > Field(1) - m_epsilon)
    \n-
    398 continue;
    \n-
    399
    \n-
    400 Coordinate local_x = corner<Coordinate, Field>(i);
    \n-
    401 local_x.axpy(z[0], corner<Coordinate, Field>(j) - corner<Coordinate, Field>(i));
    \n-
    402 Coordinate local_y = corner<Coordinate, Field>(k);
    \n-
    403 local_y.axpy(z[1], corner<Coordinate, Field>(l) - corner<Coordinate, Field>(k));
    \n-
    404
    \n-
    405 /* Make sure the intersection is in the triangle. */
    \n-
    406 if (!inside(local_x, m_epsilon) || !inside(local_y, m_epsilon))
    \n-
    407 continue;
    \n-
    408
    \n-
    409 /* Make sure the intersection respects overlap. */
    \n-
    410 auto xy = interpolate(local_x, get<0>(corners));
    \n-
    411 xy -= interpolate(local_y, get<1>(corners));
    \n-
    412 const auto nx = interpolate_unit_normals(local_x, get<0>(normals));
    \n-
    413 const auto ny = interpolate_unit_normals(local_y, get<1>(normals));
    \n-
    414 local_x[dim-1] = -(xy*nx);
    \n-
    415 local_y[dim-1] = xy*ny;
    \n-
    416
    \n-
    417 if (local_x[dim-1] < -m_overlap-m_epsilon || local_y[dim-1] < -m_overlap-m_epsilon)
    \n-
    418 continue;
    \n-
    419
    \n-
    420 /* Normals should be opposing. */
    \n-
    421 if (nx*ny > m_max_normal_product + m_epsilon)
    \n-
    422 continue;
    \n-
    423
    \n-
    424 /* Intersection is feasible. Store it. */
    \n-
    425 auto& intersection = m_edge_intersections[m_number_of_edge_intersections++];
    \n-
    426 intersection = { {{edgex, edgey}}, {{local_x, local_y}} };
    \n-
    427 }
    \n-
    428 catch(const Dune::FMatrixError&) {
    \n-
    429 /* Edges might be parallel, ignore and continue with next edge */
    \n-
    430 }
    \n-
    431 }
    \n-
    432 }
    \n-
    433}
    \n-
    434
    \n-
    435template<typename Coordinate>
    \n-
    436template<typename Corners, typename Normals>
    \n-
    437bool Projection<Coordinate>
    \n-
    438::projectionFeasible(const Coordinate& x, const Coordinate& nx, const Coordinate& px, const Corners& corners, const Normals& normals) const
    \n-
    439{
    \n-
    440 using namespace ProjectionImplementation;
    \n-
    441
    \n-
    442 /* Image must be within simplex. */
    \n-
    443 if (!inside(px, m_epsilon))
    \n-
    444 return false;
    \n-
    445
    \n-
    446 /* Distance along normal must not be smaller than -overlap. */
    \n-
    447 if (px[dim-1] < -m_overlap-m_epsilon)
    \n-
    448 return false;
    \n-
    449
    \n-
    450 /* Distance along normal at image must not be smaller than -overlap. */
    \n-
    451 auto xmy = x;
    \n-
    452 xmy -= interpolate(px, corners);
    \n-
    453 const auto n = interpolate_unit_normals(px, normals);
    \n-
    454 const auto d = xmy * n;
    \n-
    455 if (d < -m_overlap-m_epsilon)
    \n-
    456 return false;
    \n-
    457
    \n-
    458 /* Normals at x and \u03a6(x) are opposing. */
    \n-
    459 if (nx * n > m_max_normal_product + m_epsilon)
    \n-
    460 return false;
    \n-
    461
    \n-
    462 /* Okay, projection is feasible. */
    \n-
    463 return true;
    \n-
    464}
    \n-
    465
    \n-
    466template<typename Coordinate>
    \n-
    467template<typename Corners, typename Normals>
    \n-
    468void Projection<Coordinate>
    \n-
    \n-
    469::project(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals)
    \n-
    470{
    \n-
    471 doProjection(corners, normals);
    \n-
    472 doInverseProjection(corners, normals);
    \n-
    473 doEdgeIntersection(corners, normals);
    \n-
    474}
    \n-
    \n-
    475
    \n-
    476} /* namespace GridGlue */
    \n-
    477} /* namespace Dune */
    \n+
    140void print(const Projection<Coordinate>& projection,
    \n+
    141 const Corners& corners,
    \n+
    142 const Normals& normals)
    \n+
    143{
    \n+
    144 using namespace ProjectionWriterImplementation;
    \n+
    145
    \n+
    146 std::cout << "Side 0 corners and images:\\n";
    \n+
    147 write_points<0>(projection, corners, std::cout);
    \n+
    148 std::cout << "Side 0 success:\\n";
    \n+
    149 write_success<0>(projection, std::cout);
    \n+
    150 std::cout << "Side 1 corners and images:\\n";
    \n+
    151 write_points<1>(projection, corners, std::cout);
    \n+
    152 std::cout << "Side 1 success:\\n";
    \n+
    153 write_success<1>(projection, std::cout);
    \n+
    154 std::cout << "Side 0 normals and projected normals:\\n";
    \n+
    155 write_normals<0>(projection, normals, std::cout);
    \n+
    156 std::cout << "Side 1 normals and projected normals:\\n";
    \n+
    157 write_normals<1>(projection, normals, std::cout);
    \n+
    158 std::cout << projection.numberOfEdgeIntersections() << " edge intersections:\\n";
    \n+
    159 write_edge_intersection_points(projection, corners, std::cout);
    \n+
    160}
    \n+\n+
    161
    \n+
    162} /* namespace GridGlue */
    \n+
    163} /* namespace Dune */
    \n
    Definition gridglue.hh:37
    \n-
    Corners::value_type interpolate(const Coordinate &x, const Corners &corners)
    Definition projection_impl.hh:70
    \n-
    bool inside(const Coordinate &x, const Field &epsilon)
    Definition projection_impl.hh:111
    \n-
    std::pair< unsigned, unsigned > edgeToCorners(unsigned edge)
    Definition projection_impl.hh:43
    \n-
    Coordinate corner(unsigned c)
    Definition projection_impl.hh:24
    \n-
    Normals::value_type interpolate_unit_normals(const Coordinate &x, const Normals &normals)
    Definition projection_impl.hh:91
    \n+
    void write(const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, std::ostream &out)
    write projection in VTK format
    Definition projectionwriter_impl.hh:86
    \n+
    void print(const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals)
    Print information about the projection to std::cout stream.
    Definition projectionwriter_impl.hh:140
    \n+
    void write_normals(const Projection< Coordinate > &projection, const Normals &normals, std::ostream &out)
    Definition projectionwriter_impl.hh:27
    \n+
    void write_points(const Projection< Coordinate > &projection, const Corners &corners, std::ostream &out)
    Definition projectionwriter_impl.hh:11
    \n+
    void write_success(const Projection< Coordinate > &projection, std::ostream &out)
    Definition projectionwriter_impl.hh:72
    \n+
    void write_edge_intersection_points(const Projection< Coordinate > &projection, const Corners &corners, std::ostream &out)
    Definition projectionwriter_impl.hh:43
    \n+
    void write_edge_intersection_normals(const Projection< Coordinate > &projection, const Normals &normals, std::ostream &out)
    Definition projectionwriter_impl.hh:56
    \n
    Projection of a line (triangle) on another line (triangle).
    Definition projection.hh:21
    \n-
    Coordinate::field_type Field
    Scalar type.
    Definition projection.hh:61
    \n+
    const std::tuple< std::bitset< dim >, std::bitset< dim > > & success() const
    Indicate whether projection (inverse projection) is valid for each corner or not.
    Definition projection.hh:252
    \n+
    unsigned numberOfEdgeIntersections() const
    Number of edge intersections.
    Definition projection.hh:262
    \n+
    const std::tuple< Images, Preimages > & images() const
    Images and preimages of corners.
    Definition projection.hh:235
    \n+
    const std::array< EdgeIntersection, maxEdgeIntersections > & edgeIntersections() const
    Edge-edge intersections.
    Definition projection.hh:273
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,480 +1,238 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-projection_impl.hh\n+projectionwriter_impl.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-3#include \n+3#include \n 4\n-5#include \n-6\n-7namespace _\bD_\bu_\bn_\be {\n-8namespace GridGlue {\n+5namespace _\bD_\bu_\bn_\be {\n+6namespace GridGlue {\n+7\n+_\b8namespace ProjectionWriterImplementation {\n 9\n-_\b1_\b0namespace ProjectionImplementation {\n-11\n-22template\n-23inline Coordinate\n-_\b2_\b4_\bc_\bo_\br_\bn_\be_\br(unsigned c)\n-25{\n-26 Coordinate x(Field(0));\n-27 if (c == 0)\n-28 return x;\n-29 x[c-1] = Field(1);\n-30 return x;\n-31}\n+10template\n+_\b1_\b1void _\bw_\br_\bi_\bt_\be_\b__\bp_\bo_\bi_\bn_\bt_\bs(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection, const Corners&\n+corners, std::ostream& out)\n+12{\n+13 using namespace ProjectionImplementation;\n+14 using std::get;\n+15 const unsigned other_side = 1 - side;\n+16\n+17 for (const auto& c : get(corners))\n+18 out << c << \"\\n\";\n+19\n+20 for (const auto& i : get(projection._\bi_\bm_\ba_\bg_\be_\bs())) {\n+21 const auto global = interpolate(i, get(corners));\n+22 out << global << \"\\n\";\n+23 }\n+24}\n+25\n+26template\n+_\b2_\b7void _\bw_\br_\bi_\bt_\be_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection, const Normals&\n+normals, std::ostream& out)\n+28{\n+29 using namespace ProjectionImplementation;\n+30 using std::get;\n+31 const unsigned other_side = 1 - side;\n 32\n-42inline std::pair\n-_\b4_\b3_\be_\bd_\bg_\be_\bT_\bo_\bC_\bo_\br_\bn_\be_\br_\bs(unsigned edge)\n+33 for (const auto& n : get(normals))\n+34 out << n << \"\\n\";\n+35\n+36 for (const auto& x : get(projection._\bi_\bm_\ba_\bg_\be_\bs())) {\n+37 const auto n = interpolate_unit_normals(x, get(normals));\n+38 out << n << \"\\n\";\n+39 }\n+40}\n+41\n+42template\n+_\b4_\b3void _\bw_\br_\bi_\bt_\be_\b__\be_\bd_\bg_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b__\bp_\bo_\bi_\bn_\bt_\bs(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection,\n+const Corners& corners, std::ostream& out)\n 44{\n-45 switch(edge) {\n-46 case 0: return {0, 1};\n-47 case 1: return {0, 2};\n-48 case 2: return {1, 2};\n-49 }\n-50 DUNE_THROW(Dune::Exception, \"Unexpected edge number.\");\n-51}\n-52\n-68template\n-69inline typename Corners::value_type\n-_\b7_\b0_\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(const Coordinate& x, const Corners& corners)\n-71{\n-72 auto y = corners[0];\n-73 for (unsigned i = 0; i < corners.size() - 1; ++i)\n-74 y.axpy(x[i], corners[i+1] - corners[0]);\n-75 return y;\n-76}\n+45 using namespace ProjectionImplementation;\n+46 using std::get;\n+47\n+48 for (std::size_t i = 0; i < projection._\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(); ++i) {\n+49 const auto& local = projection._\be_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].local;\n+50 out << interpolate(local[0], get<0>(corners)) << \"\\n\"\n+51 << interpolate(local[1], get<1>(corners)) << \"\\n\";\n+52 }\n+53}\n+54\n+55template\n+_\b5_\b6void _\bw_\br_\bi_\bt_\be_\b__\be_\bd_\bg_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>&\n+projection, const Normals& normals, std::ostream& out)\n+57{\n+58 using namespace ProjectionImplementation;\n+59 using std::get;\n+60\n+61 for (std::size_t i = 0; i < projection._\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(); ++i) {\n+62 const auto& local = projection._\be_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].local;\n+63 const auto n0 = interpolate_unit_normals(local[0], get<0>(normals));\n+64 const auto n1 = interpolate_unit_normals(local[1], get<1>(normals));\n+65\n+66 out << n0 << \"\\n\"\n+67 << n1 << \"\\n\";\n+68 }\n+69}\n+70\n+71template\n+_\b7_\b2void _\bw_\br_\bi_\bt_\be_\b__\bs_\bu_\bc_\bc_\be_\bs_\bs(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection, std::ostream&\n+out)\n+73{\n+74 using std::get;\n+75\n+76 out << side << \"\\n\";\n 77\n-89template\n-90inline typename Normals::value_type\n-_\b9_\b1_\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be_\b__\bu_\bn_\bi_\bt_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs(const Coordinate& x, const Normals& normals)\n-92{\n-93 auto n = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(x, normals);\n-94 n /= n.two_norm();\n-95 return n;\n-96}\n-97\n-109template\n-110inline bool\n-_\b1_\b1_\b1_\bi_\bn_\bs_\bi_\bd_\be(const Coordinate& x, const Field& epsilon)\n-112{\n-113 const unsigned dim = Coordinate::dimension;\n-114 Field sum(0);\n-115 for (unsigned i = 0; i < dim-1; ++i) {\n-116 if (x[i] < -epsilon)\n-117 return false;\n-118 sum += x[i];\n-119 }\n-120 /* If any x\u00e1\u00b5\u00a2 is NaN, sum will be NaN and this comparison false! */\n-121 if (sum <= Field(1) + epsilon)\n-122 return true;\n-123 return false;\n-124}\n-125\n-126} /* namespace ProjectionImplementation */\n-127\n-128template\n-129Projection\n-_\b1_\b3_\b0::Projection(const _\bF_\bi_\be_\bl_\bd overlap, const _\bF_\bi_\be_\bl_\bd max_normal_product)\n-131 : m_overlap(overlap)\n-132 , m_max_normal_product(max_normal_product)\n-133{\n-134 /* Nothing. */\n-135}\n-136\n-137template\n-138void\n-139_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>\n-_\b1_\b4_\b0_\b:_\b:_\be_\bp_\bs_\bi_\bl_\bo_\bn(const _\bF_\bi_\be_\bl_\bd epsilon)\n-141{\n-142 m_epsilon = epsilon;\n-143}\n-144\n-145template\n-146template\n-147void\n-148_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>\n-149_\b:_\b:_\bd_\bo_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn(const std::tuple& corners, const std::\n-tuple& normals)\n-150{\n-151 /* Try to obtain \u00ce\u00a6(x\u00e1\u00b5\u00a2) for each corner x\u00e1\u00b5\u00a2 of the preimage triangle.\n-152 * This means solving a linear system of equations\n-153 * \u00ce\u00a6(x\u00e1\u00b5\u00a2) = (1-\u00ce\u00b1-\u00ce\u00b2) y\u00e2\u0082\u0080 + \u00ce\u00b1 y\u00e2\u0082\u0081 + \u00ce\u00b2 y\u00e2\u0082\u0082 = x\u00e1\u00b5\u00a2 + \u00ce\u00b4 n\u00e1\u00b5\u00a2\n-154 * or \u00ce\u00b1 (y\u00e2\u0082\u0081 - y\u00e2\u0082\u0080) + \u00ce\u00b2 (y\u00e2\u0082\u0082 - y\u00e2\u0082\u0080) - \u00ce\u00b4 n\u00e1\u00b5\u00a2 = x\u00e1\u00b5\u00a2 - y\u00e2\u0082\u0080\n-155 * to obtain the barycentric coordinates (\u00ce\u00b1, \u00ce\u00b2) of \u00ce\u00a6(x\u00e1\u00b5\u00a2) in the image\n-156 * triangle and the distance \u00ce\u00b4.\n-157 *\n-158 * In the matrix m corresponding to the system, only the third column and\n-the\n-159 * right-hand side depend on i. The first two columns can be assembled\n-before\n-160 * and reused.\n-161 */\n-162 using namespace ProjectionImplementation;\n-163 using std::get;\n-164 typedef Dune::FieldMatrix Matrix;\n-165 Matrix m;\n-166\n-167 const auto& origin = get<0>(corners);\n-168 const auto& origin_normals = get<0>(normals);\n-169 const auto& target = get<1>(corners);\n-170 const auto& target_normals = get<1>(normals);\n-171 auto& images = get<0>(m_images);\n-172 auto& success = get<0>(m_success);\n-173\n-174 /* directions\u00e1\u00b5\u00a2 = (y\u00e1\u00b5\u00a2 - y\u00e2\u0082\u0080) / ||y\u00e1\u00b5\u00a2 - y\u00e2\u0082\u0080||\n-175 * These are the first to columns of the system matrix; the rescaling is\n-done\n-176 * to ensure all columns have a comparable norm (the last has the normal\n-with norm 1.\n-177 */\n-178 std::array directions;\n-179 std::array scales;\n-180 /* estimator for the diameter of the target face */\n-181 Field scaleSum(0);\n-182 for (unsigned i = 0; i < dim-1; ++i) {\n-183 directions[i] = target[i+1] - target[0];\n-184 scales[i] = directions[i].infinity_norm();\n-185 directions[i] /= scales[i];\n-186 scaleSum += scales[i];\n-187 }\n-188\n-189 for (unsigned i = 0; i < dim-1; ++i) {\n-190 for (unsigned j = 0; j < dim; ++j) {\n-191 m[j][i] = directions[i][j];\n-192 }\n-193 }\n-194\n-195 m_projection_valid = true;\n-196 success.reset();\n-197\n-198 /* Now project x\u00e1\u00b5\u00a2 for each i */\n-199 for (unsigned i = 0; i < origin.size(); ++i) {\n-200 for (unsigned j = 0; j < dim; ++j)\n-201 m[j][dim-1] = origin_normals[i][j];\n-202\n-203 const Coordinate rhs = origin[i] - target[0];\n-204\n-205 try {\n-206 /* y = (\u00ce\u00b1, \u00ce\u00b2, \u00ce\u00b4) */\n-207 auto& y = images[i];\n-208 m.solve(y, rhs);\n-209 for (unsigned j = 0; j < dim-1; ++j)\n-210 y[j] /= scales[j];\n-211 /* Solving gave us -\u00ce\u00b4 as the term is \"-\u00ce\u00b4 n\u00e1\u00b5\u00a2\". */\n-212 y[dim-1] *= Field(-1);\n-213\n-214 /* If the forward projection is too far in the wrong direction\n-215 * then this might result in artificial inverse projections or\n-216 * edge intersections. To prevent these wrong cases but not\n-217 * dismiss feasible intersections, the projection is dismissed\n-218 * if the forward projection is further than two times the\n-219 * approximate diameter of the image triangle.\n-220 */\n-221 if(y[dim-1] < -2*scaleSum) {\n-222 success.set(i,false);\n-223 m_projection_valid = false;\n-224 return;\n-225 }\n-226\n-227 const bool feasible = projectionFeasible(origin[i], origin_normals[i], y,\n-target, target_normals);\n-228 success.set(i, feasible);\n-229 }\n-230 catch (const Dune::FMatrixError&) {\n-231 success.set(i, false);\n-232 m_projection_valid = false;\n-233 }\n-234 }\n-235}\n-236\n-237template\n-238template\n-239void\n-240Projection\n-241::doInverseProjection(const std::tuple& corners, const\n-std::tuple& normals)\n-242{\n-243 /* Try to obtain \u00ce\u00a6\u00e2\u0081\u00bb\u00c2\u00b9(y\u00e1\u00b5\u00a2) for each corner y\u00e1\u00b5\u00a2 of the image triangle.\n-244 * Instead of solving the problem directly (which would lead to\n-245 * non-linear equations), we make use of the forward projection \u00ce\u00a6\n-246 * which projects the preimage triangle on the plane spanned by the\n-247 * image triangle. The inverse projection is then given by finding\n-248 * the barycentric coordinates of y\u00e1\u00b5\u00a2 with respect to the triangle\n-249 * with the corners \u00ce\u00a6(x\u00e1\u00b5\u00a2). This way we only have to solve linear\n-250 * equations.\n-251 */\n-252\n-253 using namespace ProjectionImplementation;\n-254 using std::get;\n-255 typedef Dune::FieldMatrix Matrix;\n-256 typedef Dune::FieldVector Vector;\n-257\n-258 /* The inverse projection can only be computed if the forward projection\n-259 * managed to project all x\u00e1\u00b5\u00a2 on the plane spanned by the y\u00e1\u00b5\u00a2\n-260 */\n-261 if (!m_projection_valid) {\n-262 get<1>(m_success).reset();\n-263 return;\n-264 }\n-265\n-266 const auto& images = get<0>(m_images);\n-267 const auto& target_corners = get<1>(corners);\n-268 auto& preimages = get<1>(m_images);\n-269 auto& success = get<1>(m_success);\n-270\n-271 std::array v;\n-272 for (unsigned i = 0; i < dim-1; ++i) {\n-273 v[i] = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(images[i+1], target_corners);\n-274 v[i] -= _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(images[0], target_corners);\n-275 }\n-276\n-277 Matrix m;\n-278 for (unsigned i = 0; i < dim-1; ++i) {\n-279 for (unsigned j = 0; j < dim-1; ++j) {\n-280 m[i][j] = v[i]*v[j];\n-281 }\n-282 }\n-283\n-284 for (unsigned i = 0; i < dim; ++i) {\n-285 /* Convert y\u00e1\u00b5\u00a2 to barycentric coordinates with respect to \u00ce\u00a6(x\u00e2\u00b1\u00bc) */\n-286 v[dim-1] = target_corners[i];\n-287 v[dim-1] -= _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(images[0], target_corners);\n-288\n-289 Vector rhs, z;\n-290 for (unsigned j = 0; j < dim-1; ++j)\n-291 rhs[j] = v[dim-1]*v[j];\n-292 m.solve(z, rhs);\n-293\n-294 for (unsigned j = 0; j < dim-1; ++j)\n-295 preimages[i][j] = z[j];\n-296\n-297 /* Calculate distance along normal direction */\n-298 const auto x = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(z, get<0>(corners));\n-299 preimages[i][dim-1] = (x - target_corners[i]) * get<1>(normals)[i];\n-300\n-301 /* Check y_i lies inside the \u00ce\u00a6(x\u00e2\u00b1\u00bc) */\n-302 const bool feasible = projectionFeasible(target_corners[i], get<1>(normals)\n-[i], preimages[i], get<0>(corners), get<0>(normals));\n-303 success.set(i, feasible);\n-304 }\n-305}\n-306\n-307template\n-308template\n-309void\n-310Projection\n-311::doEdgeIntersection(const std::tuple& corners, const\n-std::tuple& normals)\n-312{\n-313 using namespace ProjectionImplementation;\n-314 using std::get;\n-315\n-316 m_number_of_edge_intersections = 0;\n-317\n-318 /* There are no edge intersections for 2d, only for 3d */\n-319 if (dim != 3)\n-320 return;\n-321\n-322 /* There are no edge intersections\n-323 * - when the projection is invalid,\n-324 * - when the projected triangle lies fully in the target triangle,\n-325 * - or when the target triangle lies fully in the projected triangle.\n-326 */\n-327 if (!m_projection_valid || get<0>(m_success).all() || get<1>(m_success).all\n-()) {\n-328 return;\n-329 }\n-330\n-331 const auto& images = get<0>(m_images);\n-332 const auto& ys = get<1>(corners);\n-333\n-334 /* Intersect line through \u00ce\u00a6(x\u00e1\u00b5\u00a2), \u00ce\u00a6(x\u00e2\u00b1\u00bc) with line through y\u00e2\u0082\u0096, y\u00e2\u0082\u0097:\n-335 We want \u00ce\u00b1, \u00ce\u00b2 \u00e2\u0088\u0088 \u00e2\u0084\u009d such that\n-336 \u00ce\u00a6(x\u00e1\u00b5\u00a2) + \u00ce\u00b1 (\u00ce\u00a6(x\u00e2\u00b1\u00bc) - \u00ce\u00a6(x\u00e1\u00b5\u00a2)) = y\u00e2\u0082\u0096 + \u00ce\u00b2 (y\u00e2\u0082\u0097 - y\u00e2\u0082\u0096)\n-337 or\n-338 \u00ce\u00b1 (\u00ce\u00a6(x\u00e2\u00b1\u00bc)-\u00ce\u00a6(x\u00e1\u00b5\u00a2)) + \u00ce\u00b2 (y\u00e2\u0082\u0097-y\u00e2\u0082\u0096) = y\u00e2\u0082\u0096-\u00ce\u00a6(x\u00e1\u00b5\u00a2)\n-339 To get a 2\u00c3\u00972 system of equations, multiply with y\u00e2\u0082\u0098-y\u00e2\u0082\u0080 for\n-340 m \u00e2\u0088\u0088 {1,\u00cc\u00a3\u00cc\u00a32} which are linear indep. (and so the system is\n-341 equivalent to the original 3\u00c3\u00972 system)\n-342 */\n-343 for (unsigned edgex = 0; edgex < dim; ++edgex) {\n-344 unsigned i, j;\n-345 std::tie(i, j) = _\be_\bd_\bg_\be_\bT_\bo_\bC_\bo_\br_\bn_\be_\br_\bs(edgex);\n-346\n-347 /* Both sides of edgex lie in the target triangle means no edge\n-intersection */\n-348 if (get<0>(m_success)[i] && get<0>(m_success)[j])\n-349 continue;\n-350\n-351 const auto pxi = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(images[i], ys);\n-352 const auto pxj = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(images[j], ys);\n-353 const auto pxjpxi = pxj - pxi;\n-354\n-355 typedef Dune::FieldMatrix Matrix;\n-356 typedef Dune::FieldVector Vector;\n-357\n-358 for (unsigned edgey = 0; edgey < dim; ++edgey) {\n-359 unsigned k, l;\n-360 std::tie(k, l) = _\be_\bd_\bg_\be_\bT_\bo_\bC_\bo_\br_\bn_\be_\br_\bs(edgey);\n-361\n-362 /* Both sides of edgey lie in the projected triangle means no edge\n-intersection */\n-363 if (get<1>(m_success)[k] && get<1>(m_success)[l])\n-364 continue;\n-365\n-366 const auto ykyl = ys[k] - ys[l];\n-367 const auto ykpxi = ys[k] - pxi;\n-368\n-369 /* If edges are parallel then the intersection is already computed by\n-vertex projections. */\n-370 bool parallel = true;\n-371 for (unsigned h=0; h<3; h++)\n-372 parallel &= std::abs(ykyl[(h+1)%3]*pxjpxi[(h+2)%3] - ykyl[(h+2)%3]*pxjpxi[\n-(h+1)%3])<1e-14;\n-373 if (parallel)\n-374 continue;\n-375\n-376 Matrix mat;\n-377 Vector rhs, z;\n-378\n-379 for (unsigned m = 0; m < dim-1; ++m) {\n-380 const auto ym1y0 = ys[m+1] - ys[0];\n-381 mat[m][0] = pxjpxi * ym1y0;\n-382 mat[m][1] = ykyl * ym1y0;\n-383 rhs[m] = ykpxi * ym1y0;\n-384 }\n-385\n-386 try {\n-387 using std::isfinite;\n-388\n-389 mat.solve(z, rhs);\n-390\n-391 /* If solving the system gives a NaN, the edges are probably parallel. */\n-392 if (!isfinite(z[0]) || !isfinite(z[1]))\n-393 continue;\n-394\n-395 /* Filter out corner (pre)images. We only want \"real\" edge-edge\n-intersections here. */\n-396 if (z[0] < m_epsilon || z[0] > Field(1) - m_epsilon\n-397 || z[1] < m_epsilon || z[1] > Field(1) - m_epsilon)\n-398 continue;\n-399\n-400 Coordinate local_x = corner(i);\n-401 local_x.axpy(z[0], corner(j) - corner\n-(i));\n-402 Coordinate local_y = corner(k);\n-403 local_y.axpy(z[1], corner(l) - corner\n-(k));\n-404\n-405 /* Make sure the intersection is in the triangle. */\n-406 if (!_\bi_\bn_\bs_\bi_\bd_\be(local_x, m_epsilon) || !_\bi_\bn_\bs_\bi_\bd_\be(local_y, m_epsilon))\n-407 continue;\n-408\n-409 /* Make sure the intersection respects overlap. */\n-410 auto xy = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(local_x, get<0>(corners));\n-411 xy -= _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(local_y, get<1>(corners));\n-412 const auto nx = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be_\b__\bu_\bn_\bi_\bt_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs(local_x, get<0>(normals));\n-413 const auto ny = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be_\b__\bu_\bn_\bi_\bt_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs(local_y, get<1>(normals));\n-414 local_x[dim-1] = -(xy*nx);\n-415 local_y[dim-1] = xy*ny;\n-416\n-417 if (local_x[dim-1] < -m_overlap-m_epsilon || local_y[dim-1] < -m_overlap-\n-m_epsilon)\n-418 continue;\n-419\n-420 /* Normals should be opposing. */\n-421 if (nx*ny > m_max_normal_product + m_epsilon)\n-422 continue;\n-423\n-424 /* Intersection is feasible. Store it. */\n-425 auto& intersection = m_edge_intersections\n-[m_number_of_edge_intersections++];\n-426 intersection = { {{edgex, edgey}}, {{local_x, local_y}} };\n-427 }\n-428 catch(const Dune::FMatrixError&) {\n-429 /* Edges might be parallel, ignore and continue with next edge */\n-430 }\n-431 }\n-432 }\n-433}\n-434\n-435template\n-436template\n-437bool Projection\n-438::projectionFeasible(const Coordinate& x, const Coordinate& nx, const\n-Coordinate& px, const Corners& corners, const Normals& normals) const\n-439{\n-440 using namespace ProjectionImplementation;\n-441\n-442 /* Image must be within simplex. */\n-443 if (!_\bi_\bn_\bs_\bi_\bd_\be(px, m_epsilon))\n-444 return false;\n-445\n-446 /* Distance along normal must not be smaller than -overlap. */\n-447 if (px[dim-1] < -m_overlap-m_epsilon)\n-448 return false;\n-449\n-450 /* Distance along normal at image must not be smaller than -overlap. */\n-451 auto xmy = x;\n-452 xmy -= _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be(px, corners);\n-453 const auto n = _\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be_\b__\bu_\bn_\bi_\bt_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs(px, normals);\n-454 const auto d = xmy * n;\n-455 if (d < -m_overlap-m_epsilon)\n-456 return false;\n-457\n-458 /* Normals at x and \u00ce\u00a6(x) are opposing. */\n-459 if (nx * n > m_max_normal_product + m_epsilon)\n-460 return false;\n-461\n-462 /* Okay, projection is feasible. */\n-463 return true;\n-464}\n-465\n-466template\n-467template\n-468void Projection\n-_\b4_\b6_\b9::project(const std::tuple& corners, const std::\n-tuple& normals)\n-470{\n-471 doProjection(corners, normals);\n-472 doInverseProjection(corners, normals);\n-473 doEdgeIntersection(corners, normals);\n-474}\n-475\n-476} /* namespace GridGlue */\n-477} /* namespace Dune */\n+78 const auto& success = get(projection._\bs_\bu_\bc_\bc_\be_\bs_\bs());\n+79 for (std::size_t i = 0; i < success.size(); ++i)\n+80 out << (success[i] ? \"1\\n\" : \"0\\n\");\n+81}\n+82\n+83} /* namespace ProjectionWriterImplementation */\n+84\n+85template\n+_\b8_\b6void _\bw_\br_\bi_\bt_\be(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection,\n+87 const Corners& corners,\n+88 const Normals& normals,\n+89 std::ostream& out)\n+90{\n+91 using namespace ProjectionWriterImplementation;\n+92\n+93 const auto numberOfEdgeIntersections = projection._\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+();\n+94 const auto nPoints = 12 + 2 * numberOfEdgeIntersections;\n+95\n+96 out << \"# vtk DataFile Version2.0\\n\"\n+97 << \"Filename: projection\\n\"\n+98 << \"ASCII\\n\"\n+99 << \"DATASET UNSTRUCTURED_GRID\\n\"\n+100 << \"POINTS \" << nPoints << \" double\\n\";\n+101 write_points<0>(projection, corners, out);\n+102 write_points<1>(projection, corners, out);\n+103 write_edge_intersection_points(projection, corners, out);\n+104 out << \"CELLS \" << (8 + numberOfEdgeIntersections) << \" \" << (26 + 3 *\n+numberOfEdgeIntersections) << \"\\n\";\n+105 out << \"3 0 1 2\\n\" \"2 0 3\\n\" \"2 1 4\\n\" \"2 2 5\\n\"\n+106 << \"3 6 7 8\\n\" \"2 6 9\\n\" \"2 7 10\\n\" \"2 8 11\\n\";\n+107 for (std::size_t i = 0; i < numberOfEdgeIntersections; ++i)\n+108 out << \"2 \" << (12 + 2*i) << \" \" << (12 + 2*i + 1) << \"\\n\";\n+109 out << \"CELL_TYPES \" << (8 + numberOfEdgeIntersections) << \"\\n\"\n+\"5\\n3\\n3\\n3\\n\" \"5\\n3\\n3\\n3\\n\";\n+110 for (std::size_t i = 0; i < numberOfEdgeIntersections; ++i)\n+111 out << \"3\\n\";\n+112 out << \"CELL_DATA \" << (8 + numberOfEdgeIntersections) << \"\\n\";\n+113 out << \"SCALARS success int 1\\n\"\n+114 << \"LOOKUP_TABLE success\\n\";\n+115 write_success<0>(projection, out);\n+116 write_success<1>(projection, out);\n+117 for (std::size_t i = 0; i < numberOfEdgeIntersections; ++i)\n+118 out << \"2\\n\";\n+119 out << \"LOOKUP_TABLE success 2\\n\"\n+120 << \"1.0 0.0 0.0 1.0\\n\"\n+121 << \"0.0 1.0 0.0 1.0\\n\";\n+122 out << \"POINT_DATA \" << nPoints << \"\\n\"\n+123 << \"NORMALS normals double\\n\";\n+124 write_normals<0>(projection, normals, out);\n+125 write_normals<1>(projection, normals, out);\n+126 write_edge_intersection_normals(projection, normals, out);\n+127}\n+128\n+129template\n+_\b1_\b3_\b0void _\bw_\br_\bi_\bt_\be(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection,\n+131 const Corners& corners,\n+132 const Normals& normals,\n+133 const std::string& filename)\n+134{\n+135 std::ofstream out(filename.c_str());\n+136 _\bw_\br_\bi_\bt_\be(projection, corners, normals, out);\n+137}\n+138\n+139template\n+_\b1_\b4_\b0void _\bp_\br_\bi_\bn_\bt(const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b>& projection,\n+141 const Corners& corners,\n+142 const Normals& normals)\n+143{\n+144 using namespace ProjectionWriterImplementation;\n+145\n+146 std::cout << \"Side 0 corners and images:\\n\";\n+147 write_points<0>(projection, corners, std::cout);\n+148 std::cout << \"Side 0 success:\\n\";\n+149 write_success<0>(projection, std::cout);\n+150 std::cout << \"Side 1 corners and images:\\n\";\n+151 write_points<1>(projection, corners, std::cout);\n+152 std::cout << \"Side 1 success:\\n\";\n+153 write_success<1>(projection, std::cout);\n+154 std::cout << \"Side 0 normals and projected normals:\\n\";\n+155 write_normals<0>(projection, normals, std::cout);\n+156 std::cout << \"Side 1 normals and projected normals:\\n\";\n+157 write_normals<1>(projection, normals, std::cout);\n+158 std::cout << projection._\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs() << \" edge\n+intersections:\\n\";\n+159 write_edge_intersection_points(projection, corners, std::cout);\n+160}\n+161\n+162} /* namespace GridGlue */\n+163} /* namespace Dune */\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be\n-Corners::value_type interpolate(const Coordinate &x, const Corners &corners)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:70\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bs_\bi_\bd_\be\n-bool inside(const Coordinate &x, const Field &epsilon)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:111\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bd_\bg_\be_\bT_\bo_\bC_\bo_\br_\bn_\be_\br_\bs\n-std::pair< unsigned, unsigned > edgeToCorners(unsigned edge)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:43\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\br_\bn_\be_\br\n-Coordinate corner(unsigned c)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:24\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bn_\bt_\be_\br_\bp_\bo_\bl_\ba_\bt_\be_\b__\bu_\bn_\bi_\bt_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs\n-Normals::value_type interpolate_unit_normals(const Coordinate &x, const Normals\n-&normals)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:91\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be\n+void write(const Projection< Coordinate > &projection, const Corners &corners,\n+const Normals &normals, std::ostream &out)\n+write projection in VTK format\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:86\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt\n+void print(const Projection< Coordinate > &projection, const Corners &corners,\n+const Normals &normals)\n+Print information about the projection to std::cout stream.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:140\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs\n+void write_normals(const Projection< Coordinate > &projection, const Normals\n+&normals, std::ostream &out)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:27\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bp_\bo_\bi_\bn_\bt_\bs\n+void write_points(const Projection< Coordinate > &projection, const Corners\n+&corners, std::ostream &out)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:11\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bs_\bu_\bc_\bc_\be_\bs_\bs\n+void write_success(const Projection< Coordinate > &projection, std::ostream\n+&out)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:72\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\be_\bd_\bg_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b__\bp_\bo_\bi_\bn_\bt_\bs\n+void write_edge_intersection_points(const Projection< Coordinate > &projection,\n+const Corners &corners, std::ostream &out)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:43\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\be_\bd_\bg_\be_\b__\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b__\bn_\bo_\br_\bm_\ba_\bl_\bs\n+void write_edge_intersection_normals(const Projection< Coordinate >\n+&projection, const Normals &normals, std::ostream &out)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:56\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn\n Projection of a line (triangle) on another line (triangle).\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:21\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bF_\bi_\be_\bl_\bd\n-Coordinate::field_type Field\n-Scalar type.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:61\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bs_\bu_\bc_\bc_\be_\bs_\bs\n+const std::tuple< std::bitset< dim >, std::bitset< dim > > & success() const\n+Indicate whether projection (inverse projection) is valid for each corner or\n+not.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:252\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+unsigned numberOfEdgeIntersections() const\n+Number of edge intersections.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:262\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bm_\ba_\bg_\be_\bs\n+const std::tuple< Images, Preimages > & images() const\n+Images and preimages of corners.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:235\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+const std::array< EdgeIntersection, maxEdgeIntersections > & edgeIntersections\n+() const\n+Edge-edge intersections.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:273\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: ringcomm.hh File Reference\n+dune-grid-glue: projectionwriter.hh File Reference\n \n \n \n \n \n \n \n@@ -71,77 +71,47 @@\n \n \n \n
    \n \n-
    ringcomm.hh File Reference
    \n+
    projectionwriter.hh File Reference
    \n
    \n
    \n-
    #include <mpi.h>
    \n-#include <functional>
    \n-#include <utility>
    \n-#include <dune/common/fvector.hh>
    \n-#include <dune/common/hybridutilities.hh>
    \n-#include <dune/geometry/type.hh>
    \n+
    #include <iostream>
    \n+#include <string>
    \n+#include <dune/grid-glue/common/projection.hh>
    \n+#include "projectionwriter_impl.hh"
    \n
    \n

    Go to the source code of this file.

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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::Parallel
    namespace  Dune::GridGlue
     
    \n-\n-\n-\n-

    \n-Macros

    #define CheckMPIStatus(A, B)   {}
     
    \n \n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n

    \n Functions

    template<typename OP , typename... Args>
    void Dune::Parallel::MPI_AllApply (MPI_Comm mpicomm, OP &&op, const Args &... data)
     apply an operator locally to a difstributed data set
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::write (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, std::ostream &out)
     write projection in VTK format
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::write (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, const std::string &filename)
     write projection in VTK format
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::print (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals)
     Print information about the projection to std::cout stream.
     
    \n-

    Macro Definition Documentation

    \n-\n-

    ◆ CheckMPIStatus

    \n-\n-
    \n-
    \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n-
    #define CheckMPIStatus( A,
     
    )   {}
    \n-
    \n-
    Todo:
    Implement MPI Status check with exception handling
    \n-\n-
    \n-
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,39 +1,37 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-ringcomm.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n+projectionwriter.hh File Reference\n+#include \n+#include \n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n-namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bP_\ba_\br_\ba_\bl_\bl_\be_\bl\n-\u00a0\n-M\bMa\bac\bcr\bro\bos\bs\n-#define\u00a0 _\bC_\bh_\be_\bc_\bk_\bM_\bP_\bI_\bS_\bt_\ba_\bt_\bu_\bs(A, B)\u00a0\u00a0\u00a0{}\n+namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bP_\ba_\br_\ba_\bl_\bl_\be_\bl_\b:_\b:_\bM_\bP_\bI_\b__\bA_\bl_\bl_\bA_\bp_\bp_\bl_\by (MPI_Comm mpicomm, OP &&op, const Args &...\n- data)\n-\u00a0 apply an operator locally to a difstributed data set\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n+ Corners &corners, const Normals &normals, std::ostream &out)\n+\u00a0 write projection in VTK format\n+\u00a0\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n+ Corners &corners, const Normals &normals, const std::string &filename)\n+\u00a0 write projection in VTK format\n+\u00a0\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n+ Corners &corners, const Normals &normals)\n+\u00a0 Print information about the projection to std::cout stream.\n \u00a0\n-*\b**\b**\b**\b**\b* M\bMa\bac\bcr\bro\bo D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn D\bDo\boc\bcu\bum\bme\ben\bnt\bta\bat\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0C\bCh\bhe\bec\bck\bkM\bMP\bPI\bIS\bSt\bta\bat\btu\bus\bs *\b**\b**\b**\b**\b*\n-#define CheckMPIStatus ( \u00a0 A,\n- \u00a0 B\u00a0\n- ) \u00a0\u00a0\u00a0{}\n- _\bT\bT_\bo\bo_\bd\bd_\bo\bo_\b:\b:\n- Implement MPI Status check with exception handling\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: ringcomm.hh Source File\n+dune-grid-glue: projectionwriter.hh Source File\n \n \n \n \n \n \n \n@@ -74,309 +74,57 @@\n \n \n
    \n
    \n-
    ringcomm.hh
    \n+
    projectionwriter.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n-
    2// vi: set et ts=4 sw=2 sts=2:
    \n-
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n-
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    5/* IMPLEMENTATION OF CLASS G R I D G L U E */
    \n-
    6
    \n-
    8#define CheckMPIStatus(A,B) {}
    \n-
    9
    \n-
    10#include <mpi.h>
    \n-
    11#include <functional>
    \n-
    12#include <utility>
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n+
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+
    3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH
    \n+
    4#define DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH
    \n+
    5
    \n+
    6#include <iostream>
    \n+
    7#include <string>
    \n+
    8
    \n+\n+
    10
    \n+
    11namespace Dune {
    \n+
    12namespace GridGlue {
    \n
    13
    \n-
    14#include <dune/common/fvector.hh>
    \n-
    15#include <dune/common/hybridutilities.hh>
    \n-
    16
    \n-
    17#include <dune/geometry/type.hh>
    \n-
    18
    \n-
    19namespace Dune {
    \n-
    \n-
    20namespace Parallel {
    \n-
    21
    \n-
    22 namespace Impl {
    \n-
    23
    \n-
    25 template<typename T>
    \n-
    26 struct MPITypeInfo {};
    \n-
    27
    \n-
    28 template<>
    \n-
    29 struct MPITypeInfo< int >
    \n-
    30 {
    \n-
    31 static const unsigned int size = 1;
    \n-
    32 static inline MPI_Datatype getType()
    \n-
    33 {
    \n-
    34 return MPI_INT;
    \n-
    35 }
    \n-
    36 };
    \n-
    37
    \n-
    38 template<typename K, int N>
    \n-
    39 struct MPITypeInfo< Dune::FieldVector<K,N> >
    \n-
    40 {
    \n-
    41 static const unsigned int size = N;
    \n-
    42 static inline MPI_Datatype getType()
    \n-
    43 {
    \n-
    44 return Dune::MPITraits<K>::getType();
    \n-
    45 }
    \n-
    46 };
    \n-
    47
    \n-
    48 template<>
    \n-
    49 struct MPITypeInfo< unsigned int >
    \n-
    50 {
    \n-
    51 static const unsigned int size = 1;
    \n-
    52 static inline MPI_Datatype getType()
    \n-
    53 {
    \n-
    54 return MPI_UNSIGNED;
    \n-
    55 }
    \n-
    56 };
    \n-
    57
    \n-
    58 template<>
    \n-
    59 struct MPITypeInfo< Dune::GeometryType >
    \n-
    60 {
    \n-
    61 static const unsigned int size = 1;
    \n-
    62 static inline MPI_Datatype getType()
    \n-
    63 {
    \n-
    64 return Dune::MPITraits< Dune::GeometryType >::getType();
    \n-
    65 }
    \n-
    66 };
    \n-
    67
    \n-
    68 template<typename T>
    \n-
    69 void MPI_SetVectorSize(
    \n-
    70 std::vector<T> & data,
    \n-
    71 MPI_Status & status)
    \n-
    72 {
    \n-
    73 typedef MPITypeInfo<T> Info;
    \n-
    74 int sz;
    \n-
    75 MPI_Get_count(&status, Info::getType(), &sz);
    \n-
    76 assert(sz%Info::size == 0);
    \n-
    77 data.resize(sz/Info::size);
    \n-
    78 }
    \n-
    79
    \n-
    89 template<typename T>
    \n-
    90 void MPI_SendVectorInRing(
    \n-
    91 std::vector<T> & data,
    \n-
    92 std::vector<T> & next,
    \n-
    93 int tag,
    \n-
    94 int rightrank,
    \n-
    95 int leftrank,
    \n-
    96 MPI_Comm comm,
    \n-
    97 MPI_Request& r_send,
    \n-
    98 MPI_Request& r_recv
    \n-
    99 )
    \n-
    100 {
    \n-
    101 // mpi status stuff
    \n-
    102 [[maybe_unused]] int result = 0;
    \n-
    103 typedef MPITypeInfo<T> Info;
    \n-
    104 // resize next buffer to maximum size
    \n-
    105 next.resize(next.capacity());
    \n-
    106 // send data (explicitly send data.size elements)
    \n-
    107 result =
    \n-
    108 MPI_Isend(
    \n-
    109 &(data[0]), Info::size*data.size(), Info::getType(), rightrank, tag,
    \n-
    110 comm, &r_send);
    \n-
    111 // receive up to maximum size. The acutal size is stored in the status
    \n-
    112 result =
    \n-
    113 MPI_Irecv(
    \n-
    114 &(next[0]), Info::size*next.size(), Info::getType(), leftrank, tag,
    \n-
    115 comm, &r_recv);
    \n-
    116 // // check result
    \n-
    117 // MPI_Status status;
    \n-
    118 // CheckMPIStatus(result, status);
    \n-
    119 }
    \n-
    120
    \n-
    121 template<typename T>
    \n-
    122 using ptr_t = T*;
    \n-
    123
    \n-
    124 /* these helper structs are needed as long as we still support
    \n-
    125 C++11, as we can't use variadic lambdas */
    \n-
    126 template<typename... Args>
    \n-
    127 struct call_MPI_SendVectorInRing
    \n-
    128 {
    \n-
    129 std::tuple<Args...> & remotedata;
    \n-
    130 std::tuple<Args...> & nextdata;
    \n-
    131 int & tag;
    \n-
    132 int & rightrank;
    \n-
    133 int & leftrank;
    \n-
    134 MPI_Comm & mpicomm;
    \n-
    135 std::array<MPI_Request,sizeof...(Args)> & requests_send;
    \n-
    136 std::array<MPI_Request,sizeof...(Args)> & requests_recv;
    \n-
    137
    \n-
    138 template<typename I>
    \n-
    139 void operator()(I i)
    \n-
    140 {
    \n-
    141 MPI_SendVectorInRing(
    \n-
    142 std::get<i>(remotedata),
    \n-
    143 std::get<i>(nextdata),
    \n-
    144 tag+i,
    \n-
    145 rightrank, leftrank, mpicomm,
    \n-
    146 requests_send[i],
    \n-
    147 requests_recv[i]);
    \n-
    148 }
    \n-
    149 };
    \n-
    150 template<typename... Args>
    \n-
    151 struct call_MPI_SetVectorSize
    \n-
    152 {
    \n-
    153 std::tuple<Args...> & nextdata;
    \n-
    154 std::array<MPI_Status,sizeof...(Args)> & status_recv;
    \n-
    155
    \n-
    156 template<typename I>
    \n-
    157 void operator()(I i)
    \n-
    158 {
    \n-
    159 MPI_SetVectorSize(std::get<i>(nextdata),status_recv[i]);
    \n-
    160 }
    \n-
    161 };
    \n-
    162
    \n-
    163 template<typename OP, std::size_t... Indices, typename... Args>
    \n-
    164 void MPI_AllApply_impl(MPI_Comm mpicomm,
    \n-
    165 OP && op,
    \n-
    166 std::index_sequence<Indices...> indices,
    \n-
    167 const Args&... data)
    \n-
    168 {
    \n-
    169 constexpr std::size_t N = sizeof...(Args);
    \n-
    170 int myrank = 0;
    \n-
    171 int commsize = 0;
    \n-
    172#if HAVE_MPI
    \n-
    173 MPI_Comm_rank(mpicomm, &myrank);
    \n-
    174 MPI_Comm_size(mpicomm, &commsize);
    \n-
    175#endif // HAVE_MPI
    \n-
    176
    \n-
    177 if (commsize > 1)
    \n-
    178 {
    \n-
    179#ifdef DEBUG_GRIDGLUE_PARALLELMERGE
    \n-
    180 std::cout << myrank << " Start Communication, size " << commsize << std::endl;
    \n-
    181#endif
    \n-
    182
    \n-
    183 // get data sizes
    \n-
    184 std::array<unsigned int, N> size({ ((unsigned int)data.size())... });
    \n-
    185
    \n-
    186 // communicate max data size
    \n-
    187 std::array<unsigned int, N> maxSize;
    \n-
    188 MPI_Allreduce(&size, &maxSize,
    \n-
    189 size.size(), MPI_UNSIGNED, MPI_MAX, mpicomm);
    \n-
    190#ifdef DEBUG_GRIDGLUE_PARALLELMERGE
    \n-
    191 std::cout << myrank << " maxSize " << "done... " << std::endl;
    \n-
    192#endif
    \n-
    193
    \n-
    194 // allocate receiving buffers with maxsize to ensure sufficient buffer size for communication
    \n-
    195 std::tuple<Args...> remotedata { Args(maxSize[Indices])... };
    \n-
    196
    \n-
    197 // copy local data to receiving buffer
    \n-
    198 remotedata = std::tie(data...);
    \n-
    199
    \n-
    200 // allocate second set of receiving buffers necessary for async communication
    \n-
    201 std::tuple<Args...> nextdata { Args(maxSize[Indices])... };
    \n-
    202
    \n-
    203 // communicate data in the ring
    \n-
    204 int rightrank = (myrank + 1 + commsize) % commsize;
    \n-
    205 int leftrank = (myrank - 1 + commsize) % commsize;
    \n-
    206
    \n-
    207 std::cout << myrank << ": size = " << commsize << std::endl;
    \n-
    208 std::cout << myrank << ": left = " << leftrank
    \n-
    209 << " right = " << rightrank << std::endl;
    \n-
    210
    \n-
    211 // currently the remote data is our own data
    \n-
    212 int remoterank = myrank;
    \n-
    213
    \n-
    214 for (int i=1; i<commsize; i++)
    \n-
    215 {
    \n-
    216 // in this iteration we will receive data from nextrank
    \n-
    217 int nextrank = (myrank - i + commsize) % commsize;
    \n-
    218
    \n-
    219 std::cout << myrank << ": next = " << nextrank << std::endl;
    \n-
    220
    \n-
    221 // send remote data to right neighbor and receive from left neighbor
    \n-
    222 std::array<MPI_Request,N> requests_send;
    \n-
    223 std::array<MPI_Request,N> requests_recv;
    \n-
    224
    \n-
    225 int tag = 0;
    \n-
    226 Dune::Hybrid::forEach(indices,
    \n-
    227 // [&](auto i){
    \n-
    228 // MPI_SendVectorInRing(
    \n-
    229 // std::get<i>(remotedata),
    \n-
    230 // std::get<i>(nextdata),
    \n-
    231 // tag+i,
    \n-
    232 // rightrank, leftrank, mpicomm,
    \n-
    233 // requests_send[i],
    \n-
    234 // requests_recv[i]);
    \n-
    235 // });
    \n-
    236 call_MPI_SendVectorInRing<Args...>({
    \n-
    237 remotedata,
    \n-
    238 nextdata,
    \n-
    239 tag,
    \n-
    240 rightrank, leftrank, mpicomm,
    \n-
    241 requests_send,
    \n-
    242 requests_recv
    \n-
    243 }));
    \n-
    244
    \n-
    245 // apply operator
    \n-
    246 op(remoterank,std::get<Indices>(remotedata)...);
    \n-
    247
    \n-
    248 // wait for communication to finalize
    \n-
    249 std::array<MPI_Status,N> status_send;
    \n-
    250 std::array<MPI_Status,N> status_recv;
    \n-
    251 MPI_Waitall(N,&requests_recv[0],&status_recv[0]);
    \n-
    252
    \n-
    253 // we finished receiving from nextrank and thus remoterank = nextrank
    \n-
    254 remoterank = nextrank;
    \n-
    255
    \n-
    256 // get current data sizes
    \n-
    257 // and resize vectors
    \n-
    258 Dune::Hybrid::forEach(indices,
    \n-
    259 // [&](auto i){
    \n-
    260 // MPI_SetVectorSize(std::get<i>(nextdata),status_recv[i]);
    \n-
    261 // });
    \n-
    262 call_MPI_SetVectorSize<Args...>({
    \n-
    263 nextdata, status_recv
    \n-
    264 }));
    \n-
    265
    \n-
    266 MPI_Waitall(N,&requests_send[0],&status_send[0]);
    \n-
    267
    \n-
    268 // swap the communication buffers
    \n-
    269 std::swap(remotedata,nextdata);
    \n-
    270 }
    \n-
    271
    \n-
    272 // last apply (or the only one in the case of sequential application)
    \n-
    273 op(remoterank,std::get<Indices>(remotedata)...);
    \n-
    274 }
    \n-
    275 else // sequential
    \n-
    276 {
    \n-
    277 op(myrank,data...);
    \n-
    278 }
    \n-
    279 }
    \n-
    280
    \n-
    281 } // end namespace Impl
    \n-
    282
    \n-
    296template<typename OP, typename... Args>
    \n-
    \n-
    297void MPI_AllApply(MPI_Comm mpicomm,
    \n-
    298 OP && op,
    \n-
    299 const Args& ... data)
    \n-
    300{
    \n-
    301 Impl::MPI_AllApply_impl(
    \n-
    302 mpicomm,
    \n-
    303 std::forward<OP>(op),
    \n-
    304 std::make_index_sequence<sizeof...(Args)>(),
    \n-
    305 data...
    \n-
    306 );
    \n-
    307}
    \n-
    \n-
    308
    \n-
    309} // end namespace Parallel
    \n-
    \n-
    310} // end namespace Dune
    \n+
    28template<typename Coordinate, typename Corners, typename Normals>
    \n+
    29void write(const Projection<Coordinate>& projection,
    \n+
    30 const Corners& corners,
    \n+
    31 const Normals& normals,
    \n+
    32 std::ostream& out);
    \n+
    33
    \n+
    40template<typename Coordinate, typename Corners, typename Normals>
    \n+
    41void write(const Projection<Coordinate>& projection,
    \n+
    42 const Corners& corners,
    \n+
    43 const Normals& normals,
    \n+
    44 const std::string& filename);
    \n+
    54template<typename Coordinate, typename Corners, typename Normals>
    \n+
    55void print(const Projection<Coordinate>& projection,
    \n+
    56 const Corners& corners,
    \n+
    57 const Normals& normals);
    \n+
    58
    \n+
    59} /* namespace GridGlue */
    \n+
    60} /* namespace Dune */
    \n+
    61
    \n+\n+
    63
    \n+
    64#endif
    \n+\n+\n
    Definition gridglue.hh:37
    \n-
    void MPI_AllApply(MPI_Comm mpicomm, OP &&op, const Args &... data)
    apply an operator locally to a difstributed data set
    Definition ringcomm.hh:297
    \n+
    void write(const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, std::ostream &out)
    write projection in VTK format
    Definition projectionwriter_impl.hh:86
    \n+
    void print(const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals)
    Print information about the projection to std::cout stream.
    Definition projectionwriter_impl.hh:140
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,308 +1,62 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-ringcomm.hh\n+projectionwriter.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n-2// vi: set et ts=4 sw=2 sts=2:\n-3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n+1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n-4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n+2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-5/* IMPLEMENTATION OF CLASS G R I D G L U E */\n-6\n-_\b8#define CheckMPIStatus(A,B) {}\n-9\n-10#include \n-11#include \n-12#include \n+3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH\n+4#define DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH\n+5\n+6#include \n+7#include \n+8\n+9#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+10\n+11namespace _\bD_\bu_\bn_\be {\n+12namespace GridGlue {\n 13\n-14#include \n-15#include \n-16\n-17#include \n-18\n-19namespace _\bD_\bu_\bn_\be {\n-_\b2_\b0namespace Parallel {\n-21\n-22 namespace Impl {\n-23\n-25 template\n-26 struct MPITypeInfo {};\n-27\n-28 template<>\n-29 struct MPITypeInfo< int >\n-30 {\n-31 static const unsigned int size = 1;\n-32 static inline MPI_Datatype getType()\n-33 {\n-34 return MPI_INT;\n-35 }\n-36 };\n-37\n-38 template\n-39 struct MPITypeInfo< _\bD_\bu_\bn_\be::FieldVector >\n-40 {\n-41 static const unsigned int size = N;\n-42 static inline MPI_Datatype getType()\n-43 {\n-44 return Dune::MPITraits::getType();\n-45 }\n-46 };\n-47\n-48 template<>\n-49 struct MPITypeInfo< unsigned int >\n-50 {\n-51 static const unsigned int size = 1;\n-52 static inline MPI_Datatype getType()\n-53 {\n-54 return MPI_UNSIGNED;\n-55 }\n-56 };\n-57\n-58 template<>\n-59 struct MPITypeInfo< _\bD_\bu_\bn_\be::GeometryType >\n-60 {\n-61 static const unsigned int size = 1;\n-62 static inline MPI_Datatype getType()\n-63 {\n-64 return Dune::MPITraits< Dune::GeometryType >::getType();\n-65 }\n-66 };\n-67\n-68 template\n-69 void MPI_SetVectorSize(\n-70 std::vector & data,\n-71 MPI_Status & status)\n-72 {\n-73 typedef MPITypeInfo Info;\n-74 int sz;\n-75 MPI_Get_count(&status, Info::getType(), &sz);\n-76 assert(sz%Info::size == 0);\n-77 data.resize(sz/Info::size);\n-78 }\n-79\n-89 template\n-90 void MPI_SendVectorInRing(\n-91 std::vector & data,\n-92 std::vector & next,\n-93 int tag,\n-94 int rightrank,\n-95 int leftrank,\n-96 MPI_Comm comm,\n-97 MPI_Request& r_send,\n-98 MPI_Request& r_recv\n-99 )\n-100 {\n-101 // mpi status stuff\n-102 [[maybe_unused]] int result = 0;\n-103 typedef MPITypeInfo Info;\n-104 // resize next buffer to maximum size\n-105 next.resize(next.capacity());\n-106 // send data (explicitly send data.size elements)\n-107 result =\n-108 MPI_Isend(\n-109 &(data[0]), Info::size*data.size(), Info::getType(), rightrank, tag,\n-110 comm, &r_send);\n-111 // receive up to maximum size. The acutal size is stored in the status\n-112 result =\n-113 MPI_Irecv(\n-114 &(next[0]), Info::size*next.size(), Info::getType(), leftrank, tag,\n-115 comm, &r_recv);\n-116 // // check result\n-117 // MPI_Status status;\n-118 // CheckMPIStatus(result, status);\n-119 }\n-120\n-121 template\n-122 using ptr_t = T*;\n-123\n-124 /* these helper structs are needed as long as we still support\n-125 C++11, as we can't use variadic lambdas */\n-126 template\n-127 struct call_MPI_SendVectorInRing\n-128 {\n-129 std::tuple & remotedata;\n-130 std::tuple & nextdata;\n-131 int & tag;\n-132 int & rightrank;\n-133 int & leftrank;\n-134 MPI_Comm & mpicomm;\n-135 std::array & requests_send;\n-136 std::array & requests_recv;\n-137\n-138 template\n-139 void operator()(I i)\n-140 {\n-141 MPI_SendVectorInRing(\n-142 std::get(remotedata),\n-143 std::get(nextdata),\n-144 tag+i,\n-145 rightrank, leftrank, mpicomm,\n-146 requests_send[i],\n-147 requests_recv[i]);\n-148 }\n-149 };\n-150 template\n-151 struct call_MPI_SetVectorSize\n-152 {\n-153 std::tuple & nextdata;\n-154 std::array & status_recv;\n-155\n-156 template\n-157 void operator()(I i)\n-158 {\n-159 MPI_SetVectorSize(std::get(nextdata),status_recv[i]);\n-160 }\n-161 };\n-162\n-163 template\n-164 void MPI_AllApply_impl(MPI_Comm mpicomm,\n-165 OP && op,\n-166 std::index_sequence indices,\n-167 const Args&... data)\n-168 {\n-169 constexpr std::size_t N = sizeof...(Args);\n-170 int myrank = 0;\n-171 int commsize = 0;\n-172#if HAVE_MPI\n-173 MPI_Comm_rank(mpicomm, &myrank);\n-174 MPI_Comm_size(mpicomm, &commsize);\n-175#endif // HAVE_MPI\n-176\n-177 if (commsize > 1)\n-178 {\n-179#ifdef DEBUG_GRIDGLUE_PARALLELMERGE\n-180 std::cout << myrank << \" Start Communication, size \" << commsize << std::\n-endl;\n-181#endif\n-182\n-183 // get data sizes\n-184 std::array size({ ((unsigned int)data.size())... });\n-185\n-186 // communicate max data size\n-187 std::array maxSize;\n-188 MPI_Allreduce(&size, &maxSize,\n-189 size.size(), MPI_UNSIGNED, MPI_MAX, mpicomm);\n-190#ifdef DEBUG_GRIDGLUE_PARALLELMERGE\n-191 std::cout << myrank << \" maxSize \" << \"done... \" << std::endl;\n-192#endif\n-193\n-194 // allocate receiving buffers with maxsize to ensure sufficient buffer size\n-for communication\n-195 std::tuple remotedata { Args(maxSize[Indices])... };\n-196\n-197 // copy local data to receiving buffer\n-198 remotedata = std::tie(data...);\n-199\n-200 // allocate second set of receiving buffers necessary for async\n-communication\n-201 std::tuple nextdata { Args(maxSize[Indices])... };\n-202\n-203 // communicate data in the ring\n-204 int rightrank = (myrank + 1 + commsize) % commsize;\n-205 int leftrank = (myrank - 1 + commsize) % commsize;\n-206\n-207 std::cout << myrank << \": size = \" << commsize << std::endl;\n-208 std::cout << myrank << \": left = \" << leftrank\n-209 << \" right = \" << rightrank << std::endl;\n-210\n-211 // currently the remote data is our own data\n-212 int remoterank = myrank;\n-213\n-214 for (int i=1; i requests_send;\n-223 std::array requests_recv;\n-224\n-225 int tag = 0;\n-226 Dune::Hybrid::forEach(indices,\n-227 // [&](auto i){\n-228 // MPI_SendVectorInRing(\n-229 // std::get(remotedata),\n-230 // std::get(nextdata),\n-231 // tag+i,\n-232 // rightrank, leftrank, mpicomm,\n-233 // requests_send[i],\n-234 // requests_recv[i]);\n-235 // });\n-236 call_MPI_SendVectorInRing({\n-237 remotedata,\n-238 nextdata,\n-239 tag,\n-240 rightrank, leftrank, mpicomm,\n-241 requests_send,\n-242 requests_recv\n-243 }));\n-244\n-245 // apply operator\n-246 op(remoterank,std::get(remotedata)...);\n-247\n-248 // wait for communication to finalize\n-249 std::array status_send;\n-250 std::array status_recv;\n-251 MPI_Waitall(N,&requests_recv[0],&status_recv[0]);\n-252\n-253 // we finished receiving from nextrank and thus remoterank = nextrank\n-254 remoterank = nextrank;\n-255\n-256 // get current data sizes\n-257 // and resize vectors\n-258 Dune::Hybrid::forEach(indices,\n-259 // [&](auto i){\n-260 // MPI_SetVectorSize(std::get(nextdata),status_recv[i]);\n-261 // });\n-262 call_MPI_SetVectorSize({\n-263 nextdata, status_recv\n-264 }));\n-265\n-266 MPI_Waitall(N,&requests_send[0],&status_send[0]);\n-267\n-268 // swap the communication buffers\n-269 std::swap(remotedata,nextdata);\n-270 }\n-271\n-272 // last apply (or the only one in the case of sequential application)\n-273 op(remoterank,std::get(remotedata)...);\n-274 }\n-275 else // sequential\n-276 {\n-277 op(myrank,data...);\n-278 }\n-279 }\n-280\n-281 } // end namespace Impl\n-282\n-296template\n-_\b2_\b9_\b7void _\bM_\bP_\bI_\b__\bA_\bl_\bl_\bA_\bp_\bp_\bl_\by(MPI_Comm mpicomm,\n-298 OP && op,\n-299 const Args& ... data)\n-300{\n-301 Impl::MPI_AllApply_impl(\n-302 mpicomm,\n-303 std::forward(op),\n-304 std::make_index_sequence(),\n-305 data...\n-306 );\n-307}\n-308\n-309} // end namespace Parallel\n-310} // end namespace Dune\n+28template\n+29void _\bw_\br_\bi_\bt_\be(const Projection& projection,\n+30 const Corners& corners,\n+31 const Normals& normals,\n+32 std::ostream& out);\n+33\n+40template\n+41void _\bw_\br_\bi_\bt_\be(const Projection& projection,\n+42 const Corners& corners,\n+43 const Normals& normals,\n+44 const std::string& filename);\n+54template\n+55void _\bp_\br_\bi_\bn_\bt(const Projection& projection,\n+56 const Corners& corners,\n+57 const Normals& normals);\n+58\n+59} /* namespace GridGlue */\n+60} /* namespace Dune */\n+61\n+62#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n+63\n+64#endif\n+_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\n+_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bP_\ba_\br_\ba_\bl_\bl_\be_\bl_\b:_\b:_\bM_\bP_\bI_\b__\bA_\bl_\bl_\bA_\bp_\bp_\bl_\by\n-void MPI_AllApply(MPI_Comm mpicomm, OP &&op, const Args &... data)\n-apply an operator locally to a difstributed data set\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn ringcomm.hh:297\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be\n+void write(const Projection< Coordinate > &projection, const Corners &corners,\n+const Normals &normals, std::ostream &out)\n+write projection in VTK format\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:86\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt\n+void print(const Projection< Coordinate > &projection, const Corners &corners,\n+const Normals &normals)\n+Print information about the projection to std::cout stream.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:140\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: projection.hh File Reference\n+dune-grid-glue: crossproduct.hh File Reference\n \n \n \n \n \n \n \n@@ -70,41 +70,35 @@\n \n
    \n
    \n \n-
    projection.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    crossproduct.hh File Reference
    \n \n
    \n-
    #include <array>
    \n-#include <bitset>
    \n-#include <tuple>
    \n-#include "projection_impl.hh"
    \n-
    \n+\n

    Go to the source code of this file.

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

    \n-Classes

    class  Dune::GridGlue::Projection< Coordinate >
     Projection of a line (triangle) on another line (triangle). More...
     
    struct  Dune::GridGlue::Projection< Coordinate >::EdgeIntersection
     Intersection between two edges of a triangle. More...
     
    \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n+\n+\n+\n+\n+\n

    \n+Functions

    template<class T , int dim>
    static Dune::FieldVector< T, dim > Dune::GridGlue::crossProduct (const Dune::FieldVector< T, dim > &a, const Dune::FieldVector< T, dim > &b)
     compute cross product
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,28 +1,24 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-projection.hh File Reference\n-#include \n-#include \n-#include \n-#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n+_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n+crossproduct.hh File Reference\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-C\bCl\bla\bas\bss\bse\bes\bs\n- class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\b _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b _\b>\n-\u00a0 _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn of a line (triangle) on another line (triangle). _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\b _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b _\b>_\b:_\b:_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-\u00a0 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn between two edges of a triangle. _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n+template\n+static Dune::FieldVector< T, dim >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt (const Dune::\n+ FieldVector< T, dim > &a, const Dune::\n+ FieldVector< T, dim > &b)\n+\u00a0 compute cross product\n+\u00a0\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: projection.hh Source File\n+dune-grid-glue: crossproduct.hh Source File\n \n \n \n \n \n \n \n@@ -74,137 +74,48 @@\n \n \n \n
    \n-
    projection.hh
    \n+
    crossproduct.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH
    \n-
    4#define DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH
    \n+
    3#ifndef DUNE_GRIDGLUE_COMMON_CROSSPRODUCT_HH
    \n+
    4#define DUNE_GRIDGLUE_COMMON_CROSSPRODUCT_HH 1
    \n
    5
    \n-
    6#include <array>
    \n-
    7#include <bitset>
    \n-
    8#include <tuple>
    \n-
    9
    \n-
    10namespace Dune {
    \n-
    11namespace GridGlue {
    \n-
    12
    \n-
    19template<typename Coordinate>
    \n-
    \n-\n-
    21{
    \n-
    22public:
    \n-
    \n-\n-
    29 {
    \n-
    33 std::array<unsigned, 2> edge;
    \n-
    34
    \n-
    41 std::array<Coordinate, 2> local;
    \n-
    42 };
    \n-
    \n-
    43
    \n-
    47 constexpr static unsigned dim = Coordinate::dimension;
    \n-
    48
    \n-
    54 constexpr static unsigned maxEdgeIntersections = dim == 3 ? 9 : 0;
    \n-
    55
    \n-
    56 static_assert(dim == 2 || dim == 3, "Projection only implemented for dim=2 or dim=3");
    \n-
    57
    \n-
    61 typedef typename Coordinate::field_type Field;
    \n-
    62
    \n-
    70 typedef std::array<Coordinate, dim> Images;
    \n-
    71
    \n-\n-
    79
    \n-
    80private:
    \n-
    84 const Field m_overlap;
    \n-
    85
    \n-
    94 const Field m_max_normal_product;
    \n-
    95
    \n-
    101 Field m_epsilon = Field(1e-12);
    \n-
    102
    \n-
    104 std::tuple<Images, Preimages> m_images;
    \n-
    105
    \n-
    107 std::tuple<std::bitset<dim>, std::bitset<dim> > m_success;
    \n-
    108
    \n-
    110 unsigned m_number_of_edge_intersections;
    \n-
    111
    \n-
    113 std::array<EdgeIntersection, maxEdgeIntersections> m_edge_intersections;
    \n-
    114
    \n-
    126 bool m_projection_valid;
    \n-
    127
    \n-
    133 template<typename Corners, typename Normals>
    \n-
    134 void doProjection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals);
    \n-
    135
    \n-
    144 template<typename Corners, typename Normals>
    \n-
    145 void doInverseProjection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals);
    \n-
    146
    \n-
    155 template<typename Corners, typename Normals>
    \n-
    156 void doEdgeIntersection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals);
    \n-
    157
    \n-
    183 template<typename Corners, typename Normals>
    \n-
    184 inline bool projectionFeasible(const Coordinate& x, const Coordinate& nx, const Coordinate& px, const Corners& corners, const Normals& normals) const;
    \n-
    185
    \n-
    186public:
    \n-
    191 Projection(const Field overlap = Field(0), const Field max_normal_product = Field(-0.1));
    \n-
    192
    \n-
    198 void epsilon(const Field epsilon);
    \n-
    199
    \n-
    212 template<typename Corners, typename Normals>
    \n-
    213 void project(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals);
    \n-
    214
    \n-
    \n-
    235 const std::tuple<Images, Preimages>& images() const
    \n-
    236 { return m_images; }
    \n-
    \n-
    237
    \n-
    \n-
    252 const std::tuple<std::bitset<dim>, std::bitset<dim> >& success() const
    \n-
    253 { return m_success; }
    \n-
    \n-
    254
    \n-
    \n-\n-
    263 { return m_number_of_edge_intersections; }
    \n-
    \n-
    264
    \n-
    \n-
    273 const std::array<EdgeIntersection, maxEdgeIntersections>& edgeIntersections() const
    \n-
    274 { return m_edge_intersections; }
    \n-
    \n-
    275};
    \n-
    \n-
    276
    \n-
    277} /* namespace GridGlue */
    \n-
    278} /* namespace Dune */
    \n-
    279
    \n-
    280#include "projection_impl.hh"
    \n-
    281
    \n-
    282#endif
    \n-\n+
    6namespace Dune {
    \n+
    7namespace GridGlue {
    \n+
    8
    \n+
    14template <class T, int dim>
    \n+
    \n+
    15static Dune::FieldVector<T,dim> crossProduct(const Dune::FieldVector<T,dim>& a,
    \n+
    16 const Dune::FieldVector<T,dim>& b)
    \n+
    17{
    \n+
    18 if (dim!=3)
    \n+
    19 DUNE_THROW(Dune::NotImplemented, "crossProduct does not work for dimension " << dim);
    \n+
    20
    \n+
    21 Dune::FieldVector<T,dim> c;
    \n+
    22 c[0] = a[1]*b[2] - a[2]*b[1];
    \n+
    23 c[1] = a[2]*b[0] - a[0]*b[2];
    \n+
    24 c[2] = a[0]*b[1] - a[1]*b[0];
    \n+
    25
    \n+
    26 return c;
    \n+
    27}
    \n+
    \n+
    28
    \n+
    29} /* namespace GridGlue */
    \n+
    30} /* namespace Dune */
    \n+
    31
    \n+
    32#endif
    \n
    Definition gridglue.hh:37
    \n-
    Projection of a line (triangle) on another line (triangle).
    Definition projection.hh:21
    \n-
    Coordinate::field_type Field
    Scalar type.
    Definition projection.hh:61
    \n-
    const std::tuple< std::bitset< dim >, std::bitset< dim > > & success() const
    Indicate whether projection (inverse projection) is valid for each corner or not.
    Definition projection.hh:252
    \n-
    static constexpr unsigned maxEdgeIntersections
    maximum number of edge-edge intersections
    Definition projection.hh:54
    \n-
    Images Preimages
    Definition projection.hh:78
    \n-
    std::array< Coordinate, dim > Images
    List of corner images.
    Definition projection.hh:70
    \n-
    void epsilon(const Field epsilon)
    Set epsilon used for floating-point comparisons.
    Definition projection_impl.hh:140
    \n-
    void project(const std::tuple< Corners &, Corners & > &corners, const std::tuple< Normals &, Normals & > &normals)
    Do the actual projection.
    Definition projection_impl.hh:469
    \n-
    static constexpr unsigned dim
    dimension of coordinates
    Definition projection.hh:47
    \n-
    unsigned numberOfEdgeIntersections() const
    Number of edge intersections.
    Definition projection.hh:262
    \n-
    const std::tuple< Images, Preimages > & images() const
    Images and preimages of corners.
    Definition projection.hh:235
    \n-
    const std::array< EdgeIntersection, maxEdgeIntersections > & edgeIntersections() const
    Edge-edge intersections.
    Definition projection.hh:273
    \n-
    Intersection between two edges of a triangle.
    Definition projection.hh:29
    \n-
    std::array< Coordinate, 2 > local
    Local coordinates of intersection and distance along normals.
    Definition projection.hh:41
    \n-
    std::array< unsigned, 2 > edge
    Edge numbers in image and preimage triangle.
    Definition projection.hh:33
    \n+
    static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim > &a, const Dune::FieldVector< T, dim > &b)
    compute cross product
    Definition crossproduct.hh:15
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,175 +1,49 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-projection.hh\n+crossproduct.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH\n-4#define DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH\n+3#ifndef DUNE_GRIDGLUE_COMMON_CROSSPRODUCT_HH\n+4#define DUNE_GRIDGLUE_COMMON_CROSSPRODUCT_HH 1\n 5\n-6#include \n-7#include \n-8#include \n-9\n-10namespace _\bD_\bu_\bn_\be {\n-11namespace GridGlue {\n-12\n-19template\n-_\b2_\b0class _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn\n-21{\n-22public:\n-_\b2_\b8 struct _\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-29 {\n-_\b3_\b3 std::array _\be_\bd_\bg_\be;\n-34\n-_\b4_\b1 std::array _\bl_\bo_\bc_\ba_\bl;\n-42 };\n-43\n-_\b4_\b7 constexpr static unsigned _\bd_\bi_\bm = Coordinate::dimension;\n-48\n-_\b5_\b4 constexpr static unsigned _\bm_\ba_\bx_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs = _\bd_\bi_\bm == 3 ? 9 : 0;\n-55\n-56 static_assert(_\bd_\bi_\bm == 2 || _\bd_\bi_\bm == 3, \"Projection only implemented for dim=2\n-or dim=3\");\n-57\n-_\b6_\b1 typedef typename Coordinate::field_type _\bF_\bi_\be_\bl_\bd;\n-62\n-_\b7_\b0 typedef std::array _\bI_\bm_\ba_\bg_\be_\bs;\n-71\n-_\b7_\b8 typedef _\bI_\bm_\ba_\bg_\be_\bs _\bP_\br_\be_\bi_\bm_\ba_\bg_\be_\bs;\n-79\n-80private:\n-84 const _\bF_\bi_\be_\bl_\bd m_overlap;\n-85\n-94 const _\bF_\bi_\be_\bl_\bd m_max_normal_product;\n-95\n-101 _\bF_\bi_\be_\bl_\bd m_epsilon = _\bF_\bi_\be_\bl_\bd(1e-12);\n-102\n-104 std::tuple m_images;\n-105\n-107 std::tuple, std::bitset > m_success;\n-108\n-110 unsigned m_number_of_edge_intersections;\n-111\n-113 std::array m_edge_intersections;\n-114\n-126 bool m_projection_valid;\n-127\n-133 template\n-134 void doProjection(const std::tuple& corners, const\n-std::tuple& normals);\n-135\n-144 template\n-145 void doInverseProjection(const std::tuple& corners,\n-const std::tuple& normals);\n-146\n-155 template\n-156 void doEdgeIntersection(const std::tuple& corners,\n-const std::tuple& normals);\n-157\n-183 template\n-184 inline bool projectionFeasible(const Coordinate& x, const Coordinate& nx,\n-const Coordinate& px, const Corners& corners, const Normals& normals) const;\n-185\n-186public:\n-191 _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn(const _\bF_\bi_\be_\bl_\bd overlap = _\bF_\bi_\be_\bl_\bd(0), const _\bF_\bi_\be_\bl_\bd max_normal_product =\n-_\bF_\bi_\be_\bl_\bd(-0.1));\n-192\n-198 void _\be_\bp_\bs_\bi_\bl_\bo_\bn(const _\bF_\bi_\be_\bl_\bd _\be_\bp_\bs_\bi_\bl_\bo_\bn);\n-199\n-212 template\n-213 void _\bp_\br_\bo_\bj_\be_\bc_\bt(const std::tuple& corners, const std::\n-tuple& normals);\n-214\n-_\b2_\b3_\b5 const std::tuple& _\bi_\bm_\ba_\bg_\be_\bs() const\n-236 { return m_images; }\n-237\n-_\b2_\b5_\b2 const std::tuple, std::bitset >& _\bs_\bu_\bc_\bc_\be_\bs_\bs() const\n-253 { return m_success; }\n-254\n-_\b2_\b6_\b2 unsigned _\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs() const\n-263 { return m_number_of_edge_intersections; }\n-264\n-_\b2_\b7_\b3 const std::array& _\be_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-() const\n-274 { return m_edge_intersections; }\n-275};\n-276\n-277} /* namespace GridGlue */\n-278} /* namespace Dune */\n-279\n-280#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n-281\n-282#endif\n-_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\n+6namespace _\bD_\bu_\bn_\be {\n+7namespace GridGlue {\n+8\n+14template \n+_\b1_\b5static Dune::FieldVector _\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt(const Dune::FieldVector&\n+a,\n+16 const Dune::FieldVector& b)\n+17{\n+18 if (dim!=3)\n+19 DUNE_THROW(Dune::NotImplemented, \"crossProduct does not work for dimension \"\n+<< dim);\n+20\n+21 Dune::FieldVector c;\n+22 c[0] = a[1]*b[2] - a[2]*b[1];\n+23 c[1] = a[2]*b[0] - a[0]*b[2];\n+24 c[2] = a[0]*b[1] - a[1]*b[0];\n+25\n+26 return c;\n+27}\n+28\n+29} /* namespace GridGlue */\n+30} /* namespace Dune */\n+31\n+32#endif\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn\n-Projection of a line (triangle) on another line (triangle).\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:21\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bF_\bi_\be_\bl_\bd\n-Coordinate::field_type Field\n-Scalar type.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:61\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bs_\bu_\bc_\bc_\be_\bs_\bs\n-const std::tuple< std::bitset< dim >, std::bitset< dim > > & success() const\n-Indicate whether projection (inverse projection) is valid for each corner or\n-not.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:252\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bm_\ba_\bx_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-static constexpr unsigned maxEdgeIntersections\n-maximum number of edge-edge intersections\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:54\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bP_\br_\be_\bi_\bm_\ba_\bg_\be_\bs\n-Images Preimages\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:78\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bs\n-std::array< Coordinate, dim > Images\n-List of corner images.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:70\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bp_\bs_\bi_\bl_\bo_\bn\n-void epsilon(const Field epsilon)\n-Set epsilon used for floating-point comparisons.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:140\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bp_\br_\bo_\bj_\be_\bc_\bt\n-void project(const std::tuple< Corners &, Corners & > &corners, const std::\n-tuple< Normals &, Normals & > &normals)\n-Do the actual projection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:469\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bd_\bi_\bm\n-static constexpr unsigned dim\n-dimension of coordinates\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:47\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-unsigned numberOfEdgeIntersections() const\n-Number of edge intersections.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:262\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bm_\ba_\bg_\be_\bs\n-const std::tuple< Images, Preimages > & images() const\n-Images and preimages of corners.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:235\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-const std::array< EdgeIntersection, maxEdgeIntersections > & edgeIntersections\n-() const\n-Edge-edge intersections.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:273\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-Intersection between two edges of a triangle.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:29\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bl_\bo_\bc_\ba_\bl\n-std::array< Coordinate, 2 > local\n-Local coordinates of intersection and distance along normals.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:41\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bd_\bg_\be\n-std::array< unsigned, 2 > edge\n-Edge numbers in image and preimage triangle.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:33\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt\n+static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim\n+> &a, const Dune::FieldVector< T, dim > &b)\n+compute cross product\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn crossproduct.hh:15\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: areawriter_impl.hh File Reference\n+dune-grid-glue: projection.hh File Reference\n \n \n \n \n \n \n \n@@ -71,55 +71,40 @@\n \n \n \n
    \n \n-
    areawriter_impl.hh File Reference
    \n+Namespaces
    \n+
    projection.hh File Reference
    \n \n
    \n-
    #include <fstream>
    \n-#include <vector>
    \n-#include <dune/common/fvector.hh>
    \n-#include <dune/geometry/type.hh>
    \n-#include <dune/grid/common/mcmgmapper.hh>
    \n+
    #include <array>
    \n+#include <bitset>
    \n+#include <tuple>
    \n+#include "projection_impl.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::GridGlue::AreaWriterImplementation::FacetLayout< dimgrid >
    class  Dune::GridGlue::Projection< Coordinate >
     Projection of a line (triangle) on another line (triangle). More...
     
    struct  Dune::GridGlue::Projection< Coordinate >::EdgeIntersection
     Intersection between two edges of a triangle. More...
     
    \n \n \n \n \n \n-\n-\n-

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    namespace  Dune::GridGlue::AreaWriterImplementation
     
    \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n

    \n-Functions

    template<typename GridView >
    void Dune::GridGlue::AreaWriterImplementation::write_facet_geometry (const GridView &gv, std::ostream &out)
     
    template<int side, typename Glue >
    void Dune::GridGlue::write_glue_area_vtk (const Glue &glue, std::ostream &out)
     
    template<int side, typename Glue >
    void Dune::GridGlue::write_glue_area_vtk (const Glue &glue, const std::string &filename)
     
    template<typename Glue >
    void Dune::GridGlue::write_glue_areas_vtk (const Glue &glue, const std::string &base)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,43 +1,28 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-areawriter_impl.hh File Reference\n-#include \n-#include \n-#include \n-#include \n-#include \n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n+projection.hh File Reference\n+#include \n+#include \n+#include \n+#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bF_\ba_\bc_\be_\bt_\bL_\ba_\by_\bo_\bu_\bt_\b<_\b _\bd_\bi_\bm_\bg_\br_\bi_\bd_\b _\b>\n+ class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\b _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b _\b>\n+\u00a0 _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn of a line (triangle) on another line (triangle). _\bM_\bo_\br_\be_\b._\b._\b.\n+\u00a0\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b<_\b _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\b _\b>_\b:_\b:_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+\u00a0 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn between two edges of a triangle. _\bM_\bo_\br_\be_\b._\b._\b.\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n-namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn\n-\u00a0\n-F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bf_\ba_\bc_\be_\bt_\b__\bg_\be_\bo_\bm_\be_\bt_\br_\by (const\n- GridView &gv, std::ostream &out)\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk (const Glue &glue, std::ostream &out)\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk (const Glue &glue, const std::string\n- &filename)\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\bs_\b__\bv_\bt_\bk (const Glue &glue, const std::string\n- &base)\n-\u00a0\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: areawriter_impl.hh Source File\n+dune-grid-glue: projection.hh Source File\n \n \n \n \n \n \n \n@@ -74,183 +74,137 @@\n \n \n
    \n
    \n-
    areawriter_impl.hh
    \n+
    projection.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#include <fstream>
    \n-
    4#include <vector>
    \n+
    3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH
    \n+
    4#define DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH
    \n
    5
    \n-
    6#include <dune/common/fvector.hh>
    \n-
    7#include <dune/geometry/type.hh>
    \n-
    8#include <dune/grid/common/mcmgmapper.hh>
    \n+
    6#include <array>
    \n+
    7#include <bitset>
    \n+
    8#include <tuple>
    \n
    9
    \n
    10namespace Dune {
    \n
    11namespace GridGlue {
    \n
    12
    \n-
    \n-
    13namespace AreaWriterImplementation {
    \n-
    14
    \n-
    15template<int dimgrid>
    \n-
    \n-\n-
    17{
    \n-
    \n-
    18 bool contains(Dune::GeometryType gt) const
    \n-
    19 {
    \n-
    20 return gt.dim() == dimgrid - 1;
    \n-
    21 }
    \n-
    \n-
    22};
    \n-
    \n-
    23
    \n-
    24template<typename GridView>
    \n-
    \n-
    25void write_facet_geometry(const GridView& gv, std::ostream& out)
    \n-
    26{
    \n-
    27 using Coordinate = Dune::FieldVector<double, 3>;
    \n-
    28
    \n-
    29 std::vector<Coordinate> corners;
    \n-
    30 for (const auto& facet : facets(gv)) {
    \n-
    31 const auto geometry = facet.geometry();
    \n-
    32 for (int i = 0; i < geometry.corners(); ++i) {
    \n-
    33 /* VTK always needs 3-dim coordinates... */
    \n-
    34 const auto c0 = geometry.corner(i);
    \n-
    35 Coordinate c1;
    \n-
    36 for (int d = 0; d < GridView::dimensionworld; ++d)
    \n-
    37 c1[d] = c0[d];
    \n-
    38 for (int d = GridView::dimensionworld; d < Coordinate::dimension; ++d)
    \n-
    39 c1[d] = double(0);
    \n-
    40 corners.push_back(c1);
    \n-
    41 }
    \n-
    42 }
    \n+
    19template<typename Coordinate>
    \n+
    \n+\n+
    21{
    \n+
    22public:
    \n+
    \n+\n+
    29 {
    \n+
    33 std::array<unsigned, 2> edge;
    \n+
    34
    \n+
    41 std::array<Coordinate, 2> local;
    \n+
    42 };
    \n+
    \n
    43
    \n-
    44 {
    \n-
    45 out << "DATASET UNSTRUCTURED_GRID\\n"
    \n-
    46 << "POINTS " << corners.size() << " double\\n";
    \n-
    47 for (const auto& c : corners)
    \n-
    48 out << c << "\\n";
    \n-
    49 }
    \n-
    50 {
    \n-
    51 out << "CELLS " << gv.size(1) << " " << (gv.size(1) + corners.size()) << "\\n";
    \n-
    52 std::size_t c = 0;
    \n-
    53 for (const auto& facet : facets(gv)) {
    \n-
    54 const auto geometry = facet.geometry();
    \n-
    55 out << geometry.corners();
    \n-
    56 for (int i = 0; i < geometry.corners(); ++i, ++c)
    \n-
    57 out << " " << c;
    \n-
    58 out << "\\n";
    \n-
    59 }
    \n-
    60 }
    \n-
    61 {
    \n-
    62 out << "CELL_TYPES " << gv.size(1) << "\\n";
    \n-
    63 for (const auto& facet : facets(gv)) {
    \n-
    64 const auto type = facet.type();
    \n-
    65 if (type.isVertex())
    \n-
    66 out << "1\\n";
    \n-
    67 else if (type.isLine())
    \n-
    68 out << "2\\n";
    \n-
    69 else if (type.isTriangle())
    \n-
    70 out << "5\\n";
    \n-
    71 else if (type.isQuadrilateral())
    \n-
    72 out << "9\\n";
    \n-
    73 else if (type.isTetrahedron())
    \n-
    74 out << "10\\n";
    \n-
    75 else
    \n-
    76 DUNE_THROW(Dune::Exception, "Unhandled geometry type");
    \n-
    77 }
    \n-
    78 }
    \n-
    79}
    \n-
    \n-
    80
    \n-
    81} /* namespace AreaWriterImplementation */
    \n-
    \n-
    82
    \n-
    83template<int side, typename Glue>
    \n-
    \n-
    84void write_glue_area_vtk(const Glue& glue, std::ostream& out)
    \n-
    85{
    \n-
    86 using GridView = typename std::decay< decltype(glue.template gridView<side>()) >::type;
    \n-
    87 using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, AreaWriterImplementation::FacetLayout>;
    \n-
    88 using ctype = typename GridView::ctype;
    \n-
    89
    \n-
    90 const GridView gv = glue.template gridView<side>();
    \n-
    91 Mapper mapper(gv);
    \n-
    92 std::vector<ctype> coveredArea(mapper.size(), ctype(0));
    \n-
    93 std::vector<ctype> totalArea(mapper.size(), ctype(1));
    \n-
    94
    \n-
    95 for (const auto& in : intersections(glue, Reverse<side == 1>())) {
    \n-
    96 const auto element = in.inside();
    \n-
    97 const auto index = mapper.subIndex(element, in.indexInInside(), 1);
    \n-
    98 coveredArea[index] += in.geometryInInside().volume();
    \n-
    99
    \n-
    100 const auto& refElement = Dune::ReferenceElements<ctype, GridView::dimension>::general(element.type());
    \n-
    101 const auto& subGeometry = refElement.template geometry<1>(in.indexInInside());
    \n-
    102 totalArea[index] = subGeometry.volume();
    \n-
    103 }
    \n-
    104
    \n-
    105 for (std::size_t i = 0; i < coveredArea.size(); ++i)
    \n-
    106 coveredArea[i] /= totalArea[i];
    \n-
    107
    \n-
    108 out << "# vtk DataFile Version 2.0\\n"
    \n-
    109 << "Filename: Glue Area\\n"
    \n-
    110 << "ASCII\\n";
    \n+
    47 constexpr static unsigned dim = Coordinate::dimension;
    \n+
    48
    \n+
    54 constexpr static unsigned maxEdgeIntersections = dim == 3 ? 9 : 0;
    \n+
    55
    \n+
    56 static_assert(dim == 2 || dim == 3, "Projection only implemented for dim=2 or dim=3");
    \n+
    57
    \n+
    61 typedef typename Coordinate::field_type Field;
    \n+
    62
    \n+
    70 typedef std::array<Coordinate, dim> Images;
    \n+
    71
    \n+\n+
    79
    \n+
    80private:
    \n+
    84 const Field m_overlap;
    \n+
    85
    \n+
    94 const Field m_max_normal_product;
    \n+
    95
    \n+
    101 Field m_epsilon = Field(1e-12);
    \n+
    102
    \n+
    104 std::tuple<Images, Preimages> m_images;
    \n+
    105
    \n+
    107 std::tuple<std::bitset<dim>, std::bitset<dim> > m_success;
    \n+
    108
    \n+
    110 unsigned m_number_of_edge_intersections;
    \n
    111
    \n-\n-
    113
    \n-
    114 out << "CELL_DATA " << coveredArea.size() << "\\n"
    \n-
    115 << "SCALARS CoveredArea double 1\\n"
    \n-
    116 << "LOOKUP_TABLE default\\n";
    \n-
    117 for (const auto& value : coveredArea)
    \n-
    118 out << value << "\\n";
    \n-
    119}
    \n-
    \n-
    120
    \n-
    121template<int side, typename Glue>
    \n-
    \n-
    122void write_glue_area_vtk(const Glue& glue, const std::string& filename)
    \n-
    123{
    \n-
    124 std::ofstream out(filename.c_str());
    \n-
    125 write_glue_area_vtk<side>(glue, out);
    \n-
    126}
    \n-
    \n+
    113 std::array<EdgeIntersection, maxEdgeIntersections> m_edge_intersections;
    \n+
    114
    \n+
    126 bool m_projection_valid;
    \n
    127
    \n-
    128template<typename Glue>
    \n-
    \n-
    129void write_glue_areas_vtk(const Glue& glue, const std::string& base)
    \n-
    130{
    \n-
    131 {
    \n-
    132 std::string filename = base;
    \n-
    133 filename += "-inside.vtk";
    \n-
    134 write_glue_area_vtk<0>(glue, filename);
    \n-
    135 }
    \n-
    136 {
    \n-
    137 std::string filename = base;
    \n-
    138 filename += "-outside.vtk";
    \n-
    139 write_glue_area_vtk<1>(glue, filename);
    \n-
    140 }
    \n-
    141}
    \n-
    \n-
    142
    \n-
    143} /* namespace GridGlue */
    \n-
    144} /* namespace Dune */
    \n+
    133 template<typename Corners, typename Normals>
    \n+
    134 void doProjection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals);
    \n+
    135
    \n+
    144 template<typename Corners, typename Normals>
    \n+
    145 void doInverseProjection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals);
    \n+
    146
    \n+
    155 template<typename Corners, typename Normals>
    \n+
    156 void doEdgeIntersection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals);
    \n+
    157
    \n+
    183 template<typename Corners, typename Normals>
    \n+
    184 inline bool projectionFeasible(const Coordinate& x, const Coordinate& nx, const Coordinate& px, const Corners& corners, const Normals& normals) const;
    \n+
    185
    \n+
    186public:
    \n+
    191 Projection(const Field overlap = Field(0), const Field max_normal_product = Field(-0.1));
    \n+
    192
    \n+
    198 void epsilon(const Field epsilon);
    \n+
    199
    \n+
    212 template<typename Corners, typename Normals>
    \n+
    213 void project(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals);
    \n+
    214
    \n+
    \n+
    235 const std::tuple<Images, Preimages>& images() const
    \n+
    236 { return m_images; }
    \n+
    \n+
    237
    \n+
    \n+
    252 const std::tuple<std::bitset<dim>, std::bitset<dim> >& success() const
    \n+
    253 { return m_success; }
    \n+
    \n+
    254
    \n+
    \n+\n+
    263 { return m_number_of_edge_intersections; }
    \n+
    \n+
    264
    \n+
    \n+
    273 const std::array<EdgeIntersection, maxEdgeIntersections>& edgeIntersections() const
    \n+
    274 { return m_edge_intersections; }
    \n+
    \n+
    275};
    \n+
    \n+
    276
    \n+
    277} /* namespace GridGlue */
    \n+
    278} /* namespace Dune */
    \n+
    279
    \n+
    280#include "projection_impl.hh"
    \n+
    281
    \n+
    282#endif
    \n+\n
    Definition gridglue.hh:37
    \n-
    void write_glue_area_vtk(const Glue &glue, std::ostream &out)
    Definition areawriter_impl.hh:84
    \n-
    void write_glue_areas_vtk(const Glue &glue, const std::string &base)
    Definition areawriter_impl.hh:129
    \n-
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n-
    void write_facet_geometry(const GridView &gv, std::ostream &out)
    Definition areawriter_impl.hh:25
    \n-
    Definition rangegenerators.hh:17
    \n-\n-
    bool contains(Dune::GeometryType gt) const
    Definition areawriter_impl.hh:18
    \n+
    Projection of a line (triangle) on another line (triangle).
    Definition projection.hh:21
    \n+
    Coordinate::field_type Field
    Scalar type.
    Definition projection.hh:61
    \n+
    const std::tuple< std::bitset< dim >, std::bitset< dim > > & success() const
    Indicate whether projection (inverse projection) is valid for each corner or not.
    Definition projection.hh:252
    \n+
    static constexpr unsigned maxEdgeIntersections
    maximum number of edge-edge intersections
    Definition projection.hh:54
    \n+
    Images Preimages
    Definition projection.hh:78
    \n+
    std::array< Coordinate, dim > Images
    List of corner images.
    Definition projection.hh:70
    \n+
    void epsilon(const Field epsilon)
    Set epsilon used for floating-point comparisons.
    Definition projection_impl.hh:140
    \n+
    void project(const std::tuple< Corners &, Corners & > &corners, const std::tuple< Normals &, Normals & > &normals)
    Do the actual projection.
    Definition projection_impl.hh:469
    \n+
    static constexpr unsigned dim
    dimension of coordinates
    Definition projection.hh:47
    \n+
    unsigned numberOfEdgeIntersections() const
    Number of edge intersections.
    Definition projection.hh:262
    \n+
    const std::tuple< Images, Preimages > & images() const
    Images and preimages of corners.
    Definition projection.hh:235
    \n+
    const std::array< EdgeIntersection, maxEdgeIntersections > & edgeIntersections() const
    Edge-edge intersections.
    Definition projection.hh:273
    \n+
    Intersection between two edges of a triangle.
    Definition projection.hh:29
    \n+
    std::array< Coordinate, 2 > local
    Local coordinates of intersection and distance along normals.
    Definition projection.hh:41
    \n+
    std::array< unsigned, 2 > edge
    Edge numbers in image and preimage triangle.
    Definition projection.hh:33
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,184 +1,175 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-areawriter_impl.hh\n+projection.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-3#include \n-4#include \n+3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH\n+4#define DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH\n 5\n-6#include \n-7#include \n-8#include \n+6#include \n+7#include \n+8#include \n 9\n 10namespace _\bD_\bu_\bn_\be {\n 11namespace GridGlue {\n 12\n-_\b1_\b3namespace AreaWriterImplementation {\n-14\n-15template\n-_\b1_\b6struct _\bF_\ba_\bc_\be_\bt_\bL_\ba_\by_\bo_\bu_\bt\n-17{\n-_\b1_\b8 bool _\bc_\bo_\bn_\bt_\ba_\bi_\bn_\bs(Dune::GeometryType gt) const\n-19 {\n-20 return gt.dim() == dimgrid - 1;\n-21 }\n-22};\n-23\n-24template\n-_\b2_\b5void _\bw_\br_\bi_\bt_\be_\b__\bf_\ba_\bc_\be_\bt_\b__\bg_\be_\bo_\bm_\be_\bt_\br_\by(const GridView& gv, std::ostream& out)\n-26{\n-27 using Coordinate = Dune::FieldVector;\n-28\n-29 std::vector corners;\n-30 for (const auto& facet : facets(gv)) {\n-31 const auto geometry = facet.geometry();\n-32 for (int i = 0; i < geometry.corners(); ++i) {\n-33 /* VTK always needs 3-dim coordinates... */\n-34 const auto c0 = geometry.corner(i);\n-35 Coordinate c1;\n-36 for (int d = 0; d < GridView::dimensionworld; ++d)\n-37 c1[d] = c0[d];\n-38 for (int d = GridView::dimensionworld; d < Coordinate::dimension; ++d)\n-39 c1[d] = double(0);\n-40 corners.push_back(c1);\n-41 }\n-42 }\n+19template\n+_\b2_\b0class _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn\n+21{\n+22public:\n+_\b2_\b8 struct _\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+29 {\n+_\b3_\b3 std::array _\be_\bd_\bg_\be;\n+34\n+_\b4_\b1 std::array _\bl_\bo_\bc_\ba_\bl;\n+42 };\n 43\n-44 {\n-45 out << \"DATASET UNSTRUCTURED_GRID\\n\"\n-46 << \"POINTS \" << corners.size() << \" double\\n\";\n-47 for (const auto& c : corners)\n-48 out << c << \"\\n\";\n-49 }\n-50 {\n-51 out << \"CELLS \" << gv.size(1) << \" \" << (gv.size(1) + corners.size()) <<\n-\"\\n\";\n-52 std::size_t c = 0;\n-53 for (const auto& facet : facets(gv)) {\n-54 const auto geometry = facet.geometry();\n-55 out << geometry.corners();\n-56 for (int i = 0; i < geometry.corners(); ++i, ++c)\n-57 out << \" \" << c;\n-58 out << \"\\n\";\n-59 }\n-60 }\n-61 {\n-62 out << \"CELL_TYPES \" << gv.size(1) << \"\\n\";\n-63 for (const auto& facet : facets(gv)) {\n-64 const auto type = facet.type();\n-65 if (type.isVertex())\n-66 out << \"1\\n\";\n-67 else if (type.isLine())\n-68 out << \"2\\n\";\n-69 else if (type.isTriangle())\n-70 out << \"5\\n\";\n-71 else if (type.isQuadrilateral())\n-72 out << \"9\\n\";\n-73 else if (type.isTetrahedron())\n-74 out << \"10\\n\";\n-75 else\n-76 DUNE_THROW(Dune::Exception, \"Unhandled geometry type\");\n-77 }\n-78 }\n-79}\n-80\n-81} /* namespace AreaWriterImplementation */\n-82\n-83template\n-_\b8_\b4void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk(const Glue& glue, std::ostream& out)\n-85{\n-86 using GridView = typename std::decay< decltype(glue.template gridView\n-()) >::type;\n-87 using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper;\n-88 using ctype = typename GridView::ctype;\n-89\n-90 const GridView gv = glue.template gridView();\n-91 Mapper mapper(gv);\n-92 std::vector coveredArea(mapper.size(), ctype(0));\n-93 std::vector totalArea(mapper.size(), ctype(1));\n-94\n-95 for (const auto& in : _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(glue, _\bR_\be_\bv_\be_\br_\bs_\be_\b<_\bs_\bi_\bd_\be_\b _\b=_\b=_\b _\b1_\b>())) {\n-96 const auto element = in.inside();\n-97 const auto index = mapper.subIndex(element, in.indexInInside(), 1);\n-98 coveredArea[index] += in.geometryInInside().volume();\n-99\n-100 const auto& refElement = Dune::ReferenceElements::general(element.type());\n-101 const auto& subGeometry = refElement.template geometry<1>(in.indexInInside\n-());\n-102 totalArea[index] = subGeometry.volume();\n-103 }\n-104\n-105 for (std::size_t i = 0; i < coveredArea.size(); ++i)\n-106 coveredArea[i] /= totalArea[i];\n-107\n-108 out << \"# vtk DataFile Version 2.0\\n\"\n-109 << \"Filename: Glue Area\\n\"\n-110 << \"ASCII\\n\";\n+_\b4_\b7 constexpr static unsigned _\bd_\bi_\bm = Coordinate::dimension;\n+48\n+_\b5_\b4 constexpr static unsigned _\bm_\ba_\bx_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs = _\bd_\bi_\bm == 3 ? 9 : 0;\n+55\n+56 static_assert(_\bd_\bi_\bm == 2 || _\bd_\bi_\bm == 3, \"Projection only implemented for dim=2\n+or dim=3\");\n+57\n+_\b6_\b1 typedef typename Coordinate::field_type _\bF_\bi_\be_\bl_\bd;\n+62\n+_\b7_\b0 typedef std::array _\bI_\bm_\ba_\bg_\be_\bs;\n+71\n+_\b7_\b8 typedef _\bI_\bm_\ba_\bg_\be_\bs _\bP_\br_\be_\bi_\bm_\ba_\bg_\be_\bs;\n+79\n+80private:\n+84 const _\bF_\bi_\be_\bl_\bd m_overlap;\n+85\n+94 const _\bF_\bi_\be_\bl_\bd m_max_normal_product;\n+95\n+101 _\bF_\bi_\be_\bl_\bd m_epsilon = _\bF_\bi_\be_\bl_\bd(1e-12);\n+102\n+104 std::tuple m_images;\n+105\n+107 std::tuple, std::bitset > m_success;\n+108\n+110 unsigned m_number_of_edge_intersections;\n 111\n-112 _\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bf_\ba_\bc_\be_\bt_\b__\bg_\be_\bo_\bm_\be_\bt_\br_\by(gv, out);\n-113\n-114 out << \"CELL_DATA \" << coveredArea.size() << \"\\n\"\n-115 << \"SCALARS CoveredArea double 1\\n\"\n-116 << \"LOOKUP_TABLE default\\n\";\n-117 for (const auto& value : coveredArea)\n-118 out << value << \"\\n\";\n-119}\n-120\n-121template\n-_\b1_\b2_\b2void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk(const Glue& glue, const std::string& filename)\n-123{\n-124 std::ofstream out(filename.c_str());\n-125 write_glue_area_vtk(glue, out);\n-126}\n+113 std::array m_edge_intersections;\n+114\n+126 bool m_projection_valid;\n 127\n-128template\n-_\b1_\b2_\b9void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\bs_\b__\bv_\bt_\bk(const Glue& glue, const std::string& base)\n-130{\n-131 {\n-132 std::string filename = base;\n-133 filename += \"-inside.vtk\";\n-134 write_glue_area_vtk<0>(glue, filename);\n-135 }\n-136 {\n-137 std::string filename = base;\n-138 filename += \"-outside.vtk\";\n-139 write_glue_area_vtk<1>(glue, filename);\n-140 }\n-141}\n-142\n-143} /* namespace GridGlue */\n-144} /* namespace Dune */\n+133 template\n+134 void doProjection(const std::tuple& corners, const\n+std::tuple& normals);\n+135\n+144 template\n+145 void doInverseProjection(const std::tuple& corners,\n+const std::tuple& normals);\n+146\n+155 template\n+156 void doEdgeIntersection(const std::tuple& corners,\n+const std::tuple& normals);\n+157\n+183 template\n+184 inline bool projectionFeasible(const Coordinate& x, const Coordinate& nx,\n+const Coordinate& px, const Corners& corners, const Normals& normals) const;\n+185\n+186public:\n+191 _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn(const _\bF_\bi_\be_\bl_\bd overlap = _\bF_\bi_\be_\bl_\bd(0), const _\bF_\bi_\be_\bl_\bd max_normal_product =\n+_\bF_\bi_\be_\bl_\bd(-0.1));\n+192\n+198 void _\be_\bp_\bs_\bi_\bl_\bo_\bn(const _\bF_\bi_\be_\bl_\bd _\be_\bp_\bs_\bi_\bl_\bo_\bn);\n+199\n+212 template\n+213 void _\bp_\br_\bo_\bj_\be_\bc_\bt(const std::tuple& corners, const std::\n+tuple& normals);\n+214\n+_\b2_\b3_\b5 const std::tuple& _\bi_\bm_\ba_\bg_\be_\bs() const\n+236 { return m_images; }\n+237\n+_\b2_\b5_\b2 const std::tuple, std::bitset >& _\bs_\bu_\bc_\bc_\be_\bs_\bs() const\n+253 { return m_success; }\n+254\n+_\b2_\b6_\b2 unsigned _\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs() const\n+263 { return m_number_of_edge_intersections; }\n+264\n+_\b2_\b7_\b3 const std::array& _\be_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+() const\n+274 { return m_edge_intersections; }\n+275};\n+276\n+277} /* namespace GridGlue */\n+278} /* namespace Dune */\n+279\n+280#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n+281\n+282#endif\n+_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk\n-void write_glue_area_vtk(const Glue &glue, std::ostream &out)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn areawriter_impl.hh:84\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\bs_\b__\bv_\bt_\bk\n-void write_glue_areas_vtk(const Glue &glue, const std::string &base)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn areawriter_impl.hh:129\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n-> &reverse=!reversed)\n-Iterate over all intersections of a GridGlue.\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bf_\ba_\bc_\be_\bt_\b__\bg_\be_\bo_\bm_\be_\bt_\br_\by\n-void write_facet_geometry(const GridView &gv, std::ostream &out)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn areawriter_impl.hh:25\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bR_\be_\bv_\be_\br_\bs_\be\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn rangegenerators.hh:17\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bF_\ba_\bc_\be_\bt_\bL_\ba_\by_\bo_\bu_\bt\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn areawriter_impl.hh:17\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bF_\ba_\bc_\be_\bt_\bL_\ba_\by_\bo_\bu_\bt_\b:_\b:_\bc_\bo_\bn_\bt_\ba_\bi_\bn_\bs\n-bool contains(Dune::GeometryType gt) const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn areawriter_impl.hh:18\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn\n+Projection of a line (triangle) on another line (triangle).\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:21\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bF_\bi_\be_\bl_\bd\n+Coordinate::field_type Field\n+Scalar type.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:61\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bs_\bu_\bc_\bc_\be_\bs_\bs\n+const std::tuple< std::bitset< dim >, std::bitset< dim > > & success() const\n+Indicate whether projection (inverse projection) is valid for each corner or\n+not.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:252\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bm_\ba_\bx_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+static constexpr unsigned maxEdgeIntersections\n+maximum number of edge-edge intersections\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:54\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bP_\br_\be_\bi_\bm_\ba_\bg_\be_\bs\n+Images Preimages\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:78\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bs\n+std::array< Coordinate, dim > Images\n+List of corner images.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:70\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bp_\bs_\bi_\bl_\bo_\bn\n+void epsilon(const Field epsilon)\n+Set epsilon used for floating-point comparisons.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:140\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bp_\br_\bo_\bj_\be_\bc_\bt\n+void project(const std::tuple< Corners &, Corners & > &corners, const std::\n+tuple< Normals &, Normals & > &normals)\n+Do the actual projection.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:469\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bd_\bi_\bm\n+static constexpr unsigned dim\n+dimension of coordinates\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:47\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+unsigned numberOfEdgeIntersections() const\n+Number of edge intersections.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:262\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bm_\ba_\bg_\be_\bs\n+const std::tuple< Images, Preimages > & images() const\n+Images and preimages of corners.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:235\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+const std::array< EdgeIntersection, maxEdgeIntersections > & edgeIntersections\n+() const\n+Edge-edge intersections.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:273\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+Intersection between two edges of a triangle.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:29\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bl_\bo_\bc_\ba_\bl\n+std::array< Coordinate, 2 > local\n+Local coordinates of intersection and distance along normals.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:41\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bd_\bg_\be\n+std::array< unsigned, 2 > edge\n+Edge numbers in image and preimage triangle.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:33\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00056.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00056.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: codim1extractor.hh File Reference\n+dune-grid-glue: extractor.hh File Reference\n \n \n \n \n \n \n \n@@ -72,44 +72,62 @@\n
  • dune
  • grid-glue
  • extractors
  • \n \n \n
    \n \n-
    codim1extractor.hh File Reference
    \n+
    extractor.hh File Reference
    \n
    \n
    \n \n-

    Grid extractor class for codim 1 subgrids. \n+

    extractor base class \n More...

    \n-
    #include "extractor.hh"
    \n-#include <array>
    \n-#include <deque>
    \n-#include <functional>
    \n-#include <dune/common/deprecated.hh>
    \n+
    #include <vector>
    \n+#include <map>
    \n+#include <algorithm>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/common/fvector.hh>
    \n #include <dune/common/version.hh>
    \n-#include <dune/grid-glue/common/crossproduct.hh>
    \n+#include <dune/grid/common/geometry.hh>
    \n+#include <dune/grid/common/grid.hh>
    \n+#include <dune/grid/common/mcmgmapper.hh>
    \n+#include <dune/geometry/multilineargeometry.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 Classes

    class  Dune::GridGlue::Codim1Extractor< GV >
    class  Dune::GridGlue::Extractor< GV, cd >
     Provides codimension-independent methods for grid extraction. More...
     
    struct  Dune::GridGlue::Extractor< GV, cd >::CornerInfo
     Helpful struct holding one index for the coordinate (vertex) to which it is associated and the element's corner index;. More...
     
    struct  Dune::GridGlue::Extractor< GV, cd >::CoordinateInfo
     
    struct  Dune::GridGlue::Extractor< GV, cd >::VertexInfo
     simple struct holding a vertex pointer and an index More...
     
    struct  Dune::GridGlue::Extractor< GV, cd >::ElementInfo
     simple struct holding an element seed and an index More...
     
    struct  Dune::GridGlue::Extractor< GV, cd >::SubEntityInfo
     Holds some information about an element's subentity involved in a coupling. More...
     
    \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n

    Detailed Description

    \n-

    Grid extractor class for codim 1 subgrids.

    \n+

    extractor base class

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,29 +2,49 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\bs\n _\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-codim1extractor.hh File Reference\n-Grid extractor class for codim 1 subgrids. _\bM_\bo_\br_\be_\b._\b._\b.\n-#include \"_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\"\n-#include \n-#include \n-#include \n-#include \n+extractor.hh File Reference\n+extractor base class _\bM_\bo_\br_\be_\b._\b._\b.\n+#include \n+#include \n+#include \n+#include \n+#include \n #include \n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bc_\br_\bo_\bs_\bs_\bp_\br_\bo_\bd_\bu_\bc_\bt_\b._\bh_\bh>\n+#include \n+#include \n+#include \n+#include \n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b _\b>\n+ class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\bc_\bd_\b _\b>\n+\u00a0 Provides codimension-independent methods for grid extraction. _\bM_\bo_\br_\be_\b._\b._\b.\n+\u00a0\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\bc_\bd_\b _\b>_\b:_\b:_\bC_\bo_\br_\bn_\be_\br_\bI_\bn_\bf_\bo\n+\u00a0 Helpful struct holding one index for the coordinate (vertex) to which\n+ it is associated and the element's corner index;. _\bM_\bo_\br_\be_\b._\b._\b.\n+\u00a0\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\bc_\bd_\b _\b>_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n+\u00a0\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\bc_\bd_\b _\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n+\u00a0 simple struct holding a vertex pointer and an index _\bM_\bo_\br_\be_\b._\b._\b.\n+\u00a0\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\bc_\bd_\b _\b>_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n+\u00a0 simple struct holding an element seed and an index _\bM_\bo_\br_\be_\b._\b._\b.\n+\u00a0\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\bc_\bd_\b _\b>_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n+\u00a0 Holds some information about an element's subentity involved in a\n+ coupling. _\bM_\bo_\br_\be_\b._\b._\b.\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n *\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-Grid extractor class for codim 1 subgrids.\n+extractor base class\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00056_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00056_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: codim1extractor.hh Source File\n+dune-grid-glue: extractor.hh Source File\n \n \n \n \n \n \n \n@@ -74,415 +74,490 @@\n \n \n
    \n
    \n-
    codim1extractor.hh
    \n+
    extractor.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n
    5/*
    \n-
    6 * Filename: codim1extractor.hh
    \n+
    6 * Filename: extractor.hh
    \n
    7 * Version: 1.0
    \n-
    8 * Created on: Jun 23, 2009
    \n-
    9 * Author: Oliver Sander, Christian Engwer
    \n+
    8 * Created on: Oct 05, 2009
    \n+
    9 * Author: Christian Engwer
    \n
    10 * ---------------------------------
    \n
    11 * Project: dune-grid-glue
    \n-
    12 * Description: class for grid extractors extracting surface grids
    \n+
    12 * Description: base class for all grid extractors
    \n
    13 *
    \n
    14 */
    \n-
    20#ifndef DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH
    \n-
    21#define DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH
    \n+
    20#ifndef DUNE_GRIDGLUE_EXTRACTORS_EXTRACTOR_HH
    \n+
    21#define DUNE_GRIDGLUE_EXTRACTORS_EXTRACTOR_HH
    \n
    22
    \n-
    23#include "extractor.hh"
    \n-
    24
    \n-
    25#include <array>
    \n-
    26#include <deque>
    \n-
    27#include <functional>
    \n-
    28
    \n-
    29#include <dune/common/deprecated.hh>
    \n-
    30#include <dune/common/version.hh>
    \n-\n-
    32
    \n-
    33namespace Dune {
    \n-
    34
    \n-
    35 namespace GridGlue {
    \n-
    36
    \n-
    40template<typename GV>
    \n-
    \n-
    41class Codim1Extractor : public Extractor<GV,1>
    \n-
    42{
    \n-
    43public:
    \n-
    44
    \n-
    45 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n-
    46
    \n-
    47 using Extractor<GV,1>::dimworld;
    \n-
    48 using Extractor<GV,1>::dim;
    \n-
    49 using Extractor<GV,1>::codim;
    \n-
    50 using Extractor<GV,1>::cube_corners;
    \n-\n-
    52
    \n-
    54 static constexpr int simplex_corners = dim;
    \n+
    23#include <vector>
    \n+
    24#include <map>
    \n+
    25#include <algorithm>
    \n+
    26#include <dune/common/exceptions.hh>
    \n+
    27#include <dune/common/fvector.hh>
    \n+
    28#include <dune/common/version.hh>
    \n+
    29#include <dune/grid/common/geometry.hh>
    \n+
    30#include <dune/grid/common/grid.hh>
    \n+
    31#include <dune/grid/common/mcmgmapper.hh>
    \n+
    32#include <dune/geometry/multilineargeometry.hh>
    \n+
    33
    \n+
    34namespace Dune {
    \n+
    35
    \n+
    36 namespace GridGlue {
    \n+
    37
    \n+
    44template<typename GV, int cd>
    \n+
    \n+\n+
    46{
    \n+
    47
    \n+
    48public:
    \n+
    49
    \n+
    50 static constexpr auto dimworld = GV::dimensionworld;
    \n+
    51 static constexpr auto dim = GV::dimension;
    \n+
    52 static constexpr auto codim = cd;
    \n+
    53
    \n+
    54 static constexpr int cube_corners = 1 << (dim-codim);
    \n
    55
    \n-
    56 typedef GV GridView;
    \n-
    57
    \n-
    58 typedef typename GV::Grid::ctype ctype;
    \n-
    59 typedef Dune::FieldVector<ctype, dimworld> Coords;
    \n-
    60
    \n-
    61 typedef typename GV::Traits::template Codim<dim>::Entity Vertex;
    \n-
    62 typedef typename GV::Traits::template Codim<0>::Entity Element;
    \n-
    63 typedef std::function<bool(const Element&, unsigned int subentity)> Predicate;
    \n-
    64
    \n-
    65 // import typedefs from base class
    \n-\n-\n-\n-\n-\n-
    71
    \n-
    72public:
    \n-
    73
    \n-
    74 /* C O N S T R U C T O R S A N D D E S T R U C T O R S */
    \n-
    75
    \n-
    \n-
    81 Codim1Extractor(const GV& gv, const Predicate& predicate)
    \n-
    82 : Extractor<GV,1>(gv)
    \n-
    83 {
    \n-
    84 std::cout << "This is Codim1Extractor on a <" << dim
    \n-
    85 << "," << dimworld << "> grid!"
    \n-
    86 << std::endl;
    \n-
    87 update(predicate);
    \n-
    88 }
    \n-
    \n-
    89
    \n-
    90private:
    \n-
    91
    \n-
    105 void update(const Predicate& predicate);
    \n-
    106
    \n-
    107};
    \n+
    56 typedef GV GridView;
    \n+
    57 typedef typename GridView::Grid Grid;
    \n+
    58
    \n+
    59 typedef typename GV::Grid::ctype ctype;
    \n+
    60 typedef Dune::FieldVector<ctype, dimworld> Coords;
    \n+
    61 typedef Dune::FieldVector<ctype, dim> LocalCoords;
    \n+
    62
    \n+
    63 typedef typename GV::Traits::template Codim<dim>::Entity Vertex;
    \n+
    64 typedef typename Vertex::EntitySeed VertexSeed;
    \n+
    65
    \n+
    66 typedef typename GV::Traits::template Codim<0>::Entity Element;
    \n+
    67 typedef typename Element::EntitySeed ElementSeed;
    \n+
    68
    \n+
    69 typedef std::vector<unsigned int> VertexVector;
    \n+
    70
    \n+
    71#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 6)
    \n+
    72 using CellMapper = MultipleCodimMultipleGeomTypeMapper<GridView>;
    \n+
    73#else
    \n+
    74 using CellMapper = MultipleCodimMultipleGeomTypeMapper<GridView, MCMGElementLayout>;
    \n+
    75#endif
    \n+
    76 // typedef typename CellMapper::IndexType IndexType;
    \n+
    77 typedef int IndexType;
    \n+
    78public:
    \n+
    79
    \n+
    80 // transformations
    \n+
    81 typedef Dune::MultiLinearGeometry<ctype, dim-codim, dimworld> Geometry;
    \n+
    82 typedef Dune::MultiLinearGeometry<ctype, dim-codim, dim> LocalGeometry;
    \n+
    83
    \n+
    84protected:
    \n+
    85 /************************** PRIVATE SUBCLASSES **********************/
    \n+
    86
    \n+
    \n+\n+
    92 {
    \n+
    93 unsigned int idx : 28;
    \n+
    94 unsigned int num : 4;
    \n+
    95 };
    \n
    \n+
    96
    \n+
    \n+\n+
    98 {
    \n+
    \n+\n+
    100 {}
    \n+
    \n+
    101
    \n+
    \n+
    102 CoordinateInfo(unsigned int index_, IndexType vtxindex_)
    \n+
    103 : vtxindex(vtxindex_), index(index_)
    \n+
    104 {}
    \n+
    \n+
    105
    \n+\n
    108
    \n-
    109
    \n-
    110template<typename GV>
    \n-
    111void Codim1Extractor<GV>::update(const Predicate& predicate)
    \n-
    112{
    \n-
    113 // free everything there is in this object
    \n-
    114 this->clear();
    \n+\n+
    111
    \n+
    113 unsigned int index;
    \n+
    114 };
    \n+
    \n
    115
    \n-
    116 // In this first pass iterate over all entities of codim 0.
    \n-
    117 // For each codim 1 intersection check if it is part of the boundary and if so,
    \n-
    118 // get its corner vertices, find resp. store them together with their associated index,
    \n-
    119 // and remember the indices of the boundary faces' corners.
    \n+
    \n+\n
    120 {
    \n-
    121 // several counter for consecutive indexing are needed
    \n-
    122 int simplex_index = 0;
    \n-
    123 int vertex_index = 0;
    \n-
    124 IndexType eindex = 0; // supress warning
    \n-
    125
    \n-
    126 // needed later for insertion into a std::set which only
    \n-
    127 // works with const references
    \n-
    128
    \n-
    129 // a temporary container where newly acquired face
    \n-
    130 // information can be stored at first
    \n-
    131 std::deque<SubEntityInfo> temp_faces;
    \n-
    132
    \n-
    133 // iterate over interior codim 0 elements on the grid
    \n-
    134 for (const auto& elmt : elements(this->gv_, Partitions::interior))
    \n-
    135 {
    \n-
    136 Dune::GeometryType gt = elmt.type();
    \n-
    137
    \n-
    138 // if some face is part of the surface add it!
    \n-
    139 if (elmt.hasBoundaryIntersections())
    \n-
    140 {
    \n-
    141 // add an entry to the element info map, the index will be set properly later,
    \n-
    142 // whereas the number of faces is already known
    \n-
    143 eindex = this->cellMapper_.index(elmt);
    \n-
    144 this->elmtInfo_.emplace(eindex, ElementInfo(simplex_index, elmt, 0));
    \n+
    \n+
    121 VertexInfo(unsigned int idx_, const Vertex& p_) : idx(idx_), p(p_.seed())
    \n+
    122 {}
    \n+
    \n+
    123 unsigned int idx;
    \n+\n+
    125 };
    \n+
    \n+
    126
    \n+
    127
    \n+
    \n+\n+
    132 {
    \n+
    \n+
    133 ElementInfo(unsigned int idx_, const Element& p_, unsigned int f_) : idx(idx_), faces(f_), p(p_.seed())
    \n+
    134 {}
    \n+
    \n+
    135
    \n+
    137 unsigned int idx : 28;
    \n+
    138
    \n+
    140 unsigned int faces : 4;
    \n+
    141
    \n+\n+
    144 };
    \n+
    \n
    145
    \n-
    146 // now add the faces in ascending order of their indices
    \n-
    147 // (we are only talking about 1-4 faces here, so O(n^2) is ok!)
    \n-
    148 for (const auto& in : intersections(this->gv_, elmt))
    \n-
    149 {
    \n-
    150 // Stop only at selected boundary faces
    \n-
    151 if (!in.boundary() or !predicate(elmt, in.indexInInside()))
    \n-
    152 continue;
    \n-
    153
    \n-
    154 const auto& refElement = Dune::ReferenceElements<ctype, dim>::general(gt);
    \n-
    155 // get the corner count of this face
    \n-
    156 const int face_corners = refElement.size(in.indexInInside(), 1, dim);
    \n-
    157
    \n-
    158 // now we only have to care about the 3D case, i.e. a triangle face can be
    \n-
    159 // inserted directly whereas a quadrilateral face has to be divided into two triangles
    \n-
    160 switch (face_corners)
    \n-
    161 {
    \n-
    162 case 2 :
    \n-
    163 case 3:
    \n-
    164 {
    \n-
    165 // we have a simplex here
    \n-
    166
    \n-
    167 // register the additional face(s)
    \n-
    168 this->elmtInfo_.at(eindex).faces++;
    \n-
    169
    \n-
    170 // add a new face to the temporary collection
    \n-
    171 temp_faces.emplace_back(eindex, in.indexInInside(),
    \n-
    172#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
    \n-
    173 Dune::GeometryTypes::simplex(dim-codim)
    \n-
    174#else
    \n-
    175 Dune::GeometryType(Dune::GeometryType::simplex,dim-codim)
    \n-
    176#endif
    \n-
    177 );
    \n+
    146
    \n+
    \n+\n+
    151 {
    \n+
    \n+\n+
    153 /*
    \n+
    154 * TODO: move default value of `geometryType_` to member declaration
    \n+
    155 * when removing support for older dune-geometry
    \n+
    156 */
    \n+
    157#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
    \n+
    158 : geometryType_(GeometryTypes::simplex(dim-codim))
    \n+
    159 {}
    \n+
    160#else
    \n+
    161 {
    \n+
    162 geometryType_.makeSimplex(dim-codim);
    \n+
    163 }
    \n+
    \n+
    164#endif
    \n+
    165
    \n+
    \n+
    166 SubEntityInfo(IndexType parent_, unsigned int num_in_parent_,
    \n+
    167 const Dune::GeometryType& geometryType)
    \n+
    168 : parent(parent_), num_in_parent(num_in_parent_), geometryType_(geometryType)
    \n+
    169 {}
    \n+
    \n+
    170
    \n+
    \n+
    171 unsigned int nCorners() const
    \n+
    172 {
    \n+
    173 return Dune::ReferenceElements<ctype, dim-codim>::general(geometryType_).size(dim-codim);
    \n+
    174 }
    \n+
    \n+
    175
    \n+\n
    178
    \n-
    179 std::vector<FieldVector<ctype,dimworld> > cornerCoords(face_corners);
    \n-
    180
    \n-
    181 // try for each of the faces vertices whether it is already inserted or not
    \n-
    182 for (int i = 0; i < face_corners; ++i)
    \n-
    183 {
    \n-
    184 // get the number of the vertex in the parent element
    \n-
    185 int vertex_number = refElement.subEntity(in.indexInInside(), 1, i, dim);
    \n-
    186
    \n-
    187 // get the vertex pointer and the index from the index set
    \n-
    188 const Vertex vertex = elmt.template subEntity<dim>(vertex_number);
    \n-
    189 cornerCoords[i] = vertex.geometry().corner(0);
    \n-
    190
    \n-
    191 IndexType vindex = this->gv_.indexSet().template index<dim>(vertex);
    \n-
    192
    \n-
    193 // remember the vertex' number in parent element's vertices
    \n-
    194 temp_faces.back().corners[i].num = vertex_number;
    \n-
    195
    \n-
    196 // if the vertex is not yet inserted in the vertex info map
    \n-
    197 // it is a new one -> it will be inserted now!
    \n-
    198 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);
    \n-
    199 if (vimit == this->vtxInfo_.end())
    \n-
    200 {
    \n-
    201 // insert into the map
    \n-
    202 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));
    \n-
    203 // remember the vertex as a corner of the current face in temp_faces
    \n-
    204 temp_faces.back().corners[i].idx = vertex_index;
    \n-
    205 // increase the current index
    \n-
    206 vertex_index++;
    \n-
    207 }
    \n-
    208 else
    \n-
    209 {
    \n-
    210 // only insert the index into the simplices array
    \n-
    211 temp_faces.back().corners[i].idx = vimit->second.idx;
    \n-
    212 }
    \n-
    213 }
    \n-
    214
    \n-
    215 // Now we have the correct vertices in the last entries of temp_faces, but they may
    \n-
    216 // have the wrong orientation. We want them to be oriented such that all boundary edges
    \n-
    217 // point in the counterclockwise direction. Therefore, we check the orientation of the
    \n-
    218 // new face and possibly switch the two vertices.
    \n-
    219 FieldVector<ctype,dimworld> realNormal = in.centerUnitOuterNormal();
    \n-
    220
    \n-
    221 // Compute segment normal
    \n-
    222 FieldVector<ctype,dimworld> reconstructedNormal;
    \n-
    223 if (dim==2) // boundary face is a line segment
    \n-
    224 {
    \n-
    225 reconstructedNormal[0] = cornerCoords[1][1] - cornerCoords[0][1];
    \n-
    226 reconstructedNormal[1] = cornerCoords[0][0] - cornerCoords[1][0];
    \n-
    227 } else { // boundary face is a triangle
    \n-
    228 FieldVector<ctype,dimworld> segment1 = cornerCoords[1] - cornerCoords[0];
    \n-
    229 FieldVector<ctype,dimworld> segment2 = cornerCoords[2] - cornerCoords[0];
    \n-
    230 reconstructedNormal = crossProduct(segment1, segment2);
    \n-
    231 }
    \n-
    232 reconstructedNormal /= reconstructedNormal.two_norm();
    \n-
    233
    \n-
    234 if (realNormal * reconstructedNormal < 0.0)
    \n-
    235 std::swap(temp_faces.back().corners[0], temp_faces.back().corners[1]);
    \n-
    236
    \n-
    237 // now increase the current face index
    \n-
    238 simplex_index++;
    \n-
    239 break;
    \n-
    240 }
    \n-
    241 case 4 :
    \n-
    242 {
    \n-
    243 assert(dim == 3 && cube_corners == 4);
    \n-
    244 // we have a quadrilateral here
    \n-
    245 std::array<unsigned int, 4> vertex_indices;
    \n-
    246 std::array<unsigned int, 4> vertex_numbers;
    \n-
    247
    \n-
    248 // register the additional face(s) (2 simplices)
    \n-
    249 this->elmtInfo_.at(eindex).faces += 2;
    \n-
    250
    \n-
    251 std::array<FieldVector<ctype,dimworld>, 4> cornerCoords;
    \n-
    252
    \n-
    253 // get the vertex pointers for the quadrilateral's corner vertices
    \n-
    254 // and try for each of them whether it is already inserted or not
    \n-
    255 for (int i = 0; i < cube_corners; ++i)
    \n-
    256 {
    \n-
    257 // get the number of the vertex in the parent element
    \n-
    258 vertex_numbers[i] = refElement.subEntity(in.indexInInside(), 1, i, dim);
    \n-
    259
    \n-
    260 // get the vertex pointer and the index from the index set
    \n-
    261 const Vertex vertex = elmt.template subEntity<dim>(vertex_numbers[i]);
    \n-
    262 cornerCoords[i] = vertex.geometry().corner(0);
    \n-
    263
    \n-
    264 IndexType vindex = this->gv_.indexSet().template index<dim>(vertex);
    \n-
    265
    \n-
    266 // if the vertex is not yet inserted in the vertex info map
    \n-
    267 // it is a new one -> it will be inserted now!
    \n-
    268 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);
    \n-
    269 if (vimit == this->vtxInfo_.end())
    \n-
    270 {
    \n-
    271 // insert into the map
    \n-
    272 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));
    \n-
    273 // remember this vertex' index
    \n-
    274 vertex_indices[i] = vertex_index;
    \n-
    275 // increase the current index
    \n-
    276 vertex_index++;
    \n-
    277 }
    \n-
    278 else
    \n-
    279 {
    \n-
    280 // only remember the vertex' index
    \n-
    281 vertex_indices[i] = vimit->second.idx;
    \n-
    282 }
    \n-
    283 }
    \n-
    284
    \n-
    285 // now introduce the two triangles subdividing the quadrilateral
    \n-
    286 // ATTENTION: the order of vertices given by "orientedSubface" corresponds to the order
    \n-
    287 // of a Dune quadrilateral, i.e. the triangles are given by 0 1 2 and 3 2 1
    \n-
    288
    \n-
    289 // add a new face to the temporary collection for the first tri
    \n-
    290 temp_faces.emplace_back(eindex, in.indexInInside(),
    \n-
    291#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
    \n-
    292 Dune::GeometryTypes::simplex(dim-codim)
    \n-
    293#else
    \n-
    294 Dune::GeometryType(Dune::GeometryType::simplex,dim-codim)
    \n-
    295#endif
    \n-
    296 );
    \n-
    297 temp_faces.back().corners[0].idx = vertex_indices[0];
    \n-
    298 temp_faces.back().corners[1].idx = vertex_indices[1];
    \n-
    299 temp_faces.back().corners[2].idx = vertex_indices[2];
    \n-
    300 // remember the vertices' numbers in parent element's vertices
    \n-
    301 temp_faces.back().corners[0].num = vertex_numbers[0];
    \n-
    302 temp_faces.back().corners[1].num = vertex_numbers[1];
    \n-
    303 temp_faces.back().corners[2].num = vertex_numbers[2];
    \n-
    304
    \n-
    305 // Now we have the correct vertices in the last entries of temp_faces, but they may
    \n-
    306 // have the wrong orientation. We want the triangle vertices on counterclockwise order,
    \n-
    307 // when viewed from the outside of the grid. Therefore, we check the orientation of the
    \n-
    308 // new face and possibly switch two vertices.
    \n-
    309 FieldVector<ctype,dimworld> realNormal = in.centerUnitOuterNormal();
    \n-
    310
    \n-
    311 // Compute segment normal
    \n-
    312 FieldVector<ctype,dimworld> reconstructedNormal = crossProduct(cornerCoords[1] - cornerCoords[0],
    \n-
    313 cornerCoords[2] - cornerCoords[0]);
    \n-
    314 reconstructedNormal /= reconstructedNormal.two_norm();
    \n-
    315
    \n-
    316 if (realNormal * reconstructedNormal < 0.0)
    \n-
    317 std::swap(temp_faces.back().corners[0], temp_faces.back().corners[1]);
    \n-
    318
    \n-
    319
    \n-
    320 // add a new face to the temporary collection for the second tri
    \n-
    321 temp_faces.emplace_back(eindex, in.indexInInside(),
    \n-
    322#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
    \n-
    323 Dune::GeometryTypes::simplex(dim-codim)
    \n-
    324#else
    \n-
    325 Dune::GeometryType(Dune::GeometryType::simplex,dim-codim)
    \n-
    326#endif
    \n-
    327 );
    \n-
    328 temp_faces.back().corners[0].idx = vertex_indices[3];
    \n-
    329 temp_faces.back().corners[1].idx = vertex_indices[2];
    \n-
    330 temp_faces.back().corners[2].idx = vertex_indices[1];
    \n-
    331 // remember the vertices' numbers in parent element's vertices
    \n-
    332 temp_faces.back().corners[0].num = vertex_numbers[3];
    \n-
    333 temp_faces.back().corners[1].num = vertex_numbers[2];
    \n-
    334 temp_faces.back().corners[2].num = vertex_numbers[1];
    \n-
    335
    \n-
    336 // Now we have the correct vertices in the last entries of temp_faces, but they may
    \n-
    337 // have the wrong orientation. We want the triangle vertices on counterclockwise order,
    \n-
    338 // when viewed from the outside of the grid. Therefore, we check the orientation of the
    \n-
    339 // new face and possibly switch two vertices.
    \n-
    340 // Compute segment normal
    \n-
    341 reconstructedNormal = crossProduct(cornerCoords[2] - cornerCoords[3],
    \n-
    342 cornerCoords[1] - cornerCoords[3]);
    \n-
    343 reconstructedNormal /= reconstructedNormal.two_norm();
    \n-
    344
    \n-
    345 if (realNormal * reconstructedNormal < 0.0)
    \n-
    346 std::swap(temp_faces.back().corners[0], temp_faces.back().corners[1]);
    \n-
    347
    \n-
    348 simplex_index+=2;
    \n-
    349 break;
    \n-
    350 }
    \n-
    351 default :
    \n-
    352 DUNE_THROW(Dune::NotImplemented, "the extractor does only work for triangle and quadrilateral faces (" << face_corners << " corners)");
    \n-
    353 break;
    \n-
    354 }
    \n-
    355 } // end loop over found surface parts
    \n-
    356 }
    \n-
    357 } // end loop over elements
    \n-
    358
    \n-
    359 std::cout << "added " << simplex_index << " subfaces\\n";
    \n-
    360
    \n-
    361 // allocate the array for the face specific information...
    \n-
    362 this->subEntities_.resize(simplex_index);
    \n-
    363 // ...and fill in the data from the temporary containers
    \n-
    364 copy(temp_faces.begin(), temp_faces.end(), this->subEntities_.begin());
    \n-
    365 }
    \n-
    366
    \n+
    180 unsigned int num_in_parent : 3;
    \n+
    181
    \n+
    183 Dune::GeometryType geometryType_;
    \n+
    184
    \n+
    191 CornerInfo corners[cube_corners]; // sim = numer of vertices in a simplex
    \n+
    192 };
    \n+
    \n+
    193
    \n+
    194
    \n+
    195 typedef std::map<IndexType, ElementInfo> ElementInfoMap;
    \n+
    196 typedef std::map<IndexType, VertexInfo> VertexInfoMap;
    \n+
    197
    \n+
    198 /************************** MEMBER VARIABLES ************************/
    \n+
    199
    \n+\n+
    202
    \n+
    203 /* Geometrical and Topological Information */
    \n+
    204
    \n+
    206 std::vector<CoordinateInfo> coords_;
    \n+
    207
    \n+
    209 std::vector<SubEntityInfo> subEntities_;
    \n+
    210
    \n+\n+
    217
    \n+\n+
    224
    \n+\n+
    226
    \n+
    227public:
    \n+
    228
    \n+
    229 /* C O N S T R U C T O R S A N D D E S T R U C T O R S */
    \n+
    230
    \n+
    \n+
    235 Extractor(const GV& gv)
    \n+
    236 : gv_(gv)
    \n+
    237#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 6)
    \n+
    238 , cellMapper_(gv, mcmgElementLayout())
    \n+
    239#else
    \n+
    240 , cellMapper_(gv)
    \n+
    241#endif
    \n+
    242 {}
    \n+
    \n+
    243
    \n+
    244 /* F U N C T I O N A L I T Y */
    \n+
    245
    \n+
    \n+
    249 void clear()
    \n+
    250 {
    \n+
    251 // this is an inofficial way on how to free the memory allocated
    \n+
    252 // by a std::vector
    \n+
    253 {
    \n+
    254 std::vector<CoordinateInfo> dummy;
    \n+
    255 coords_.swap(dummy);
    \n+
    256 }
    \n+
    257 {
    \n+
    258 std::vector<SubEntityInfo> dummy;
    \n+
    259 subEntities_.swap(dummy);
    \n+
    260 }
    \n+
    261
    \n+
    262 // ...then clear the maps themselves, too
    \n+
    263 vtxInfo_.clear();
    \n+
    264 elmtInfo_.clear();
    \n+
    265 }
    \n+
    \n+
    266
    \n+
    267
    \n+
    268 /* G E T T E R S */
    \n+
    269
    \n+
    \n+
    275 void getCoords(std::vector<Dune::FieldVector<ctype, dimworld> >& coords) const
    \n+
    276 {
    \n+
    277 coords.resize(coords_.size());
    \n+
    278 for (unsigned int i = 0; i < coords_.size(); ++i)
    \n+
    279 coords[i] = coords_[i].coord;
    \n+
    280 }
    \n+
    \n+
    281
    \n+
    282
    \n+
    \n+
    287 unsigned int nCoords() const
    \n+
    288 {
    \n+
    289 return coords_.size();
    \n+
    290 }
    \n+
    \n+
    291
    \n+
    \n+
    293 void getGeometryTypes(std::vector<Dune::GeometryType>& geometryTypes) const
    \n+
    294 {
    \n+
    295 geometryTypes.resize(subEntities_.size());
    \n+
    296 for (size_t i=0; i<subEntities_.size(); i++)
    \n+
    297 geometryTypes[i] = subEntities_[i].geometryType_;
    \n+
    298 }
    \n+
    \n+
    299
    \n+
    300
    \n+
    \n+
    304 void getFaces(std::vector<VertexVector>& faces) const
    \n+
    305 {
    \n+
    306 faces.resize(subEntities_.size());
    \n+
    307 for (unsigned int i = 0; i < subEntities_.size(); ++i) {
    \n+
    308 faces[i].resize(subEntities_[i].nCorners());
    \n+
    309 for (unsigned int j = 0; j < subEntities_[i].nCorners(); ++j)
    \n+
    310 faces[i][j] = subEntities_[i].corners[j].idx;
    \n+
    311 }
    \n+
    312 }
    \n+
    \n+
    313
    \n+
    314
    \n+
    \n+
    323 bool faceIndices(const Element& e, int& first, int& count) const
    \n+
    324 {
    \n+
    325 typename ElementInfoMap::const_iterator it =
    \n+
    326 elmtInfo_.find(cellMapper_.map(e));
    \n+
    327 if (it == elmtInfo_.end())
    \n+
    328 {
    \n+
    329 first = -1;
    \n+
    330 count = 0;
    \n+
    331 return false;
    \n+
    332 }
    \n+
    333 // the iterator is valid, fill the out params
    \n+
    334 first = it->second.idx;
    \n+
    335 count = it->second.faces;
    \n+
    336 return true;
    \n+
    337 }
    \n+
    \n+
    338
    \n+
    339
    \n+
    \n+
    345 int indexInInside(unsigned int index) const
    \n+
    346 {
    \n+
    347 return index < subEntities_.size() ? subEntities_[index].num_in_parent : -1;
    \n+
    348 }
    \n+
    \n+
    349
    \n+
    350 // /**
    \n+
    351 // * @brief tests that a given entry in the extraction set does have local couplings
    \n+
    352 // * @todo parallel interface
    \n+
    353 // */
    \n+
    354 // bool contains (unsigned int global, unsigned int & local) const
    \n+
    355 // {
    \n+
    356 // local = global;
    \n+
    357 // return true;
    \n+
    358 // }
    \n+
    359
    \n+
    \n+
    363 const GridView & gridView() const
    \n+
    364 {
    \n+
    365 return gv_;
    \n+
    366 }
    \n+
    \n
    367
    \n-
    368 // now first write the array with the coordinates...
    \n-
    369 this->coords_.resize(this->vtxInfo_.size());
    \n-
    370 for (const auto& vinfo : this->vtxInfo_)
    \n-
    371 {
    \n-
    372 // get a pointer to the associated info object
    \n-
    373 CoordinateInfo* current = &this->coords_[vinfo.second.idx];
    \n-
    374 // store this coordinates index // NEEDED?
    \n-
    375 current->index = vinfo.second.idx;
    \n-
    376 // store the vertex' index for the index2vertex mapping
    \n-
    377 current->vtxindex = vinfo.first;
    \n-
    378 // store the vertex' coordinates under the associated index
    \n-
    379 // in the coordinates array
    \n-
    380 const auto vtx = this->grid().entity(vinfo.second.p);
    \n-
    381 current->coord = vtx.geometry().corner(0);
    \n-
    382 }
    \n-
    383
    \n-
    384}
    \n-
    385
    \n-
    386} // namespace GridGlue
    \n+
    \n+
    368 const Grid& grid() const
    \n+
    369 {
    \n+
    370 return gv_.grid();
    \n+
    371 }
    \n+
    \n+
    372
    \n+
    379 Element
    \n+
    \n+
    380 element(unsigned int index) const
    \n+
    381 {
    \n+
    382 if (index >= subEntities_.size())
    \n+
    383 DUNE_THROW(Dune::GridError, "invalid face index");
    \n+
    384 const ElementSeed seed = elmtInfo_.at(subEntities_[index].parent).p;
    \n+
    385 return grid().entity(seed);
    \n+
    386 }
    \n+
    \n
    387
    \n-
    388} // namespace Dune
    \n-
    389
    \n-
    390#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH
    \n-\n-
    extractor base class
    \n+
    388#if 1
    \n+
    395 Vertex
    \n+
    \n+
    396 vertex(unsigned int index) const
    \n+
    397 {
    \n+
    398 if (index >= coords_.size())
    \n+
    399 DUNE_THROW(Dune::GridError, "invalid coordinate index");
    \n+
    400 const VertexSeed seed = vtxInfo_.at(coords_[index].vtxindex).p;
    \n+
    401 return grid().entity(seed);
    \n+
    402 }
    \n+
    \n+
    403#endif
    \n+
    404
    \n+
    \n+
    406 Geometry geometry(unsigned int index) const;
    \n+
    407
    \n+
    \n+
    409 LocalGeometry geometryLocal(unsigned int index) const;
    \n+
    410
    \n+
    411};
    \n+
    412
    \n+
    413
    \n+
    415template<typename GV, int cd>
    \n+
    \n+\n+
    417{
    \n+
    418 std::vector<Coords> corners(subEntities_[index].nCorners());
    \n+
    419 for (unsigned int i = 0; i < subEntities_[index].nCorners(); ++i)
    \n+
    420 corners[i] = coords_[subEntities_[index].corners[i].idx].coord;
    \n+
    421
    \n+
    422 return Geometry(subEntities_[index].geometryType_, corners);
    \n+
    423}
    \n+
    \n+
    424
    \n+
    425
    \n+
    427template<typename GV, int cd>
    \n+
    \n+\n+
    429{
    \n+
    430 std::vector<LocalCoords> corners(subEntities_[index].nCorners());
    \n+
    431
    \n+
    432 // get face info
    \n+
    433 const SubEntityInfo & face = subEntities_[index];
    \n+
    434 Dune::GeometryType facetype = subEntities_[index].geometryType_;
    \n+
    435
    \n+
    436 // get reference element
    \n+
    437 const auto elmtseed = elmtInfo_.at(face.parent).p;
    \n+
    438 const auto elmt = grid().entity(elmtseed);
    \n+
    439 const Dune::GeometryType celltype = elmt.type();
    \n+
    440 const auto& re = Dune::ReferenceElements<ctype, dim>::general(celltype);
    \n+
    441 for (unsigned int i = 0; i < subEntities_[index].nCorners(); ++i)
    \n+
    442 corners[i] = re.position(face.corners[i].num,dim);
    \n+
    443
    \n+
    444 return LocalGeometry(facetype, corners);
    \n+
    445}
    \n+
    \n+
    \n+
    446
    \n+
    447} // namespace GridGlue
    \n+
    448
    \n+
    449} // namespace Dune
    \n+
    450
    \n+
    451#endif // DUNE_GRIDGLUE_EXTRACTORS_EXTRACTOR_HH
    \n+
    \n+
    \n
    Definition gridglue.hh:37
    \n-
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n-
    static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim > &a, const Dune::FieldVector< T, dim > &b)
    compute cross product
    Definition crossproduct.hh:15
    \n-
    Definition codim1extractor.hh:42
    \n-
    Extractor< GV, 1 >::IndexType IndexType
    Definition codim1extractor.hh:51
    \n-
    GV GridView
    Definition codim1extractor.hh:56
    \n-
    GV::Traits::template Codim< 0 >::Entity Element
    Definition codim1extractor.hh:62
    \n-
    Dune::FieldVector< ctype, dimworld > Coords
    Definition codim1extractor.hh:59
    \n-
    GV::Grid::ctype ctype
    Definition codim1extractor.hh:58
    \n-
    Codim1Extractor(const GV &gv, const Predicate &predicate)
    Constructor.
    Definition codim1extractor.hh:81
    \n-
    static constexpr int simplex_corners
    compile time number of corners of surface simplices
    Definition codim1extractor.hh:54
    \n-
    Extractor< GV, 1 >::VertexInfo VertexInfo
    Definition codim1extractor.hh:68
    \n-
    Extractor< GV, 1 >::CoordinateInfo CoordinateInfo
    Definition codim1extractor.hh:69
    \n-
    Extractor< GV, 1 >::ElementInfo ElementInfo
    Definition codim1extractor.hh:67
    \n-
    Extractor< GV, 1 >::SubEntityInfo SubEntityInfo
    Definition codim1extractor.hh:66
    \n-
    Extractor< GV, 1 >::VertexInfoMap VertexInfoMap
    Definition codim1extractor.hh:70
    \n-
    std::function< bool(const Element &, unsigned int subentity)> Predicate
    Definition codim1extractor.hh:63
    \n-
    GV::Traits::template Codim< dim >::Entity Vertex
    Definition codim1extractor.hh:61
    \n
    Provides codimension-independent methods for grid extraction.
    Definition extractor.hh:46
    \n-
    static constexpr auto dimworld
    Definition extractor.hh:50
    \n+
    GV::Traits::template Codim< dim >::Entity Vertex
    Definition extractor.hh:63
    \n+
    VertexInfoMap vtxInfo_
    a map enabling faster access to vertices and coordinates
    Definition extractor.hh:216
    \n+
    const Grid & grid() const
    Definition extractor.hh:368
    \n+
    MultipleCodimMultipleGeomTypeMapper< GridView, MCMGElementLayout > CellMapper
    Definition extractor.hh:74
    \n+
    Element element(unsigned int index) const
    gets the parent element for a given face index, throws an exception if index not valid
    Definition extractor.hh:380
    \n+
    int indexInInside(unsigned int index) const
    gets the number face in the parent element
    Definition extractor.hh:345
    \n+
    Dune::FieldVector< ctype, dim > LocalCoords
    Definition extractor.hh:61
    \n+
    LocalGeometry geometryLocal(unsigned int index) const
    Get geometry of the extracted face in element coordinates.
    Definition extractor.hh:428
    \n+
    static constexpr auto dimworld
    Definition extractor.hh:50
    \n+
    Dune::MultiLinearGeometry< ctype, dim-codim, dimworld > Geometry
    Definition extractor.hh:81
    \n
    int IndexType
    Definition extractor.hh:77
    \n-
    static constexpr int cube_corners
    Definition extractor.hh:54
    \n-
    static constexpr auto codim
    Definition extractor.hh:52
    \n+
    std::vector< CoordinateInfo > coords_
    all information about the corner vertices of the extracted
    Definition extractor.hh:206
    \n+
    GV::Traits::template Codim< 0 >::Entity Element
    Definition extractor.hh:66
    \n+
    const GridView & gridView() const
    give access to the Dune::GridView where this Patch belongs to
    Definition extractor.hh:363
    \n+
    void getFaces(std::vector< VertexVector > &faces) const
    Get the corners of the extracted subentities.
    Definition extractor.hh:304
    \n+
    std::vector< unsigned int > VertexVector
    Definition extractor.hh:69
    \n+
    const GridView gv_
    the grid object to extract the surface from
    Definition extractor.hh:201
    \n+
    std::vector< SubEntityInfo > subEntities_
    all information about the extracted subEntities
    Definition extractor.hh:209
    \n+
    static constexpr int cube_corners
    Definition extractor.hh:54
    \n+
    Vertex vertex(unsigned int index) const
    gets the vertex for a given coordinate index throws an exception if index not valid
    Definition extractor.hh:396
    \n+
    static constexpr auto codim
    Definition extractor.hh:52
    \n+
    Dune::FieldVector< ctype, dimworld > Coords
    Definition extractor.hh:60
    \n+
    void getGeometryTypes(std::vector< Dune::GeometryType > &geometryTypes) const
    Get the list of geometry types.
    Definition extractor.hh:293
    \n
    std::map< IndexType, VertexInfo > VertexInfoMap
    Definition extractor.hh:196
    \n-
    static constexpr auto dim
    Definition extractor.hh:51
    \n+
    GridView::Grid Grid
    Definition extractor.hh:57
    \n+
    bool faceIndices(const Element &e, int &first, int &count) const
    gets index of first subentity as well as the total number of subentities that were extracted from thi...
    Definition extractor.hh:323
    \n+
    Geometry geometry(unsigned int index) const
    Get world geometry of the extracted face.
    Definition extractor.hh:416
    \n+
    GV GridView
    Definition extractor.hh:56
    \n+
    unsigned int nCoords() const
    getter for the count of coordinates
    Definition extractor.hh:287
    \n+
    GV::Grid::ctype ctype
    Definition extractor.hh:59
    \n+
    std::map< IndexType, ElementInfo > ElementInfoMap
    Definition extractor.hh:195
    \n+
    Extractor(const GV &gv)
    Constructor.
    Definition extractor.hh:235
    \n+
    void getCoords(std::vector< Dune::FieldVector< ctype, dimworld > > &coords) const
    getter for the coordinates array
    Definition extractor.hh:275
    \n+
    CellMapper cellMapper_
    Definition extractor.hh:225
    \n+
    Element::EntitySeed ElementSeed
    Definition extractor.hh:67
    \n+
    Vertex::EntitySeed VertexSeed
    Definition extractor.hh:64
    \n+
    ElementInfoMap elmtInfo_
    a map enabling faster access to elements and faces
    Definition extractor.hh:223
    \n+
    void clear()
    delete everything build up so far and free the memory
    Definition extractor.hh:249
    \n+
    static constexpr auto dim
    Definition extractor.hh:51
    \n+
    Dune::MultiLinearGeometry< ctype, dim-codim, dim > LocalGeometry
    Definition extractor.hh:82
    \n+
    Helpful struct holding one index for the coordinate (vertex) to which it is associated and the elemen...
    Definition extractor.hh:92
    \n+
    unsigned int idx
    index of the vertex
    Definition extractor.hh:93
    \n+
    unsigned int num
    element corner
    Definition extractor.hh:94
    \n \n+
    CoordinateInfo(unsigned int index_, IndexType vtxindex_)
    Definition extractor.hh:102
    \n+
    unsigned int index
    the index of this coordinate (in internal storage scheme) // NEEDED??
    Definition extractor.hh:113
    \n+
    CoordinateInfo()
    Definition extractor.hh:99
    \n+
    Coords coord
    the coordinate
    Definition extractor.hh:110
    \n+
    IndexType vtxindex
    the index of the parent element (from index set)
    Definition extractor.hh:107
    \n
    simple struct holding a vertex pointer and an index
    Definition extractor.hh:120
    \n+
    unsigned int idx
    Definition extractor.hh:123
    \n+
    VertexInfo(unsigned int idx_, const Vertex &p_)
    Definition extractor.hh:121
    \n+
    VertexSeed p
    Definition extractor.hh:124
    \n
    simple struct holding an element seed and an index
    Definition extractor.hh:132
    \n+
    unsigned int idx
    the index of this element's first face in the internal list of extracted faces
    Definition extractor.hh:137
    \n+
    unsigned int faces
    the number of extracted faces for this element
    Definition extractor.hh:140
    \n+
    ElementInfo(unsigned int idx_, const Element &p_, unsigned int f_)
    Definition extractor.hh:133
    \n+
    ElementSeed p
    the entity seed for the element
    Definition extractor.hh:143
    \n
    Holds some information about an element's subentity involved in a coupling.
    Definition extractor.hh:151
    \n+
    unsigned int nCorners() const
    Definition extractor.hh:171
    \n+
    CornerInfo corners[cube_corners]
    the corner indices plus the numbers of the vertices in the parent element
    Definition extractor.hh:191
    \n+
    IndexType parent
    the index of the parent element (from index set)
    Definition extractor.hh:177
    \n+
    SubEntityInfo(IndexType parent_, unsigned int num_in_parent_, const Dune::GeometryType &geometryType)
    Definition extractor.hh:166
    \n+
    unsigned int num_in_parent
    the number of the face in the parent element
    Definition extractor.hh:180
    \n+
    Dune::GeometryType geometryType_
    The GeometryType of the subentity.
    Definition extractor.hh:183
    \n+
    SubEntityInfo()
    Definition extractor.hh:152
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,485 +1,607 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\bs\n-codim1extractor.hh\n+extractor.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n 5/*\n-6 * Filename: codim1extractor.hh\n+6 * Filename: extractor.hh\n 7 * Version: 1.0\n-8 * Created on: Jun 23, 2009\n-9 * Author: Oliver Sander, Christian Engwer\n+8 * Created on: Oct 05, 2009\n+9 * Author: Christian Engwer\n 10 * ---------------------------------\n 11 * Project: dune-grid-glue\n-12 * Description: class for grid extractors extracting surface grids\n+12 * Description: base class for all grid extractors\n 13 *\n 14 */\n-20#ifndef DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH\n-21#define DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH\n+20#ifndef DUNE_GRIDGLUE_EXTRACTORS_EXTRACTOR_HH\n+21#define DUNE_GRIDGLUE_EXTRACTORS_EXTRACTOR_HH\n 22\n-23#include \"_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\"\n-24\n-25#include \n-26#include \n-27#include \n-28\n-29#include \n-30#include \n-31#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bc_\br_\bo_\bs_\bs_\bp_\br_\bo_\bd_\bu_\bc_\bt_\b._\bh_\bh>\n-32\n-33namespace _\bD_\bu_\bn_\be {\n-34\n-35 namespace GridGlue {\n-36\n-40template\n-_\b4_\b1class _\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br : public _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-42{\n-43public:\n-44\n-45 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n-46\n-47 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd;\n-48 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm;\n-49 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bo_\bd_\bi_\bm;\n-50 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bu_\bb_\be_\b__\bc_\bo_\br_\bn_\be_\br_\bs;\n-_\b5_\b1 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b1_\b>_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be;\n-52\n-_\b5_\b4 static constexpr int _\bs_\bi_\bm_\bp_\bl_\be_\bx_\b__\bc_\bo_\br_\bn_\be_\br_\bs = _\bd_\bi_\bm;\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\n+34namespace _\bD_\bu_\bn_\be {\n+35\n+36 namespace GridGlue {\n+37\n+44template\n+_\b4_\b5class _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+46{\n+47\n+48public:\n+49\n+_\b5_\b0 static constexpr auto _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd = GV::dimensionworld;\n+_\b5_\b1 static constexpr auto _\bd_\bi_\bm = GV::dimension;\n+_\b5_\b2 static constexpr auto _\bc_\bo_\bd_\bi_\bm = cd;\n+53\n+_\b5_\b4 static constexpr int _\bc_\bu_\bb_\be_\b__\bc_\bo_\br_\bn_\be_\br_\bs = 1 << (_\bd_\bi_\bm-_\bc_\bo_\bd_\bi_\bm);\n 55\n _\b5_\b6 typedef GV _\bG_\br_\bi_\bd_\bV_\bi_\be_\bw;\n-57\n-_\b5_\b8 typedef typename GV::Grid::ctype _\bc_\bt_\by_\bp_\be;\n-_\b5_\b9 typedef Dune::FieldVector _\bC_\bo_\bo_\br_\bd_\bs;\n-60\n-_\b6_\b1 typedef typename GV::Traits::template Codim::Entity _\bV_\be_\br_\bt_\be_\bx;\n-_\b6_\b2 typedef typename GV::Traits::template Codim<0>::Entity _\bE_\bl_\be_\bm_\be_\bn_\bt;\n-_\b6_\b3 typedef std::function\n-_\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be;\n-64\n-65 // import typedefs from base class\n-_\b6_\b6 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b1_\b>_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo;\n-_\b6_\b7 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b1_\b>_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo;\n-_\b6_\b8 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b1_\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo;\n-_\b6_\b9 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b1_\b>_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo;\n-_\b7_\b0 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b1_\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp;\n-71\n-72public:\n-73\n-74 /* C O N S T R U C T O R S A N D D E S T R U C T O R S */\n-75\n-_\b8_\b1 _\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(const GV& gv, const _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be& predicate)\n-82 : _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(gv)\n-83 {\n-84 std::cout << \"This is Codim1Extractor on a <\" << _\bd_\bi_\bm\n-85 << \",\" << _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd << \"> grid!\"\n-86 << std::endl;\n-87 update(predicate);\n-88 }\n-89\n-90private:\n-91\n-105 void update(const _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be& predicate);\n-106\n-107};\n+_\b5_\b7 typedef typename GridView::Grid _\bG_\br_\bi_\bd;\n+58\n+_\b5_\b9 typedef typename GV::Grid::ctype _\bc_\bt_\by_\bp_\be;\n+_\b6_\b0 typedef Dune::FieldVector _\bC_\bo_\bo_\br_\bd_\bs;\n+_\b6_\b1 typedef Dune::FieldVector _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs;\n+62\n+_\b6_\b3 typedef typename GV::Traits::template Codim::Entity _\bV_\be_\br_\bt_\be_\bx;\n+_\b6_\b4 typedef typename Vertex::EntitySeed _\bV_\be_\br_\bt_\be_\bx_\bS_\be_\be_\bd;\n+65\n+_\b6_\b6 typedef typename GV::Traits::template Codim<0>::Entity _\bE_\bl_\be_\bm_\be_\bn_\bt;\n+_\b6_\b7 typedef typename Element::EntitySeed _\bE_\bl_\be_\bm_\be_\bn_\bt_\bS_\be_\be_\bd;\n+68\n+_\b6_\b9 typedef std::vector _\bV_\be_\br_\bt_\be_\bx_\bV_\be_\bc_\bt_\bo_\br;\n+70\n+71#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 6)\n+72 using _\bC_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br = MultipleCodimMultipleGeomTypeMapper;\n+73#else\n+_\b7_\b4 using _\bC_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br = MultipleCodimMultipleGeomTypeMapper;\n+75#endif\n+76 // typedef typename CellMapper::IndexType IndexType;\n+_\b7_\b7 typedef int _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be;\n+78public:\n+79\n+80 // transformations\n+_\b8_\b1 typedef Dune::MultiLinearGeometry<_\bc_\bt_\by_\bp_\be, _\bd_\bi_\bm-_\bc_\bo_\bd_\bi_\bm, _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd> _\bG_\be_\bo_\bm_\be_\bt_\br_\by;\n+_\b8_\b2 typedef Dune::MultiLinearGeometry<_\bc_\bt_\by_\bp_\be, _\bd_\bi_\bm-_\bc_\bo_\bd_\bi_\bm, _\bd_\bi_\bm> _\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by;\n+83\n+84protected:\n+85 /************************** PRIVATE SUBCLASSES **********************/\n+86\n+_\b9_\b1 struct _\bC_\bo_\br_\bn_\be_\br_\bI_\bn_\bf_\bo\n+92 {\n+_\b9_\b3 unsigned int _\bi_\bd_\bx : 28;\n+_\b9_\b4 unsigned int _\bn_\bu_\bm : 4;\n+95 };\n+96\n+_\b9_\b7 struct _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n+98 {\n+_\b9_\b9 _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo()\n+100 {}\n+101\n+_\b1_\b0_\b2 _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo(unsigned int index_, _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be vtxindex_)\n+103 : _\bv_\bt_\bx_\bi_\bn_\bd_\be_\bx(vtxindex_), _\bi_\bn_\bd_\be_\bx(index_)\n+104 {}\n+105\n+_\b1_\b0_\b7 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bv_\bt_\bx_\bi_\bn_\bd_\be_\bx;\n 108\n-109\n-110template\n-111void Codim1Extractor::update(const Predicate& predicate)\n-112{\n-113 // free everything there is in this object\n-114 this->clear();\n+_\b1_\b1_\b0 _\bC_\bo_\bo_\br_\bd_\bs _\bc_\bo_\bo_\br_\bd;\n+111\n+_\b1_\b1_\b3 unsigned int _\bi_\bn_\bd_\be_\bx;\n+114 };\n 115\n-116 // In this first pass iterate over all entities of codim 0.\n-117 // For each codim 1 intersection check if it is part of the boundary and if\n-so,\n-118 // get its corner vertices, find resp. store them together with their\n-associated index,\n-119 // and remember the indices of the boundary faces' corners.\n+_\b1_\b1_\b9 struct _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n 120 {\n-121 // several counter for consecutive indexing are needed\n-122 int simplex_index = 0;\n-123 int vertex_index = 0;\n-124 IndexType eindex = 0; // supress warning\n-125\n-126 // needed later for insertion into a std::set which only\n-127 // works with const references\n-128\n-129 // a temporary container where newly acquired face\n-130 // information can be stored at first\n-131 std::deque temp_faces;\n-132\n-133 // iterate over interior codim 0 elements on the grid\n-134 for (const auto& elmt : elements(this->gv_, Partitions::interior))\n-135 {\n-136 Dune::GeometryType gt = elmt.type();\n-137\n-138 // if some face is part of the surface add it!\n-139 if (elmt.hasBoundaryIntersections())\n-140 {\n-141 // add an entry to the element info map, the index will be set properly\n-later,\n-142 // whereas the number of faces is already known\n-143 eindex = this->cellMapper_.index(elmt);\n-144 this->elmtInfo_.emplace(eindex, ElementInfo(simplex_index, elmt, 0));\n+_\b1_\b2_\b1 _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo(unsigned int idx_, const _\bV_\be_\br_\bt_\be_\bx& p_) : _\bi_\bd_\bx(idx_), _\bp(p_.seed())\n+122 {}\n+_\b1_\b2_\b3 unsigned int _\bi_\bd_\bx;\n+_\b1_\b2_\b4 _\bV_\be_\br_\bt_\be_\bx_\bS_\be_\be_\bd _\bp;\n+125 };\n+126\n+127\n+_\b1_\b3_\b1 struct _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n+132 {\n+_\b1_\b3_\b3 _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo(unsigned int idx_, const _\bE_\bl_\be_\bm_\be_\bn_\bt& p_, unsigned int f_) : _\bi_\bd_\bx\n+(idx_), _\bf_\ba_\bc_\be_\bs(f_), _\bp(p_.seed())\n+134 {}\n+135\n+_\b1_\b3_\b7 unsigned int _\bi_\bd_\bx : 28;\n+138\n+_\b1_\b4_\b0 unsigned int _\bf_\ba_\bc_\be_\bs : 4;\n+141\n+_\b1_\b4_\b3 _\bE_\bl_\be_\bm_\be_\bn_\bt_\bS_\be_\be_\bd _\bp;\n+144 };\n 145\n-146 // now add the faces in ascending order of their indices\n-147 // (we are only talking about 1-4 faces here, so O(n^2) is ok!)\n-148 for (const auto& in : _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(this->gv_, elmt))\n-149 {\n-150 // Stop only at selected boundary faces\n-151 if (!in.boundary() or !predicate(elmt, in.indexInInside()))\n-152 continue;\n-153\n-154 const auto& refElement = Dune::ReferenceElements::general(gt);\n-155 // get the corner count of this face\n-156 const int face_corners = refElement.size(in.indexInInside(), 1, dim);\n-157\n-158 // now we only have to care about the 3D case, i.e. a triangle face can be\n-159 // inserted directly whereas a quadrilateral face has to be divided into\n-two triangles\n-160 switch (face_corners)\n+146\n+_\b1_\b5_\b0 struct _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n+151 {\n+_\b1_\b5_\b2 _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo()\n+153 /*\n+154 * TODO: move default value of `geometryType_` to member declaration\n+155 * when removing support for older dune-geometry\n+156 */\n+157#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)\n+158 : _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_(GeometryTypes::simplex(_\bd_\bi_\bm-_\bc_\bo_\bd_\bi_\bm))\n+159 {}\n+160#else\n 161 {\n-162 case 2 :\n-163 case 3:\n-164 {\n-165 // we have a simplex here\n-166\n-167 // register the additional face(s)\n-168 this->elmtInfo_.at(eindex).faces++;\n-169\n-170 // add a new face to the temporary collection\n-171 temp_faces.emplace_back(eindex, in.indexInInside(),\n-172#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)\n-173 Dune::GeometryTypes::simplex(dim-codim)\n-174#else\n-175 Dune::GeometryType(Dune::GeometryType::simplex,dim-codim)\n-176#endif\n-177 );\n+162 _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_.makeSimplex(_\bd_\bi_\bm-_\bc_\bo_\bd_\bi_\bm);\n+163 }\n+164#endif\n+165\n+_\b1_\b6_\b6 _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo(_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be parent_, unsigned int num_in_parent_,\n+167 const Dune::GeometryType& geometryType)\n+168 : _\bp_\ba_\br_\be_\bn_\bt(parent_), _\bn_\bu_\bm_\b__\bi_\bn_\b__\bp_\ba_\br_\be_\bn_\bt(num_in_parent_), _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_\n+(geometryType)\n+169 {}\n+170\n+_\b1_\b7_\b1 unsigned int _\bn_\bC_\bo_\br_\bn_\be_\br_\bs() const\n+172 {\n+173 return Dune::ReferenceElements::general\n+(_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_).size(_\bd_\bi_\bm-_\bc_\bo_\bd_\bi_\bm);\n+174 }\n+175\n+_\b1_\b7_\b7 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bp_\ba_\br_\be_\bn_\bt;\n 178\n-179 std::vector > cornerCoords(face_corners);\n-180\n-181 // try for each of the faces vertices whether it is already inserted or not\n-182 for (int i = 0; i < face_corners; ++i)\n-183 {\n-184 // get the number of the vertex in the parent element\n-185 int vertex_number = refElement.subEntity(in.indexInInside(), 1, i, dim);\n-186\n-187 // get the vertex pointer and the index from the index set\n-188 const Vertex vertex = elmt.template subEntity(vertex_number);\n-189 cornerCoords[i] = vertex.geometry().corner(0);\n-190\n-191 IndexType vindex = this->gv_.indexSet().template index(vertex);\n-192\n-193 // remember the vertex' number in parent element's vertices\n-194 temp_faces.back().corners[i].num = vertex_number;\n-195\n-196 // if the vertex is not yet inserted in the vertex info map\n-197 // it is a new one -> it will be inserted now!\n-198 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);\n-199 if (vimit == this->vtxInfo_.end())\n-200 {\n-201 // insert into the map\n-202 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));\n-203 // remember the vertex as a corner of the current face in temp_faces\n-204 temp_faces.back().corners[i].idx = vertex_index;\n-205 // increase the current index\n-206 vertex_index++;\n-207 }\n-208 else\n-209 {\n-210 // only insert the index into the simplices array\n-211 temp_faces.back().corners[i].idx = vimit->second.idx;\n-212 }\n-213 }\n-214\n-215 // Now we have the correct vertices in the last entries of temp_faces, but\n-they may\n-216 // have the wrong orientation. We want them to be oriented such that all\n-boundary edges\n-217 // point in the counterclockwise direction. Therefore, we check the\n-orientation of the\n-218 // new face and possibly switch the two vertices.\n-219 FieldVector realNormal = in.centerUnitOuterNormal();\n-220\n-221 // Compute segment normal\n-222 FieldVector reconstructedNormal;\n-223 if (dim==2) // boundary face is a line segment\n-224 {\n-225 reconstructedNormal[0] = cornerCoords[1][1] - cornerCoords[0][1];\n-226 reconstructedNormal[1] = cornerCoords[0][0] - cornerCoords[1][0];\n-227 } else { // boundary face is a triangle\n-228 FieldVector segment1 = cornerCoords[1] - cornerCoords[0];\n-229 FieldVector segment2 = cornerCoords[2] - cornerCoords[0];\n-230 reconstructedNormal = _\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt(segment1, segment2);\n-231 }\n-232 reconstructedNormal /= reconstructedNormal.two_norm();\n-233\n-234 if (realNormal * reconstructedNormal < 0.0)\n-235 std::swap(temp_faces.back().corners[0], temp_faces.back().corners[1]);\n-236\n-237 // now increase the current face index\n-238 simplex_index++;\n-239 break;\n-240 }\n-241 case 4 :\n-242 {\n-243 assert(dim == 3 && cube_corners == 4);\n-244 // we have a quadrilateral here\n-245 std::array vertex_indices;\n-246 std::array vertex_numbers;\n-247\n-248 // register the additional face(s) (2 simplices)\n-249 this->elmtInfo_.at(eindex).faces += 2;\n-250\n-251 std::array, 4> cornerCoords;\n-252\n-253 // get the vertex pointers for the quadrilateral's corner vertices\n-254 // and try for each of them whether it is already inserted or not\n-255 for (int i = 0; i < cube_corners; ++i)\n-256 {\n-257 // get the number of the vertex in the parent element\n-258 vertex_numbers[i] = refElement.subEntity(in.indexInInside(), 1, i, dim);\n-259\n-260 // get the vertex pointer and the index from the index set\n-261 const Vertex vertex = elmt.template subEntity(vertex_numbers[i]);\n-262 cornerCoords[i] = vertex.geometry().corner(0);\n-263\n-264 IndexType vindex = this->gv_.indexSet().template index(vertex);\n-265\n-266 // if the vertex is not yet inserted in the vertex info map\n-267 // it is a new one -> it will be inserted now!\n-268 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);\n-269 if (vimit == this->vtxInfo_.end())\n-270 {\n-271 // insert into the map\n-272 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));\n-273 // remember this vertex' index\n-274 vertex_indices[i] = vertex_index;\n-275 // increase the current index\n-276 vertex_index++;\n-277 }\n-278 else\n-279 {\n-280 // only remember the vertex' index\n-281 vertex_indices[i] = vimit->second.idx;\n-282 }\n-283 }\n-284\n-285 // now introduce the two triangles subdividing the quadrilateral\n-286 // ATTENTION: the order of vertices given by \"orientedSubface\" corresponds\n-to the order\n-287 // of a Dune quadrilateral, i.e. the triangles are given by 0 1 2 and 3 2 1\n-288\n-289 // add a new face to the temporary collection for the first tri\n-290 temp_faces.emplace_back(eindex, in.indexInInside(),\n-291#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)\n-292 Dune::GeometryTypes::simplex(dim-codim)\n-293#else\n-294 Dune::GeometryType(Dune::GeometryType::simplex,dim-codim)\n-295#endif\n-296 );\n-297 temp_faces.back().corners[0].idx = vertex_indices[0];\n-298 temp_faces.back().corners[1].idx = vertex_indices[1];\n-299 temp_faces.back().corners[2].idx = vertex_indices[2];\n-300 // remember the vertices' numbers in parent element's vertices\n-301 temp_faces.back().corners[0].num = vertex_numbers[0];\n-302 temp_faces.back().corners[1].num = vertex_numbers[1];\n-303 temp_faces.back().corners[2].num = vertex_numbers[2];\n-304\n-305 // Now we have the correct vertices in the last entries of temp_faces, but\n-they may\n-306 // have the wrong orientation. We want the triangle vertices on\n-counterclockwise order,\n-307 // when viewed from the outside of the grid. Therefore, we check the\n-orientation of the\n-308 // new face and possibly switch two vertices.\n-309 FieldVector realNormal = in.centerUnitOuterNormal();\n-310\n-311 // Compute segment normal\n-312 FieldVector reconstructedNormal = _\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt(cornerCoords\n-[1] - cornerCoords[0],\n-313 cornerCoords[2] - cornerCoords[0]);\n-314 reconstructedNormal /= reconstructedNormal.two_norm();\n-315\n-316 if (realNormal * reconstructedNormal < 0.0)\n-317 std::swap(temp_faces.back().corners[0], temp_faces.back().corners[1]);\n-318\n-319\n-320 // add a new face to the temporary collection for the second tri\n-321 temp_faces.emplace_back(eindex, in.indexInInside(),\n-322#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)\n-323 Dune::GeometryTypes::simplex(dim-codim)\n-324#else\n-325 Dune::GeometryType(Dune::GeometryType::simplex,dim-codim)\n-326#endif\n-327 );\n-328 temp_faces.back().corners[0].idx = vertex_indices[3];\n-329 temp_faces.back().corners[1].idx = vertex_indices[2];\n-330 temp_faces.back().corners[2].idx = vertex_indices[1];\n-331 // remember the vertices' numbers in parent element's vertices\n-332 temp_faces.back().corners[0].num = vertex_numbers[3];\n-333 temp_faces.back().corners[1].num = vertex_numbers[2];\n-334 temp_faces.back().corners[2].num = vertex_numbers[1];\n-335\n-336 // Now we have the correct vertices in the last entries of temp_faces, but\n-they may\n-337 // have the wrong orientation. We want the triangle vertices on\n-counterclockwise order,\n-338 // when viewed from the outside of the grid. Therefore, we check the\n-orientation of the\n-339 // new face and possibly switch two vertices.\n-340 // Compute segment normal\n-341 reconstructedNormal = _\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt(cornerCoords[2] - cornerCoords[3],\n-342 cornerCoords[1] - cornerCoords[3]);\n-343 reconstructedNormal /= reconstructedNormal.two_norm();\n-344\n-345 if (realNormal * reconstructedNormal < 0.0)\n-346 std::swap(temp_faces.back().corners[0], temp_faces.back().corners[1]);\n-347\n-348 simplex_index+=2;\n-349 break;\n-350 }\n-351 default :\n-352 DUNE_THROW(Dune::NotImplemented, \"the extractor does only work for triangle\n-and quadrilateral faces (\" << face_corners << \" corners)\");\n-353 break;\n-354 }\n-355 } // end loop over found surface parts\n-356 }\n-357 } // end loop over elements\n-358\n-359 std::cout << \"added \" << simplex_index << \" subfaces\\n\";\n-360\n-361 // allocate the array for the face specific information...\n-362 this->subEntities_.resize(simplex_index);\n-363 // ...and fill in the data from the temporary containers\n-364 copy(temp_faces.begin(), temp_faces.end(), this->subEntities_.begin());\n-365 }\n-366\n+_\b1_\b8_\b0 unsigned int _\bn_\bu_\bm_\b__\bi_\bn_\b__\bp_\ba_\br_\be_\bn_\bt : 3;\n+181\n+_\b1_\b8_\b3 Dune::GeometryType _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_;\n+184\n+_\b1_\b9_\b1 _\bC_\bo_\br_\bn_\be_\br_\bI_\bn_\bf_\bo _\bc_\bo_\br_\bn_\be_\br_\bs[_\bc_\bu_\bb_\be_\b__\bc_\bo_\br_\bn_\be_\br_\bs]; // sim = numer of vertices in a simplex\n+192 };\n+193\n+194\n+_\b1_\b9_\b5 typedef std::map _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\bM_\ba_\bp;\n+_\b1_\b9_\b6 typedef std::map _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp;\n+197\n+198 /************************** MEMBER VARIABLES ************************/\n+199\n+_\b2_\b0_\b1 const _\bG_\br_\bi_\bd_\bV_\bi_\be_\bw _\bg_\bv_\b_;\n+202\n+203 /* Geometrical and Topological Information */\n+204\n+_\b2_\b0_\b6 std::vector _\bc_\bo_\bo_\br_\bd_\bs_\b_;\n+207\n+_\b2_\b0_\b9 std::vector _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_;\n+210\n+_\b2_\b1_\b6 _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp _\bv_\bt_\bx_\bI_\bn_\bf_\bo_\b_;\n+217\n+_\b2_\b2_\b3 _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\bM_\ba_\bp _\be_\bl_\bm_\bt_\bI_\bn_\bf_\bo_\b_;\n+224\n+_\b2_\b2_\b5 _\bC_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br _\bc_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br_\b_;\n+226\n+227public:\n+228\n+229 /* C O N S T R U C T O R S A N D D E S T R U C T O R S */\n+230\n+_\b2_\b3_\b5 _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(const GV& gv)\n+236 : _\bg_\bv_\b_(gv)\n+237#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 6)\n+238 , _\bc_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br_\b_(gv, mcmgElementLayout())\n+239#else\n+240 , _\bc_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br_\b_(gv)\n+241#endif\n+242 {}\n+243\n+244 /* F U N C T I O N A L I T Y */\n+245\n+_\b2_\b4_\b9 void _\bc_\bl_\be_\ba_\br()\n+250 {\n+251 // this is an inofficial way on how to free the memory allocated\n+252 // by a std::vector\n+253 {\n+254 std::vector dummy;\n+255 _\bc_\bo_\bo_\br_\bd_\bs_\b_.swap(dummy);\n+256 }\n+257 {\n+258 std::vector dummy;\n+259 _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.swap(dummy);\n+260 }\n+261\n+262 // ...then clear the maps themselves, too\n+263 _\bv_\bt_\bx_\bI_\bn_\bf_\bo_\b_.clear();\n+264 _\be_\bl_\bm_\bt_\bI_\bn_\bf_\bo_\b_.clear();\n+265 }\n+266\n+267\n+268 /* G E T T E R S */\n+269\n+_\b2_\b7_\b5 void _\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs(std::vector >& coords)\n+const\n+276 {\n+277 coords.resize(_\bc_\bo_\bo_\br_\bd_\bs_\b_.size());\n+278 for (unsigned int i = 0; i < _\bc_\bo_\bo_\br_\bd_\bs_\b_.size(); ++i)\n+279 coords[i] = _\bc_\bo_\bo_\br_\bd_\bs_\b_[i].coord;\n+280 }\n+281\n+282\n+_\b2_\b8_\b7 unsigned int _\bn_\bC_\bo_\bo_\br_\bd_\bs() const\n+288 {\n+289 return _\bc_\bo_\bo_\br_\bd_\bs_\b_.size();\n+290 }\n+291\n+_\b2_\b9_\b3 void _\bg_\be_\bt_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\bs(std::vector& geometryTypes) const\n+294 {\n+295 geometryTypes.resize(_\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.size());\n+296 for (size_t i=0; i<_\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.size(); i++)\n+297 geometryTypes[i] = _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_[i].geometryType_;\n+298 }\n+299\n+300\n+_\b3_\b0_\b4 void _\bg_\be_\bt_\bF_\ba_\bc_\be_\bs(std::vector& faces) const\n+305 {\n+306 faces.resize(_\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.size());\n+307 for (unsigned int i = 0; i < _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.size(); ++i) {\n+308 faces[i].resize(_\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_[i].nCorners());\n+309 for (unsigned int j = 0; j < _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_[i].nCorners(); ++j)\n+310 faces[i][j] = _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_[i].corners[j].idx;\n+311 }\n+312 }\n+313\n+314\n+_\b3_\b2_\b3 bool _\bf_\ba_\bc_\be_\bI_\bn_\bd_\bi_\bc_\be_\bs(const _\bE_\bl_\be_\bm_\be_\bn_\bt& e, int& first, int& count) const\n+324 {\n+325 typename ElementInfoMap::const_iterator it =\n+326 _\be_\bl_\bm_\bt_\bI_\bn_\bf_\bo_\b_.find(_\bc_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br_\b_.map(e));\n+327 if (it == _\be_\bl_\bm_\bt_\bI_\bn_\bf_\bo_\b_.end())\n+328 {\n+329 first = -1;\n+330 count = 0;\n+331 return false;\n+332 }\n+333 // the iterator is valid, fill the out params\n+334 first = it->second.idx;\n+335 count = it->second.faces;\n+336 return true;\n+337 }\n+338\n+339\n+_\b3_\b4_\b5 int _\bi_\bn_\bd_\be_\bx_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be(unsigned int index) const\n+346 {\n+347 return index < _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.size() ? _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_[index].num_in_parent : -\n+1;\n+348 }\n+349\n+350 // /**\n+351 // * @brief tests that a given entry in the extraction set does have local\n+couplings\n+352 // * @todo parallel interface\n+353 // */\n+354 // bool contains (unsigned int global, unsigned int & local) const\n+355 // {\n+356 // local = global;\n+357 // return true;\n+358 // }\n+359\n+_\b3_\b6_\b3 const _\bG_\br_\bi_\bd_\bV_\bi_\be_\bw & _\bg_\br_\bi_\bd_\bV_\bi_\be_\bw() const\n+364 {\n+365 return _\bg_\bv_\b_;\n+366 }\n 367\n-368 // now first write the array with the coordinates...\n-369 this->coords_.resize(this->vtxInfo_.size());\n-370 for (const auto& vinfo : this->vtxInfo_)\n-371 {\n-372 // get a pointer to the associated info object\n-373 CoordinateInfo* current = &this->coords_[vinfo.second.idx];\n-374 // store this coordinates index // NEEDED?\n-375 current->index = vinfo.second.idx;\n-376 // store the vertex' index for the index2vertex mapping\n-377 current->vtxindex = vinfo.first;\n-378 // store the vertex' coordinates under the associated index\n-379 // in the coordinates array\n-380 const auto vtx = this->grid().entity(vinfo.second.p);\n-381 current->coord = vtx.geometry().corner(0);\n-382 }\n-383\n-384}\n-385\n-386} // namespace GridGlue\n+_\b3_\b6_\b8 const _\bG_\br_\bi_\bd& _\bg_\br_\bi_\bd() const\n+369 {\n+370 return _\bg_\bv_\b_.grid();\n+371 }\n+372\n+379 _\bE_\bl_\be_\bm_\be_\bn_\bt\n+_\b3_\b8_\b0 _\be_\bl_\be_\bm_\be_\bn_\bt(unsigned int index) const\n+381 {\n+382 if (index >= _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.size())\n+383 DUNE_THROW(Dune::GridError, \"invalid face index\");\n+384 const _\bE_\bl_\be_\bm_\be_\bn_\bt_\bS_\be_\be_\bd seed = _\be_\bl_\bm_\bt_\bI_\bn_\bf_\bo_\b_.at(_\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_[index].parent).p;\n+385 return _\bg_\br_\bi_\bd().entity(seed);\n+386 }\n 387\n-388} // namespace Dune\n-389\n-390#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH\n-_\bc_\br_\bo_\bs_\bs_\bp_\br_\bo_\bd_\bu_\bc_\bt_\b._\bh_\bh\n-_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\n-extractor base class\n+388#if 1\n+395 _\bV_\be_\br_\bt_\be_\bx\n+_\b3_\b9_\b6 _\bv_\be_\br_\bt_\be_\bx(unsigned int index) const\n+397 {\n+398 if (index >= _\bc_\bo_\bo_\br_\bd_\bs_\b_.size())\n+399 DUNE_THROW(Dune::GridError, \"invalid coordinate index\");\n+400 const _\bV_\be_\br_\bt_\be_\bx_\bS_\be_\be_\bd seed = _\bv_\bt_\bx_\bI_\bn_\bf_\bo_\b_.at(_\bc_\bo_\bo_\br_\bd_\bs_\b_[index].vtxindex).p;\n+401 return _\bg_\br_\bi_\bd().entity(seed);\n+402 }\n+403#endif\n+404\n+_\b4_\b0_\b6 _\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bg_\be_\bo_\bm_\be_\bt_\br_\by(unsigned int index) const;\n+407\n+_\b4_\b0_\b9 _\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bL_\bo_\bc_\ba_\bl(unsigned int index) const;\n+410\n+411};\n+412\n+413\n+415template\n+_\b4_\b1_\b6typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\bc_\bd_\b>_\b:_\b:_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\bc_\bd_\b>_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by(unsigned int\n+index) const\n+417{\n+418 std::vector corners(subEntities_[index].nCorners());\n+419 for (unsigned int i = 0; i < subEntities_[index].nCorners(); ++i)\n+420 corners[i] = coords_[subEntities_[index].corners[i].idx].coord;\n+421\n+422 return _\bG_\be_\bo_\bm_\be_\bt_\br_\by(subEntities_[index].geometryType_, corners);\n+423}\n+424\n+425\n+427template\n+_\b4_\b2_\b8typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\bc_\bd_\b>_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\bc_\bd_\b>_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bL_\bo_\bc_\ba_\bl\n+(unsigned int index) const\n+429{\n+430 std::vector corners(subEntities_[index].nCorners());\n+431\n+432 // get face info\n+433 const _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo & face = subEntities_[index];\n+434 Dune::GeometryType facetype = subEntities_[index]._\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_;\n+435\n+436 // get reference element\n+437 const auto elmtseed = elmtInfo_.at(face._\bp_\ba_\br_\be_\bn_\bt).p;\n+438 const auto elmt = grid().entity(elmtseed);\n+439 const Dune::GeometryType celltype = elmt.type();\n+440 const auto& re = Dune::ReferenceElements::general(celltype);\n+441 for (unsigned int i = 0; i < subEntities_[index].nCorners(); ++i)\n+442 corners[i] = re.position(face._\bc_\bo_\br_\bn_\be_\br_\bs[i]._\bn_\bu_\bm,dim);\n+443\n+444 return _\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by(facetype, corners);\n+445}\n+446\n+447} // namespace GridGlue\n+448\n+449} // namespace Dune\n+450\n+451#endif // DUNE_GRIDGLUE_EXTRACTORS_EXTRACTOR_HH\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n-> &reverse=!reversed)\n-Iterate over all intersections of a GridGlue.\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt\n-static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim\n-> &a, const Dune::FieldVector< T, dim > &b)\n-compute cross product\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn crossproduct.hh:15\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:42\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n-Extractor< GV, 1 >::IndexType IndexType\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:51\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw\n-GV GridView\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:56\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt\n-GV::Traits::template Codim< 0 >::Entity Element\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:62\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< ctype, dimworld > Coords\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:59\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bt_\by_\bp_\be\n-GV::Grid::ctype ctype\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:58\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-Codim1Extractor(const GV &gv, const Predicate &predicate)\n-Constructor.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:81\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bs_\bi_\bm_\bp_\bl_\be_\bx_\b__\bc_\bo_\br_\bn_\be_\br_\bs\n-static constexpr int simplex_corners\n-compile time number of corners of surface simplices\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:54\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n-Extractor< GV, 1 >::VertexInfo VertexInfo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:68\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n-Extractor< GV, 1 >::CoordinateInfo CoordinateInfo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:69\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n-Extractor< GV, 1 >::ElementInfo ElementInfo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:67\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n-Extractor< GV, 1 >::SubEntityInfo SubEntityInfo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:66\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n-Extractor< GV, 1 >::VertexInfoMap VertexInfoMap\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:70\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be\n-std::function< bool(const Element &, unsigned int subentity)> Predicate\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:63\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx\n-GV::Traits::template Codim< dim >::Entity Vertex\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:61\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n Provides codimension-independent methods for grid extraction.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:46\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b1_\b _\b>_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx\n+GV::Traits::template Codim< dim >::Entity Vertex\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:63\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bv_\bt_\bx_\bI_\bn_\bf_\bo_\b_\n+VertexInfoMap vtxInfo_\n+a map enabling faster access to vertices and coordinates\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:216\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\br_\bi_\bd\n+const Grid & grid() const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:368\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br\n+MultipleCodimMultipleGeomTypeMapper< GridView, MCMGElementLayout > CellMapper\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:74\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\be_\bl_\be_\bm_\be_\bn_\bt\n+Element element(unsigned int index) const\n+gets the parent element for a given face index, throws an exception if index\n+not valid\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:380\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bi_\bn_\bd_\be_\bx_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be\n+int indexInInside(unsigned int index) const\n+gets the number face in the parent element\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:345\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< ctype, dim > LocalCoords\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:61\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bL_\bo_\bc_\ba_\bl\n+LocalGeometry geometryLocal(unsigned int index) const\n+Get geometry of the extracted face in element coordinates.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:428\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd\n static constexpr auto dimworld\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:50\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+Dune::MultiLinearGeometry< ctype, dim-codim, dimworld > Geometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:81\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n int IndexType\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:77\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b1_\b _\b>_\b:_\b:_\bc_\bu_\bb_\be_\b__\bc_\bo_\br_\bn_\be_\br_\bs\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bo_\bo_\br_\bd_\bs_\b_\n+std::vector< CoordinateInfo > coords_\n+all information about the corner vertices of the extracted\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:206\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt\n+GV::Traits::template Codim< 0 >::Entity Element\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:66\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\br_\bi_\bd_\bV_\bi_\be_\bw\n+const GridView & gridView() const\n+give access to the Dune::GridView where this Patch belongs to\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:363\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bt_\bF_\ba_\bc_\be_\bs\n+void getFaces(std::vector< VertexVector > &faces) const\n+Get the corners of the extracted subentities.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:304\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bV_\be_\bc_\bt_\bo_\br\n+std::vector< unsigned int > VertexVector\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:69\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\bv_\b_\n+const GridView gv_\n+the grid object to extract the surface from\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:201\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_\n+std::vector< SubEntityInfo > subEntities_\n+all information about the extracted subEntities\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:209\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bu_\bb_\be_\b__\bc_\bo_\br_\bn_\be_\br_\bs\n static constexpr int cube_corners\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:54\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b1_\b _\b>_\b:_\b:_\bc_\bo_\bd_\bi_\bm\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bv_\be_\br_\bt_\be_\bx\n+Vertex vertex(unsigned int index) const\n+gets the vertex for a given coordinate index throws an exception if index not\n+valid\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:396\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bo_\bd_\bi_\bm\n static constexpr auto codim\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:52\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< ctype, dimworld > Coords\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:60\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bt_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\bs\n+void getGeometryTypes(std::vector< Dune::GeometryType > &geometryTypes) const\n+Get the list of geometry types.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:293\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n std::map< IndexType, VertexInfo > VertexInfoMap\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:196\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b1_\b _\b>_\b:_\b:_\bd_\bi_\bm\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bG_\br_\bi_\bd\n+GridView::Grid Grid\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:57\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bf_\ba_\bc_\be_\bI_\bn_\bd_\bi_\bc_\be_\bs\n+bool faceIndices(const Element &e, int &first, int &count) const\n+gets index of first subentity as well as the total number of subentities that\n+were extracted from thi...\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:323\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by\n+Geometry geometry(unsigned int index) const\n+Get world geometry of the extracted face.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:416\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw\n+GV GridView\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:56\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bn_\bC_\bo_\bo_\br_\bd_\bs\n+unsigned int nCoords() const\n+getter for the count of coordinates\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:287\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bt_\by_\bp_\be\n+GV::Grid::ctype ctype\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:59\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n+std::map< IndexType, ElementInfo > ElementInfoMap\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:195\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+Extractor(const GV &gv)\n+Constructor.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:235\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs\n+void getCoords(std::vector< Dune::FieldVector< ctype, dimworld > > &coords)\n+const\n+getter for the coordinates array\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:275\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br_\b_\n+CellMapper cellMapper_\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:225\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bS_\be_\be_\bd\n+Element::EntitySeed ElementSeed\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:67\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bS_\be_\be_\bd\n+Vertex::EntitySeed VertexSeed\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:64\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\be_\bl_\bm_\bt_\bI_\bn_\bf_\bo_\b_\n+ElementInfoMap elmtInfo_\n+a map enabling faster access to elements and faces\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:223\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bl_\be_\ba_\br\n+void clear()\n+delete everything build up so far and free the memory\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:249\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm\n static constexpr auto dim\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:51\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n+Dune::MultiLinearGeometry< ctype, dim-codim, dim > LocalGeometry\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:82\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\br_\bn_\be_\br_\bI_\bn_\bf_\bo\n+Helpful struct holding one index for the coordinate (vertex) to which it is\n+associated and the elemen...\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:92\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\br_\bn_\be_\br_\bI_\bn_\bf_\bo_\b:_\b:_\bi_\bd_\bx\n+unsigned int idx\n+index of the vertex\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:93\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\br_\bn_\be_\br_\bI_\bn_\bf_\bo_\b:_\b:_\bn_\bu_\bm\n+unsigned int num\n+element corner\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:94\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:98\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n+CoordinateInfo(unsigned int index_, IndexType vtxindex_)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:102\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo_\b:_\b:_\bi_\bn_\bd_\be_\bx\n+unsigned int index\n+the index of this coordinate (in internal storage scheme) // NEEDED??\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:113\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n+CoordinateInfo()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:99\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo_\b:_\b:_\bc_\bo_\bo_\br_\bd\n+Coords coord\n+the coordinate\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:110\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo_\b:_\b:_\bv_\bt_\bx_\bi_\bn_\bd_\be_\bx\n+IndexType vtxindex\n+the index of the parent element (from index set)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:107\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n simple struct holding a vertex pointer and an index\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:120\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\b:_\b:_\bi_\bd_\bx\n+unsigned int idx\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:123\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n+VertexInfo(unsigned int idx_, const Vertex &p_)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:121\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\b:_\b:_\bp\n+VertexSeed p\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:124\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n simple struct holding an element seed and an index\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:132\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\b:_\b:_\bi_\bd_\bx\n+unsigned int idx\n+the index of this element's first face in the internal list of extracted faces\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:137\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\b:_\b:_\bf_\ba_\bc_\be_\bs\n+unsigned int faces\n+the number of extracted faces for this element\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:140\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n+ElementInfo(unsigned int idx_, const Element &p_, unsigned int f_)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:133\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\b:_\b:_\bp\n+ElementSeed p\n+the entity seed for the element\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:143\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n Holds some information about an element's subentity involved in a coupling.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:151\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bn_\bC_\bo_\br_\bn_\be_\br_\bs\n+unsigned int nCorners() const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:171\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bc_\bo_\br_\bn_\be_\br_\bs\n+CornerInfo corners[cube_corners]\n+the corner indices plus the numbers of the vertices in the parent element\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:191\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt\n+IndexType parent\n+the index of the parent element (from index set)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:177\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n+SubEntityInfo(IndexType parent_, unsigned int num_in_parent_, const Dune::\n+GeometryType &geometryType)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:166\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bn_\bu_\bm_\b__\bi_\bn_\b__\bp_\ba_\br_\be_\bn_\bt\n+unsigned int num_in_parent\n+the number of the face in the parent element\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:180\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_\n+Dune::GeometryType geometryType_\n+The GeometryType of the subentity.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:183\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n+SubEntityInfo()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:152\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: codim0extractor.hh File Reference\n+dune-grid-glue: codim1extractor.hh File Reference\n \n \n \n \n \n \n \n@@ -72,42 +72,44 @@\n
  • dune
  • grid-glue
  • extractors
  • \n
    \n
    \n
    \n \n-
    codim0extractor.hh File Reference
    \n+
    codim1extractor.hh File Reference
    \n
    \n
    \n \n-

    Mesh grid extractor base class. \n+

    Grid extractor class for codim 1 subgrids. \n More...

    \n-
    #include <deque>
    \n+
    #include "extractor.hh"
    \n+#include <array>
    \n+#include <deque>
    \n #include <functional>
    \n #include <dune/common/deprecated.hh>
    \n-#include <dune/grid/common/mcmgmapper.hh>
    \n-#include "extractor.hh"
    \n+#include <dune/common/version.hh>
    \n+#include <dune/grid-glue/common/crossproduct.hh>
    \n
    \n

    Go to the source code of this file.

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

    \n Classes

    class  Dune::GridGlue::Codim0Extractor< GV >
    class  Dune::GridGlue::Codim1Extractor< GV >
     
    \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n

    Detailed Description

    \n-

    Mesh grid extractor base class.

    \n+

    Grid extractor class for codim 1 subgrids.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,27 +2,29 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\bs\n _\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-codim0extractor.hh File Reference\n-Mesh grid extractor base class. _\bM_\bo_\br_\be_\b._\b._\b.\n+codim1extractor.hh File Reference\n+Grid extractor class for codim 1 subgrids. _\bM_\bo_\br_\be_\b._\b._\b.\n+#include \"_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\"\n+#include \n #include \n #include \n #include \n-#include \n-#include \"_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\"\n+#include \n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bc_\br_\bo_\bs_\bs_\bp_\br_\bo_\bd_\bu_\bc_\bt_\b._\bh_\bh>\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b _\b>\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b _\b>\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n *\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-Mesh grid extractor base class.\n+Grid extractor class for codim 1 subgrids.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: codim0extractor.hh Source File\n+dune-grid-glue: codim1extractor.hh Source File\n \n \n \n \n \n \n \n@@ -74,272 +74,411 @@\n \n \n
    \n
    \n-
    codim0extractor.hh
    \n+
    codim1extractor.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n
    5/*
    \n-
    6 * Filename: codim0extractor.hh
    \n+
    6 * Filename: codim1extractor.hh
    \n
    7 * Version: 1.0
    \n
    8 * Created on: Jun 23, 2009
    \n
    9 * Author: Oliver Sander, Christian Engwer
    \n
    10 * ---------------------------------
    \n
    11 * Project: dune-grid-glue
    \n-
    12 * Description: base class for grid extractors extracting surface grids
    \n+
    12 * Description: class for grid extractors extracting surface grids
    \n
    13 *
    \n
    14 */
    \n-
    20#ifndef DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH
    \n-
    21#define DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH
    \n+
    20#ifndef DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH
    \n+
    21#define DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH
    \n
    22
    \n-
    23#include <deque>
    \n-
    24#include <functional>
    \n-
    25
    \n-
    26#include <dune/common/deprecated.hh>
    \n-
    27#include <dune/grid/common/mcmgmapper.hh>
    \n+
    23#include "extractor.hh"
    \n+
    24
    \n+
    25#include <array>
    \n+
    26#include <deque>
    \n+
    27#include <functional>
    \n
    28
    \n-
    29#include "extractor.hh"
    \n-
    30
    \n-
    31namespace Dune {
    \n+
    29#include <dune/common/deprecated.hh>
    \n+
    30#include <dune/common/version.hh>
    \n+\n
    32
    \n-
    33 namespace GridGlue {
    \n+
    33namespace Dune {
    \n
    34
    \n-
    38template<typename GV>
    \n-
    \n-
    39class Codim0Extractor : public Extractor<GV,0>
    \n-
    40{
    \n-
    41
    \n-
    42public:
    \n-
    43
    \n-
    44 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n-
    45 using Extractor<GV,0>::codim;
    \n-
    46 typedef typename Extractor<GV,0>::ctype ctype;
    \n-
    47 using Extractor<GV,0>::dim;
    \n-
    48 using Extractor<GV,0>::dimworld;
    \n-\n-
    50
    \n-
    51 typedef typename GV::Traits::template Codim<dim>::Entity Vertex;
    \n-
    52 typedef typename GV::Traits::template Codim<0>::Entity Element;
    \n-
    53 typedef std::function<bool(const Element&, unsigned int subentity)> Predicate;
    \n-
    54
    \n-
    55 // import typedefs from base class
    \n-\n-\n-\n-\n-\n-
    61
    \n-
    \n-
    67 Codim0Extractor(const GV& gv, const Predicate& predicate)
    \n-
    68 : Extractor<GV,0>(gv), positiveNormalDirection_(false)
    \n-
    69 {
    \n-
    70 std::cout << "This is Codim0Extractor on a <"
    \n-
    71 << GV::dimension << "," << GV::dimensionworld << "> grid!" << std::endl;
    \n-
    72 update(predicate);
    \n-
    73 }
    \n+
    35 namespace GridGlue {
    \n+
    36
    \n+
    40template<typename GV>
    \n+
    \n+
    41class Codim1Extractor : public Extractor<GV,1>
    \n+
    42{
    \n+
    43public:
    \n+
    44
    \n+
    45 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n+
    46
    \n+
    47 using Extractor<GV,1>::dimworld;
    \n+
    48 using Extractor<GV,1>::dim;
    \n+
    49 using Extractor<GV,1>::codim;
    \n+
    50 using Extractor<GV,1>::cube_corners;
    \n+\n+
    52
    \n+
    54 static constexpr int simplex_corners = dim;
    \n+
    55
    \n+
    56 typedef GV GridView;
    \n+
    57
    \n+
    58 typedef typename GV::Grid::ctype ctype;
    \n+
    59 typedef Dune::FieldVector<ctype, dimworld> Coords;
    \n+
    60
    \n+
    61 typedef typename GV::Traits::template Codim<dim>::Entity Vertex;
    \n+
    62 typedef typename GV::Traits::template Codim<0>::Entity Element;
    \n+
    63 typedef std::function<bool(const Element&, unsigned int subentity)> Predicate;
    \n+
    64
    \n+
    65 // import typedefs from base class
    \n+\n+\n+\n+\n+\n+
    71
    \n+
    72public:
    \n+
    73
    \n+
    74 /* C O N S T R U C T O R S A N D D E S T R U C T O R S */
    \n+
    75
    \n+
    \n+
    81 Codim1Extractor(const GV& gv, const Predicate& predicate)
    \n+
    82 : Extractor<GV,1>(gv)
    \n+
    83 {
    \n+
    84 std::cout << "This is Codim1Extractor on a <" << dim
    \n+
    85 << "," << dimworld << "> grid!"
    \n+
    86 << std::endl;
    \n+
    87 update(predicate);
    \n+
    88 }
    \n
    \n-
    74
    \n-\n-
    76 const bool & positiveNormalDirection() const { return positiveNormalDirection_; }
    \n-
    77
    \n-
    78protected:
    \n-\n-
    80private:
    \n-
    81 void update(const Predicate& predicate);
    \n-
    82};
    \n-
    \n-
    83
    \n-
    84
    \n-
    85template<typename GV>
    \n-
    86void Codim0Extractor<GV>::update(const Predicate& predicate)
    \n-
    87{
    \n-
    88 // In this first pass iterate over all entities of codim 0.
    \n-
    89 // Get its corner vertices, find resp. store them together with their associated index,
    \n-
    90 // and remember the indices of the corners.
    \n+
    89
    \n+
    90private:
    \n
    91
    \n-
    92 // free everything there is in this object
    \n-
    93 this->clear();
    \n-
    94
    \n-
    95 // several counter for consecutive indexing are needed
    \n-
    96 size_t element_index = 0;
    \n-
    97 size_t vertex_index = 0;
    \n-
    98
    \n-
    99 // a temporary container where newly acquired face
    \n-
    100 // information can be stored at first
    \n-
    101 std::deque<SubEntityInfo> temp_faces;
    \n-
    102
    \n-
    103 // iterate over all codim 0 elements on the grid
    \n-
    104 for (const auto& elmt : elements(this->gv_, Partitions::interior))
    \n-
    105 {
    \n-
    106 const auto geometry = elmt.geometry();
    \n-
    107 IndexType eindex = this->cellMapper_.index(elmt);
    \n+
    105 void update(const Predicate& predicate);
    \n+
    106
    \n+
    107};
    \n+
    \n
    108
    \n-
    109 // only do sth. if this element is "interesting"
    \n-
    110 // implicit cast is done automatically
    \n-
    111 if (predicate(elmt,0))
    \n-
    112 {
    \n-
    113 // add an entry to the element info map, the index will be set properly later
    \n-
    114 this->elmtInfo_.emplace(eindex, ElementInfo(element_index, elmt, 1));
    \n+
    109
    \n+
    110template<typename GV>
    \n+
    111void Codim1Extractor<GV>::update(const Predicate& predicate)
    \n+
    112{
    \n+
    113 // free everything there is in this object
    \n+
    114 this->clear();
    \n
    115
    \n-
    116 unsigned int numCorners = elmt.subEntities(dim);
    \n-
    117 unsigned int vertex_indices[numCorners]; // index in global vector
    \n-
    118 unsigned int vertex_numbers[numCorners]; // index in parent entity
    \n-
    119
    \n-
    120 // try for each of the faces vertices whether it is already inserted or not
    \n-
    121 for (unsigned int i = 0; i < numCorners; ++i)
    \n-
    122 {
    \n-
    123 vertex_numbers[i] = i;
    \n-
    124
    \n-
    125 // get the vertex pointer and the index from the index set
    \n-
    126 const Vertex vertex = elmt.template subEntity<dim>(vertex_numbers[i]);
    \n-
    127 IndexType vindex = this->gv_.indexSet().template index<dim>(vertex);
    \n+
    116 // In this first pass iterate over all entities of codim 0.
    \n+
    117 // For each codim 1 intersection check if it is part of the boundary and if so,
    \n+
    118 // get its corner vertices, find resp. store them together with their associated index,
    \n+
    119 // and remember the indices of the boundary faces' corners.
    \n+
    120 {
    \n+
    121 // several counter for consecutive indexing are needed
    \n+
    122 int simplex_index = 0;
    \n+
    123 int vertex_index = 0;
    \n+
    124 IndexType eindex = 0; // supress warning
    \n+
    125
    \n+
    126 // needed later for insertion into a std::set which only
    \n+
    127 // works with const references
    \n
    128
    \n-
    129 // if the vertex is not yet inserted in the vertex info map
    \n-
    130 // it is a new one -> it will be inserted now!
    \n-
    131 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);
    \n-
    132 if (vimit == this->vtxInfo_.end())
    \n-
    133 {
    \n-
    134 // insert into the map
    \n-
    135 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));
    \n-
    136 // remember this vertex' index
    \n-
    137 vertex_indices[i] = vertex_index;
    \n-
    138 // increase the current index
    \n-
    139 vertex_index++;
    \n-
    140 }
    \n-
    141 else
    \n-
    142 {
    \n-
    143 // only remember the vertex' index
    \n-
    144 vertex_indices[i] = vimit->second.idx;
    \n-
    145 }
    \n-
    146 }
    \n-
    147
    \n-
    148 // flip cell if necessary
    \n-
    149 {
    \n-
    150 switch (int(dim))
    \n-
    151 {
    \n-
    152 case 0 :
    \n-
    153 break;
    \n-
    154 case 1 :
    \n-
    155 {
    \n-
    156 // The following test only works if the zero-th coordinate is the
    \n-
    157 // one that defines the orientation. A sufficient condition for
    \n-
    158 // this is dimworld == 1
    \n-
    159 /* assert(dimworld==1); */
    \n-
    160 bool elementNormalDirection =
    \n-
    161 (geometry.corner(1)[0] < geometry.corner(0)[0]);
    \n-
    162 if ( positiveNormalDirection_ != elementNormalDirection )
    \n-
    163 {
    \n-
    164 std::swap(vertex_indices[0], vertex_indices[1]);
    \n-
    165 std::swap(vertex_numbers[0], vertex_numbers[1]);
    \n-
    166 }
    \n-
    167 break;
    \n-
    168 }
    \n-
    169 case 2 :
    \n-
    170 {
    \n-
    171 Dune::FieldVector<ctype, dimworld>
    \n-
    172 v0 = geometry.corner(1),
    \n-
    173 v1 = geometry.corner(2);
    \n-
    174 v0 -= geometry.corner(0);
    \n-
    175 v1 -= geometry.corner(0);
    \n-
    176 ctype normal_sign = v0[0]*v1[1] - v0[1]*v1[0];
    \n-
    177 bool elementNormalDirection = (normal_sign < 0);
    \n-
    178 if ( positiveNormalDirection_ != elementNormalDirection )
    \n-
    179 {
    \n-
    180 std::cout << "swap\\n";
    \n-
    181 if (elmt.type().isCube())
    \n-
    182 {
    \n-
    183 for (int i = 0; i < (1<<dim); i+=2)
    \n-
    184 {
    \n-
    185 // swap i and i+1
    \n-
    186 std::swap(vertex_indices[i], vertex_indices[i+1]);
    \n-
    187 std::swap(vertex_numbers[i], vertex_numbers[i+1]);
    \n-
    188 }
    \n-
    189 } else if (elmt.type().isSimplex()) {
    \n-
    190 std::swap(vertex_indices[0], vertex_indices[1]);
    \n-
    191 std::swap(vertex_numbers[0], vertex_numbers[1]);
    \n-
    192 } else {
    \n-
    193 DUNE_THROW(Dune::Exception, "Unexpected Geometrytype");
    \n-
    194 }
    \n-
    195 }
    \n-
    196 break;
    \n-
    197 }
    \n-
    198 }
    \n-
    199 }
    \n-
    200
    \n-
    201 // add a new face to the temporary collection
    \n-
    202 temp_faces.emplace_back(eindex, 0, elmt.type());
    \n-
    203 element_index++;
    \n-
    204 for (unsigned int i=0; i<numCorners; i++) {
    \n-
    205 temp_faces.back().corners[i].idx = vertex_indices[i];
    \n-
    206 // remember the vertices' numbers in parent element's vertices
    \n-
    207 temp_faces.back().corners[i].num = vertex_numbers[i];
    \n-
    208 }
    \n-
    209
    \n-
    210 }
    \n-
    211 } // end loop over elements
    \n-
    212
    \n-
    213 // allocate the array for the face specific information...
    \n-
    214 this->subEntities_.resize(element_index);
    \n-
    215 // ...and fill in the data from the temporary containers
    \n-
    216 copy(temp_faces.begin(), temp_faces.end(), this->subEntities_.begin());
    \n-
    217
    \n-
    218 // now first write the array with the coordinates...
    \n-
    219 this->coords_.resize(this->vtxInfo_.size());
    \n-
    220 for (const auto& vinfo : this->vtxInfo_)
    \n-
    221 {
    \n-
    222 // get a pointer to the associated info object
    \n-
    223 CoordinateInfo* current = &this->coords_[vinfo.second.idx];
    \n-
    224 // store this coordinates index // NEEDED?
    \n-
    225 current->index = vinfo.second.idx;
    \n-
    226 // store the vertex' index for the index2vertex mapping
    \n-
    227 current->vtxindex = vinfo.first;
    \n-
    228 // store the vertex' coordinates under the associated index
    \n-
    229 // in the coordinates array
    \n-
    230 const auto vtx = this->grid().entity(vinfo.second.p);
    \n-
    231 current->coord = vtx.geometry().corner(0);
    \n-
    232 }
    \n+
    129 // a temporary container where newly acquired face
    \n+
    130 // information can be stored at first
    \n+
    131 std::deque<SubEntityInfo> temp_faces;
    \n+
    132
    \n+
    133 // iterate over interior codim 0 elements on the grid
    \n+
    134 for (const auto& elmt : elements(this->gv_, Partitions::interior))
    \n+
    135 {
    \n+
    136 Dune::GeometryType gt = elmt.type();
    \n+
    137
    \n+
    138 // if some face is part of the surface add it!
    \n+
    139 if (elmt.hasBoundaryIntersections())
    \n+
    140 {
    \n+
    141 // add an entry to the element info map, the index will be set properly later,
    \n+
    142 // whereas the number of faces is already known
    \n+
    143 eindex = this->cellMapper_.index(elmt);
    \n+
    144 this->elmtInfo_.emplace(eindex, ElementInfo(simplex_index, elmt, 0));
    \n+
    145
    \n+
    146 // now add the faces in ascending order of their indices
    \n+
    147 // (we are only talking about 1-4 faces here, so O(n^2) is ok!)
    \n+
    148 for (const auto& in : intersections(this->gv_, elmt))
    \n+
    149 {
    \n+
    150 // Stop only at selected boundary faces
    \n+
    151 if (!in.boundary() or !predicate(elmt, in.indexInInside()))
    \n+
    152 continue;
    \n+
    153
    \n+
    154 const auto& refElement = Dune::ReferenceElements<ctype, dim>::general(gt);
    \n+
    155 // get the corner count of this face
    \n+
    156 const int face_corners = refElement.size(in.indexInInside(), 1, dim);
    \n+
    157
    \n+
    158 // now we only have to care about the 3D case, i.e. a triangle face can be
    \n+
    159 // inserted directly whereas a quadrilateral face has to be divided into two triangles
    \n+
    160 switch (face_corners)
    \n+
    161 {
    \n+
    162 case 2 :
    \n+
    163 case 3:
    \n+
    164 {
    \n+
    165 // we have a simplex here
    \n+
    166
    \n+
    167 // register the additional face(s)
    \n+
    168 this->elmtInfo_.at(eindex).faces++;
    \n+
    169
    \n+
    170 // add a new face to the temporary collection
    \n+
    171 temp_faces.emplace_back(eindex, in.indexInInside(),
    \n+
    172#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
    \n+
    173 Dune::GeometryTypes::simplex(dim-codim)
    \n+
    174#else
    \n+
    175 Dune::GeometryType(Dune::GeometryType::simplex,dim-codim)
    \n+
    176#endif
    \n+
    177 );
    \n+
    178
    \n+
    179 std::vector<FieldVector<ctype,dimworld> > cornerCoords(face_corners);
    \n+
    180
    \n+
    181 // try for each of the faces vertices whether it is already inserted or not
    \n+
    182 for (int i = 0; i < face_corners; ++i)
    \n+
    183 {
    \n+
    184 // get the number of the vertex in the parent element
    \n+
    185 int vertex_number = refElement.subEntity(in.indexInInside(), 1, i, dim);
    \n+
    186
    \n+
    187 // get the vertex pointer and the index from the index set
    \n+
    188 const Vertex vertex = elmt.template subEntity<dim>(vertex_number);
    \n+
    189 cornerCoords[i] = vertex.geometry().corner(0);
    \n+
    190
    \n+
    191 IndexType vindex = this->gv_.indexSet().template index<dim>(vertex);
    \n+
    192
    \n+
    193 // remember the vertex' number in parent element's vertices
    \n+
    194 temp_faces.back().corners[i].num = vertex_number;
    \n+
    195
    \n+
    196 // if the vertex is not yet inserted in the vertex info map
    \n+
    197 // it is a new one -> it will be inserted now!
    \n+
    198 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);
    \n+
    199 if (vimit == this->vtxInfo_.end())
    \n+
    200 {
    \n+
    201 // insert into the map
    \n+
    202 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));
    \n+
    203 // remember the vertex as a corner of the current face in temp_faces
    \n+
    204 temp_faces.back().corners[i].idx = vertex_index;
    \n+
    205 // increase the current index
    \n+
    206 vertex_index++;
    \n+
    207 }
    \n+
    208 else
    \n+
    209 {
    \n+
    210 // only insert the index into the simplices array
    \n+
    211 temp_faces.back().corners[i].idx = vimit->second.idx;
    \n+
    212 }
    \n+
    213 }
    \n+
    214
    \n+
    215 // Now we have the correct vertices in the last entries of temp_faces, but they may
    \n+
    216 // have the wrong orientation. We want them to be oriented such that all boundary edges
    \n+
    217 // point in the counterclockwise direction. Therefore, we check the orientation of the
    \n+
    218 // new face and possibly switch the two vertices.
    \n+
    219 FieldVector<ctype,dimworld> realNormal = in.centerUnitOuterNormal();
    \n+
    220
    \n+
    221 // Compute segment normal
    \n+
    222 FieldVector<ctype,dimworld> reconstructedNormal;
    \n+
    223 if (dim==2) // boundary face is a line segment
    \n+
    224 {
    \n+
    225 reconstructedNormal[0] = cornerCoords[1][1] - cornerCoords[0][1];
    \n+
    226 reconstructedNormal[1] = cornerCoords[0][0] - cornerCoords[1][0];
    \n+
    227 } else { // boundary face is a triangle
    \n+
    228 FieldVector<ctype,dimworld> segment1 = cornerCoords[1] - cornerCoords[0];
    \n+
    229 FieldVector<ctype,dimworld> segment2 = cornerCoords[2] - cornerCoords[0];
    \n+
    230 reconstructedNormal = crossProduct(segment1, segment2);
    \n+
    231 }
    \n+
    232 reconstructedNormal /= reconstructedNormal.two_norm();
    \n
    233
    \n-
    234}
    \n-
    235
    \n-
    236} // namespace GridGlue
    \n-
    237
    \n-
    238} // namespace Dune
    \n-
    239
    \n-
    240#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH
    \n-
    extractor base class
    \n+
    234 if (realNormal * reconstructedNormal < 0.0)
    \n+
    235 std::swap(temp_faces.back().corners[0], temp_faces.back().corners[1]);
    \n+
    236
    \n+
    237 // now increase the current face index
    \n+
    238 simplex_index++;
    \n+
    239 break;
    \n+
    240 }
    \n+
    241 case 4 :
    \n+
    242 {
    \n+
    243 assert(dim == 3 && cube_corners == 4);
    \n+
    244 // we have a quadrilateral here
    \n+
    245 std::array<unsigned int, 4> vertex_indices;
    \n+
    246 std::array<unsigned int, 4> vertex_numbers;
    \n+
    247
    \n+
    248 // register the additional face(s) (2 simplices)
    \n+
    249 this->elmtInfo_.at(eindex).faces += 2;
    \n+
    250
    \n+
    251 std::array<FieldVector<ctype,dimworld>, 4> cornerCoords;
    \n+
    252
    \n+
    253 // get the vertex pointers for the quadrilateral's corner vertices
    \n+
    254 // and try for each of them whether it is already inserted or not
    \n+
    255 for (int i = 0; i < cube_corners; ++i)
    \n+
    256 {
    \n+
    257 // get the number of the vertex in the parent element
    \n+
    258 vertex_numbers[i] = refElement.subEntity(in.indexInInside(), 1, i, dim);
    \n+
    259
    \n+
    260 // get the vertex pointer and the index from the index set
    \n+
    261 const Vertex vertex = elmt.template subEntity<dim>(vertex_numbers[i]);
    \n+
    262 cornerCoords[i] = vertex.geometry().corner(0);
    \n+
    263
    \n+
    264 IndexType vindex = this->gv_.indexSet().template index<dim>(vertex);
    \n+
    265
    \n+
    266 // if the vertex is not yet inserted in the vertex info map
    \n+
    267 // it is a new one -> it will be inserted now!
    \n+
    268 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);
    \n+
    269 if (vimit == this->vtxInfo_.end())
    \n+
    270 {
    \n+
    271 // insert into the map
    \n+
    272 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));
    \n+
    273 // remember this vertex' index
    \n+
    274 vertex_indices[i] = vertex_index;
    \n+
    275 // increase the current index
    \n+
    276 vertex_index++;
    \n+
    277 }
    \n+
    278 else
    \n+
    279 {
    \n+
    280 // only remember the vertex' index
    \n+
    281 vertex_indices[i] = vimit->second.idx;
    \n+
    282 }
    \n+
    283 }
    \n+
    284
    \n+
    285 // now introduce the two triangles subdividing the quadrilateral
    \n+
    286 // ATTENTION: the order of vertices given by "orientedSubface" corresponds to the order
    \n+
    287 // of a Dune quadrilateral, i.e. the triangles are given by 0 1 2 and 3 2 1
    \n+
    288
    \n+
    289 // add a new face to the temporary collection for the first tri
    \n+
    290 temp_faces.emplace_back(eindex, in.indexInInside(),
    \n+
    291#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
    \n+
    292 Dune::GeometryTypes::simplex(dim-codim)
    \n+
    293#else
    \n+
    294 Dune::GeometryType(Dune::GeometryType::simplex,dim-codim)
    \n+
    295#endif
    \n+
    296 );
    \n+
    297 temp_faces.back().corners[0].idx = vertex_indices[0];
    \n+
    298 temp_faces.back().corners[1].idx = vertex_indices[1];
    \n+
    299 temp_faces.back().corners[2].idx = vertex_indices[2];
    \n+
    300 // remember the vertices' numbers in parent element's vertices
    \n+
    301 temp_faces.back().corners[0].num = vertex_numbers[0];
    \n+
    302 temp_faces.back().corners[1].num = vertex_numbers[1];
    \n+
    303 temp_faces.back().corners[2].num = vertex_numbers[2];
    \n+
    304
    \n+
    305 // Now we have the correct vertices in the last entries of temp_faces, but they may
    \n+
    306 // have the wrong orientation. We want the triangle vertices on counterclockwise order,
    \n+
    307 // when viewed from the outside of the grid. Therefore, we check the orientation of the
    \n+
    308 // new face and possibly switch two vertices.
    \n+
    309 FieldVector<ctype,dimworld> realNormal = in.centerUnitOuterNormal();
    \n+
    310
    \n+
    311 // Compute segment normal
    \n+
    312 FieldVector<ctype,dimworld> reconstructedNormal = crossProduct(cornerCoords[1] - cornerCoords[0],
    \n+
    313 cornerCoords[2] - cornerCoords[0]);
    \n+
    314 reconstructedNormal /= reconstructedNormal.two_norm();
    \n+
    315
    \n+
    316 if (realNormal * reconstructedNormal < 0.0)
    \n+
    317 std::swap(temp_faces.back().corners[0], temp_faces.back().corners[1]);
    \n+
    318
    \n+
    319
    \n+
    320 // add a new face to the temporary collection for the second tri
    \n+
    321 temp_faces.emplace_back(eindex, in.indexInInside(),
    \n+
    322#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
    \n+
    323 Dune::GeometryTypes::simplex(dim-codim)
    \n+
    324#else
    \n+
    325 Dune::GeometryType(Dune::GeometryType::simplex,dim-codim)
    \n+
    326#endif
    \n+
    327 );
    \n+
    328 temp_faces.back().corners[0].idx = vertex_indices[3];
    \n+
    329 temp_faces.back().corners[1].idx = vertex_indices[2];
    \n+
    330 temp_faces.back().corners[2].idx = vertex_indices[1];
    \n+
    331 // remember the vertices' numbers in parent element's vertices
    \n+
    332 temp_faces.back().corners[0].num = vertex_numbers[3];
    \n+
    333 temp_faces.back().corners[1].num = vertex_numbers[2];
    \n+
    334 temp_faces.back().corners[2].num = vertex_numbers[1];
    \n+
    335
    \n+
    336 // Now we have the correct vertices in the last entries of temp_faces, but they may
    \n+
    337 // have the wrong orientation. We want the triangle vertices on counterclockwise order,
    \n+
    338 // when viewed from the outside of the grid. Therefore, we check the orientation of the
    \n+
    339 // new face and possibly switch two vertices.
    \n+
    340 // Compute segment normal
    \n+
    341 reconstructedNormal = crossProduct(cornerCoords[2] - cornerCoords[3],
    \n+
    342 cornerCoords[1] - cornerCoords[3]);
    \n+
    343 reconstructedNormal /= reconstructedNormal.two_norm();
    \n+
    344
    \n+
    345 if (realNormal * reconstructedNormal < 0.0)
    \n+
    346 std::swap(temp_faces.back().corners[0], temp_faces.back().corners[1]);
    \n+
    347
    \n+
    348 simplex_index+=2;
    \n+
    349 break;
    \n+
    350 }
    \n+
    351 default :
    \n+
    352 DUNE_THROW(Dune::NotImplemented, "the extractor does only work for triangle and quadrilateral faces (" << face_corners << " corners)");
    \n+
    353 break;
    \n+
    354 }
    \n+
    355 } // end loop over found surface parts
    \n+
    356 }
    \n+
    357 } // end loop over elements
    \n+
    358
    \n+
    359 std::cout << "added " << simplex_index << " subfaces\\n";
    \n+
    360
    \n+
    361 // allocate the array for the face specific information...
    \n+
    362 this->subEntities_.resize(simplex_index);
    \n+
    363 // ...and fill in the data from the temporary containers
    \n+
    364 copy(temp_faces.begin(), temp_faces.end(), this->subEntities_.begin());
    \n+
    365 }
    \n+
    366
    \n+
    367
    \n+
    368 // now first write the array with the coordinates...
    \n+
    369 this->coords_.resize(this->vtxInfo_.size());
    \n+
    370 for (const auto& vinfo : this->vtxInfo_)
    \n+
    371 {
    \n+
    372 // get a pointer to the associated info object
    \n+
    373 CoordinateInfo* current = &this->coords_[vinfo.second.idx];
    \n+
    374 // store this coordinates index // NEEDED?
    \n+
    375 current->index = vinfo.second.idx;
    \n+
    376 // store the vertex' index for the index2vertex mapping
    \n+
    377 current->vtxindex = vinfo.first;
    \n+
    378 // store the vertex' coordinates under the associated index
    \n+
    379 // in the coordinates array
    \n+
    380 const auto vtx = this->grid().entity(vinfo.second.p);
    \n+
    381 current->coord = vtx.geometry().corner(0);
    \n+
    382 }
    \n+
    383
    \n+
    384}
    \n+
    385
    \n+
    386} // namespace GridGlue
    \n+
    387
    \n+
    388} // namespace Dune
    \n+
    389
    \n+
    390#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH
    \n+\n+
    extractor base class
    \n
    Definition gridglue.hh:37
    \n-
    Definition codim0extractor.hh:40
    \n-
    bool & positiveNormalDirection()
    Definition codim0extractor.hh:75
    \n-
    Extractor< GV, 0 >::IndexType IndexType
    Definition codim0extractor.hh:49
    \n-
    const bool & positiveNormalDirection() const
    Definition codim0extractor.hh:76
    \n-
    GV::Traits::template Codim< dim >::Entity Vertex
    Definition codim0extractor.hh:51
    \n-
    Extractor< GV, 0 >::CoordinateInfo CoordinateInfo
    Definition codim0extractor.hh:59
    \n-
    Extractor< GV, 0 >::VertexInfo VertexInfo
    Definition codim0extractor.hh:58
    \n-
    Extractor< GV, 0 >::ctype ctype
    Definition codim0extractor.hh:46
    \n-
    bool positiveNormalDirection_
    Definition codim0extractor.hh:79
    \n-
    Extractor< GV, 0 >::VertexInfoMap VertexInfoMap
    Definition codim0extractor.hh:60
    \n-
    std::function< bool(const Element &, unsigned int subentity)> Predicate
    Definition codim0extractor.hh:53
    \n-
    Codim0Extractor(const GV &gv, const Predicate &predicate)
    Constructor.
    Definition codim0extractor.hh:67
    \n-
    Extractor< GV, 0 >::ElementInfo ElementInfo
    Definition codim0extractor.hh:57
    \n-
    GV::Traits::template Codim< 0 >::Entity Element
    Definition codim0extractor.hh:52
    \n-
    Extractor< GV, 0 >::SubEntityInfo SubEntityInfo
    Definition codim0extractor.hh:56
    \n+
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n+
    static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim > &a, const Dune::FieldVector< T, dim > &b)
    compute cross product
    Definition crossproduct.hh:15
    \n+
    Definition codim1extractor.hh:42
    \n+
    Extractor< GV, 1 >::IndexType IndexType
    Definition codim1extractor.hh:51
    \n+
    GV GridView
    Definition codim1extractor.hh:56
    \n+
    GV::Traits::template Codim< 0 >::Entity Element
    Definition codim1extractor.hh:62
    \n+
    Dune::FieldVector< ctype, dimworld > Coords
    Definition codim1extractor.hh:59
    \n+
    GV::Grid::ctype ctype
    Definition codim1extractor.hh:58
    \n+
    Codim1Extractor(const GV &gv, const Predicate &predicate)
    Constructor.
    Definition codim1extractor.hh:81
    \n+
    static constexpr int simplex_corners
    compile time number of corners of surface simplices
    Definition codim1extractor.hh:54
    \n+
    Extractor< GV, 1 >::VertexInfo VertexInfo
    Definition codim1extractor.hh:68
    \n+
    Extractor< GV, 1 >::CoordinateInfo CoordinateInfo
    Definition codim1extractor.hh:69
    \n+
    Extractor< GV, 1 >::ElementInfo ElementInfo
    Definition codim1extractor.hh:67
    \n+
    Extractor< GV, 1 >::SubEntityInfo SubEntityInfo
    Definition codim1extractor.hh:66
    \n+
    Extractor< GV, 1 >::VertexInfoMap VertexInfoMap
    Definition codim1extractor.hh:70
    \n+
    std::function< bool(const Element &, unsigned int subentity)> Predicate
    Definition codim1extractor.hh:63
    \n+
    GV::Traits::template Codim< dim >::Entity Vertex
    Definition codim1extractor.hh:61
    \n
    Provides codimension-independent methods for grid extraction.
    Definition extractor.hh:46
    \n-
    static constexpr auto dimworld
    Definition extractor.hh:50
    \n+
    static constexpr auto dimworld
    Definition extractor.hh:50
    \n
    int IndexType
    Definition extractor.hh:77
    \n-
    static constexpr auto codim
    Definition extractor.hh:52
    \n+
    static constexpr int cube_corners
    Definition extractor.hh:54
    \n+
    static constexpr auto codim
    Definition extractor.hh:52
    \n
    std::map< IndexType, VertexInfo > VertexInfoMap
    Definition extractor.hh:196
    \n-
    GV::Grid::ctype ctype
    Definition extractor.hh:59
    \n-
    static constexpr auto dim
    Definition extractor.hh:51
    \n+
    static constexpr auto dim
    Definition extractor.hh:51
    \n \n
    simple struct holding a vertex pointer and an index
    Definition extractor.hh:120
    \n
    simple struct holding an element seed and an index
    Definition extractor.hh:132
    \n
    Holds some information about an element's subentity involved in a coupling.
    Definition extractor.hh:151
    \n
    \n \n
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,317 +1,477 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\bs\n-codim0extractor.hh\n+codim1extractor.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n 5/*\n-6 * Filename: codim0extractor.hh\n+6 * Filename: codim1extractor.hh\n 7 * Version: 1.0\n 8 * Created on: Jun 23, 2009\n 9 * Author: Oliver Sander, Christian Engwer\n 10 * ---------------------------------\n 11 * Project: dune-grid-glue\n-12 * Description: base class for grid extractors extracting surface grids\n+12 * Description: class for grid extractors extracting surface grids\n 13 *\n 14 */\n-20#ifndef DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH\n-21#define DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH\n+20#ifndef DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH\n+21#define DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH\n 22\n-23#include \n-24#include \n-25\n-26#include \n-27#include \n+23#include \"_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\"\n+24\n+25#include \n+26#include \n+27#include \n 28\n-29#include \"_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\"\n-30\n-31namespace _\bD_\bu_\bn_\be {\n+29#include \n+30#include \n+31#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bc_\br_\bo_\bs_\bs_\bp_\br_\bo_\bd_\bu_\bc_\bt_\b._\bh_\bh>\n 32\n-33 namespace GridGlue {\n+33namespace _\bD_\bu_\bn_\be {\n 34\n-38template\n-_\b3_\b9class _\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br : public _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-40{\n-41\n-42public:\n-43\n-44 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n-45 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bo_\bd_\bi_\bm;\n-_\b4_\b6 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bc_\bt_\by_\bp_\be _\bc_\bt_\by_\bp_\be;\n-47 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm;\n-48 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd;\n-_\b4_\b9 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be;\n-50\n-_\b5_\b1 typedef typename GV::Traits::template Codim::Entity _\bV_\be_\br_\bt_\be_\bx;\n-_\b5_\b2 typedef typename GV::Traits::template Codim<0>::Entity _\bE_\bl_\be_\bm_\be_\bn_\bt;\n-_\b5_\b3 typedef std::function\n+35 namespace GridGlue {\n+36\n+40template\n+_\b4_\b1class _\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br : public _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+42{\n+43public:\n+44\n+45 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n+46\n+47 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd;\n+48 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm;\n+49 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bo_\bd_\bi_\bm;\n+50 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bu_\bb_\be_\b__\bc_\bo_\br_\bn_\be_\br_\bs;\n+_\b5_\b1 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b1_\b>_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be;\n+52\n+_\b5_\b4 static constexpr int _\bs_\bi_\bm_\bp_\bl_\be_\bx_\b__\bc_\bo_\br_\bn_\be_\br_\bs = _\bd_\bi_\bm;\n+55\n+_\b5_\b6 typedef GV _\bG_\br_\bi_\bd_\bV_\bi_\be_\bw;\n+57\n+_\b5_\b8 typedef typename GV::Grid::ctype _\bc_\bt_\by_\bp_\be;\n+_\b5_\b9 typedef Dune::FieldVector _\bC_\bo_\bo_\br_\bd_\bs;\n+60\n+_\b6_\b1 typedef typename GV::Traits::template Codim::Entity _\bV_\be_\br_\bt_\be_\bx;\n+_\b6_\b2 typedef typename GV::Traits::template Codim<0>::Entity _\bE_\bl_\be_\bm_\be_\bn_\bt;\n+_\b6_\b3 typedef std::function\n _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be;\n-54\n-55 // import typedefs from base class\n-_\b5_\b6 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo;\n-_\b5_\b7 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo;\n-_\b5_\b8 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo;\n-_\b5_\b9 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo;\n-_\b6_\b0 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp;\n-61\n-_\b6_\b7 _\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(const GV& gv, const _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be& predicate)\n-68 : _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(gv), _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_(false)\n-69 {\n-70 std::cout << \"This is Codim0Extractor on a <\"\n-71 << GV::dimension << \",\" << GV::dimensionworld << \"> grid!\" << std::endl;\n-72 update(predicate);\n-73 }\n-74\n-_\b7_\b5 bool & _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn() { return _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_; }\n-_\b7_\b6 const bool & _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn() const { return\n-_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_; }\n-77\n-78protected:\n-_\b7_\b9 bool _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_;\n-80private:\n-81 void update(const _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be& predicate);\n-82};\n-83\n-84\n-85template\n-86void _\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b>_\b:_\b:_\bu_\bp_\bd_\ba_\bt_\be(const Predicate& predicate)\n-87{\n-88 // In this first pass iterate over all entities of codim 0.\n-89 // Get its corner vertices, find resp. store them together with their\n-associated index,\n-90 // and remember the indices of the corners.\n+64\n+65 // import typedefs from base class\n+_\b6_\b6 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b1_\b>_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo;\n+_\b6_\b7 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b1_\b>_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo;\n+_\b6_\b8 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b1_\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo;\n+_\b6_\b9 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b1_\b>_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo;\n+_\b7_\b0 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b1_\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp;\n+71\n+72public:\n+73\n+74 /* C O N S T R U C T O R S A N D D E S T R U C T O R S */\n+75\n+_\b8_\b1 _\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(const GV& gv, const _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be& predicate)\n+82 : _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(gv)\n+83 {\n+84 std::cout << \"This is Codim1Extractor on a <\" << _\bd_\bi_\bm\n+85 << \",\" << _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd << \"> grid!\"\n+86 << std::endl;\n+87 update(predicate);\n+88 }\n+89\n+90private:\n 91\n-92 // free everything there is in this object\n-93 this->clear();\n-94\n-95 // several counter for consecutive indexing are needed\n-96 size_t element_index = 0;\n-97 size_t vertex_index = 0;\n-98\n-99 // a temporary container where newly acquired face\n-100 // information can be stored at first\n-101 std::deque temp_faces;\n-102\n-103 // iterate over all codim 0 elements on the grid\n-104 for (const auto& elmt : elements(this->gv_, Partitions::interior))\n-105 {\n-106 const auto geometry = elmt.geometry();\n-107 IndexType eindex = this->cellMapper_.index(elmt);\n+105 void update(const _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be& predicate);\n+106\n+107};\n 108\n-109 // only do sth. if this element is \"interesting\"\n-110 // implicit cast is done automatically\n-111 if (predicate(elmt,0))\n-112 {\n-113 // add an entry to the element info map, the index will be set properly\n-later\n-114 this->elmtInfo_.emplace(eindex, ElementInfo(element_index, elmt, 1));\n+109\n+110template\n+111void Codim1Extractor::update(const Predicate& predicate)\n+112{\n+113 // free everything there is in this object\n+114 this->clear();\n 115\n-116 unsigned int numCorners = elmt.subEntities(dim);\n-117 unsigned int vertex_indices[numCorners]; // index in global vector\n-118 unsigned int vertex_numbers[numCorners]; // index in parent entity\n-119\n-120 // try for each of the faces vertices whether it is already inserted or not\n-121 for (unsigned int i = 0; i < numCorners; ++i)\n-122 {\n-123 vertex_numbers[i] = i;\n-124\n-125 // get the vertex pointer and the index from the index set\n-126 const Vertex vertex = elmt.template subEntity(vertex_numbers[i]);\n-127 IndexType vindex = this->gv_.indexSet().template index(vertex);\n+116 // In this first pass iterate over all entities of codim 0.\n+117 // For each codim 1 intersection check if it is part of the boundary and if\n+so,\n+118 // get its corner vertices, find resp. store them together with their\n+associated index,\n+119 // and remember the indices of the boundary faces' corners.\n+120 {\n+121 // several counter for consecutive indexing are needed\n+122 int simplex_index = 0;\n+123 int vertex_index = 0;\n+124 IndexType eindex = 0; // supress warning\n+125\n+126 // needed later for insertion into a std::set which only\n+127 // works with const references\n 128\n-129 // if the vertex is not yet inserted in the vertex info map\n-130 // it is a new one -> it will be inserted now!\n-131 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);\n-132 if (vimit == this->vtxInfo_.end())\n-133 {\n-134 // insert into the map\n-135 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));\n-136 // remember this vertex' index\n-137 vertex_indices[i] = vertex_index;\n-138 // increase the current index\n-139 vertex_index++;\n-140 }\n-141 else\n-142 {\n-143 // only remember the vertex' index\n-144 vertex_indices[i] = vimit->second.idx;\n-145 }\n-146 }\n-147\n-148 // flip cell if necessary\n+129 // a temporary container where newly acquired face\n+130 // information can be stored at first\n+131 std::deque temp_faces;\n+132\n+133 // iterate over interior codim 0 elements on the grid\n+134 for (const auto& elmt : elements(this->gv_, Partitions::interior))\n+135 {\n+136 Dune::GeometryType gt = elmt.type();\n+137\n+138 // if some face is part of the surface add it!\n+139 if (elmt.hasBoundaryIntersections())\n+140 {\n+141 // add an entry to the element info map, the index will be set properly\n+later,\n+142 // whereas the number of faces is already known\n+143 eindex = this->cellMapper_.index(elmt);\n+144 this->elmtInfo_.emplace(eindex, ElementInfo(simplex_index, elmt, 0));\n+145\n+146 // now add the faces in ascending order of their indices\n+147 // (we are only talking about 1-4 faces here, so O(n^2) is ok!)\n+148 for (const auto& in : _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(this->gv_, elmt))\n 149 {\n-150 switch (int(dim))\n-151 {\n-152 case 0 :\n-153 break;\n-154 case 1 :\n-155 {\n-156 // The following test only works if the zero-th coordinate is the\n-157 // one that defines the orientation. A sufficient condition for\n-158 // this is dimworld == 1\n-159 /* assert(dimworld==1); */\n-160 bool elementNormalDirection =\n-161 (geometry.corner(1)[0] < geometry.corner(0)[0]);\n-162 if ( positiveNormalDirection_ != elementNormalDirection )\n-163 {\n-164 std::swap(vertex_indices[0], vertex_indices[1]);\n-165 std::swap(vertex_numbers[0], vertex_numbers[1]);\n-166 }\n-167 break;\n-168 }\n-169 case 2 :\n-170 {\n-171 Dune::FieldVector\n-172 v0 = geometry.corner(1),\n-173 v1 = geometry.corner(2);\n-174 v0 -= geometry.corner(0);\n-175 v1 -= geometry.corner(0);\n-176 ctype normal_sign = v0[0]*v1[1] - v0[1]*v1[0];\n-177 bool elementNormalDirection = (normal_sign < 0);\n-178 if ( positiveNormalDirection_ != elementNormalDirection )\n-179 {\n-180 std::cout << \"swap\\n\";\n-181 if (elmt.type().isCube())\n-182 {\n-183 for (int i = 0; i < (1<subEntities_.resize(element_index);\n-215 // ...and fill in the data from the temporary containers\n-216 copy(temp_faces.begin(), temp_faces.end(), this->subEntities_.begin());\n-217\n-218 // now first write the array with the coordinates...\n-219 this->coords_.resize(this->vtxInfo_.size());\n-220 for (const auto& vinfo : this->vtxInfo_)\n-221 {\n-222 // get a pointer to the associated info object\n-223 CoordinateInfo* current = &this->coords_[vinfo.second.idx];\n-224 // store this coordinates index // NEEDED?\n-225 current->index = vinfo.second.idx;\n-226 // store the vertex' index for the index2vertex mapping\n-227 current->vtxindex = vinfo.first;\n-228 // store the vertex' coordinates under the associated index\n-229 // in the coordinates array\n-230 const auto vtx = this->grid().entity(vinfo.second.p);\n-231 current->coord = vtx.geometry().corner(0);\n-232 }\n+150 // Stop only at selected boundary faces\n+151 if (!in.boundary() or !predicate(elmt, in.indexInInside()))\n+152 continue;\n+153\n+154 const auto& refElement = Dune::ReferenceElements::general(gt);\n+155 // get the corner count of this face\n+156 const int face_corners = refElement.size(in.indexInInside(), 1, dim);\n+157\n+158 // now we only have to care about the 3D case, i.e. a triangle face can be\n+159 // inserted directly whereas a quadrilateral face has to be divided into\n+two triangles\n+160 switch (face_corners)\n+161 {\n+162 case 2 :\n+163 case 3:\n+164 {\n+165 // we have a simplex here\n+166\n+167 // register the additional face(s)\n+168 this->elmtInfo_.at(eindex).faces++;\n+169\n+170 // add a new face to the temporary collection\n+171 temp_faces.emplace_back(eindex, in.indexInInside(),\n+172#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)\n+173 Dune::GeometryTypes::simplex(dim-codim)\n+174#else\n+175 Dune::GeometryType(Dune::GeometryType::simplex,dim-codim)\n+176#endif\n+177 );\n+178\n+179 std::vector > cornerCoords(face_corners);\n+180\n+181 // try for each of the faces vertices whether it is already inserted or not\n+182 for (int i = 0; i < face_corners; ++i)\n+183 {\n+184 // get the number of the vertex in the parent element\n+185 int vertex_number = refElement.subEntity(in.indexInInside(), 1, i, dim);\n+186\n+187 // get the vertex pointer and the index from the index set\n+188 const Vertex vertex = elmt.template subEntity(vertex_number);\n+189 cornerCoords[i] = vertex.geometry().corner(0);\n+190\n+191 IndexType vindex = this->gv_.indexSet().template index(vertex);\n+192\n+193 // remember the vertex' number in parent element's vertices\n+194 temp_faces.back().corners[i].num = vertex_number;\n+195\n+196 // if the vertex is not yet inserted in the vertex info map\n+197 // it is a new one -> it will be inserted now!\n+198 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);\n+199 if (vimit == this->vtxInfo_.end())\n+200 {\n+201 // insert into the map\n+202 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));\n+203 // remember the vertex as a corner of the current face in temp_faces\n+204 temp_faces.back().corners[i].idx = vertex_index;\n+205 // increase the current index\n+206 vertex_index++;\n+207 }\n+208 else\n+209 {\n+210 // only insert the index into the simplices array\n+211 temp_faces.back().corners[i].idx = vimit->second.idx;\n+212 }\n+213 }\n+214\n+215 // Now we have the correct vertices in the last entries of temp_faces, but\n+they may\n+216 // have the wrong orientation. We want them to be oriented such that all\n+boundary edges\n+217 // point in the counterclockwise direction. Therefore, we check the\n+orientation of the\n+218 // new face and possibly switch the two vertices.\n+219 FieldVector realNormal = in.centerUnitOuterNormal();\n+220\n+221 // Compute segment normal\n+222 FieldVector reconstructedNormal;\n+223 if (dim==2) // boundary face is a line segment\n+224 {\n+225 reconstructedNormal[0] = cornerCoords[1][1] - cornerCoords[0][1];\n+226 reconstructedNormal[1] = cornerCoords[0][0] - cornerCoords[1][0];\n+227 } else { // boundary face is a triangle\n+228 FieldVector segment1 = cornerCoords[1] - cornerCoords[0];\n+229 FieldVector segment2 = cornerCoords[2] - cornerCoords[0];\n+230 reconstructedNormal = _\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt(segment1, segment2);\n+231 }\n+232 reconstructedNormal /= reconstructedNormal.two_norm();\n 233\n-234}\n-235\n-236} // namespace GridGlue\n-237\n-238} // namespace Dune\n-239\n-240#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH\n+234 if (realNormal * reconstructedNormal < 0.0)\n+235 std::swap(temp_faces.back().corners[0], temp_faces.back().corners[1]);\n+236\n+237 // now increase the current face index\n+238 simplex_index++;\n+239 break;\n+240 }\n+241 case 4 :\n+242 {\n+243 assert(dim == 3 && cube_corners == 4);\n+244 // we have a quadrilateral here\n+245 std::array vertex_indices;\n+246 std::array vertex_numbers;\n+247\n+248 // register the additional face(s) (2 simplices)\n+249 this->elmtInfo_.at(eindex).faces += 2;\n+250\n+251 std::array, 4> cornerCoords;\n+252\n+253 // get the vertex pointers for the quadrilateral's corner vertices\n+254 // and try for each of them whether it is already inserted or not\n+255 for (int i = 0; i < cube_corners; ++i)\n+256 {\n+257 // get the number of the vertex in the parent element\n+258 vertex_numbers[i] = refElement.subEntity(in.indexInInside(), 1, i, dim);\n+259\n+260 // get the vertex pointer and the index from the index set\n+261 const Vertex vertex = elmt.template subEntity(vertex_numbers[i]);\n+262 cornerCoords[i] = vertex.geometry().corner(0);\n+263\n+264 IndexType vindex = this->gv_.indexSet().template index(vertex);\n+265\n+266 // if the vertex is not yet inserted in the vertex info map\n+267 // it is a new one -> it will be inserted now!\n+268 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);\n+269 if (vimit == this->vtxInfo_.end())\n+270 {\n+271 // insert into the map\n+272 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));\n+273 // remember this vertex' index\n+274 vertex_indices[i] = vertex_index;\n+275 // increase the current index\n+276 vertex_index++;\n+277 }\n+278 else\n+279 {\n+280 // only remember the vertex' index\n+281 vertex_indices[i] = vimit->second.idx;\n+282 }\n+283 }\n+284\n+285 // now introduce the two triangles subdividing the quadrilateral\n+286 // ATTENTION: the order of vertices given by \"orientedSubface\" corresponds\n+to the order\n+287 // of a Dune quadrilateral, i.e. the triangles are given by 0 1 2 and 3 2 1\n+288\n+289 // add a new face to the temporary collection for the first tri\n+290 temp_faces.emplace_back(eindex, in.indexInInside(),\n+291#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)\n+292 Dune::GeometryTypes::simplex(dim-codim)\n+293#else\n+294 Dune::GeometryType(Dune::GeometryType::simplex,dim-codim)\n+295#endif\n+296 );\n+297 temp_faces.back().corners[0].idx = vertex_indices[0];\n+298 temp_faces.back().corners[1].idx = vertex_indices[1];\n+299 temp_faces.back().corners[2].idx = vertex_indices[2];\n+300 // remember the vertices' numbers in parent element's vertices\n+301 temp_faces.back().corners[0].num = vertex_numbers[0];\n+302 temp_faces.back().corners[1].num = vertex_numbers[1];\n+303 temp_faces.back().corners[2].num = vertex_numbers[2];\n+304\n+305 // Now we have the correct vertices in the last entries of temp_faces, but\n+they may\n+306 // have the wrong orientation. We want the triangle vertices on\n+counterclockwise order,\n+307 // when viewed from the outside of the grid. Therefore, we check the\n+orientation of the\n+308 // new face and possibly switch two vertices.\n+309 FieldVector realNormal = in.centerUnitOuterNormal();\n+310\n+311 // Compute segment normal\n+312 FieldVector reconstructedNormal = _\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt(cornerCoords\n+[1] - cornerCoords[0],\n+313 cornerCoords[2] - cornerCoords[0]);\n+314 reconstructedNormal /= reconstructedNormal.two_norm();\n+315\n+316 if (realNormal * reconstructedNormal < 0.0)\n+317 std::swap(temp_faces.back().corners[0], temp_faces.back().corners[1]);\n+318\n+319\n+320 // add a new face to the temporary collection for the second tri\n+321 temp_faces.emplace_back(eindex, in.indexInInside(),\n+322#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)\n+323 Dune::GeometryTypes::simplex(dim-codim)\n+324#else\n+325 Dune::GeometryType(Dune::GeometryType::simplex,dim-codim)\n+326#endif\n+327 );\n+328 temp_faces.back().corners[0].idx = vertex_indices[3];\n+329 temp_faces.back().corners[1].idx = vertex_indices[2];\n+330 temp_faces.back().corners[2].idx = vertex_indices[1];\n+331 // remember the vertices' numbers in parent element's vertices\n+332 temp_faces.back().corners[0].num = vertex_numbers[3];\n+333 temp_faces.back().corners[1].num = vertex_numbers[2];\n+334 temp_faces.back().corners[2].num = vertex_numbers[1];\n+335\n+336 // Now we have the correct vertices in the last entries of temp_faces, but\n+they may\n+337 // have the wrong orientation. We want the triangle vertices on\n+counterclockwise order,\n+338 // when viewed from the outside of the grid. Therefore, we check the\n+orientation of the\n+339 // new face and possibly switch two vertices.\n+340 // Compute segment normal\n+341 reconstructedNormal = _\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt(cornerCoords[2] - cornerCoords[3],\n+342 cornerCoords[1] - cornerCoords[3]);\n+343 reconstructedNormal /= reconstructedNormal.two_norm();\n+344\n+345 if (realNormal * reconstructedNormal < 0.0)\n+346 std::swap(temp_faces.back().corners[0], temp_faces.back().corners[1]);\n+347\n+348 simplex_index+=2;\n+349 break;\n+350 }\n+351 default :\n+352 DUNE_THROW(Dune::NotImplemented, \"the extractor does only work for triangle\n+and quadrilateral faces (\" << face_corners << \" corners)\");\n+353 break;\n+354 }\n+355 } // end loop over found surface parts\n+356 }\n+357 } // end loop over elements\n+358\n+359 std::cout << \"added \" << simplex_index << \" subfaces\\n\";\n+360\n+361 // allocate the array for the face specific information...\n+362 this->subEntities_.resize(simplex_index);\n+363 // ...and fill in the data from the temporary containers\n+364 copy(temp_faces.begin(), temp_faces.end(), this->subEntities_.begin());\n+365 }\n+366\n+367\n+368 // now first write the array with the coordinates...\n+369 this->coords_.resize(this->vtxInfo_.size());\n+370 for (const auto& vinfo : this->vtxInfo_)\n+371 {\n+372 // get a pointer to the associated info object\n+373 CoordinateInfo* current = &this->coords_[vinfo.second.idx];\n+374 // store this coordinates index // NEEDED?\n+375 current->index = vinfo.second.idx;\n+376 // store the vertex' index for the index2vertex mapping\n+377 current->vtxindex = vinfo.first;\n+378 // store the vertex' coordinates under the associated index\n+379 // in the coordinates array\n+380 const auto vtx = this->grid().entity(vinfo.second.p);\n+381 current->coord = vtx.geometry().corner(0);\n+382 }\n+383\n+384}\n+385\n+386} // namespace GridGlue\n+387\n+388} // namespace Dune\n+389\n+390#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH\n+_\bc_\br_\bo_\bs_\bs_\bp_\br_\bo_\bd_\bu_\bc_\bt_\b._\bh_\bh\n _\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\n extractor base class\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:40\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn\n-bool & positiveNormalDirection()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:75\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n-Extractor< GV, 0 >::IndexType IndexType\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:49\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn\n-const bool & positiveNormalDirection() const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:76\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx\n-GV::Traits::template Codim< dim >::Entity Vertex\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:51\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n-Extractor< GV, 0 >::CoordinateInfo CoordinateInfo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:59\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n-Extractor< GV, 0 >::VertexInfo VertexInfo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:58\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bt_\by_\bp_\be\n-Extractor< GV, 0 >::ctype ctype\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:46\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_\n-bool positiveNormalDirection_\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:79\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n-Extractor< GV, 0 >::VertexInfoMap VertexInfoMap\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:60\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be\n-std::function< bool(const Element &, unsigned int subentity)> Predicate\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:53\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-Codim0Extractor(const GV &gv, const Predicate &predicate)\n-Constructor.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:67\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n-Extractor< GV, 0 >::ElementInfo ElementInfo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:57\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n+> &reverse=!reversed)\n+Iterate over all intersections of a GridGlue.\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt\n+static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim\n+> &a, const Dune::FieldVector< T, dim > &b)\n+compute cross product\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn crossproduct.hh:15\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:42\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n+Extractor< GV, 1 >::IndexType IndexType\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:51\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw\n+GV GridView\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:56\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt\n GV::Traits::template Codim< 0 >::Entity Element\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:52\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n-Extractor< GV, 0 >::SubEntityInfo SubEntityInfo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:56\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:62\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< ctype, dimworld > Coords\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:59\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bt_\by_\bp_\be\n+GV::Grid::ctype ctype\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:58\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+Codim1Extractor(const GV &gv, const Predicate &predicate)\n+Constructor.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:81\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bs_\bi_\bm_\bp_\bl_\be_\bx_\b__\bc_\bo_\br_\bn_\be_\br_\bs\n+static constexpr int simplex_corners\n+compile time number of corners of surface simplices\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:54\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n+Extractor< GV, 1 >::VertexInfo VertexInfo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:68\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n+Extractor< GV, 1 >::CoordinateInfo CoordinateInfo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:69\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n+Extractor< GV, 1 >::ElementInfo ElementInfo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:67\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n+Extractor< GV, 1 >::SubEntityInfo SubEntityInfo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:66\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n+Extractor< GV, 1 >::VertexInfoMap VertexInfoMap\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:70\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be\n+std::function< bool(const Element &, unsigned int subentity)> Predicate\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:63\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b1_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx\n+GV::Traits::template Codim< dim >::Entity Vertex\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim1extractor.hh:61\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n Provides codimension-independent methods for grid extraction.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:46\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b0_\b _\b>_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b1_\b _\b>_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd\n static constexpr auto dimworld\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:50\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n int IndexType\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:77\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b0_\b _\b>_\b:_\b:_\bc_\bo_\bd_\bi_\bm\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b1_\b _\b>_\b:_\b:_\bc_\bu_\bb_\be_\b__\bc_\bo_\br_\bn_\be_\br_\bs\n+static constexpr int cube_corners\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:54\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b1_\b _\b>_\b:_\b:_\bc_\bo_\bd_\bi_\bm\n static constexpr auto codim\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:52\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n std::map< IndexType, VertexInfo > VertexInfoMap\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:196\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bt_\by_\bp_\be\n-GV::Grid::ctype ctype\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:59\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b0_\b _\b>_\b:_\b:_\bd_\bi_\bm\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b1_\b _\b>_\b:_\b:_\bd_\bi_\bm\n static constexpr auto dim\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:51\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:98\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n simple struct holding a vertex pointer and an index\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:120\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: extractor.hh File Reference\n+dune-grid-glue: codim0extractor.hh File Reference\n \n \n \n \n \n \n \n@@ -72,62 +72,42 @@\n
  • dune
  • grid-glue
  • extractors
  • \n
    \n
    \n
    \n \n-
    extractor.hh File Reference
    \n+
    codim0extractor.hh File Reference
    \n
    \n
    \n \n-

    extractor base class \n+

    Mesh grid extractor base class. \n More...

    \n-
    #include <vector>
    \n-#include <map>
    \n-#include <algorithm>
    \n-#include <dune/common/exceptions.hh>
    \n-#include <dune/common/fvector.hh>
    \n-#include <dune/common/version.hh>
    \n-#include <dune/grid/common/geometry.hh>
    \n-#include <dune/grid/common/grid.hh>
    \n+
    #include <deque>
    \n+#include <functional>
    \n+#include <dune/common/deprecated.hh>
    \n #include <dune/grid/common/mcmgmapper.hh>
    \n-#include <dune/geometry/multilineargeometry.hh>
    \n+#include "extractor.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 Classes

    class  Dune::GridGlue::Extractor< GV, cd >
     Provides codimension-independent methods for grid extraction. More...
     
    struct  Dune::GridGlue::Extractor< GV, cd >::CornerInfo
     Helpful struct holding one index for the coordinate (vertex) to which it is associated and the element's corner index;. More...
     
    struct  Dune::GridGlue::Extractor< GV, cd >::CoordinateInfo
     
    struct  Dune::GridGlue::Extractor< GV, cd >::VertexInfo
     simple struct holding a vertex pointer and an index More...
     
    struct  Dune::GridGlue::Extractor< GV, cd >::ElementInfo
     simple struct holding an element seed and an index More...
     
    struct  Dune::GridGlue::Extractor< GV, cd >::SubEntityInfo
     Holds some information about an element's subentity involved in a coupling. More...
    class  Dune::GridGlue::Codim0Extractor< GV >
     
    \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n

    Detailed Description

    \n-

    extractor base class

    \n+

    Mesh grid extractor base class.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,49 +2,27 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\bs\n _\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-extractor.hh File Reference\n-extractor base class _\bM_\bo_\br_\be_\b._\b._\b.\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n+codim0extractor.hh File Reference\n+Mesh grid extractor base class. _\bM_\bo_\br_\be_\b._\b._\b.\n+#include \n+#include \n+#include \n #include \n-#include \n+#include \"_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\"\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n- class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\bc_\bd_\b _\b>\n-\u00a0 Provides codimension-independent methods for grid extraction. _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\bc_\bd_\b _\b>_\b:_\b:_\bC_\bo_\br_\bn_\be_\br_\bI_\bn_\bf_\bo\n-\u00a0 Helpful struct holding one index for the coordinate (vertex) to which\n- it is associated and the element's corner index;. _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\bc_\bd_\b _\b>_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n-\u00a0\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\bc_\bd_\b _\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n-\u00a0 simple struct holding a vertex pointer and an index _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\bc_\bd_\b _\b>_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n-\u00a0 simple struct holding an element seed and an index _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\bc_\bd_\b _\b>_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n-\u00a0 Holds some information about an element's subentity involved in a\n- coupling. _\bM_\bo_\br_\be_\b._\b._\b.\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b _\b>\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n *\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-extractor base class\n+Mesh grid extractor base class.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: extractor.hh Source File\n+dune-grid-glue: codim0extractor.hh Source File\n \n \n \n \n \n \n \n@@ -74,490 +74,276 @@\n \n \n
    \n
    \n-
    extractor.hh
    \n+
    codim0extractor.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n
    5/*
    \n-
    6 * Filename: extractor.hh
    \n+
    6 * Filename: codim0extractor.hh
    \n
    7 * Version: 1.0
    \n-
    8 * Created on: Oct 05, 2009
    \n-
    9 * Author: Christian Engwer
    \n+
    8 * Created on: Jun 23, 2009
    \n+
    9 * Author: Oliver Sander, Christian Engwer
    \n
    10 * ---------------------------------
    \n
    11 * Project: dune-grid-glue
    \n-
    12 * Description: base class for all grid extractors
    \n+
    12 * Description: base class for grid extractors extracting surface grids
    \n
    13 *
    \n
    14 */
    \n-
    20#ifndef DUNE_GRIDGLUE_EXTRACTORS_EXTRACTOR_HH
    \n-
    21#define DUNE_GRIDGLUE_EXTRACTORS_EXTRACTOR_HH
    \n+
    20#ifndef DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH
    \n+
    21#define DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH
    \n
    22
    \n-
    23#include <vector>
    \n-
    24#include <map>
    \n-
    25#include <algorithm>
    \n-
    26#include <dune/common/exceptions.hh>
    \n-
    27#include <dune/common/fvector.hh>
    \n-
    28#include <dune/common/version.hh>
    \n-
    29#include <dune/grid/common/geometry.hh>
    \n-
    30#include <dune/grid/common/grid.hh>
    \n-
    31#include <dune/grid/common/mcmgmapper.hh>
    \n-
    32#include <dune/geometry/multilineargeometry.hh>
    \n-
    33
    \n-
    34namespace Dune {
    \n-
    35
    \n-
    36 namespace GridGlue {
    \n-
    37
    \n-
    44template<typename GV, int cd>
    \n-
    \n-\n-
    46{
    \n-
    47
    \n-
    48public:
    \n-
    49
    \n-
    50 static constexpr auto dimworld = GV::dimensionworld;
    \n-
    51 static constexpr auto dim = GV::dimension;
    \n-
    52 static constexpr auto codim = cd;
    \n-
    53
    \n-
    54 static constexpr int cube_corners = 1 << (dim-codim);
    \n-
    55
    \n-
    56 typedef GV GridView;
    \n-
    57 typedef typename GridView::Grid Grid;
    \n-
    58
    \n-
    59 typedef typename GV::Grid::ctype ctype;
    \n-
    60 typedef Dune::FieldVector<ctype, dimworld> Coords;
    \n-
    61 typedef Dune::FieldVector<ctype, dim> LocalCoords;
    \n-
    62
    \n-
    63 typedef typename GV::Traits::template Codim<dim>::Entity Vertex;
    \n-
    64 typedef typename Vertex::EntitySeed VertexSeed;
    \n-
    65
    \n-
    66 typedef typename GV::Traits::template Codim<0>::Entity Element;
    \n-
    67 typedef typename Element::EntitySeed ElementSeed;
    \n-
    68
    \n-
    69 typedef std::vector<unsigned int> VertexVector;
    \n-
    70
    \n-
    71#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 6)
    \n-
    72 using CellMapper = MultipleCodimMultipleGeomTypeMapper<GridView>;
    \n-
    73#else
    \n-
    74 using CellMapper = MultipleCodimMultipleGeomTypeMapper<GridView, MCMGElementLayout>;
    \n-
    75#endif
    \n-
    76 // typedef typename CellMapper::IndexType IndexType;
    \n-
    77 typedef int IndexType;
    \n-
    78public:
    \n-
    79
    \n-
    80 // transformations
    \n-
    81 typedef Dune::MultiLinearGeometry<ctype, dim-codim, dimworld> Geometry;
    \n-
    82 typedef Dune::MultiLinearGeometry<ctype, dim-codim, dim> LocalGeometry;
    \n-
    83
    \n-
    84protected:
    \n-
    85 /************************** PRIVATE SUBCLASSES **********************/
    \n-
    86
    \n-
    \n-\n-
    92 {
    \n-
    93 unsigned int idx : 28;
    \n-
    94 unsigned int num : 4;
    \n-
    95 };
    \n-
    \n-
    96
    \n-
    \n-\n-
    98 {
    \n-
    \n-\n-
    100 {}
    \n+
    23#include <deque>
    \n+
    24#include <functional>
    \n+
    25
    \n+
    26#include <dune/common/deprecated.hh>
    \n+
    27#include <dune/grid/common/mcmgmapper.hh>
    \n+
    28
    \n+
    29#include "extractor.hh"
    \n+
    30
    \n+
    31namespace Dune {
    \n+
    32
    \n+
    33 namespace GridGlue {
    \n+
    34
    \n+
    38template<typename GV>
    \n+
    \n+
    39class Codim0Extractor : public Extractor<GV,0>
    \n+
    40{
    \n+
    41
    \n+
    42public:
    \n+
    43
    \n+
    44 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n+
    45 using Extractor<GV,0>::codim;
    \n+
    46 typedef typename Extractor<GV,0>::ctype ctype;
    \n+
    47 using Extractor<GV,0>::dim;
    \n+
    48 using Extractor<GV,0>::dimworld;
    \n+\n+
    50
    \n+
    51 typedef typename GV::Traits::template Codim<dim>::Entity Vertex;
    \n+
    52 typedef typename GV::Traits::template Codim<0>::Entity Element;
    \n+
    53 typedef std::function<bool(const Element&, unsigned int subentity)> Predicate;
    \n+
    54
    \n+
    55 // import typedefs from base class
    \n+\n+\n+\n+\n+\n+
    61
    \n+
    \n+
    67 Codim0Extractor(const GV& gv, const Predicate& predicate)
    \n+
    68 : Extractor<GV,0>(gv), positiveNormalDirection_(false)
    \n+
    69 {
    \n+
    70 std::cout << "This is Codim0Extractor on a <"
    \n+
    71 << GV::dimension << "," << GV::dimensionworld << "> grid!" << std::endl;
    \n+
    72 update(predicate);
    \n+
    73 }
    \n+
    \n+
    74
    \n+\n+
    76 const bool & positiveNormalDirection() const { return positiveNormalDirection_; }
    \n+
    77
    \n+
    78protected:
    \n+\n+
    80private:
    \n+
    81 void update(const Predicate& predicate);
    \n+
    82};
    \n
    \n-
    101
    \n-
    \n-
    102 CoordinateInfo(unsigned int index_, IndexType vtxindex_)
    \n-
    103 : vtxindex(vtxindex_), index(index_)
    \n-
    104 {}
    \n-
    \n-
    105
    \n-\n+
    83
    \n+
    84
    \n+
    85template<typename GV>
    \n+
    86void Codim0Extractor<GV>::update(const Predicate& predicate)
    \n+
    87{
    \n+
    88 // In this first pass iterate over all entities of codim 0.
    \n+
    89 // Get its corner vertices, find resp. store them together with their associated index,
    \n+
    90 // and remember the indices of the corners.
    \n+
    91
    \n+
    92 // free everything there is in this object
    \n+
    93 this->clear();
    \n+
    94
    \n+
    95 // several counter for consecutive indexing are needed
    \n+
    96 size_t element_index = 0;
    \n+
    97 size_t vertex_index = 0;
    \n+
    98
    \n+
    99 // a temporary container where newly acquired face
    \n+
    100 // information can be stored at first
    \n+
    101 std::deque<SubEntityInfo> temp_faces;
    \n+
    102
    \n+
    103 // iterate over all codim 0 elements on the grid
    \n+
    104 for (const auto& elmt : elements(this->gv_, Partitions::interior))
    \n+
    105 {
    \n+
    106 const auto geometry = elmt.geometry();
    \n+
    107 IndexType eindex = this->cellMapper_.index(elmt);
    \n
    108
    \n-\n-
    111
    \n-
    113 unsigned int index;
    \n-
    114 };
    \n-
    \n+
    109 // only do sth. if this element is "interesting"
    \n+
    110 // implicit cast is done automatically
    \n+
    111 if (predicate(elmt,0))
    \n+
    112 {
    \n+
    113 // add an entry to the element info map, the index will be set properly later
    \n+
    114 this->elmtInfo_.emplace(eindex, ElementInfo(element_index, elmt, 1));
    \n
    115
    \n-
    \n-\n-
    120 {
    \n-
    \n-
    121 VertexInfo(unsigned int idx_, const Vertex& p_) : idx(idx_), p(p_.seed())
    \n-
    122 {}
    \n-
    \n-
    123 unsigned int idx;
    \n-\n-
    125 };
    \n-
    \n-
    126
    \n-
    127
    \n-
    \n-\n-
    132 {
    \n-
    \n-
    133 ElementInfo(unsigned int idx_, const Element& p_, unsigned int f_) : idx(idx_), faces(f_), p(p_.seed())
    \n-
    134 {}
    \n-
    \n-
    135
    \n-
    137 unsigned int idx : 28;
    \n-
    138
    \n-
    140 unsigned int faces : 4;
    \n-
    141
    \n-\n-
    144 };
    \n-
    \n-
    145
    \n-
    146
    \n-
    \n-\n-
    151 {
    \n-
    \n-\n-
    153 /*
    \n-
    154 * TODO: move default value of `geometryType_` to member declaration
    \n-
    155 * when removing support for older dune-geometry
    \n-
    156 */
    \n-
    157#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)
    \n-
    158 : geometryType_(GeometryTypes::simplex(dim-codim))
    \n-
    159 {}
    \n-
    160#else
    \n-
    161 {
    \n-
    162 geometryType_.makeSimplex(dim-codim);
    \n-
    163 }
    \n-
    \n-
    164#endif
    \n-
    165
    \n-
    \n-
    166 SubEntityInfo(IndexType parent_, unsigned int num_in_parent_,
    \n-
    167 const Dune::GeometryType& geometryType)
    \n-
    168 : parent(parent_), num_in_parent(num_in_parent_), geometryType_(geometryType)
    \n-
    169 {}
    \n-
    \n-
    170
    \n-
    \n-
    171 unsigned int nCorners() const
    \n-
    172 {
    \n-
    173 return Dune::ReferenceElements<ctype, dim-codim>::general(geometryType_).size(dim-codim);
    \n-
    174 }
    \n-
    \n-
    175
    \n-\n-
    178
    \n-
    180 unsigned int num_in_parent : 3;
    \n-
    181
    \n-
    183 Dune::GeometryType geometryType_;
    \n-
    184
    \n-
    191 CornerInfo corners[cube_corners]; // sim = numer of vertices in a simplex
    \n-
    192 };
    \n-
    \n-
    193
    \n-
    194
    \n-
    195 typedef std::map<IndexType, ElementInfo> ElementInfoMap;
    \n-
    196 typedef std::map<IndexType, VertexInfo> VertexInfoMap;
    \n-
    197
    \n-
    198 /************************** MEMBER VARIABLES ************************/
    \n-
    199
    \n-\n-
    202
    \n-
    203 /* Geometrical and Topological Information */
    \n-
    204
    \n-
    206 std::vector<CoordinateInfo> coords_;
    \n-
    207
    \n-
    209 std::vector<SubEntityInfo> subEntities_;
    \n-
    210
    \n-\n+
    116 unsigned int numCorners = elmt.subEntities(dim);
    \n+
    117 unsigned int vertex_indices[numCorners]; // index in global vector
    \n+
    118 unsigned int vertex_numbers[numCorners]; // index in parent entity
    \n+
    119
    \n+
    120 // try for each of the faces vertices whether it is already inserted or not
    \n+
    121 for (unsigned int i = 0; i < numCorners; ++i)
    \n+
    122 {
    \n+
    123 vertex_numbers[i] = i;
    \n+
    124
    \n+
    125 // get the vertex pointer and the index from the index set
    \n+
    126 const Vertex vertex = elmt.template subEntity<dim>(vertex_numbers[i]);
    \n+
    127 IndexType vindex = this->gv_.indexSet().template index<dim>(vertex);
    \n+
    128
    \n+
    129 // if the vertex is not yet inserted in the vertex info map
    \n+
    130 // it is a new one -> it will be inserted now!
    \n+
    131 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);
    \n+
    132 if (vimit == this->vtxInfo_.end())
    \n+
    133 {
    \n+
    134 // insert into the map
    \n+
    135 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));
    \n+
    136 // remember this vertex' index
    \n+
    137 vertex_indices[i] = vertex_index;
    \n+
    138 // increase the current index
    \n+
    139 vertex_index++;
    \n+
    140 }
    \n+
    141 else
    \n+
    142 {
    \n+
    143 // only remember the vertex' index
    \n+
    144 vertex_indices[i] = vimit->second.idx;
    \n+
    145 }
    \n+
    146 }
    \n+
    147
    \n+
    148 // flip cell if necessary
    \n+
    149 {
    \n+
    150 switch (int(dim))
    \n+
    151 {
    \n+
    152 case 0 :
    \n+
    153 break;
    \n+
    154 case 1 :
    \n+
    155 {
    \n+
    156 // The following test only works if the zero-th coordinate is the
    \n+
    157 // one that defines the orientation. A sufficient condition for
    \n+
    158 // this is dimworld == 1
    \n+
    159 /* assert(dimworld==1); */
    \n+
    160 bool elementNormalDirection =
    \n+
    161 (geometry.corner(1)[0] < geometry.corner(0)[0]);
    \n+
    162 if ( positiveNormalDirection_ != elementNormalDirection )
    \n+
    163 {
    \n+
    164 std::swap(vertex_indices[0], vertex_indices[1]);
    \n+
    165 std::swap(vertex_numbers[0], vertex_numbers[1]);
    \n+
    166 }
    \n+
    167 break;
    \n+
    168 }
    \n+
    169 case 2 :
    \n+
    170 {
    \n+
    171 Dune::FieldVector<ctype, dimworld>
    \n+
    172 v0 = geometry.corner(1),
    \n+
    173 v1 = geometry.corner(2);
    \n+
    174 v0 -= geometry.corner(0);
    \n+
    175 v1 -= geometry.corner(0);
    \n+
    176 ctype normal_sign = v0[0]*v1[1] - v0[1]*v1[0];
    \n+
    177 bool elementNormalDirection = (normal_sign < 0);
    \n+
    178 if ( positiveNormalDirection_ != elementNormalDirection )
    \n+
    179 {
    \n+
    180 std::cout << "swap\\n";
    \n+
    181 if (elmt.type().isCube())
    \n+
    182 {
    \n+
    183 for (int i = 0; i < (1<<dim); i+=2)
    \n+
    184 {
    \n+
    185 // swap i and i+1
    \n+
    186 std::swap(vertex_indices[i], vertex_indices[i+1]);
    \n+
    187 std::swap(vertex_numbers[i], vertex_numbers[i+1]);
    \n+
    188 }
    \n+
    189 } else if (elmt.type().isSimplex()) {
    \n+
    190 std::swap(vertex_indices[0], vertex_indices[1]);
    \n+
    191 std::swap(vertex_numbers[0], vertex_numbers[1]);
    \n+
    192 } else {
    \n+
    193 DUNE_THROW(Dune::Exception, "Unexpected Geometrytype");
    \n+
    194 }
    \n+
    195 }
    \n+
    196 break;
    \n+
    197 }
    \n+
    198 }
    \n+
    199 }
    \n+
    200
    \n+
    201 // add a new face to the temporary collection
    \n+
    202 temp_faces.emplace_back(eindex, 0, elmt.type());
    \n+
    203 element_index++;
    \n+
    204 for (unsigned int i=0; i<numCorners; i++) {
    \n+
    205 temp_faces.back().corners[i].idx = vertex_indices[i];
    \n+
    206 // remember the vertices' numbers in parent element's vertices
    \n+
    207 temp_faces.back().corners[i].num = vertex_numbers[i];
    \n+
    208 }
    \n+
    209
    \n+
    210 }
    \n+
    211 } // end loop over elements
    \n+
    212
    \n+
    213 // allocate the array for the face specific information...
    \n+
    214 this->subEntities_.resize(element_index);
    \n+
    215 // ...and fill in the data from the temporary containers
    \n+
    216 copy(temp_faces.begin(), temp_faces.end(), this->subEntities_.begin());
    \n
    217
    \n-\n-
    224
    \n-\n-
    226
    \n-
    227public:
    \n-
    228
    \n-
    229 /* C O N S T R U C T O R S A N D D E S T R U C T O R S */
    \n-
    230
    \n-
    \n-
    235 Extractor(const GV& gv)
    \n-
    236 : gv_(gv)
    \n-
    237#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 6)
    \n-
    238 , cellMapper_(gv, mcmgElementLayout())
    \n-
    239#else
    \n-
    240 , cellMapper_(gv)
    \n-
    241#endif
    \n-
    242 {}
    \n-
    \n-
    243
    \n-
    244 /* F U N C T I O N A L I T Y */
    \n-
    245
    \n-
    \n-
    249 void clear()
    \n-
    250 {
    \n-
    251 // this is an inofficial way on how to free the memory allocated
    \n-
    252 // by a std::vector
    \n-
    253 {
    \n-
    254 std::vector<CoordinateInfo> dummy;
    \n-
    255 coords_.swap(dummy);
    \n-
    256 }
    \n-
    257 {
    \n-
    258 std::vector<SubEntityInfo> dummy;
    \n-
    259 subEntities_.swap(dummy);
    \n-
    260 }
    \n-
    261
    \n-
    262 // ...then clear the maps themselves, too
    \n-
    263 vtxInfo_.clear();
    \n-
    264 elmtInfo_.clear();
    \n-
    265 }
    \n-
    \n-
    266
    \n-
    267
    \n-
    268 /* G E T T E R S */
    \n-
    269
    \n-
    \n-
    275 void getCoords(std::vector<Dune::FieldVector<ctype, dimworld> >& coords) const
    \n-
    276 {
    \n-
    277 coords.resize(coords_.size());
    \n-
    278 for (unsigned int i = 0; i < coords_.size(); ++i)
    \n-
    279 coords[i] = coords_[i].coord;
    \n-
    280 }
    \n-
    \n-
    281
    \n-
    282
    \n-
    \n-
    287 unsigned int nCoords() const
    \n-
    288 {
    \n-
    289 return coords_.size();
    \n-
    290 }
    \n-
    \n-
    291
    \n-
    \n-
    293 void getGeometryTypes(std::vector<Dune::GeometryType>& geometryTypes) const
    \n-
    294 {
    \n-
    295 geometryTypes.resize(subEntities_.size());
    \n-
    296 for (size_t i=0; i<subEntities_.size(); i++)
    \n-
    297 geometryTypes[i] = subEntities_[i].geometryType_;
    \n-
    298 }
    \n-
    \n-
    299
    \n-
    300
    \n-
    \n-
    304 void getFaces(std::vector<VertexVector>& faces) const
    \n-
    305 {
    \n-
    306 faces.resize(subEntities_.size());
    \n-
    307 for (unsigned int i = 0; i < subEntities_.size(); ++i) {
    \n-
    308 faces[i].resize(subEntities_[i].nCorners());
    \n-
    309 for (unsigned int j = 0; j < subEntities_[i].nCorners(); ++j)
    \n-
    310 faces[i][j] = subEntities_[i].corners[j].idx;
    \n-
    311 }
    \n-
    312 }
    \n-
    \n-
    313
    \n-
    314
    \n-
    \n-
    323 bool faceIndices(const Element& e, int& first, int& count) const
    \n-
    324 {
    \n-
    325 typename ElementInfoMap::const_iterator it =
    \n-
    326 elmtInfo_.find(cellMapper_.map(e));
    \n-
    327 if (it == elmtInfo_.end())
    \n-
    328 {
    \n-
    329 first = -1;
    \n-
    330 count = 0;
    \n-
    331 return false;
    \n-
    332 }
    \n-
    333 // the iterator is valid, fill the out params
    \n-
    334 first = it->second.idx;
    \n-
    335 count = it->second.faces;
    \n-
    336 return true;
    \n-
    337 }
    \n-
    \n-
    338
    \n-
    339
    \n-
    \n-
    345 int indexInInside(unsigned int index) const
    \n-
    346 {
    \n-
    347 return index < subEntities_.size() ? subEntities_[index].num_in_parent : -1;
    \n-
    348 }
    \n-
    \n-
    349
    \n-
    350 // /**
    \n-
    351 // * @brief tests that a given entry in the extraction set does have local couplings
    \n-
    352 // * @todo parallel interface
    \n-
    353 // */
    \n-
    354 // bool contains (unsigned int global, unsigned int & local) const
    \n-
    355 // {
    \n-
    356 // local = global;
    \n-
    357 // return true;
    \n-
    358 // }
    \n-
    359
    \n-
    \n-
    363 const GridView & gridView() const
    \n-
    364 {
    \n-
    365 return gv_;
    \n-
    366 }
    \n-
    \n-
    367
    \n-
    \n-
    368 const Grid& grid() const
    \n-
    369 {
    \n-
    370 return gv_.grid();
    \n-
    371 }
    \n-
    \n-
    372
    \n-
    379 Element
    \n-
    \n-
    380 element(unsigned int index) const
    \n-
    381 {
    \n-
    382 if (index >= subEntities_.size())
    \n-
    383 DUNE_THROW(Dune::GridError, "invalid face index");
    \n-
    384 const ElementSeed seed = elmtInfo_.at(subEntities_[index].parent).p;
    \n-
    385 return grid().entity(seed);
    \n-
    386 }
    \n-
    \n-
    387
    \n-
    388#if 1
    \n-
    395 Vertex
    \n-
    \n-
    396 vertex(unsigned int index) const
    \n-
    397 {
    \n-
    398 if (index >= coords_.size())
    \n-
    399 DUNE_THROW(Dune::GridError, "invalid coordinate index");
    \n-
    400 const VertexSeed seed = vtxInfo_.at(coords_[index].vtxindex).p;
    \n-
    401 return grid().entity(seed);
    \n-
    402 }
    \n-
    \n-
    403#endif
    \n-
    404
    \n-
    \n-
    406 Geometry geometry(unsigned int index) const;
    \n-
    407
    \n-
    \n-
    409 LocalGeometry geometryLocal(unsigned int index) const;
    \n-
    410
    \n-
    411};
    \n-
    412
    \n-
    413
    \n-
    415template<typename GV, int cd>
    \n-
    \n-\n-
    417{
    \n-
    418 std::vector<Coords> corners(subEntities_[index].nCorners());
    \n-
    419 for (unsigned int i = 0; i < subEntities_[index].nCorners(); ++i)
    \n-
    420 corners[i] = coords_[subEntities_[index].corners[i].idx].coord;
    \n-
    421
    \n-
    422 return Geometry(subEntities_[index].geometryType_, corners);
    \n-
    423}
    \n-
    \n-
    424
    \n-
    425
    \n-
    427template<typename GV, int cd>
    \n-
    \n-\n-
    429{
    \n-
    430 std::vector<LocalCoords> corners(subEntities_[index].nCorners());
    \n-
    431
    \n-
    432 // get face info
    \n-
    433 const SubEntityInfo & face = subEntities_[index];
    \n-
    434 Dune::GeometryType facetype = subEntities_[index].geometryType_;
    \n-
    435
    \n-
    436 // get reference element
    \n-
    437 const auto elmtseed = elmtInfo_.at(face.parent).p;
    \n-
    438 const auto elmt = grid().entity(elmtseed);
    \n-
    439 const Dune::GeometryType celltype = elmt.type();
    \n-
    440 const auto& re = Dune::ReferenceElements<ctype, dim>::general(celltype);
    \n-
    441 for (unsigned int i = 0; i < subEntities_[index].nCorners(); ++i)
    \n-
    442 corners[i] = re.position(face.corners[i].num,dim);
    \n-
    443
    \n-
    444 return LocalGeometry(facetype, corners);
    \n-
    445}
    \n-
    \n-
    \n-
    446
    \n-
    447} // namespace GridGlue
    \n-
    448
    \n-
    449} // namespace Dune
    \n-
    450
    \n-
    451#endif // DUNE_GRIDGLUE_EXTRACTORS_EXTRACTOR_HH
    \n-
    \n-
    \n+
    218 // now first write the array with the coordinates...
    \n+
    219 this->coords_.resize(this->vtxInfo_.size());
    \n+
    220 for (const auto& vinfo : this->vtxInfo_)
    \n+
    221 {
    \n+
    222 // get a pointer to the associated info object
    \n+
    223 CoordinateInfo* current = &this->coords_[vinfo.second.idx];
    \n+
    224 // store this coordinates index // NEEDED?
    \n+
    225 current->index = vinfo.second.idx;
    \n+
    226 // store the vertex' index for the index2vertex mapping
    \n+
    227 current->vtxindex = vinfo.first;
    \n+
    228 // store the vertex' coordinates under the associated index
    \n+
    229 // in the coordinates array
    \n+
    230 const auto vtx = this->grid().entity(vinfo.second.p);
    \n+
    231 current->coord = vtx.geometry().corner(0);
    \n+
    232 }
    \n+
    233
    \n+
    234}
    \n+
    235
    \n+
    236} // namespace GridGlue
    \n+
    237
    \n+
    238} // namespace Dune
    \n+
    239
    \n+
    240#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH
    \n+
    extractor base class
    \n
    Definition gridglue.hh:37
    \n+
    Definition codim0extractor.hh:40
    \n+
    bool & positiveNormalDirection()
    Definition codim0extractor.hh:75
    \n+
    Extractor< GV, 0 >::IndexType IndexType
    Definition codim0extractor.hh:49
    \n+
    const bool & positiveNormalDirection() const
    Definition codim0extractor.hh:76
    \n+
    GV::Traits::template Codim< dim >::Entity Vertex
    Definition codim0extractor.hh:51
    \n+
    Extractor< GV, 0 >::CoordinateInfo CoordinateInfo
    Definition codim0extractor.hh:59
    \n+
    Extractor< GV, 0 >::VertexInfo VertexInfo
    Definition codim0extractor.hh:58
    \n+
    Extractor< GV, 0 >::ctype ctype
    Definition codim0extractor.hh:46
    \n+
    bool positiveNormalDirection_
    Definition codim0extractor.hh:79
    \n+
    Extractor< GV, 0 >::VertexInfoMap VertexInfoMap
    Definition codim0extractor.hh:60
    \n+
    std::function< bool(const Element &, unsigned int subentity)> Predicate
    Definition codim0extractor.hh:53
    \n+
    Codim0Extractor(const GV &gv, const Predicate &predicate)
    Constructor.
    Definition codim0extractor.hh:67
    \n+
    Extractor< GV, 0 >::ElementInfo ElementInfo
    Definition codim0extractor.hh:57
    \n+
    GV::Traits::template Codim< 0 >::Entity Element
    Definition codim0extractor.hh:52
    \n+
    Extractor< GV, 0 >::SubEntityInfo SubEntityInfo
    Definition codim0extractor.hh:56
    \n
    Provides codimension-independent methods for grid extraction.
    Definition extractor.hh:46
    \n-
    GV::Traits::template Codim< dim >::Entity Vertex
    Definition extractor.hh:63
    \n-
    VertexInfoMap vtxInfo_
    a map enabling faster access to vertices and coordinates
    Definition extractor.hh:216
    \n-
    const Grid & grid() const
    Definition extractor.hh:368
    \n-
    MultipleCodimMultipleGeomTypeMapper< GridView, MCMGElementLayout > CellMapper
    Definition extractor.hh:74
    \n-
    Element element(unsigned int index) const
    gets the parent element for a given face index, throws an exception if index not valid
    Definition extractor.hh:380
    \n-
    int indexInInside(unsigned int index) const
    gets the number face in the parent element
    Definition extractor.hh:345
    \n-
    Dune::FieldVector< ctype, dim > LocalCoords
    Definition extractor.hh:61
    \n-
    LocalGeometry geometryLocal(unsigned int index) const
    Get geometry of the extracted face in element coordinates.
    Definition extractor.hh:428
    \n-
    static constexpr auto dimworld
    Definition extractor.hh:50
    \n-
    Dune::MultiLinearGeometry< ctype, dim-codim, dimworld > Geometry
    Definition extractor.hh:81
    \n+
    static constexpr auto dimworld
    Definition extractor.hh:50
    \n
    int IndexType
    Definition extractor.hh:77
    \n-
    std::vector< CoordinateInfo > coords_
    all information about the corner vertices of the extracted
    Definition extractor.hh:206
    \n-
    GV::Traits::template Codim< 0 >::Entity Element
    Definition extractor.hh:66
    \n-
    const GridView & gridView() const
    give access to the Dune::GridView where this Patch belongs to
    Definition extractor.hh:363
    \n-
    void getFaces(std::vector< VertexVector > &faces) const
    Get the corners of the extracted subentities.
    Definition extractor.hh:304
    \n-
    std::vector< unsigned int > VertexVector
    Definition extractor.hh:69
    \n-
    const GridView gv_
    the grid object to extract the surface from
    Definition extractor.hh:201
    \n-
    std::vector< SubEntityInfo > subEntities_
    all information about the extracted subEntities
    Definition extractor.hh:209
    \n-
    static constexpr int cube_corners
    Definition extractor.hh:54
    \n-
    Vertex vertex(unsigned int index) const
    gets the vertex for a given coordinate index throws an exception if index not valid
    Definition extractor.hh:396
    \n-
    static constexpr auto codim
    Definition extractor.hh:52
    \n-
    Dune::FieldVector< ctype, dimworld > Coords
    Definition extractor.hh:60
    \n-
    void getGeometryTypes(std::vector< Dune::GeometryType > &geometryTypes) const
    Get the list of geometry types.
    Definition extractor.hh:293
    \n+
    static constexpr auto codim
    Definition extractor.hh:52
    \n
    std::map< IndexType, VertexInfo > VertexInfoMap
    Definition extractor.hh:196
    \n-
    GridView::Grid Grid
    Definition extractor.hh:57
    \n-
    bool faceIndices(const Element &e, int &first, int &count) const
    gets index of first subentity as well as the total number of subentities that were extracted from thi...
    Definition extractor.hh:323
    \n-
    Geometry geometry(unsigned int index) const
    Get world geometry of the extracted face.
    Definition extractor.hh:416
    \n-
    GV GridView
    Definition extractor.hh:56
    \n-
    unsigned int nCoords() const
    getter for the count of coordinates
    Definition extractor.hh:287
    \n
    GV::Grid::ctype ctype
    Definition extractor.hh:59
    \n-
    std::map< IndexType, ElementInfo > ElementInfoMap
    Definition extractor.hh:195
    \n-
    Extractor(const GV &gv)
    Constructor.
    Definition extractor.hh:235
    \n-
    void getCoords(std::vector< Dune::FieldVector< ctype, dimworld > > &coords) const
    getter for the coordinates array
    Definition extractor.hh:275
    \n-
    CellMapper cellMapper_
    Definition extractor.hh:225
    \n-
    Element::EntitySeed ElementSeed
    Definition extractor.hh:67
    \n-
    Vertex::EntitySeed VertexSeed
    Definition extractor.hh:64
    \n-
    ElementInfoMap elmtInfo_
    a map enabling faster access to elements and faces
    Definition extractor.hh:223
    \n-
    void clear()
    delete everything build up so far and free the memory
    Definition extractor.hh:249
    \n-
    static constexpr auto dim
    Definition extractor.hh:51
    \n-
    Dune::MultiLinearGeometry< ctype, dim-codim, dim > LocalGeometry
    Definition extractor.hh:82
    \n-
    Helpful struct holding one index for the coordinate (vertex) to which it is associated and the elemen...
    Definition extractor.hh:92
    \n-
    unsigned int idx
    index of the vertex
    Definition extractor.hh:93
    \n-
    unsigned int num
    element corner
    Definition extractor.hh:94
    \n+
    static constexpr auto dim
    Definition extractor.hh:51
    \n \n-
    CoordinateInfo(unsigned int index_, IndexType vtxindex_)
    Definition extractor.hh:102
    \n-
    unsigned int index
    the index of this coordinate (in internal storage scheme) // NEEDED??
    Definition extractor.hh:113
    \n-
    CoordinateInfo()
    Definition extractor.hh:99
    \n-
    Coords coord
    the coordinate
    Definition extractor.hh:110
    \n-
    IndexType vtxindex
    the index of the parent element (from index set)
    Definition extractor.hh:107
    \n
    simple struct holding a vertex pointer and an index
    Definition extractor.hh:120
    \n-
    unsigned int idx
    Definition extractor.hh:123
    \n-
    VertexInfo(unsigned int idx_, const Vertex &p_)
    Definition extractor.hh:121
    \n-
    VertexSeed p
    Definition extractor.hh:124
    \n
    simple struct holding an element seed and an index
    Definition extractor.hh:132
    \n-
    unsigned int idx
    the index of this element's first face in the internal list of extracted faces
    Definition extractor.hh:137
    \n-
    unsigned int faces
    the number of extracted faces for this element
    Definition extractor.hh:140
    \n-
    ElementInfo(unsigned int idx_, const Element &p_, unsigned int f_)
    Definition extractor.hh:133
    \n-
    ElementSeed p
    the entity seed for the element
    Definition extractor.hh:143
    \n
    Holds some information about an element's subentity involved in a coupling.
    Definition extractor.hh:151
    \n-
    unsigned int nCorners() const
    Definition extractor.hh:171
    \n-
    CornerInfo corners[cube_corners]
    the corner indices plus the numbers of the vertices in the parent element
    Definition extractor.hh:191
    \n-
    IndexType parent
    the index of the parent element (from index set)
    Definition extractor.hh:177
    \n-
    SubEntityInfo(IndexType parent_, unsigned int num_in_parent_, const Dune::GeometryType &geometryType)
    Definition extractor.hh:166
    \n-
    unsigned int num_in_parent
    the number of the face in the parent element
    Definition extractor.hh:180
    \n-
    Dune::GeometryType geometryType_
    The GeometryType of the subentity.
    Definition extractor.hh:183
    \n-
    SubEntityInfo()
    Definition extractor.hh:152
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,607 +1,325 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\bs\n-extractor.hh\n+codim0extractor.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n 5/*\n-6 * Filename: extractor.hh\n+6 * Filename: codim0extractor.hh\n 7 * Version: 1.0\n-8 * Created on: Oct 05, 2009\n-9 * Author: Christian Engwer\n+8 * Created on: Jun 23, 2009\n+9 * Author: Oliver Sander, Christian Engwer\n 10 * ---------------------------------\n 11 * Project: dune-grid-glue\n-12 * Description: base class for all grid extractors\n+12 * Description: base class for grid extractors extracting surface grids\n 13 *\n 14 */\n-20#ifndef DUNE_GRIDGLUE_EXTRACTORS_EXTRACTOR_HH\n-21#define DUNE_GRIDGLUE_EXTRACTORS_EXTRACTOR_HH\n+20#ifndef DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH\n+21#define DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH\n 22\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\n-34namespace _\bD_\bu_\bn_\be {\n-35\n-36 namespace GridGlue {\n-37\n-44template\n-_\b4_\b5class _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-46{\n-47\n-48public:\n-49\n-_\b5_\b0 static constexpr auto _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd = GV::dimensionworld;\n-_\b5_\b1 static constexpr auto _\bd_\bi_\bm = GV::dimension;\n-_\b5_\b2 static constexpr auto _\bc_\bo_\bd_\bi_\bm = cd;\n-53\n-_\b5_\b4 static constexpr int _\bc_\bu_\bb_\be_\b__\bc_\bo_\br_\bn_\be_\br_\bs = 1 << (_\bd_\bi_\bm-_\bc_\bo_\bd_\bi_\bm);\n-55\n-_\b5_\b6 typedef GV _\bG_\br_\bi_\bd_\bV_\bi_\be_\bw;\n-_\b5_\b7 typedef typename GridView::Grid _\bG_\br_\bi_\bd;\n-58\n-_\b5_\b9 typedef typename GV::Grid::ctype _\bc_\bt_\by_\bp_\be;\n-_\b6_\b0 typedef Dune::FieldVector _\bC_\bo_\bo_\br_\bd_\bs;\n-_\b6_\b1 typedef Dune::FieldVector _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs;\n-62\n-_\b6_\b3 typedef typename GV::Traits::template Codim::Entity _\bV_\be_\br_\bt_\be_\bx;\n-_\b6_\b4 typedef typename Vertex::EntitySeed _\bV_\be_\br_\bt_\be_\bx_\bS_\be_\be_\bd;\n-65\n-_\b6_\b6 typedef typename GV::Traits::template Codim<0>::Entity _\bE_\bl_\be_\bm_\be_\bn_\bt;\n-_\b6_\b7 typedef typename Element::EntitySeed _\bE_\bl_\be_\bm_\be_\bn_\bt_\bS_\be_\be_\bd;\n-68\n-_\b6_\b9 typedef std::vector _\bV_\be_\br_\bt_\be_\bx_\bV_\be_\bc_\bt_\bo_\br;\n-70\n-71#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 6)\n-72 using _\bC_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br = MultipleCodimMultipleGeomTypeMapper;\n-73#else\n-_\b7_\b4 using _\bC_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br = MultipleCodimMultipleGeomTypeMapper;\n-75#endif\n-76 // typedef typename CellMapper::IndexType IndexType;\n-_\b7_\b7 typedef int _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be;\n-78public:\n-79\n-80 // transformations\n-_\b8_\b1 typedef Dune::MultiLinearGeometry<_\bc_\bt_\by_\bp_\be, _\bd_\bi_\bm-_\bc_\bo_\bd_\bi_\bm, _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd> _\bG_\be_\bo_\bm_\be_\bt_\br_\by;\n-_\b8_\b2 typedef Dune::MultiLinearGeometry<_\bc_\bt_\by_\bp_\be, _\bd_\bi_\bm-_\bc_\bo_\bd_\bi_\bm, _\bd_\bi_\bm> _\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by;\n+23#include \n+24#include \n+25\n+26#include \n+27#include \n+28\n+29#include \"_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\"\n+30\n+31namespace _\bD_\bu_\bn_\be {\n+32\n+33 namespace GridGlue {\n+34\n+38template\n+_\b3_\b9class _\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br : public _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+40{\n+41\n+42public:\n+43\n+44 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n+45 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bo_\bd_\bi_\bm;\n+_\b4_\b6 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bc_\bt_\by_\bp_\be _\bc_\bt_\by_\bp_\be;\n+47 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm;\n+48 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd;\n+_\b4_\b9 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be;\n+50\n+_\b5_\b1 typedef typename GV::Traits::template Codim::Entity _\bV_\be_\br_\bt_\be_\bx;\n+_\b5_\b2 typedef typename GV::Traits::template Codim<0>::Entity _\bE_\bl_\be_\bm_\be_\bn_\bt;\n+_\b5_\b3 typedef std::function\n+_\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be;\n+54\n+55 // import typedefs from base class\n+_\b5_\b6 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo;\n+_\b5_\b7 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo;\n+_\b5_\b8 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo;\n+_\b5_\b9 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo;\n+_\b6_\b0 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp;\n+61\n+_\b6_\b7 _\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(const GV& gv, const _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be& predicate)\n+68 : _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(gv), _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_(false)\n+69 {\n+70 std::cout << \"This is Codim0Extractor on a <\"\n+71 << GV::dimension << \",\" << GV::dimensionworld << \"> grid!\" << std::endl;\n+72 update(predicate);\n+73 }\n+74\n+_\b7_\b5 bool & _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn() { return _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_; }\n+_\b7_\b6 const bool & _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn() const { return\n+_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_; }\n+77\n+78protected:\n+_\b7_\b9 bool _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_;\n+80private:\n+81 void update(const _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be& predicate);\n+82};\n 83\n-84protected:\n-85 /************************** PRIVATE SUBCLASSES **********************/\n-86\n-_\b9_\b1 struct _\bC_\bo_\br_\bn_\be_\br_\bI_\bn_\bf_\bo\n-92 {\n-_\b9_\b3 unsigned int _\bi_\bd_\bx : 28;\n-_\b9_\b4 unsigned int _\bn_\bu_\bm : 4;\n-95 };\n-96\n-_\b9_\b7 struct _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n-98 {\n-_\b9_\b9 _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo()\n-100 {}\n-101\n-_\b1_\b0_\b2 _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo(unsigned int index_, _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be vtxindex_)\n-103 : _\bv_\bt_\bx_\bi_\bn_\bd_\be_\bx(vtxindex_), _\bi_\bn_\bd_\be_\bx(index_)\n-104 {}\n-105\n-_\b1_\b0_\b7 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bv_\bt_\bx_\bi_\bn_\bd_\be_\bx;\n+84\n+85template\n+86void _\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b>_\b:_\b:_\bu_\bp_\bd_\ba_\bt_\be(const Predicate& predicate)\n+87{\n+88 // In this first pass iterate over all entities of codim 0.\n+89 // Get its corner vertices, find resp. store them together with their\n+associated index,\n+90 // and remember the indices of the corners.\n+91\n+92 // free everything there is in this object\n+93 this->clear();\n+94\n+95 // several counter for consecutive indexing are needed\n+96 size_t element_index = 0;\n+97 size_t vertex_index = 0;\n+98\n+99 // a temporary container where newly acquired face\n+100 // information can be stored at first\n+101 std::deque temp_faces;\n+102\n+103 // iterate over all codim 0 elements on the grid\n+104 for (const auto& elmt : elements(this->gv_, Partitions::interior))\n+105 {\n+106 const auto geometry = elmt.geometry();\n+107 IndexType eindex = this->cellMapper_.index(elmt);\n 108\n-_\b1_\b1_\b0 _\bC_\bo_\bo_\br_\bd_\bs _\bc_\bo_\bo_\br_\bd;\n-111\n-_\b1_\b1_\b3 unsigned int _\bi_\bn_\bd_\be_\bx;\n-114 };\n+109 // only do sth. if this element is \"interesting\"\n+110 // implicit cast is done automatically\n+111 if (predicate(elmt,0))\n+112 {\n+113 // add an entry to the element info map, the index will be set properly\n+later\n+114 this->elmtInfo_.emplace(eindex, ElementInfo(element_index, elmt, 1));\n 115\n-_\b1_\b1_\b9 struct _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n-120 {\n-_\b1_\b2_\b1 _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo(unsigned int idx_, const _\bV_\be_\br_\bt_\be_\bx& p_) : _\bi_\bd_\bx(idx_), _\bp(p_.seed())\n-122 {}\n-_\b1_\b2_\b3 unsigned int _\bi_\bd_\bx;\n-_\b1_\b2_\b4 _\bV_\be_\br_\bt_\be_\bx_\bS_\be_\be_\bd _\bp;\n-125 };\n-126\n-127\n-_\b1_\b3_\b1 struct _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n-132 {\n-_\b1_\b3_\b3 _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo(unsigned int idx_, const _\bE_\bl_\be_\bm_\be_\bn_\bt& p_, unsigned int f_) : _\bi_\bd_\bx\n-(idx_), _\bf_\ba_\bc_\be_\bs(f_), _\bp(p_.seed())\n-134 {}\n-135\n-_\b1_\b3_\b7 unsigned int _\bi_\bd_\bx : 28;\n-138\n-_\b1_\b4_\b0 unsigned int _\bf_\ba_\bc_\be_\bs : 4;\n-141\n-_\b1_\b4_\b3 _\bE_\bl_\be_\bm_\be_\bn_\bt_\bS_\be_\be_\bd _\bp;\n-144 };\n-145\n-146\n-_\b1_\b5_\b0 struct _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n+116 unsigned int numCorners = elmt.subEntities(dim);\n+117 unsigned int vertex_indices[numCorners]; // index in global vector\n+118 unsigned int vertex_numbers[numCorners]; // index in parent entity\n+119\n+120 // try for each of the faces vertices whether it is already inserted or not\n+121 for (unsigned int i = 0; i < numCorners; ++i)\n+122 {\n+123 vertex_numbers[i] = i;\n+124\n+125 // get the vertex pointer and the index from the index set\n+126 const Vertex vertex = elmt.template subEntity(vertex_numbers[i]);\n+127 IndexType vindex = this->gv_.indexSet().template index(vertex);\n+128\n+129 // if the vertex is not yet inserted in the vertex info map\n+130 // it is a new one -> it will be inserted now!\n+131 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);\n+132 if (vimit == this->vtxInfo_.end())\n+133 {\n+134 // insert into the map\n+135 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));\n+136 // remember this vertex' index\n+137 vertex_indices[i] = vertex_index;\n+138 // increase the current index\n+139 vertex_index++;\n+140 }\n+141 else\n+142 {\n+143 // only remember the vertex' index\n+144 vertex_indices[i] = vimit->second.idx;\n+145 }\n+146 }\n+147\n+148 // flip cell if necessary\n+149 {\n+150 switch (int(dim))\n 151 {\n-_\b1_\b5_\b2 _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo()\n-153 /*\n-154 * TODO: move default value of `geometryType_` to member declaration\n-155 * when removing support for older dune-geometry\n-156 */\n-157#if DUNE_VERSION_NEWER(DUNE_GEOMETRY, 2, 6)\n-158 : _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_(GeometryTypes::simplex(_\bd_\bi_\bm-_\bc_\bo_\bd_\bi_\bm))\n-159 {}\n-160#else\n-161 {\n-162 _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_.makeSimplex(_\bd_\bi_\bm-_\bc_\bo_\bd_\bi_\bm);\n-163 }\n-164#endif\n-165\n-_\b1_\b6_\b6 _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo(_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be parent_, unsigned int num_in_parent_,\n-167 const Dune::GeometryType& geometryType)\n-168 : _\bp_\ba_\br_\be_\bn_\bt(parent_), _\bn_\bu_\bm_\b__\bi_\bn_\b__\bp_\ba_\br_\be_\bn_\bt(num_in_parent_), _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_\n-(geometryType)\n-169 {}\n-170\n-_\b1_\b7_\b1 unsigned int _\bn_\bC_\bo_\br_\bn_\be_\br_\bs() const\n-172 {\n-173 return Dune::ReferenceElements::general\n-(_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_).size(_\bd_\bi_\bm-_\bc_\bo_\bd_\bi_\bm);\n-174 }\n-175\n-_\b1_\b7_\b7 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bp_\ba_\br_\be_\bn_\bt;\n-178\n-_\b1_\b8_\b0 unsigned int _\bn_\bu_\bm_\b__\bi_\bn_\b__\bp_\ba_\br_\be_\bn_\bt : 3;\n-181\n-_\b1_\b8_\b3 Dune::GeometryType _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_;\n-184\n-_\b1_\b9_\b1 _\bC_\bo_\br_\bn_\be_\br_\bI_\bn_\bf_\bo _\bc_\bo_\br_\bn_\be_\br_\bs[_\bc_\bu_\bb_\be_\b__\bc_\bo_\br_\bn_\be_\br_\bs]; // sim = numer of vertices in a simplex\n-192 };\n-193\n-194\n-_\b1_\b9_\b5 typedef std::map _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\bM_\ba_\bp;\n-_\b1_\b9_\b6 typedef std::map _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp;\n-197\n-198 /************************** MEMBER VARIABLES ************************/\n-199\n-_\b2_\b0_\b1 const _\bG_\br_\bi_\bd_\bV_\bi_\be_\bw _\bg_\bv_\b_;\n-202\n-203 /* Geometrical and Topological Information */\n-204\n-_\b2_\b0_\b6 std::vector _\bc_\bo_\bo_\br_\bd_\bs_\b_;\n-207\n-_\b2_\b0_\b9 std::vector _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_;\n-210\n-_\b2_\b1_\b6 _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp _\bv_\bt_\bx_\bI_\bn_\bf_\bo_\b_;\n+152 case 0 :\n+153 break;\n+154 case 1 :\n+155 {\n+156 // The following test only works if the zero-th coordinate is the\n+157 // one that defines the orientation. A sufficient condition for\n+158 // this is dimworld == 1\n+159 /* assert(dimworld==1); */\n+160 bool elementNormalDirection =\n+161 (geometry.corner(1)[0] < geometry.corner(0)[0]);\n+162 if ( positiveNormalDirection_ != elementNormalDirection )\n+163 {\n+164 std::swap(vertex_indices[0], vertex_indices[1]);\n+165 std::swap(vertex_numbers[0], vertex_numbers[1]);\n+166 }\n+167 break;\n+168 }\n+169 case 2 :\n+170 {\n+171 Dune::FieldVector\n+172 v0 = geometry.corner(1),\n+173 v1 = geometry.corner(2);\n+174 v0 -= geometry.corner(0);\n+175 v1 -= geometry.corner(0);\n+176 ctype normal_sign = v0[0]*v1[1] - v0[1]*v1[0];\n+177 bool elementNormalDirection = (normal_sign < 0);\n+178 if ( positiveNormalDirection_ != elementNormalDirection )\n+179 {\n+180 std::cout << \"swap\\n\";\n+181 if (elmt.type().isCube())\n+182 {\n+183 for (int i = 0; i < (1<subEntities_.resize(element_index);\n+215 // ...and fill in the data from the temporary containers\n+216 copy(temp_faces.begin(), temp_faces.end(), this->subEntities_.begin());\n 217\n-_\b2_\b2_\b3 _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\bM_\ba_\bp _\be_\bl_\bm_\bt_\bI_\bn_\bf_\bo_\b_;\n-224\n-_\b2_\b2_\b5 _\bC_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br _\bc_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br_\b_;\n-226\n-227public:\n-228\n-229 /* C O N S T R U C T O R S A N D D E S T R U C T O R S */\n-230\n-_\b2_\b3_\b5 _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(const GV& gv)\n-236 : _\bg_\bv_\b_(gv)\n-237#if DUNE_VERSION_NEWER(DUNE_GRID, 2, 6)\n-238 , _\bc_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br_\b_(gv, mcmgElementLayout())\n-239#else\n-240 , _\bc_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br_\b_(gv)\n-241#endif\n-242 {}\n-243\n-244 /* F U N C T I O N A L I T Y */\n-245\n-_\b2_\b4_\b9 void _\bc_\bl_\be_\ba_\br()\n-250 {\n-251 // this is an inofficial way on how to free the memory allocated\n-252 // by a std::vector\n-253 {\n-254 std::vector dummy;\n-255 _\bc_\bo_\bo_\br_\bd_\bs_\b_.swap(dummy);\n-256 }\n-257 {\n-258 std::vector dummy;\n-259 _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.swap(dummy);\n-260 }\n-261\n-262 // ...then clear the maps themselves, too\n-263 _\bv_\bt_\bx_\bI_\bn_\bf_\bo_\b_.clear();\n-264 _\be_\bl_\bm_\bt_\bI_\bn_\bf_\bo_\b_.clear();\n-265 }\n-266\n-267\n-268 /* G E T T E R S */\n-269\n-_\b2_\b7_\b5 void _\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs(std::vector >& coords)\n-const\n-276 {\n-277 coords.resize(_\bc_\bo_\bo_\br_\bd_\bs_\b_.size());\n-278 for (unsigned int i = 0; i < _\bc_\bo_\bo_\br_\bd_\bs_\b_.size(); ++i)\n-279 coords[i] = _\bc_\bo_\bo_\br_\bd_\bs_\b_[i].coord;\n-280 }\n-281\n-282\n-_\b2_\b8_\b7 unsigned int _\bn_\bC_\bo_\bo_\br_\bd_\bs() const\n-288 {\n-289 return _\bc_\bo_\bo_\br_\bd_\bs_\b_.size();\n-290 }\n-291\n-_\b2_\b9_\b3 void _\bg_\be_\bt_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\bs(std::vector& geometryTypes) const\n-294 {\n-295 geometryTypes.resize(_\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.size());\n-296 for (size_t i=0; i<_\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.size(); i++)\n-297 geometryTypes[i] = _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_[i].geometryType_;\n-298 }\n-299\n-300\n-_\b3_\b0_\b4 void _\bg_\be_\bt_\bF_\ba_\bc_\be_\bs(std::vector& faces) const\n-305 {\n-306 faces.resize(_\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.size());\n-307 for (unsigned int i = 0; i < _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.size(); ++i) {\n-308 faces[i].resize(_\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_[i].nCorners());\n-309 for (unsigned int j = 0; j < _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_[i].nCorners(); ++j)\n-310 faces[i][j] = _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_[i].corners[j].idx;\n-311 }\n-312 }\n-313\n-314\n-_\b3_\b2_\b3 bool _\bf_\ba_\bc_\be_\bI_\bn_\bd_\bi_\bc_\be_\bs(const _\bE_\bl_\be_\bm_\be_\bn_\bt& e, int& first, int& count) const\n-324 {\n-325 typename ElementInfoMap::const_iterator it =\n-326 _\be_\bl_\bm_\bt_\bI_\bn_\bf_\bo_\b_.find(_\bc_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br_\b_.map(e));\n-327 if (it == _\be_\bl_\bm_\bt_\bI_\bn_\bf_\bo_\b_.end())\n-328 {\n-329 first = -1;\n-330 count = 0;\n-331 return false;\n-332 }\n-333 // the iterator is valid, fill the out params\n-334 first = it->second.idx;\n-335 count = it->second.faces;\n-336 return true;\n-337 }\n-338\n-339\n-_\b3_\b4_\b5 int _\bi_\bn_\bd_\be_\bx_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be(unsigned int index) const\n-346 {\n-347 return index < _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.size() ? _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_[index].num_in_parent : -\n-1;\n-348 }\n-349\n-350 // /**\n-351 // * @brief tests that a given entry in the extraction set does have local\n-couplings\n-352 // * @todo parallel interface\n-353 // */\n-354 // bool contains (unsigned int global, unsigned int & local) const\n-355 // {\n-356 // local = global;\n-357 // return true;\n-358 // }\n-359\n-_\b3_\b6_\b3 const _\bG_\br_\bi_\bd_\bV_\bi_\be_\bw & _\bg_\br_\bi_\bd_\bV_\bi_\be_\bw() const\n-364 {\n-365 return _\bg_\bv_\b_;\n-366 }\n-367\n-_\b3_\b6_\b8 const _\bG_\br_\bi_\bd& _\bg_\br_\bi_\bd() const\n-369 {\n-370 return _\bg_\bv_\b_.grid();\n-371 }\n-372\n-379 _\bE_\bl_\be_\bm_\be_\bn_\bt\n-_\b3_\b8_\b0 _\be_\bl_\be_\bm_\be_\bn_\bt(unsigned int index) const\n-381 {\n-382 if (index >= _\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_.size())\n-383 DUNE_THROW(Dune::GridError, \"invalid face index\");\n-384 const _\bE_\bl_\be_\bm_\be_\bn_\bt_\bS_\be_\be_\bd seed = _\be_\bl_\bm_\bt_\bI_\bn_\bf_\bo_\b_.at(_\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_[index].parent).p;\n-385 return _\bg_\br_\bi_\bd().entity(seed);\n-386 }\n-387\n-388#if 1\n-395 _\bV_\be_\br_\bt_\be_\bx\n-_\b3_\b9_\b6 _\bv_\be_\br_\bt_\be_\bx(unsigned int index) const\n-397 {\n-398 if (index >= _\bc_\bo_\bo_\br_\bd_\bs_\b_.size())\n-399 DUNE_THROW(Dune::GridError, \"invalid coordinate index\");\n-400 const _\bV_\be_\br_\bt_\be_\bx_\bS_\be_\be_\bd seed = _\bv_\bt_\bx_\bI_\bn_\bf_\bo_\b_.at(_\bc_\bo_\bo_\br_\bd_\bs_\b_[index].vtxindex).p;\n-401 return _\bg_\br_\bi_\bd().entity(seed);\n-402 }\n-403#endif\n-404\n-_\b4_\b0_\b6 _\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bg_\be_\bo_\bm_\be_\bt_\br_\by(unsigned int index) const;\n-407\n-_\b4_\b0_\b9 _\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bL_\bo_\bc_\ba_\bl(unsigned int index) const;\n-410\n-411};\n-412\n-413\n-415template\n-_\b4_\b1_\b6typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\bc_\bd_\b>_\b:_\b:_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\bc_\bd_\b>_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by(unsigned int\n-index) const\n-417{\n-418 std::vector corners(subEntities_[index].nCorners());\n-419 for (unsigned int i = 0; i < subEntities_[index].nCorners(); ++i)\n-420 corners[i] = coords_[subEntities_[index].corners[i].idx].coord;\n-421\n-422 return _\bG_\be_\bo_\bm_\be_\bt_\br_\by(subEntities_[index].geometryType_, corners);\n-423}\n-424\n-425\n-427template\n-_\b4_\b2_\b8typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\bc_\bd_\b>_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\bc_\bd_\b>_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bL_\bo_\bc_\ba_\bl\n-(unsigned int index) const\n-429{\n-430 std::vector corners(subEntities_[index].nCorners());\n-431\n-432 // get face info\n-433 const _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo & face = subEntities_[index];\n-434 Dune::GeometryType facetype = subEntities_[index]._\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_;\n-435\n-436 // get reference element\n-437 const auto elmtseed = elmtInfo_.at(face._\bp_\ba_\br_\be_\bn_\bt).p;\n-438 const auto elmt = grid().entity(elmtseed);\n-439 const Dune::GeometryType celltype = elmt.type();\n-440 const auto& re = Dune::ReferenceElements::general(celltype);\n-441 for (unsigned int i = 0; i < subEntities_[index].nCorners(); ++i)\n-442 corners[i] = re.position(face._\bc_\bo_\br_\bn_\be_\br_\bs[i]._\bn_\bu_\bm,dim);\n-443\n-444 return _\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by(facetype, corners);\n-445}\n-446\n-447} // namespace GridGlue\n-448\n-449} // namespace Dune\n-450\n-451#endif // DUNE_GRIDGLUE_EXTRACTORS_EXTRACTOR_HH\n+218 // now first write the array with the coordinates...\n+219 this->coords_.resize(this->vtxInfo_.size());\n+220 for (const auto& vinfo : this->vtxInfo_)\n+221 {\n+222 // get a pointer to the associated info object\n+223 CoordinateInfo* current = &this->coords_[vinfo.second.idx];\n+224 // store this coordinates index // NEEDED?\n+225 current->index = vinfo.second.idx;\n+226 // store the vertex' index for the index2vertex mapping\n+227 current->vtxindex = vinfo.first;\n+228 // store the vertex' coordinates under the associated index\n+229 // in the coordinates array\n+230 const auto vtx = this->grid().entity(vinfo.second.p);\n+231 current->coord = vtx.geometry().corner(0);\n+232 }\n+233\n+234}\n+235\n+236} // namespace GridGlue\n+237\n+238} // namespace Dune\n+239\n+240#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH\n+_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\n+extractor base class\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:40\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn\n+bool & positiveNormalDirection()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:75\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n+Extractor< GV, 0 >::IndexType IndexType\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:49\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn\n+const bool & positiveNormalDirection() const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:76\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx\n+GV::Traits::template Codim< dim >::Entity Vertex\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:51\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n+Extractor< GV, 0 >::CoordinateInfo CoordinateInfo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:59\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n+Extractor< GV, 0 >::VertexInfo VertexInfo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:58\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bt_\by_\bp_\be\n+Extractor< GV, 0 >::ctype ctype\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:46\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_\n+bool positiveNormalDirection_\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:79\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n+Extractor< GV, 0 >::VertexInfoMap VertexInfoMap\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:60\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be\n+std::function< bool(const Element &, unsigned int subentity)> Predicate\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:53\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+Codim0Extractor(const GV &gv, const Predicate &predicate)\n+Constructor.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:67\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n+Extractor< GV, 0 >::ElementInfo ElementInfo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:57\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt\n+GV::Traits::template Codim< 0 >::Entity Element\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:52\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n+Extractor< GV, 0 >::SubEntityInfo SubEntityInfo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:56\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n Provides codimension-independent methods for grid extraction.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:46\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx\n-GV::Traits::template Codim< dim >::Entity Vertex\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:63\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bv_\bt_\bx_\bI_\bn_\bf_\bo_\b_\n-VertexInfoMap vtxInfo_\n-a map enabling faster access to vertices and coordinates\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:216\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\br_\bi_\bd\n-const Grid & grid() const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:368\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br\n-MultipleCodimMultipleGeomTypeMapper< GridView, MCMGElementLayout > CellMapper\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:74\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\be_\bl_\be_\bm_\be_\bn_\bt\n-Element element(unsigned int index) const\n-gets the parent element for a given face index, throws an exception if index\n-not valid\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:380\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bi_\bn_\bd_\be_\bx_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be\n-int indexInInside(unsigned int index) const\n-gets the number face in the parent element\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:345\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< ctype, dim > LocalCoords\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:61\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bL_\bo_\bc_\ba_\bl\n-LocalGeometry geometryLocal(unsigned int index) const\n-Get geometry of the extracted face in element coordinates.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:428\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b0_\b _\b>_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd\n static constexpr auto dimworld\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:50\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-Dune::MultiLinearGeometry< ctype, dim-codim, dimworld > Geometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:81\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n int IndexType\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:77\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bo_\bo_\br_\bd_\bs_\b_\n-std::vector< CoordinateInfo > coords_\n-all information about the corner vertices of the extracted\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:206\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt\n-GV::Traits::template Codim< 0 >::Entity Element\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:66\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\br_\bi_\bd_\bV_\bi_\be_\bw\n-const GridView & gridView() const\n-give access to the Dune::GridView where this Patch belongs to\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:363\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bt_\bF_\ba_\bc_\be_\bs\n-void getFaces(std::vector< VertexVector > &faces) const\n-Get the corners of the extracted subentities.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:304\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bV_\be_\bc_\bt_\bo_\br\n-std::vector< unsigned int > VertexVector\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:69\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\bv_\b_\n-const GridView gv_\n-the grid object to extract the surface from\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:201\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bs_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\bi_\be_\bs_\b_\n-std::vector< SubEntityInfo > subEntities_\n-all information about the extracted subEntities\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:209\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bu_\bb_\be_\b__\bc_\bo_\br_\bn_\be_\br_\bs\n-static constexpr int cube_corners\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:54\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bv_\be_\br_\bt_\be_\bx\n-Vertex vertex(unsigned int index) const\n-gets the vertex for a given coordinate index throws an exception if index not\n-valid\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:396\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bo_\bd_\bi_\bm\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b0_\b _\b>_\b:_\b:_\bc_\bo_\bd_\bi_\bm\n static constexpr auto codim\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:52\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< ctype, dimworld > Coords\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:60\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bt_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\bs\n-void getGeometryTypes(std::vector< Dune::GeometryType > &geometryTypes) const\n-Get the list of geometry types.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:293\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n std::map< IndexType, VertexInfo > VertexInfoMap\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:196\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bG_\br_\bi_\bd\n-GridView::Grid Grid\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:57\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bf_\ba_\bc_\be_\bI_\bn_\bd_\bi_\bc_\be_\bs\n-bool faceIndices(const Element &e, int &first, int &count) const\n-gets index of first subentity as well as the total number of subentities that\n-were extracted from thi...\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:323\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by\n-Geometry geometry(unsigned int index) const\n-Get world geometry of the extracted face.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:416\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw\n-GV GridView\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:56\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bn_\bC_\bo_\bo_\br_\bd_\bs\n-unsigned int nCoords() const\n-getter for the count of coordinates\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:287\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bt_\by_\bp_\be\n GV::Grid::ctype ctype\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:59\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n-std::map< IndexType, ElementInfo > ElementInfoMap\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:195\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-Extractor(const GV &gv)\n-Constructor.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:235\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs\n-void getCoords(std::vector< Dune::FieldVector< ctype, dimworld > > &coords)\n-const\n-getter for the coordinates array\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:275\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\be_\bl_\bl_\bM_\ba_\bp_\bp_\be_\br_\b_\n-CellMapper cellMapper_\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:225\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bS_\be_\be_\bd\n-Element::EntitySeed ElementSeed\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:67\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bS_\be_\be_\bd\n-Vertex::EntitySeed VertexSeed\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:64\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\be_\bl_\bm_\bt_\bI_\bn_\bf_\bo_\b_\n-ElementInfoMap elmtInfo_\n-a map enabling faster access to elements and faces\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:223\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bl_\be_\ba_\br\n-void clear()\n-delete everything build up so far and free the memory\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:249\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b0_\b _\b>_\b:_\b:_\bd_\bi_\bm\n static constexpr auto dim\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:51\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by\n-Dune::MultiLinearGeometry< ctype, dim-codim, dim > LocalGeometry\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:82\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\br_\bn_\be_\br_\bI_\bn_\bf_\bo\n-Helpful struct holding one index for the coordinate (vertex) to which it is\n-associated and the elemen...\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:92\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\br_\bn_\be_\br_\bI_\bn_\bf_\bo_\b:_\b:_\bi_\bd_\bx\n-unsigned int idx\n-index of the vertex\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:93\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\br_\bn_\be_\br_\bI_\bn_\bf_\bo_\b:_\b:_\bn_\bu_\bm\n-unsigned int num\n-element corner\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:94\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:98\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n-CoordinateInfo(unsigned int index_, IndexType vtxindex_)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:102\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo_\b:_\b:_\bi_\bn_\bd_\be_\bx\n-unsigned int index\n-the index of this coordinate (in internal storage scheme) // NEEDED??\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:113\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n-CoordinateInfo()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:99\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo_\b:_\b:_\bc_\bo_\bo_\br_\bd\n-Coords coord\n-the coordinate\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:110\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo_\b:_\b:_\bv_\bt_\bx_\bi_\bn_\bd_\be_\bx\n-IndexType vtxindex\n-the index of the parent element (from index set)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:107\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n simple struct holding a vertex pointer and an index\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:120\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\b:_\b:_\bi_\bd_\bx\n-unsigned int idx\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:123\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n-VertexInfo(unsigned int idx_, const Vertex &p_)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:121\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\b:_\b:_\bp\n-VertexSeed p\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:124\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n simple struct holding an element seed and an index\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:132\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\b:_\b:_\bi_\bd_\bx\n-unsigned int idx\n-the index of this element's first face in the internal list of extracted faces\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:137\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\b:_\b:_\bf_\ba_\bc_\be_\bs\n-unsigned int faces\n-the number of extracted faces for this element\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:140\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n-ElementInfo(unsigned int idx_, const Element &p_, unsigned int f_)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:133\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo_\b:_\b:_\bp\n-ElementSeed p\n-the entity seed for the element\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:143\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n Holds some information about an element's subentity involved in a coupling.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:151\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bn_\bC_\bo_\br_\bn_\be_\br_\bs\n-unsigned int nCorners() const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:171\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bc_\bo_\br_\bn_\be_\br_\bs\n-CornerInfo corners[cube_corners]\n-the corner indices plus the numbers of the vertices in the parent element\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:191\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt\n-IndexType parent\n-the index of the parent element (from index set)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:177\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n-SubEntityInfo(IndexType parent_, unsigned int num_in_parent_, const Dune::\n-GeometryType &geometryType)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:166\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bn_\bu_\bm_\b__\bi_\bn_\b__\bp_\ba_\br_\be_\bn_\bt\n-unsigned int num_in_parent\n-the number of the face in the parent element\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:180\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bg_\be_\bo_\bm_\be_\bt_\br_\by_\bT_\by_\bp_\be_\b_\n-Dune::GeometryType geometryType_\n-The GeometryType of the subentity.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:183\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n-SubEntityInfo()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:152\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: computeintersection.hh File Reference\n+dune-grid-glue: overlappingmerge.hh File Reference\n \n \n \n \n \n \n \n@@ -71,46 +71,45 @@\n \n
    \n
    \n
    \n \n-
    computeintersection.hh File Reference
    \n+Namespaces
    \n+
    overlappingmerge.hh File Reference
    \n \n
    \n-
    #include <dune/common/fvector.hh>
    \n+
    #include <iostream>
    \n+#include <iomanip>
    \n+#include <vector>
    \n+#include <algorithm>
    \n #include <dune/common/fmatrix.hh>
    \n-#include "simplexintersection.cc"
    \n-#include "computeintersection.cc"
    \n+#include <dune/common/fvector.hh>
    \n+#include <dune/geometry/referenceelements.hh>
    \n+#include <dune/geometry/multilineargeometry.hh>
    \n+#include <dune/grid/common/grid.hh>
    \n+#include <dune/grid-glue/merging/standardmerge.hh>
    \n+#include <dune/grid-glue/merging/computeintersection.hh>
    \n+#include "overlappingmerge.cc"
    \n
    \n

    Go to the source code of this file.

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

    \n Classes

    class  Dune::GridGlue::ComputationMethod< dimWorld, dim1, dim2, T >
     
    class  Dune::GridGlue::IntersectionComputation< CM >
     Intersection computation method for two elements of arbitrary dimension. More...
    class  Dune::GridGlue::OverlappingMerge< dim1, dim2, dimworld, T >
     Computing overlapping grid intersections for grids of different dimensions. More...
     
    \n \n \n \n \n \n-

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n-\n-\n-\n-\n

    \n-Functions

    template<class V >
    int Dune::GridGlue::insertPoint (const V p, std::vector< V > &P)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,32 +1,34 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-computeintersection.hh File Reference\n-#include \n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n+overlappingmerge.hh File Reference\n+#include \n+#include \n+#include \n+#include \n #include \n-#include \"_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\"\n-#include \"_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\"\n+#include \n+#include \n+#include \n+#include \n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+#include \"_\bo_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bm_\be_\br_\bg_\be_\b._\bc_\bc\"\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\bd_\bi_\bm_\b1_\b,_\b _\bd_\bi_\bm_\b2_\b,_\b _\bT_\b _\b>\n-\u00a0\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\b _\bC_\bM_\b _\b>\n-\u00a0 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn computation method for two elements of arbitrary\n- dimension. _\bM_\bo_\br_\be_\b._\b._\b.\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b<_\b _\bd_\bi_\bm_\b1_\b,_\b _\bd_\bi_\bm_\b2_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b _\b>\n+\u00a0 Computing overlapping grid intersections for grids of different\n+ dimensions. _\bM_\bo_\br_\be_\b._\b._\b.\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n-F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-template\n-int\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt (const V p, std::vector< V > &P)\n-\u00a0\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: computeintersection.hh Source File\n+dune-grid-glue: overlappingmerge.hh Source File\n \n \n \n \n \n \n \n@@ -74,190 +74,102 @@\n \n \n
    \n
    \n-
    computeintersection.hh
    \n+
    overlappingmerge.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n-
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#ifndef DUNE_GRIDGLUE_MERGING_COMPUTEINTERSECTION_HH
    \n-
    4#define DUNE_GRIDGLUE_MERGING_COMPUTEINTERSECTION_HH
    \n-
    5
    \n-
    6#include <dune/common/fvector.hh>
    \n-
    7#include <dune/common/fmatrix.hh>
    \n-
    8
    \n-
    9namespace Dune {
    \n-
    10namespace GridGlue {
    \n-
    11
    \n-
    12template<int dimWorld, int dim1, int dim2, typename T = double>
    \n-
    \n-\n-
    14public:
    \n-
    15 typedef FieldVector<T, dimWorld> Vector;
    \n-
    16 static const int grid1Dimension = dim1;
    \n-
    17 static const int grid2Dimension = dim2;
    \n-
    18 static const int intersectionDimension = (dim1 < dim2)?(dim1):(dim2);
    \n-
    19
    \n-
    20 static bool computeIntersectionPoints(const std::vector<Vector> X,
    \n-
    21 const std::vector<Vector> Y,
    \n-
    22 std::vector<std::vector<int> >& SX,
    \n-
    23 std::vector<std::vector<int> >& SY,
    \n-
    24 std::vector<Vector>& P);
    \n-
    25 static void grid1_subdivisions(const std::vector<Vector> elementCorners,
    \n-
    26 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    27 std::vector<std::vector<int> >& faceIds);
    \n-
    28 static void grid2_subdivisions(const std::vector<Vector> elementCorners,
    \n-
    29 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    30 std::vector<std::vector<int> >& faceIds);
    \n-
    31};
    \n-
    \n-
    32
    \n-
    38template<class CM>
    \n-
    \n-\n-
    40private:
    \n-
    41 typedef typename CM::Vector V;
    \n-
    42 const int dimWorld = V::dimension;
    \n-
    43 const int dim1 = CM::grid1Dimension;
    \n-
    44 const int dim2 = CM::grid2Dimension;
    \n-
    45public:
    \n-
    59 static bool computeIntersection(const std::vector<V>& X,
    \n-
    60 const std::vector<V>& Y,
    \n-
    61 std::vector<std::vector<int> >& SX,
    \n-
    62 std::vector<std::vector<int> >& SY,
    \n-
    63 std::vector<V>& P);
    \n-
    64
    \n-
    74 template<int isDim, int dW>
    \n-
    \n-
    75 static void orderPoints(const V& centroid,
    \n-
    76 const std::vector<std::vector<int> >& SX,
    \n-
    77 const std::vector<std::vector<int> >& SY,
    \n-
    78 const std::vector<V>& P,
    \n-
    79 std::vector<std::vector<int> >& H)
    \n-
    80 {
    \n-
    81 if (isDim > 1)
    \n-
    82 orderPoints_(std::integral_constant<int,isDim>(),std::integral_constant<int,dW>(),
    \n-
    83 centroid, SX, SY, P,H);
    \n-
    84 }
    \n-
    \n-
    85
    \n-
    86private:
    \n-
    87 static void orderPoints_(std::integral_constant<int,1>,
    \n-
    88 std::integral_constant<int,1>,
    \n-
    89 const V& centroid,
    \n-
    90 const std::vector<std::vector<int> >& SX,
    \n-
    91 const std::vector<std::vector<int> >& SY,
    \n-
    92 const std::vector<V>& P,
    \n-
    93 std::vector<std::vector<int> >& H) {}
    \n-
    94 static void orderPoints_(std::integral_constant<int,1>,
    \n-
    95 std::integral_constant<int,2>,
    \n-
    96 const V& centroid,
    \n-
    97 const std::vector<std::vector<int> >& SX,
    \n-
    98 const std::vector<std::vector<int> >& SY,
    \n-
    99 const std::vector<V>& P,
    \n-
    100 std::vector<std::vector<int> >& H) {}
    \n-
    101 static void orderPoints_(std::integral_constant<int,1>,
    \n-
    102 std::integral_constant<int,3>,
    \n-
    103 const V& centroid,
    \n-
    104 const std::vector<std::vector<int> >& SX,
    \n-
    105 const std::vector<std::vector<int> >& SY,
    \n-
    106 const std::vector<V>& P,
    \n-
    107 std::vector<std::vector<int> >& H) {}
    \n-
    108 static void orderPoints_(std::integral_constant<int,2>,
    \n-
    109 std::integral_constant<int,2>,
    \n-
    110 const V& centroid,
    \n-
    111 const std::vector<std::vector<int> >& SX,
    \n-
    112 const std::vector<std::vector<int> >& SY,
    \n-
    113 const std::vector<V>& P,
    \n-
    114 std::vector<std::vector<int> >& H);
    \n-
    115 static void orderPoints_(std::integral_constant<int,2>,
    \n-
    116 std::integral_constant<int,3>,
    \n-
    117 const V& centroid,
    \n-
    118 const std::vector<std::vector<int> >& SX,
    \n-
    119 const std::vector<std::vector<int> >& SY,
    \n-
    120 const std::vector<V>& P,
    \n-
    121 std::vector<std::vector<int> >& H);
    \n-
    122 static void orderPoints_(std::integral_constant<int,3>,
    \n-
    123 std::integral_constant<int,3>,
    \n-
    124 const V& centroid,
    \n-
    125 const std::vector<std::vector<int> >& SX,
    \n-
    126 const std::vector<std::vector<int> >& SY,
    \n-
    127 const std::vector<V>& P,
    \n-
    128 std::vector<std::vector<int> > & H);
    \n-
    129
    \n-
    137 static void orderPointsCC(std::integral_constant<int,2>,
    \n-
    138 const V& centroid,
    \n-
    139 std::vector<int> &id,
    \n-
    140 const std::vector<V>& P);
    \n-
    141 static void orderPointsCC(std::integral_constant<int,3>,
    \n-
    142 const V& centroid,
    \n-
    143 std::vector<int> &id,
    \n-
    144 const std::vector<V>& P);
    \n-
    145
    \n-
    150 static void removeDuplicates( std::vector<int> & p);
    \n-
    151
    \n-
    159 static bool newFace3D(const std::vector<int>& id,
    \n-
    160 const std::vector<std::vector<int> >& H);
    \n-
    161};
    \n-
    \n-
    162
    \n-
    163template<class V>
    \n-
    \n-
    164inline int insertPoint(const V p, std::vector<V>& P)
    \n-
    165{
    \n-
    166 double eps= 1e-8; // tolerance for identical nodes
    \n-
    167 std::size_t k=0 ;
    \n-
    168
    \n-
    169 if (P.size()>0) {
    \n-
    170
    \n-
    171 while ((k<P.size())&&
    \n-
    172 ((p - P[k]).infinity_norm()>eps*(P[k].infinity_norm()) &&
    \n-
    173 (p - P[k]).infinity_norm()>eps*(p.infinity_norm())) &&
    \n-
    174 !(p.infinity_norm() < eps && P[k].infinity_norm() <eps &&
    \n-
    175 (p - P[k]).infinity_norm() < eps))
    \n-
    176 k++ ;
    \n-
    177
    \n-
    178 if (k>=P.size())
    \n-
    179 P.push_back(p) ; // new node is not contained in P
    \n-
    180
    \n-
    181 }
    \n-
    182 else
    \n-
    183 P.push_back(p);
    \n-
    184
    \n-
    185 return k ;
    \n-
    186}
    \n-
    \n-
    187
    \n-
    188
    \n-
    189} /* namespace Dune::GridGlue */
    \n-
    190} /* namespace Dune */
    \n-
    191
    \n-
    192#include "simplexintersection.cc"
    \n-
    193#include "computeintersection.cc"
    \n-
    194
    \n-
    195#endif
    \n-\n-\n+Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+
    2// vi: set et ts=4 sw=2 sts=2:
    \n+
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n+
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+
    5#ifndef DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
    \n+
    6#define DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
    \n+
    7
    \n+
    8#include <iostream>
    \n+
    9#include <iomanip>
    \n+
    10#include <vector>
    \n+
    11#include <algorithm>
    \n+
    12
    \n+
    13#include <dune/common/fmatrix.hh>
    \n+
    14#include <dune/common/fvector.hh>
    \n+
    15
    \n+
    16#include <dune/geometry/referenceelements.hh>
    \n+
    17#include <dune/geometry/multilineargeometry.hh>
    \n+
    18
    \n+
    19#include <dune/grid/common/grid.hh>
    \n+
    20
    \n+\n+\n+
    23
    \n+
    24namespace Dune {
    \n+
    25namespace GridGlue {
    \n+
    26
    \n+
    34template<int dim1, int dim2, int dimworld, typename T = double>
    \n+
    \n+\n+
    36 : public StandardMerge<T,dim1,dim2,dimworld>
    \n+
    37{
    \n+
    38
    \n+
    39public:
    \n+
    40
    \n+
    41 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n+
    42
    \n+
    44 typedef T ctype;
    \n+
    45
    \n+
    47 typedef Dune::FieldVector<T, dimworld> WorldCoords;
    \n+
    48
    \n+
    50 //typedef Dune::FieldVector<T, dim> LocalCoords;
    \n+
    51
    \n+
    \n+\n+
    53 {}
    \n+
    \n+
    54
    \n+
    55protected:
    \n+\n+
    57
    \n+
    69 void computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n+
    70 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n+
    71 std::bitset<(1<<dim1)>& neighborIntersects1,
    \n+
    72 unsigned int grid1Index,
    \n+
    73 const Dune::GeometryType& grid2ElementType,
    \n+
    74 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n+
    75 std::bitset<(1<<dim2)>& neighborIntersects2,
    \n+
    76 unsigned int grid2Index,
    \n+
    77 std::vector<SimplicialIntersection>& intersections);
    \n+
    78
    \n+
    79private:
    \n+
    80 bool inPlane(std::vector<FieldVector<T,dimworld> >& points);
    \n+
    81
    \n+
    82};
    \n+
    \n+
    83
    \n+
    84} /* namespace Dune::GridGlue */
    \n+
    85} /* namespace Dune */
    \n+
    86
    \n+
    87#include "overlappingmerge.cc"
    \n+
    88
    \n+
    89
    \n+
    90#endif // DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
    \n+
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    \n+\n+\n
    Definition gridglue.hh:37
    \n-
    int insertPoint(const V p, std::vector< V > &P)
    Definition computeintersection.hh:164
    \n-
    Definition computeintersection.hh:13
    \n-
    static void grid2_subdivisions(const std::vector< Vector > elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    \n-
    static bool computeIntersectionPoints(const std::vector< Vector > X, const std::vector< Vector > Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< Vector > &P)
    \n-
    FieldVector< T, dimWorld > Vector
    Definition computeintersection.hh:15
    \n-
    static const int grid1Dimension
    Definition computeintersection.hh:16
    \n-
    static void grid1_subdivisions(const std::vector< Vector > elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    \n-
    static const int grid2Dimension
    Definition computeintersection.hh:17
    \n-
    static const int intersectionDimension
    Definition computeintersection.hh:18
    \n-
    Intersection computation method for two elements of arbitrary dimension.
    Definition computeintersection.hh:39
    \n-
    static void orderPoints(const V &centroid, const std::vector< std::vector< int > > &SX, const std::vector< std::vector< int > > &SY, const std::vector< V > &P, std::vector< std::vector< int > > &H)
    Order Points in the point list P face-wise such that a subsimplex subdivision can be constructed.
    Definition computeintersection.hh:75
    \n-
    static bool computeIntersection(const std::vector< V > &X, const std::vector< V > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< V > &P)
    Compute the intersection of two elements X and Y Compute the intersection of two elements X and Y,...
    Definition computeintersection.cc:14
    \n+
    Computing overlapping grid intersections for grids of different dimensions.
    Definition overlappingmerge.hh:37
    \n+
    StandardMerge< T, dim1, dim2, dimworld >::SimplicialIntersection SimplicialIntersection
    Definition overlappingmerge.hh:56
    \n+
    OverlappingMerge()
    the coordinate type used in this interface
    Definition overlappingmerge.hh:52
    \n+
    void computeIntersections(const Dune::GeometryType &grid1ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)> &neighborIntersects2, unsigned int grid2Index, std::vector< SimplicialIntersection > &intersections)
    Compute the intersection between two overlapping elements.
    Definition overlappingmerge.cc:34
    \n+
    Dune::FieldVector< T, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition overlappingmerge.hh:47
    \n+
    T ctype
    the numeric type used in this interface
    Definition overlappingmerge.hh:44
    \n+
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    Definition standardmerge.hh:58
    \n+
    typename IntersectionListProvider::SimplicialIntersection SimplicialIntersection
    Definition standardmerge.hh:83
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,214 +1,127 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-computeintersection.hh\n+overlappingmerge.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n+1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n+2// vi: set et ts=4 sw=2 sts=2:\n+3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n-2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n+4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-3#ifndef DUNE_GRIDGLUE_MERGING_COMPUTEINTERSECTION_HH\n-4#define DUNE_GRIDGLUE_MERGING_COMPUTEINTERSECTION_HH\n-5\n-6#include \n-7#include \n-8\n-9namespace _\bD_\bu_\bn_\be {\n-10namespace GridGlue {\n-11\n-12template\n-_\b1_\b3class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd {\n-14public:\n-_\b1_\b5 typedef FieldVector _\bV_\be_\bc_\bt_\bo_\br;\n-_\b1_\b6 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = dim1;\n-_\b1_\b7 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = dim2;\n-_\b1_\b8 static const int _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = (dim1 < dim2)?(dim1):(dim2);\n-19\n-_\b2_\b0 static bool _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bP_\bo_\bi_\bn_\bt_\bs(const std::vector X,\n-21 const std::vector Y,\n-22 std::vector >& SX,\n-23 std::vector >& SY,\n-24 std::vector& P);\n-_\b2_\b5 static void _\bg_\br_\bi_\bd_\b1_\b__\bs_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn_\bs(const std::vector elementCorners,\n-26 std::vector >& subElements,\n-27 std::vector >& faceIds);\n-_\b2_\b8 static void _\bg_\br_\bi_\bd_\b2_\b__\bs_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn_\bs(const std::vector elementCorners,\n-29 std::vector >& subElements,\n-30 std::vector >& faceIds);\n-31};\n-32\n-38template\n-_\b3_\b9class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn {\n-40private:\n-41 typedef typename CM::Vector V;\n-42 const int dimWorld = V::dimension;\n-43 const int dim1 = CM::grid1Dimension;\n-44 const int dim2 = CM::grid2Dimension;\n-45public:\n-59 static bool _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(const std::vector& X,\n-60 const std::vector& Y,\n-61 std::vector >& SX,\n-62 std::vector >& SY,\n-63 std::vector& P);\n-64\n-74 template\n-_\b7_\b5 static void _\bo_\br_\bd_\be_\br_\bP_\bo_\bi_\bn_\bt_\bs(const V& centroid,\n-76 const std::vector >& SX,\n-77 const std::vector >& SY,\n-78 const std::vector& P,\n-79 std::vector >& H)\n-80 {\n-81 if (isDim > 1)\n-82 orderPoints_(std::integral_constant(),std::\n-integral_constant(),\n-83 centroid, SX, SY, P,H);\n-84 }\n-85\n-86private:\n-87 static void orderPoints_(std::integral_constant,\n-88 std::integral_constant,\n-89 const V& centroid,\n-90 const std::vector >& SX,\n-91 const std::vector >& SY,\n-92 const std::vector& P,\n-93 std::vector >& H) {}\n-94 static void orderPoints_(std::integral_constant,\n-95 std::integral_constant,\n-96 const V& centroid,\n-97 const std::vector >& SX,\n-98 const std::vector >& SY,\n-99 const std::vector& P,\n-100 std::vector >& H) {}\n-101 static void orderPoints_(std::integral_constant,\n-102 std::integral_constant,\n-103 const V& centroid,\n-104 const std::vector >& SX,\n-105 const std::vector >& SY,\n-106 const std::vector& P,\n-107 std::vector >& H) {}\n-108 static void orderPoints_(std::integral_constant,\n-109 std::integral_constant,\n-110 const V& centroid,\n-111 const std::vector >& SX,\n-112 const std::vector >& SY,\n-113 const std::vector& P,\n-114 std::vector >& H);\n-115 static void orderPoints_(std::integral_constant,\n-116 std::integral_constant,\n-117 const V& centroid,\n-118 const std::vector >& SX,\n-119 const std::vector >& SY,\n-120 const std::vector& P,\n-121 std::vector >& H);\n-122 static void orderPoints_(std::integral_constant,\n-123 std::integral_constant,\n-124 const V& centroid,\n-125 const std::vector >& SX,\n-126 const std::vector >& SY,\n-127 const std::vector& P,\n-128 std::vector > & H);\n-129\n-137 static void orderPointsCC(std::integral_constant,\n-138 const V& centroid,\n-139 std::vector &id,\n-140 const std::vector& P);\n-141 static void orderPointsCC(std::integral_constant,\n-142 const V& centroid,\n-143 std::vector &id,\n-144 const std::vector& P);\n-145\n-150 static void removeDuplicates( std::vector & p);\n-151\n-159 static bool newFace3D(const std::vector& id,\n-160 const std::vector >& H);\n-161};\n-162\n-163template\n-_\b1_\b6_\b4inline int _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(const V p, std::vector& P)\n-165{\n-166 double eps= 1e-8; // tolerance for identical nodes\n-167 std::size_t k=0 ;\n-168\n-169 if (P.size()>0) {\n-170\n-171 while ((keps*(P[k].infinity_norm()) &&\n-173 (p - P[k]).infinity_norm()>eps*(p.infinity_norm())) &&\n-174 !(p.infinity_norm() < eps && P[k].infinity_norm() =P.size())\n-179 P.push_back(p) ; // new node is not contained in P\n-180\n-181 }\n-182 else\n-183 P.push_back(p);\n-184\n-185 return k ;\n-186}\n-187\n-188\n-189} /* namespace Dune::GridGlue */\n-190} /* namespace Dune */\n-191\n-192#include \"_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\"\n-193#include \"_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\"\n-194\n-195#endif\n-_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\n-_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\n+5#ifndef DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH\n+6#define DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_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\n+21#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n+22#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+23\n+24namespace _\bD_\bu_\bn_\be {\n+25namespace GridGlue {\n+26\n+34template\n+_\b3_\b5class _\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be\n+36 : public _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n+37{\n+38\n+39public:\n+40\n+41 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n+42\n+_\b4_\b4 typedef T _\bc_\bt_\by_\bp_\be;\n+45\n+_\b4_\b7 typedef Dune::FieldVector _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\n+48\n+50 //typedef Dune::FieldVector LocalCoords;\n+51\n+_\b5_\b2 _\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be()\n+53 {}\n+54\n+55protected:\n+_\b5_\b6 typedef typename _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bd_\bi_\bm_\b1_\b,_\bd_\bi_\bm_\b2_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n+57\n+69 void _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(const Dune::GeometryType& grid1ElementType,\n+70 const std::vector >& grid1ElementCorners,\n+71 std::bitset<(1<& neighborIntersects1,\n+72 unsigned int grid1Index,\n+73 const Dune::GeometryType& grid2ElementType,\n+74 const std::vector >& grid2ElementCorners,\n+75 std::bitset<(1<& neighborIntersects2,\n+76 unsigned int grid2Index,\n+77 std::vector& intersections);\n+78\n+79private:\n+80 bool inPlane(std::vector >& points);\n+81\n+82};\n+83\n+84} /* namespace Dune::GridGlue */\n+85} /* namespace Dune */\n+86\n+87#include \"_\bo_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bm_\be_\br_\bg_\be_\b._\bc_\bc\"\n+88\n+89\n+90#endif // DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH\n+_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh\n+Common base class for many merger implementations: produce pairs of entities\n+that may intersect.\n+_\bo_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bm_\be_\br_\bg_\be_\b._\bc_\bc\n+_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt\n-int insertPoint(const V p, std::vector< V > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:164\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:13\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bg_\br_\bi_\bd_\b2_\b__\bs_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn_\bs\n-static void grid2_subdivisions(const std::vector< Vector > elementCorners,\n-std::vector< std::vector< unsigned int > > &subElements, std::vector< std::\n-vector< int > > &faceIds)\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bP_\bo_\bi_\bn_\bt_\bs\n-static bool computeIntersectionPoints(const std::vector< Vector > X, const\n-std::vector< Vector > Y, std::vector< std::vector< int > > &SX, std::vector<\n-std::vector< int > > &SY, std::vector< Vector > &P)\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bV_\be_\bc_\bt_\bo_\br\n-FieldVector< T, dimWorld > Vector\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:15\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn\n-static const int grid1Dimension\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:16\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bg_\br_\bi_\bd_\b1_\b__\bs_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn_\bs\n-static void grid1_subdivisions(const std::vector< Vector > elementCorners,\n-std::vector< std::vector< unsigned int > > &subElements, std::vector< std::\n-vector< int > > &faceIds)\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn\n-static const int grid2Dimension\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:17\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn\n-static const int intersectionDimension\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:18\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn\n-Intersection computation method for two elements of arbitrary dimension.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:39\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bo_\br_\bd_\be_\br_\bP_\bo_\bi_\bn_\bt_\bs\n-static void orderPoints(const V ¢roid, const std::vector< std::vector< int\n-> > &SX, const std::vector< std::vector< int > > &SY, const std::vector< V >\n-&P, std::vector< std::vector< int > > &H)\n-Order Points in the point list P face-wise such that a subsimplex subdivision\n-can be constructed.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:75\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-static bool computeIntersection(const std::vector< V > &X, const std::vector< V\n-> &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > >\n-&SY, std::vector< V > &P)\n-Compute the intersection of two elements X and Y Compute the intersection of\n-two elements X and Y,...\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.cc:14\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be\n+Computing overlapping grid intersections for grids of different dimensions.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.hh:37\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+StandardMerge< T, dim1, dim2, dimworld >::SimplicialIntersection\n+SimplicialIntersection\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.hh:56\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be\n+OverlappingMerge()\n+the coordinate type used in this interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.hh:52\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+void computeIntersections(const Dune::GeometryType &grid1ElementType, const\n+std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::\n+bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::\n+GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T,\n+dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)>\n+&neighborIntersects2, unsigned int grid2Index, std::vector<\n+SimplicialIntersection > &intersections)\n+Compute the intersection between two overlapping elements.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.cc:34\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< T, dimworld > WorldCoords\n+the coordinate type used in this interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.hh:47\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bt_\by_\bp_\be\n+T ctype\n+the numeric type used in this interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.hh:44\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n+Common base class for many merger implementations: produce pairs of entities\n+that may intersect.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:58\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+typename IntersectionListProvider::SimplicialIntersection\n+SimplicialIntersection\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:83\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00068.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00068.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: contactmerge.cc File Reference\n+dune-grid-glue: intersectionlist.hh File Reference\n \n \n \n \n \n \n \n@@ -70,23 +70,38 @@\n \n
    \n
    \n \n-
    contactmerge.cc File Reference
    \n+
    intersectionlist.hh File Reference
    \n
    \n
    \n-
    #include <dune/grid-glue/common/crossproduct.hh>
    \n-#include <dune/grid-glue/common/projection.hh>
    \n+
    #include <array>
    \n+#include <type_traits>
    \n+#include <utility>
    \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+Classes

    class  Dune::GridGlue::IntersectionListProvider< L0, L1 >
     
    class  Dune::GridGlue::IntersectionList< Local0, Local1 >
     
    class  Dune::GridGlue::SimplicialIntersectionListProvider< dim0, dim1 >
     
    struct  Dune::GridGlue::SimplicialIntersectionListProvider< dim0, dim1 >::SimplicialIntersection
     
    \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +1,32 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-contactmerge.cc File Reference\n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bc_\br_\bo_\bs_\bs_\bp_\br_\bo_\bd_\bu_\bc_\bt_\b._\bh_\bh>\n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n+intersectionlist.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n+C\bCl\bla\bas\bss\bse\bes\bs\n+ class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\b _\bL_\b0_\b,_\b _\bL_\b1_\b _\b>\n+\u00a0\n+ class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b<_\b _\bL_\bo_\bc_\ba_\bl_\b0_\b,_\b _\bL_\bo_\bc_\ba_\bl_\b1_\b _\b>\n+\u00a0\n+ class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\b _\bd_\bi_\bm_\b0_\b,_\b _\bd_\bi_\bm_\b1_\b _\b>\n+\u00a0\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\b _\bd_\bi_\bm_\b0_\b,_\b _\bd_\bi_\bm_\b1_\b _\b>_\b:_\b:\n+ _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+\u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00068_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00068_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: contactmerge.cc Source File\n+dune-grid-glue: intersectionlist.hh Source File\n \n \n \n \n \n \n \n@@ -74,389 +74,299 @@\n \n \n
    \n
    \n-
    contactmerge.cc
    \n+
    intersectionlist.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n-
    2// vi: set et ts=4 sw=2 sts=2:
    \n-
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n-
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n+
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+
    3#ifndef DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH
    \n+
    4#define DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH 1
    \n
    5
    \n-\n-\n-
    8
    \n-
    9namespace Dune {
    \n-
    10namespace GridGlue {
    \n-
    11
    \n-
    12template<int dimworld, typename T>
    \n-
    13void ContactMerge<dimworld, T>::computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n-
    14 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n-
    15 std::bitset<(1<<dim)>& neighborIntersects1,
    \n-
    16 unsigned int grid1Index,
    \n-
    17 const Dune::GeometryType& grid2ElementType,
    \n-
    18 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n-
    19 std::bitset<(1<<dim)>& neighborIntersects2,
    \n-
    20 unsigned int grid2Index,
    \n-
    21 std::vector<SimplicialIntersection>& intersections)
    \n+
    6#include <array>
    \n+
    7#include <type_traits>
    \n+
    8#include <utility>
    \n+
    9#include <vector>
    \n+
    10
    \n+
    11#include <dune/common/fvector.hh>
    \n+
    12
    \n+
    13namespace Dune {
    \n+
    14namespace GridGlue {
    \n+
    15
    \n+
    20template<typename L0, typename L1>
    \n+
    \n+\n
    22{
    \n-
    23 using std::get;
    \n+
    23public:
    \n
    24
    \n-
    25 std::vector<std::array<LocalCoords,2> > polytopeCorners;
    \n-
    26
    \n-
    27 // Initialize
    \n-
    28 neighborIntersects1.reset();
    \n-
    29 neighborIntersects2.reset();
    \n-
    30
    \n-
    31 const int nCorners1 = grid1ElementCorners.size();
    \n-
    32 const int nCorners2 = grid2ElementCorners.size();
    \n-
    33
    \n-
    34 if (nCorners1 != dimworld)
    \n-
    35 DUNE_THROW(Dune::Exception, "element1 must have " << dimworld << " corners, but has " << nCorners1);
    \n-
    36 if (nCorners2 != dimworld)
    \n-
    37 DUNE_THROW(Dune::Exception, "element2 must have " << dimworld << " corners, but has " << nCorners2);
    \n-
    38
    \n-
    39 // The grid1 projection directions
    \n-
    40 std::vector<WorldCoords> directions1(nCorners1);
    \n-
    41 for (size_t i=0; i<directions1.size(); i++)
    \n-
    42 directions1[i] = nodalDomainDirections_[this->grid1ElementCorners_[grid1Index][i]];
    \n-
    43
    \n-
    44 // The grid2 projection directions
    \n-
    45 std::vector<WorldCoords> directions2(nCorners2);
    \n-
    46 for (size_t i=0; i<directions2.size(); i++)
    \n-
    47 directions2[i] = nodalTargetDirections_[this->grid2ElementCorners_[grid2Index][i]];
    \n-
    48
    \n-
    49 // The difference between the closest point projection and the normal projection is just the ordering
    \n-
    50 // of the involved surfaces. The closest point projection is done along the outer normal field of grid2
    \n-
    51 // (due to being a best approximation) and the outer normal projection is using the outer normal field
    \n-
    52 // of grid1 instead.
    \n-
    53 std::array<decltype(std::cref(grid1ElementCorners)),2> cornersRef ={std::cref(grid1ElementCorners), std::cref(grid2ElementCorners)};
    \n-
    54 std::array<decltype(std::cref(directions1)),2> directionsRef ={std::cref(directions1), std::cref(directions2)};
    \n-
    55 std::array<Dune::GeometryType,2> elementTypes = {grid1ElementType, grid2ElementType};
    \n-
    56
    \n-
    57 // Determine which is the grid we use for outer normal projection
    \n-
    58 const size_t domGrid = (type_==ProjectionType::OUTER_NORMAL) ? 0 : 1;
    \n-
    59 const size_t tarGrid = (type_==ProjectionType::OUTER_NORMAL) ? 1 : 0;
    \n-
    60
    \n-
    62 // Compute all corners of the intersection polytope
    \n-
    64
    \n-
    65 const auto corners = std::tie(cornersRef[domGrid].get(),cornersRef[tarGrid].get());
    \n-
    66 const auto normals = std::tie(directionsRef[domGrid].get(), directionsRef[tarGrid].get());
    \n-
    67 Projection<WorldCoords> p(overlap_, maxNormalProduct_);
    \n-
    68 p.project(corners, normals);
    \n-
    69
    \n-
    70 /* projection */
    \n-
    71 {
    \n-
    72 const auto& success = get<0>(p.success());
    \n-
    73 const auto& images = get<0>(p.images());
    \n-
    74 for (unsigned i = 0; i < dimworld; ++i) {
    \n-
    75 if (success[i]) {
    \n-
    76 std::array<LocalCoords, 2> corner;
    \n-
    77 corner[domGrid] = localCornerCoords(i, elementTypes[domGrid]);
    \n-
    78 for (unsigned j = 0; j < dim; ++j)
    \n-
    79 corner[tarGrid][j] = images[i][j];
    \n-
    80 polytopeCorners.push_back(corner);
    \n-
    81 }
    \n-
    82 }
    \n-
    83 }
    \n-
    84
    \n-
    85 /* inverse projection */
    \n-
    86 {
    \n-
    87 const auto& success = get<1>(p.success());
    \n-
    88 const auto& preimages = get<1>(p.images());
    \n-
    89 for (unsigned i = 0; i < dimworld; ++i) {
    \n-
    90 if (success[i]) {
    \n-
    91 std::array<LocalCoords, 2> corner;
    \n-
    92 for (unsigned j = 0; j < dim; ++j)
    \n-
    93 corner[domGrid][j] = preimages[i][j];
    \n-
    94 corner[tarGrid] = localCornerCoords(i, elementTypes[tarGrid]);
    \n-
    95 polytopeCorners.push_back(corner);
    \n-
    96 }
    \n-
    97 }
    \n-
    98 }
    \n+
    28 using Local0 = L0;
    \n+
    29
    \n+
    33 using Local1 = L1;
    \n+
    34
    \n+
    38 using Index = unsigned int;
    \n+
    39
    \n+
    43 virtual std::size_t size() const = 0;
    \n+
    44
    \n+
    50 virtual std::size_t parents0(Index intersection) const = 0;
    \n+
    51
    \n+
    57 virtual std::size_t parents1(Index intersection) const = 0;
    \n+
    58
    \n+
    65 virtual Index parent0(Index intersection, unsigned index) const = 0;
    \n+
    66
    \n+
    73 virtual Index parent1(Index intersection, unsigned index) const = 0;
    \n+
    74
    \n+
    82 virtual Local0 corner0(Index intersection, unsigned corner, unsigned index) const = 0;
    \n+
    83
    \n+
    91 virtual Local1 corner1(Index intersection, unsigned corner, unsigned index) const = 0;
    \n+
    92};
    \n+
    \n+
    93
    \n+
    94namespace Impl {
    \n+
    95
    \n+
    96template<typename P, int I>
    \n+
    97struct IntersectionListLocal
    \n+
    98{};
    \n
    99
    \n-
    100 /* edge intersections */
    \n-
    101 {
    \n-
    102 for (unsigned i = 0; i < p.numberOfEdgeIntersections(); ++i) {
    \n-
    103 std::array<LocalCoords, 2> corner;
    \n-
    104 const auto& local = p.edgeIntersections()[i].local;
    \n-
    105 for (unsigned j = 0; j < dim; ++j) {
    \n-
    106 corner[domGrid][j] = local[0][j];
    \n-
    107 corner[tarGrid][j] = local[1][j];
    \n-
    108 }
    \n-
    109 polytopeCorners.push_back(corner);
    \n-
    110 }
    \n-
    111 }
    \n+
    100template<typename P>
    \n+
    101struct IntersectionListLocal<P, 0>
    \n+
    102{
    \n+
    103 static std::size_t parents(const P& p, typename P::Index intersection)
    \n+
    104 { return p.parents0(intersection); }
    \n+
    105
    \n+
    106 static typename P::Index parent(const P& p, typename P::Index intersection, unsigned index)
    \n+
    107 { return p.parent0(intersection, index); }
    \n+
    108
    \n+
    109 static typename P::Local0 corner(const P& p, typename P::Index intersection, unsigned corner, unsigned index)
    \n+
    110 { return p.corner0(intersection, corner, index); }
    \n+
    111};
    \n
    112
    \n-
    113 // check which neighbors might also intersect
    \n-
    114 std::array<decltype(std::ref(neighborIntersects1)),2> neighborIntersectsRef = {std::ref(neighborIntersects1), std::ref(neighborIntersects2)};
    \n-
    115 const auto& refTar = Dune::ReferenceElements<T,dim>::general(elementTypes[tarGrid]);
    \n-
    116 for (int i=0; i<refTar.size(1); i++) {
    \n-
    117
    \n-
    118 // if all face corners hit the other element then
    \n-
    119 // the neighbor might also intersect
    \n-
    120
    \n-
    121 bool intersects(true);
    \n-
    122 for (int k=0; k<refTar.size(i,1,dim); k++)
    \n-
    123 intersects &= get<1>(p.success())[refTar.subEntity(i,1,k,dim)];
    \n-
    124
    \n-
    125 if (intersects)
    \n-
    126 neighborIntersectsRef[tarGrid].get()[i] = true;
    \n-
    127 }
    \n-
    128
    \n-
    129 const auto& refDom = Dune::ReferenceElements<T,dim>::general(elementTypes[domGrid]);
    \n-
    130 for (int i=0; i<refDom.size(1); i++) {
    \n-
    131
    \n-
    132 // if all face corners hit the other element then
    \n-
    133 // the neighbor might also intersect
    \n-
    134
    \n-
    135 bool intersects(true);
    \n-
    136 for (int k=0; k<refDom.size(i,1,dim); k++)
    \n-
    137 intersects &= get<0>(p.success())[refDom.subEntity(i,1,k,dim)];
    \n+
    113template<typename P>
    \n+
    114struct IntersectionListLocal<P, 1>
    \n+
    115{
    \n+
    116 static std::size_t parents(const P& p, typename P::Index intersection)
    \n+
    117 { return p.parents1(intersection); }
    \n+
    118
    \n+
    119 static typename P::Index parent(const P& p, typename P::Index intersection, unsigned index)
    \n+
    120 { return p.parent1(intersection, index); }
    \n+
    121
    \n+
    122 static typename P::Local1 corner(const P& p, typename P::Index intersection, unsigned corner, unsigned index)
    \n+
    123 { return p.corner1(intersection, corner, index); }
    \n+
    124};
    \n+
    125
    \n+
    126} /* namespace Impl */
    \n+
    127
    \n+
    132template<typename Local0, typename Local1>
    \n+
    \n+\n+
    134{
    \n+
    135public:
    \n+\n+
    137 using Index = typename Provider::Index;
    \n
    138
    \n-
    139 if (intersects)
    \n-
    140 neighborIntersectsRef[domGrid].get()[i] = true;
    \n-
    141 }
    \n+
    \n+
    139 IntersectionList(const std::shared_ptr<Provider>& provider)
    \n+
    140 : impl_(provider)
    \n+
    141 {}
    \n+
    \n
    142
    \n-
    143 // Compute the edge intersections
    \n-
    144 for (unsigned i = 0; i < p.numberOfEdgeIntersections(); ++i) {
    \n-
    145 const auto& edge = p.edgeIntersections()[i].edge;
    \n-
    146 neighborIntersects1[edge[domGrid]] = true;
    \n-
    147 neighborIntersects2[edge[tarGrid]] = true;
    \n-
    148 }
    \n-
    149
    \n-
    150 // remove possible doubles
    \n-
    151 removeDoubles(polytopeCorners);
    \n-
    152
    \n-
    153 // Compute an interior point of the polytope
    \n-
    154 int nPolyCorners = polytopeCorners.size();
    \n-
    155
    \n-
    156 // If the polytope is degenerated then there is no intersection
    \n-
    157 if (nPolyCorners<dimworld)
    \n-
    158 return;
    \n-
    159
    \n-
    160 // If the polytope is a simplex return it
    \n-
    161 if (nPolyCorners==dim+1) {
    \n+
    \n+
    146 std::size_t size() const
    \n+
    147 { return impl_->size(); }
    \n+
    \n+
    148
    \n+
    155 template<int I>
    \n+
    \n+
    156 std::size_t parents(Index intersection) const
    \n+
    157 {
    \n+
    158 static_assert(I == 0 or I == 1, "I must be 0 or 1");
    \n+
    159 // TODO [C++17]: use `if constexpr` instead of indirection
    \n+
    160 return Impl::IntersectionListLocal<Provider, I>::parents(*impl_, intersection);
    \n+
    161 }
    \n+
    \n
    162
    \n-
    163 // std::cout<<"Add intersection: 1\\n";
    \n-
    164 typename Base::SimplicialIntersection intersect(grid1Index, grid2Index);
    \n-
    165
    \n-
    166 for (int j=0;j<dim+1; j++) {
    \n-
    167 intersect.corners0[0][j]=polytopeCorners[j][0];
    \n-
    168 intersect.corners1[0][j]=polytopeCorners[j][1];
    \n-
    169 }
    \n-
    170 intersections.push_back(intersect);
    \n-
    171
    \n-
    172 return;
    \n-
    173 }
    \n-
    174
    \n-
    175 // At this point we must have dimworld>=3
    \n-
    176
    \n-
    178 // Compute a point in the middle of the polytope and order all corners cyclic
    \n-
    180
    \n-
    181 std::array<LocalCoords,2> center;
    \n-
    182 center[0] = 0; center[1] = 0;
    \n-
    183 for (int i=0; i<nPolyCorners; i++) {
    \n-
    184 center[0].axpy(1.0/nPolyCorners,polytopeCorners[i][0]);
    \n-
    185 center[1].axpy(1.0/nPolyCorners,polytopeCorners[i][1]);
    \n-
    186 }
    \n-
    187
    \n-
    188 // Order cyclic
    \n-
    189 std::vector<int> ordering;
    \n-
    190 computeCyclicOrder(polytopeCorners,center[0],ordering);
    \n-
    191
    \n-
    193 // Add intersections
    \n-
    195
    \n-
    196 for (size_t i=1; i<polytopeCorners.size()-1; i++) {
    \n+
    170 template<int I>
    \n+
    \n+
    171 Index parent(Index intersection, unsigned index = 0) const
    \n+
    172 {
    \n+
    173 static_assert(I == 0 or I == 1, "I must be 0 or 1");
    \n+
    174 // TODO [C++17]: use `if constexpr` instead of indirection
    \n+
    175 return Impl::IntersectionListLocal<Provider, I>::parent(*impl_, intersection, index);
    \n+
    176 }
    \n+
    \n+
    177
    \n+
    186 template<int I>
    \n+
    \n+
    187 auto corner(Index intersection, unsigned corner, unsigned index = 0) const
    \n+
    188 {
    \n+
    189 static_assert(I == 0 or I == 1, "I must be 0 or 1");
    \n+
    190 // TODO [C++17]: use `if constexpr` instead of indirection
    \n+
    191 return Impl::IntersectionListLocal<Provider, I>::corner(*impl_, intersection, corner, index);
    \n+
    192 }
    \n+
    \n+
    193
    \n+
    194private:
    \n+
    195 std::shared_ptr<Provider> impl_;
    \n+
    196};
    \n+
    \n
    197
    \n-
    198 typename Base::SimplicialIntersection intersect(grid1Index, grid2Index);
    \n-
    199
    \n-
    200 for (int j=0;j<dim; j++) {
    \n-
    201 intersect.corners0[0][j]=polytopeCorners[ordering[i+j]][0];
    \n-
    202 intersect.corners1[0][j]=polytopeCorners[ordering[i+j]][1];
    \n-
    203 }
    \n-
    204
    \n-
    205 // last corner is the first for all intersections
    \n-
    206 intersect.corners0[0][dim]=polytopeCorners[ordering[0]][0];
    \n-
    207 intersect.corners1[0][dim]=polytopeCorners[ordering[0]][1];
    \n-
    208
    \n-
    209 intersections.push_back(intersect);
    \n-
    210 }
    \n-
    211}
    \n-
    212
    \n-
    213template<int dimworld, typename T>
    \n-
    \n-
    214void ContactMerge<dimworld, T>::computeCyclicOrder(const std::vector<std::array<LocalCoords,2> >& polytopeCorners,
    \n-
    215 const LocalCoords& center, std::vector<int>& ordering) const
    \n-
    216{
    \n-
    217 ordering.resize(polytopeCorners.size());
    \n-
    218
    \n-
    219 for (size_t k=0; k<ordering.size(); k++)
    \n-
    220 ordering[k] = k;
    \n-
    221
    \n-
    222 //TODO Do I have to order triangles to get some correct orientation?
    \n-
    223 if (polytopeCorners.size()<=3)
    \n-
    224 return;
    \n-
    225
    \n-
    226 // compute angles inside the polygon plane w.r.t to this axis
    \n-
    227 LocalCoords edge0 = polytopeCorners[1][0] - polytopeCorners[0][0];
    \n-
    228
    \n-
    229 // Compute a vector that is perpendicular to the edge but lies in the polytope plane
    \n-
    230 // So we have a unique ordering
    \n-
    231 LocalCoords edge1 = polytopeCorners[2][0] - polytopeCorners[0][0];
    \n-
    232 LocalCoords normal0 = edge1;
    \n-
    233 normal0.axpy(-(edge0*edge1),edge0);
    \n-
    234
    \n-
    235 std::vector<T> angles(polytopeCorners.size());
    \n-
    236
    \n-
    237 for (size_t i=0; i<polytopeCorners.size(); i++) {
    \n-
    238
    \n-
    239 LocalCoords edge = polytopeCorners[i][0] - center;
    \n-
    240
    \n-
    241 T x(edge*edge0);
    \n-
    242 T y(edge*normal0);
    \n-
    243
    \n-
    244 angles[i] = std::atan2(y, x);
    \n-
    245 if (angles[i]<0)
    \n-
    246 angles[i] += 2*M_PI;
    \n-
    247 }
    \n-
    248
    \n-
    249 // bubblesort
    \n-
    250
    \n-
    251 for (int i=polytopeCorners.size(); i>1; i--){
    \n-
    252 bool swapped = false;
    \n-
    253
    \n-
    254 for (int j=0; j<i-1; j++){
    \n-
    255
    \n-
    256 if (angles[j] > angles[j+1]){
    \n-
    257 swapped = true;
    \n-
    258 std::swap(angles[j], angles[j+1]);
    \n-
    259 std::swap(ordering[j], ordering[j+1]);
    \n-
    260 }
    \n-
    261 }
    \n-
    262
    \n-
    263 if (!swapped)
    \n-
    264 break;
    \n-
    265 }
    \n-
    266}
    \n+
    204template<int dim0, int dim1>
    \n+
    \n+\n+
    206 : public IntersectionListProvider< FieldVector<double, dim0>, FieldVector<double, dim1> >
    \n+
    207{
    \n+
    208 using Base = IntersectionListProvider< FieldVector<double, dim0>, FieldVector<double, dim1> >;
    \n+
    209
    \n+
    210public:
    \n+
    211 using Index = typename Base::Index;
    \n+
    212 using Local0 = FieldVector<double, dim0>;
    \n+
    213 using Local1 = FieldVector<double, dim1>;
    \n+
    214
    \n+
    215 template<int I>
    \n+
    216 using Local = std::conditional_t< I == 0, Local0, Local1 >;
    \n+
    217
    \n+
    \n+\n+
    222 {
    \n+
    223 private:
    \n+
    224 static constexpr int intersectionDim = dim0 < dim1 ? dim0 : dim1;
    \n+
    225 static constexpr int nVertices = intersectionDim + 1;
    \n+
    226
    \n+
    227 public:
    \n+\n+\n+
    233
    \n+
    237 template<int I>
    \n+
    238 using Corners = std::array<Local<I>, nVertices>;
    \n+
    239
    \n+
    243 std::vector< Corners<0> > corners0 = std::vector< Corners<0> >(1);
    \n+
    244
    \n+
    248 std::vector< Index > parents0 = std::vector< Index >(1);
    \n+
    249
    \n+
    253 std::vector< Corners<1> > corners1 = std::vector< Corners<1> >(1);
    \n+
    254
    \n+
    258 std::vector< Index > parents1 = std::vector< Index >(1);
    \n+
    259 };
    \n+
    \n+
    260
    \n+\n+
    \n+
    262 SimplicialIntersectionListProvider(std::vector<SimplicialIntersection>&& intersections)
    \n+
    263 : intersections_(std::move(intersections))
    \n+
    264 {}
    \n+
    \n+
    265
    \n+
    \n+\n+
    267 { return intersections_; }
    \n
    \n-
    267
    \n-
    268template<int dimworld, typename T>
    \n+
    268
    \n
    \n-
    269void ContactMerge<dimworld, T>::setupNodalDirections(const std::vector<WorldCoords>& coords1,
    \n-
    270 const std::vector<unsigned int>& elements1,
    \n-
    271 const std::vector<Dune::GeometryType>& elementTypes1,
    \n-
    272 const std::vector<WorldCoords>& coords2,
    \n-
    273 const std::vector<unsigned int>& elements2,
    \n-
    274 const std::vector<Dune::GeometryType>& elementTypes2)
    \n-
    275{
    \n-
    276 if (domainDirections_) {
    \n+
    269 std::size_t size() const override
    \n+
    270 { return intersections_.size(); }
    \n+
    \n+
    271
    \n+
    \n+
    272 std::size_t parents0(Index intersection) const override
    \n+
    273 { return intersections_[intersection].parents0.size(); }
    \n+
    \n+
    274
    \n+
    \n+
    275 std::size_t parents1(Index intersection) const override
    \n+
    276 { return intersections_[intersection].parents1.size(); }
    \n+
    \n
    277
    \n-
    278 // Sample the provided analytical contact direction field
    \n-
    279 nodalDomainDirections_.resize(coords1.size());
    \n-
    280 for (size_t i=0; i<coords1.size(); i++)
    \n-
    281 nodalDomainDirections_[i] = domainDirections_(coords1[i]);
    \n-
    282 } else
    \n-
    283 computeOuterNormalField(coords1,elements1,elementTypes1, nodalDomainDirections_);
    \n-
    284
    \n-
    285 if (targetDirections_) {
    \n+
    \n+
    278 Index parent0(Index intersection, unsigned index) const override
    \n+
    279 { return intersections_[intersection].parents0[index]; }
    \n+
    \n+
    280
    \n+
    \n+
    281 Index parent1(Index intersection, unsigned index) const override
    \n+
    282 { return intersections_[intersection].parents1[index]; }
    \n+
    \n+
    283
    \n+
    \n+
    284 Local0 corner0(Index intersection, unsigned corner, unsigned index) const override
    \n+
    285 { return intersections_[intersection].corners0[index][corner]; }
    \n+
    \n
    286
    \n-
    287 // Sample the provided analytical target direction field
    \n-
    288 nodalTargetDirections_.resize(coords2.size());
    \n-
    289 for (size_t i=0; i<coords2.size(); i++)
    \n-
    290 nodalTargetDirections_[i] = targetDirections_(coords2[i]);
    \n-
    291 } else
    \n-
    292 computeOuterNormalField(coords2,elements2,elementTypes2, nodalTargetDirections_);
    \n-
    293}
    \n+
    \n+
    287 Local1 corner1(Index intersection, unsigned corner, unsigned index) const override
    \n+
    288 { return intersections_[intersection].corners1[index][corner]; }
    \n+
    \n+
    289
    \n+
    \n+
    290 void clear()
    \n+
    291 {
    \n+
    292 intersections_.clear();
    \n+
    293 }
    \n
    \n
    294
    \n-
    295template<int dimworld, typename T>
    \n-
    \n-
    296void ContactMerge<dimworld, T>::computeOuterNormalField(const std::vector<WorldCoords>& coords,
    \n-
    297 const std::vector<unsigned int>& elements,
    \n-
    298 const std::vector<Dune::GeometryType>& elementTypes,
    \n-
    299 std::vector<WorldCoords>& normals)
    \n-
    300{
    \n-
    301 normals.assign(coords.size(),WorldCoords(0));
    \n-
    302
    \n-
    303
    \n-
    304 int offset = 0;
    \n-
    305
    \n-
    306 for (size_t i=0; i<elementTypes.size(); i++) {
    \n-
    307
    \n-
    308 int nCorners = Dune::ReferenceElements<T,dim>::general(elementTypes[i]).size(dim);
    \n-
    309
    \n-
    310 // For segments 1, for triangles or quadrilaterals take the first 2
    \n-
    311 std::array<WorldCoords, dim> edges;
    \n-
    312 for (int j=1; j<=dim; j++)
    \n-
    313 edges[j-1] = coords[elements[offset + j]] - coords[elements[offset]];
    \n-
    314
    \n-
    315 WorldCoords elementNormal;
    \n-
    316
    \n-
    317 if (dim==1) {
    \n-
    318 elementNormal[0] = edges[0][1]; elementNormal[1] = -edges[0][0];
    \n-
    319 } else
    \n-
    320 elementNormal = crossProduct(edges[0], edges[1]);
    \n-
    321
    \n-
    322 elementNormal /= elementNormal.two_norm();
    \n-
    323
    \n-
    324 for (int j=0; j<nCorners;j++)
    \n-
    325 normals[elements[offset + j]] += elementNormal;
    \n-
    326
    \n-
    327 offset += nCorners;
    \n-
    328 }
    \n-
    329
    \n-
    330 for (size_t i=0; i<coords.size(); i++)
    \n-
    331 normals[i] /= normals[i].two_norm();
    \n-
    332}
    \n-
    \n-
    333
    \n-
    334template<int dimworld, typename T>
    \n-
    \n-
    335void ContactMerge<dimworld, T>::removeDoubles(std::vector<std::array<LocalCoords,2> >& polytopeCorners)
    \n-
    336{
    \n-
    337
    \n-
    338 size_t counter(1);
    \n-
    339 for (size_t i=1; i<polytopeCorners.size(); i++) {
    \n-
    340 bool contained = false;
    \n-
    341 for (size_t j=0; j<counter; j++)
    \n-
    342 if ( (polytopeCorners[j][0]-polytopeCorners[i][0]).two_norm()<1e-10) {
    \n-
    343 assert((polytopeCorners[j][1]-polytopeCorners[i][1]).two_norm()<1e-10);
    \n-
    344 contained = true;
    \n-
    345 break;
    \n-
    346 }
    \n-
    347
    \n-
    348 if (!contained) {
    \n-
    349 if (counter < i)
    \n-
    350 polytopeCorners[counter] = polytopeCorners[i];
    \n-
    351 counter++;
    \n-
    352 }
    \n-
    353 }
    \n-
    354 polytopeCorners.resize(counter);
    \n-
    355}
    \n-
    \n-
    356
    \n-
    357} /* namespace GridGlue */
    \n-
    358} /* namespace Dune */
    \n-\n-\n+
    295private:
    \n+
    296 std::vector<SimplicialIntersection> intersections_;
    \n+
    297};
    \n+
    \n+
    298
    \n+
    299} /* namespace GridGlue */
    \n+
    300} /* namespace Dune */
    \n+
    301
    \n+
    302#endif
    \n
    Definition gridglue.hh:37
    \n-
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n-
    static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim > &a, const Dune::FieldVector< T, dim > &b)
    compute cross product
    Definition crossproduct.hh:15
    \n
    Coordinate corner(unsigned c)
    Definition projection_impl.hh:24
    \n-
    void computeCyclicOrder(const std::vector< std::array< LocalCoords, 2 > > &polytopeCorners, const LocalCoords &center, std::vector< int > &ordering) const
    Order the corners of the intersection polytope in cyclic order.
    Definition contactmerge.cc:214
    \n-
    void removeDoubles(std::vector< std::array< LocalCoords, 2 > > &polytopeCorners)
    Remove all multiples.
    Definition contactmerge.cc:335
    \n-
    Dune::FieldVector< T, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition contactmerge.hh:59
    \n-
    void setupNodalDirections(const std::vector< WorldCoords > &coords1, const std::vector< unsigned int > &elements1, const std::vector< Dune::GeometryType > &elementTypes1, const std::vector< WorldCoords > &coords2, const std::vector< unsigned int > &elements2, const std::vector< Dune::GeometryType > &elementTypes2)
    Setup the direction vectors containing the directions for each vertex.
    Definition contactmerge.cc:269
    \n-
    void computeOuterNormalField(const std::vector< WorldCoords > &coords, const std::vector< unsigned int > &elements, const std::vector< Dune::GeometryType > &elementTypes, std::vector< WorldCoords > &normals)
    If no direction field was specified compute the outer normal field.
    Definition contactmerge.cc:296
    \n-
    Dune::FieldVector< T, dim > LocalCoords
    the coordinate type used in this interface
    Definition contactmerge.hh:62
    \n+
    Definition intersectionlist.hh:22
    \n+
    virtual std::size_t parents0(Index intersection) const =0
    \n+
    virtual Local1 corner1(Index intersection, unsigned corner, unsigned index) const =0
    \n+
    unsigned int Index
    Definition intersectionlist.hh:38
    \n+
    virtual std::size_t size() const =0
    \n+
    L0 Local0
    Definition intersectionlist.hh:28
    \n+
    virtual Local0 corner0(Index intersection, unsigned corner, unsigned index) const =0
    \n+
    L1 Local1
    Definition intersectionlist.hh:33
    \n+
    virtual Index parent1(Index intersection, unsigned index) const =0
    \n+
    virtual std::size_t parents1(Index intersection) const =0
    \n+
    virtual Index parent0(Index intersection, unsigned index) const =0
    \n+
    Definition intersectionlist.hh:134
    \n+
    Index parent(Index intersection, unsigned index=0) const
    Definition intersectionlist.hh:171
    \n+
    auto corner(Index intersection, unsigned corner, unsigned index=0) const
    Definition intersectionlist.hh:187
    \n+
    typename Provider::Index Index
    Definition intersectionlist.hh:137
    \n+
    IntersectionList(const std::shared_ptr< Provider > &provider)
    Definition intersectionlist.hh:139
    \n+
    std::size_t parents(Index intersection) const
    Definition intersectionlist.hh:156
    \n+
    std::size_t size() const
    Definition intersectionlist.hh:146
    \n+
    Definition intersectionlist.hh:207
    \n+
    FieldVector< double, dim0 > Local0
    Definition intersectionlist.hh:212
    \n+
    auto & intersections()
    Definition intersectionlist.hh:266
    \n+
    SimplicialIntersectionListProvider(std::vector< SimplicialIntersection > &&intersections)
    Definition intersectionlist.hh:262
    \n+
    Local1 corner1(Index intersection, unsigned corner, unsigned index) const override
    Definition intersectionlist.hh:287
    \n+
    Local0 corner0(Index intersection, unsigned corner, unsigned index) const override
    Definition intersectionlist.hh:284
    \n+
    Index parent1(Index intersection, unsigned index) const override
    Definition intersectionlist.hh:281
    \n+
    typename Base::Index Index
    Definition intersectionlist.hh:211
    \n+
    std::conditional_t< I==0, Local0, Local1 > Local
    Definition intersectionlist.hh:216
    \n+\n+
    void clear()
    Definition intersectionlist.hh:290
    \n+
    std::size_t size() const override
    Definition intersectionlist.hh:269
    \n+
    FieldVector< double, dim1 > Local1
    Definition intersectionlist.hh:213
    \n+
    std::size_t parents1(Index intersection) const override
    Definition intersectionlist.hh:275
    \n+
    Index parent0(Index intersection, unsigned index) const override
    Definition intersectionlist.hh:278
    \n+
    std::size_t parents0(Index intersection) const override
    Definition intersectionlist.hh:272
    \n+\n+
    SimplicialIntersection(Index parent0, Index parent1)
    Definition intersectionlist.hh:229
    \n+
    std::array< Local< I >, nVertices > Corners
    Definition intersectionlist.hh:238
    \n+
    std::vector< Index > parents1
    Definition intersectionlist.hh:258
    \n+
    std::vector< Index > parents0
    Definition intersectionlist.hh:248
    \n+
    std::vector< Corners< 1 > > corners1
    Definition intersectionlist.hh:253
    \n+\n+
    std::vector< Corners< 0 > > corners0
    Definition intersectionlist.hh:243
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,439 +1,357 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-contactmerge.cc\n+intersectionlist.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n-2// vi: set et ts=4 sw=2 sts=2:\n-3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n+1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n-4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n+2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n+3#ifndef DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH\n+4#define DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH 1\n 5\n-6#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bc_\br_\bo_\bs_\bs_\bp_\br_\bo_\bd_\bu_\bc_\bt_\b._\bh_\bh>\n-7#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n-8\n-9namespace _\bD_\bu_\bn_\be {\n-10namespace GridGlue {\n-11\n-12template\n-13void ContactMerge::computeIntersections(const Dune::\n-GeometryType& grid1ElementType,\n-14 const std::vector >& grid1ElementCorners,\n-15 std::bitset<(1<& neighborIntersects1,\n-16 unsigned int grid1Index,\n-17 const Dune::GeometryType& grid2ElementType,\n-18 const std::vector >& grid2ElementCorners,\n-19 std::bitset<(1<& neighborIntersects2,\n-20 unsigned int grid2Index,\n-21 std::vector& _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs)\n+6#include \n+7#include \n+8#include \n+9#include \n+10\n+11#include \n+12\n+13namespace _\bD_\bu_\bn_\be {\n+14namespace GridGlue {\n+15\n+20template\n+_\b2_\b1class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br\n 22{\n-23 using std::get;\n+23public:\n 24\n-25 std::vector > polytopeCorners;\n-26\n-27 // Initialize\n-28 neighborIntersects1.reset();\n-29 neighborIntersects2.reset();\n-30\n-31 const int nCorners1 = grid1ElementCorners.size();\n-32 const int nCorners2 = grid2ElementCorners.size();\n-33\n-34 if (nCorners1 != dimworld)\n-35 DUNE_THROW(Dune::Exception, \"element1 must have \" << dimworld << \" corners,\n-but has \" << nCorners1);\n-36 if (nCorners2 != dimworld)\n-37 DUNE_THROW(Dune::Exception, \"element2 must have \" << dimworld << \" corners,\n-but has \" << nCorners2);\n-38\n-39 // The grid1 projection directions\n-40 std::vector directions1(nCorners1);\n-41 for (size_t i=0; igrid1ElementCorners_\n-[grid1Index][i]];\n-43\n-44 // The grid2 projection directions\n-45 std::vector directions2(nCorners2);\n-46 for (size_t i=0; igrid2ElementCorners_\n-[grid2Index][i]];\n-48\n-49 // The difference between the closest point projection and the normal\n-projection is just the ordering\n-50 // of the involved surfaces. The closest point projection is done along the\n-outer normal field of grid2\n-51 // (due to being a best approximation) and the outer normal projection is\n-using the outer normal field\n-52 // of grid1 instead.\n-53 std::array cornersRef ={std::\n-cref(grid1ElementCorners), std::cref(grid2ElementCorners)};\n-54 std::array directionsRef ={std::cref\n-(directions1), std::cref(directions2)};\n-55 std::array elementTypes = {grid1ElementType,\n-grid2ElementType};\n-56\n-57 // Determine which is the grid we use for outer normal projection\n-58 const size_t domGrid = (type_==ProjectionType::OUTER_NORMAL) ? 0 : 1;\n-59 const size_t tarGrid = (type_==ProjectionType::OUTER_NORMAL) ? 1 : 0;\n-60\n-62 // Compute all corners of the intersection polytope\n-64\n-65 const auto corners = std::tie(cornersRef[domGrid].get(),cornersRef\n-[tarGrid].get());\n-66 const auto normals = std::tie(directionsRef[domGrid].get(), directionsRef\n-[tarGrid].get());\n-67 Projection p(overlap_, maxNormalProduct_);\n-68 p.project(corners, normals);\n-69\n-70 /* projection */\n-71 {\n-72 const auto& success = get<0>(p.success());\n-73 const auto& images = get<0>(p.images());\n-74 for (unsigned i = 0; i < dimworld; ++i) {\n-75 if (success[i]) {\n-76 std::array _\bc_\bo_\br_\bn_\be_\br;\n-77 _\bc_\bo_\br_\bn_\be_\br[domGrid] = localCornerCoords(i, elementTypes[domGrid]);\n-78 for (unsigned j = 0; j < dim; ++j)\n-79 corner[tarGrid][j] = images[i][j];\n-80 polytopeCorners.push_back(corner);\n-81 }\n-82 }\n-83 }\n-84\n-85 /* inverse projection */\n-86 {\n-87 const auto& success = get<1>(p.success());\n-88 const auto& preimages = get<1>(p.images());\n-89 for (unsigned i = 0; i < dimworld; ++i) {\n-90 if (success[i]) {\n-91 std::array _\bc_\bo_\br_\bn_\be_\br;\n-92 for (unsigned j = 0; j < dim; ++j)\n-93 corner[domGrid][j] = preimages[i][j];\n-94 _\bc_\bo_\br_\bn_\be_\br[tarGrid] = localCornerCoords(i, elementTypes[tarGrid]);\n-95 polytopeCorners.push_back(corner);\n-96 }\n-97 }\n-98 }\n+_\b2_\b8 using _\bL_\bo_\bc_\ba_\bl_\b0 = L0;\n+29\n+_\b3_\b3 using _\bL_\bo_\bc_\ba_\bl_\b1 = L1;\n+34\n+_\b3_\b8 using _\bI_\bn_\bd_\be_\bx = unsigned int;\n+39\n+_\b4_\b3 virtual std::size_t _\bs_\bi_\bz_\be() const = 0;\n+44\n+_\b5_\b0 virtual std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs_\b0(_\bI_\bn_\bd_\be_\bx intersection) const = 0;\n+51\n+_\b5_\b7 virtual std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs_\b1(_\bI_\bn_\bd_\be_\bx intersection) const = 0;\n+58\n+_\b6_\b5 virtual _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b0(_\bI_\bn_\bd_\be_\bx intersection, unsigned index) const = 0;\n+66\n+_\b7_\b3 virtual _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b1(_\bI_\bn_\bd_\be_\bx intersection, unsigned index) const = 0;\n+74\n+_\b8_\b2 virtual _\bL_\bo_\bc_\ba_\bl_\b0 _\bc_\bo_\br_\bn_\be_\br_\b0(_\bI_\bn_\bd_\be_\bx intersection, unsigned corner, unsigned index)\n+const = 0;\n+83\n+_\b9_\b1 virtual _\bL_\bo_\bc_\ba_\bl_\b1 _\bc_\bo_\br_\bn_\be_\br_\b1(_\bI_\bn_\bd_\be_\bx intersection, unsigned corner, unsigned index)\n+const = 0;\n+92};\n+93\n+94namespace Impl {\n+95\n+96template\n+97struct IntersectionListLocal\n+98{};\n 99\n-100 /* edge intersections */\n-101 {\n-102 for (unsigned i = 0; i < p.numberOfEdgeIntersections(); ++i) {\n-103 std::array _\bc_\bo_\br_\bn_\be_\br;\n-104 const auto& local = p.edgeIntersections()[i].local;\n-105 for (unsigned j = 0; j < dim; ++j) {\n-106 _\bc_\bo_\br_\bn_\be_\br[domGrid][j] = local[0][j];\n-107 _\bc_\bo_\br_\bn_\be_\br[tarGrid][j] = local[1][j];\n-108 }\n-109 polytopeCorners.push_back(corner);\n-110 }\n-111 }\n+100template\n+101struct IntersectionListLocal\n+102{\n+103 static std::size_t parents(const P& p, typename P::Index intersection)\n+104 { return p.parents0(intersection); }\n+105\n+106 static typename P::Index parent(const P& p, typename P::Index intersection,\n+unsigned index)\n+107 { return p.parent0(intersection, index); }\n+108\n+109 static typename P::Local0 _\bc_\bo_\br_\bn_\be_\br(const P& p, typename P::Index\n+intersection, unsigned corner, unsigned index)\n+110 { return p.corner0(intersection, corner, index); }\n+111};\n 112\n-113 // check which neighbors might also intersect\n-114 std::array neighborIntersectsRef\n-= {std::ref(neighborIntersects1), std::ref(neighborIntersects2)};\n-115 const auto& refTar = Dune::ReferenceElements::general(elementTypes\n-[tarGrid]);\n-116 for (int i=0; i(p.success())[refTar.subEntity(i,1,k,dim)];\n-124\n-125 if (intersects)\n-126 neighborIntersectsRef[tarGrid].get()[i] = true;\n-127 }\n-128\n-129 const auto& refDom = Dune::ReferenceElements::general(elementTypes\n-[domGrid]);\n-130 for (int i=0; i(p.success())[refDom.subEntity(i,1,k,dim)];\n+113template\n+114struct IntersectionListLocal\n+115{\n+116 static std::size_t parents(const P& p, typename P::Index intersection)\n+117 { return p.parents1(intersection); }\n+118\n+119 static typename P::Index parent(const P& p, typename P::Index intersection,\n+unsigned index)\n+120 { return p.parent1(intersection, index); }\n+121\n+122 static typename P::Local1 _\bc_\bo_\br_\bn_\be_\br(const P& p, typename P::Index\n+intersection, unsigned corner, unsigned index)\n+123 { return p.corner1(intersection, corner, index); }\n+124};\n+125\n+126} /* namespace Impl */\n+127\n+132template\n+_\b1_\b3_\b3class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n+134{\n+135public:\n+_\b1_\b3_\b6 using _\bP_\br_\bo_\bv_\bi_\bd_\be_\br = _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\bL_\bo_\bc_\ba_\bl_\b0_\b,_\b _\bL_\bo_\bc_\ba_\bl_\b1_\b>;\n+_\b1_\b3_\b7 using _\bI_\bn_\bd_\be_\bx = typename _\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx;\n 138\n-139 if (intersects)\n-140 neighborIntersectsRef[domGrid].get()[i] = true;\n-141 }\n+_\b1_\b3_\b9 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt(const std::shared_ptr& provider)\n+140 : impl_(provider)\n+141 {}\n 142\n-143 // Compute the edge intersections\n-144 for (unsigned i = 0; i < p.numberOfEdgeIntersections(); ++i) {\n-145 const auto& edge = p.edgeIntersections()[i].edge;\n-146 neighborIntersects1[edge[domGrid]] = true;\n-147 neighborIntersects2[edge[tarGrid]] = true;\n-148 }\n-149\n-150 // remove possible doubles\n-151 removeDoubles(polytopeCorners);\n-152\n-153 // Compute an interior point of the polytope\n-154 int nPolyCorners = polytopeCorners.size();\n-155\n-156 // If the polytope is degenerated then there is no intersection\n-157 if (nPolyCornerssize(); }\n+148\n+155 template\n+_\b1_\b5_\b6 std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs(_\bI_\bn_\bd_\be_\bx intersection) const\n+157 {\n+158 static_assert(I == 0 or I == 1, \"I must be 0 or 1\");\n+159 // TODO [C++17]: use `if constexpr` instead of indirection\n+160 return Impl::IntersectionListLocal::parents(*impl_,\n+intersection);\n+161 }\n 162\n-163 // std::cout<<\"Add intersection: 1\\n\";\n-164 typename Base::SimplicialIntersection intersect(grid1Index, grid2Index);\n-165\n-166 for (int j=0;j=3\n-176\n-178 // Compute a point in the middle of the polytope and order all corners\n-cyclic\n-180\n-181 std::array center;\n-182 center[0] = 0; center[1] = 0;\n-183 for (int i=0; i ordering;\n-190 computeCyclicOrder(polytopeCorners,center[0],ordering);\n-191\n-193 // Add intersections\n-195\n-196 for (size_t i=1; i\n+_\b1_\b7_\b1 _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt(_\bI_\bn_\bd_\be_\bx intersection, unsigned index = 0) const\n+172 {\n+173 static_assert(I == 0 or I == 1, \"I must be 0 or 1\");\n+174 // TODO [C++17]: use `if constexpr` instead of indirection\n+175 return Impl::IntersectionListLocal::parent(*impl_,\n+intersection, index);\n+176 }\n+177\n+186 template\n+_\b1_\b8_\b7 auto _\bc_\bo_\br_\bn_\be_\br(_\bI_\bn_\bd_\be_\bx intersection, unsigned _\bc_\bo_\br_\bn_\be_\br, unsigned index = 0) const\n+188 {\n+189 static_assert(I == 0 or I == 1, \"I must be 0 or 1\");\n+190 // TODO [C++17]: use `if constexpr` instead of indirection\n+191 return Impl::IntersectionListLocal::corner(*impl_,\n+intersection, _\bc_\bo_\br_\bn_\be_\br, index);\n+192 }\n+193\n+194private:\n+195 std::shared_ptr impl_;\n+196};\n 197\n-198 typename Base::SimplicialIntersection intersect(grid1Index, grid2Index);\n-199\n-200 for (int j=0;j\n-_\b2_\b1_\b4void _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bC_\by_\bc_\bl_\bi_\bc_\bO_\br_\bd_\be_\br(const std::vector >& polytopeCorners,\n-215 const _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs& center, std::vector& ordering) const\n-216{\n-217 ordering.resize(polytopeCorners.size());\n-218\n-219 for (size_t k=0; k angles(polytopeCorners.size());\n-236\n-237 for (size_t i=0; i1; i--){\n-252 bool swapped = false;\n-253\n-254 for (int j=0; j angles[j+1]){\n-257 swapped = true;\n-258 std::swap(angles[j], angles[j+1]);\n-259 std::swap(ordering[j], ordering[j+1]);\n-260 }\n-261 }\n-262\n-263 if (!swapped)\n-264 break;\n-265 }\n-266}\n-267\n-268template\n-_\b2_\b6_\b9void _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs(const std::\n-vector& coords1,\n-270 const std::vector& elements1,\n-271 const std::vector& elementTypes1,\n-272 const std::vector& coords2,\n-273 const std::vector& elements2,\n-274 const std::vector& elementTypes2)\n-275{\n-276 if (domainDirections_) {\n+204template\n+_\b2_\b0_\b5class _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br final\n+206 : public _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br< FieldVector,\n+FieldVector >\n+207{\n+208 using _\bB_\ba_\bs_\be = _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\b _\bF_\bi_\be_\bl_\bd_\bV_\be_\bc_\bt_\bo_\br_\b<_\bd_\bo_\bu_\bb_\bl_\be_\b,_\b _\bd_\bi_\bm_\b0_\b>,\n+FieldVector >;\n+209\n+210public:\n+_\b2_\b1_\b1 using _\bI_\bn_\bd_\be_\bx = typename _\bB_\ba_\bs_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx;\n+_\b2_\b1_\b2 using _\bL_\bo_\bc_\ba_\bl_\b0 = FieldVector;\n+_\b2_\b1_\b3 using _\bL_\bo_\bc_\ba_\bl_\b1 = FieldVector;\n+214\n+215 template\n+_\b2_\b1_\b6 using _\bL_\bo_\bc_\ba_\bl = std::conditional_t< I == 0, Local0, Local1 >;\n+217\n+_\b2_\b2_\b1 struct _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+222 {\n+223 private:\n+224 static constexpr int intersectionDim = dim0 < dim1 ? dim0 : dim1;\n+225 static constexpr int nVertices = intersectionDim + 1;\n+226\n+227 public:\n+_\b2_\b2_\b8 _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn() = default;\n+_\b2_\b2_\b9 _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(_\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b0, _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b1)\n+230 : _\bp_\ba_\br_\be_\bn_\bt_\bs_\b0{_\bp_\ba_\br_\be_\bn_\bt_\b0}\n+231 , _\bp_\ba_\br_\be_\bn_\bt_\bs_\b1{_\bp_\ba_\br_\be_\bn_\bt_\b1}\n+232 {}\n+233\n+237 template\n+_\b2_\b3_\b8 using _\bC_\bo_\br_\bn_\be_\br_\bs = std::array, nVertices>;\n+239\n+_\b2_\b4_\b3 std::vector< Corners<0> > _\bc_\bo_\br_\bn_\be_\br_\bs_\b0 = std::vector< Corners<0> >(1);\n+244\n+_\b2_\b4_\b8 std::vector< Index > _\bp_\ba_\br_\be_\bn_\bt_\bs_\b0 = std::vector< Index >(1);\n+249\n+_\b2_\b5_\b3 std::vector< Corners<1> > _\bc_\bo_\br_\bn_\be_\br_\bs_\b1 = std::vector< Corners<1> >(1);\n+254\n+_\b2_\b5_\b8 std::vector< Index > _\bp_\ba_\br_\be_\bn_\bt_\bs_\b1 = std::vector< Index >(1);\n+259 };\n+260\n+_\b2_\b6_\b1 _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br() = default;\n+_\b2_\b6_\b2 _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br(std::vector&&\n+_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs)\n+263 : intersections_(std::move(_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs))\n+264 {}\n+265\n+_\b2_\b6_\b6 auto& _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()\n+267 { return intersections_; }\n+268\n+_\b2_\b6_\b9 std::size_t _\bs_\bi_\bz_\be() const override\n+270 { return intersections_.size(); }\n+271\n+_\b2_\b7_\b2 std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs_\b0(_\bI_\bn_\bd_\be_\bx intersection) const override\n+273 { return intersections_[intersection].parents0.size(); }\n+274\n+_\b2_\b7_\b5 std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs_\b1(_\bI_\bn_\bd_\be_\bx intersection) const override\n+276 { return intersections_[intersection].parents1.size(); }\n 277\n-278 // Sample the provided analytical contact direction field\n-279 nodalDomainDirections_.resize(coords1.size());\n-280 for (size_t i=0; i\n-_\b2_\b9_\b6void _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl_\bF_\bi_\be_\bl_\bd(const std::\n-vector& coords,\n-297 const std::vector& elements,\n-298 const std::vector& elementTypes,\n-299 std::vector& normals)\n-300{\n-301 normals.assign(coords.size(),_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(0));\n-302\n-303\n-304 int offset = 0;\n-305\n-306 for (size_t i=0; i::general(elementTypes\n-[i]).size(dim);\n-309\n-310 // For segments 1, for triangles or quadrilaterals take the first 2\n-311 std::array edges;\n-312 for (int j=1; j<=dim; j++)\n-313 edges[j-1] = coords[elements[offset + j]] - coords[elements[offset]];\n-314\n-315 _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs elementNormal;\n-316\n-317 if (dim==1) {\n-318 elementNormal[0] = edges[0][1]; elementNormal[1] = -edges[0][0];\n-319 } else\n-320 elementNormal = _\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt(edges[0], edges[1]);\n-321\n-322 elementNormal /= elementNormal.two_norm();\n-323\n-324 for (int j=0; j\n-_\b3_\b3_\b5void _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\br_\be_\bm_\bo_\bv_\be_\bD_\bo_\bu_\bb_\bl_\be_\bs(std::vector >& polytopeCorners)\n-336{\n-337\n-338 size_t counter(1);\n-339 for (size_t i=1; i intersections_;\n+297};\n+298\n+299} /* namespace GridGlue */\n+300} /* namespace Dune */\n+301\n+302#endif\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n-> &reverse=!reversed)\n-Iterate over all intersections of a GridGlue.\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt\n-static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim\n-> &a, const Dune::FieldVector< T, dim > &b)\n-compute cross product\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn crossproduct.hh:15\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\br_\bn_\be_\br\n Coordinate corner(unsigned c)\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:24\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bC_\by_\bc_\bl_\bi_\bc_\bO_\br_\bd_\be_\br\n-void computeCyclicOrder(const std::vector< std::array< LocalCoords, 2 > >\n-&polytopeCorners, const LocalCoords ¢er, std::vector< int > &ordering)\n-const\n-Order the corners of the intersection polytope in cyclic order.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:214\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\br_\be_\bm_\bo_\bv_\be_\bD_\bo_\bu_\bb_\bl_\be_\bs\n-void removeDoubles(std::vector< std::array< LocalCoords, 2 > >\n-&polytopeCorners)\n-Remove all multiples.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:335\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, dimworld > WorldCoords\n-the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:59\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-void setupNodalDirections(const std::vector< WorldCoords > &coords1, const\n-std::vector< unsigned int > &elements1, const std::vector< Dune::GeometryType >\n-&elementTypes1, const std::vector< WorldCoords > &coords2, const std::vector<\n-unsigned int > &elements2, const std::vector< Dune::GeometryType >\n-&elementTypes2)\n-Setup the direction vectors containing the directions for each vertex.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:269\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl_\bF_\bi_\be_\bl_\bd\n-void computeOuterNormalField(const std::vector< WorldCoords > &coords, const\n-std::vector< unsigned int > &elements, const std::vector< Dune::GeometryType >\n-&elementTypes, std::vector< WorldCoords > &normals)\n-If no direction field was specified compute the outer normal field.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:296\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, dim > LocalCoords\n-the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:62\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:22\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs_\b0\n+virtual std::size_t parents0(Index intersection) const =0\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bc_\bo_\br_\bn_\be_\br_\b1\n+virtual Local1 corner1(Index intersection, unsigned corner, unsigned index)\n+const =0\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx\n+unsigned int Index\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:38\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bs_\bi_\bz_\be\n+virtual std::size_t size() const =0\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\b0\n+L0 Local0\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:28\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bc_\bo_\br_\bn_\be_\br_\b0\n+virtual Local0 corner0(Index intersection, unsigned corner, unsigned index)\n+const =0\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\b1\n+L1 Local1\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:33\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\b1\n+virtual Index parent1(Index intersection, unsigned index) const =0\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs_\b1\n+virtual std::size_t parents1(Index intersection) const =0\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\b0\n+virtual Index parent0(Index intersection, unsigned index) const =0\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:134\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt\n+Index parent(Index intersection, unsigned index=0) const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:171\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b:_\b:_\bc_\bo_\br_\bn_\be_\br\n+auto corner(Index intersection, unsigned corner, unsigned index=0) const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:187\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b:_\b:_\bI_\bn_\bd_\be_\bx\n+typename Provider::Index Index\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:137\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n+IntersectionList(const std::shared_ptr< Provider > &provider)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:139\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs\n+std::size_t parents(Index intersection) const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:156\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b:_\b:_\bs_\bi_\bz_\be\n+std::size_t size() const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:146\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:207\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\b0\n+FieldVector< double, dim0 > Local0\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:212\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+auto & intersections()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:266\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:\n+_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br\n+SimplicialIntersectionListProvider(std::vector< SimplicialIntersection >\n+&&intersections)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:262\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bc_\bo_\br_\bn_\be_\br_\b1\n+Local1 corner1(Index intersection, unsigned corner, unsigned index) const\n+override\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:287\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bc_\bo_\br_\bn_\be_\br_\b0\n+Local0 corner0(Index intersection, unsigned corner, unsigned index) const\n+override\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:284\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\b1\n+Index parent1(Index intersection, unsigned index) const override\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:281\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx\n+typename Base::Index Index\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:211\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl\n+std::conditional_t< I==0, Local0, Local1 > Local\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:216\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:\n+_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br\n+SimplicialIntersectionListProvider()=default\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bc_\bl_\be_\ba_\br\n+void clear()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:290\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bs_\bi_\bz_\be\n+std::size_t size() const override\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:269\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\b1\n+FieldVector< double, dim1 > Local1\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:213\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs_\b1\n+std::size_t parents1(Index intersection) const override\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:275\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\b0\n+Index parent0(Index intersection, unsigned index) const override\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:278\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs_\b0\n+std::size_t parents0(Index intersection) const override\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:272\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:222\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n+_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+SimplicialIntersection(Index parent0, Index parent1)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:229\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n+_\bC_\bo_\br_\bn_\be_\br_\bs\n+std::array< Local< I >, nVertices > Corners\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:238\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n+_\bp_\ba_\br_\be_\bn_\bt_\bs_\b1\n+std::vector< Index > parents1\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:258\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n+_\bp_\ba_\br_\be_\bn_\bt_\bs_\b0\n+std::vector< Index > parents0\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:248\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n+_\bc_\bo_\br_\bn_\be_\br_\bs_\b1\n+std::vector< Corners< 1 > > corners1\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:253\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n+_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+SimplicialIntersection()=default\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n+_\bc_\bo_\br_\bn_\be_\br_\bs_\b0\n+std::vector< Corners< 0 > > corners0\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:243\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00071.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00071.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: overlappingmerge.cc File Reference\n+dune-grid-glue: standardmerge.cc File Reference\n \n \n \n \n \n \n \n@@ -71,48 +71,109 @@\n \n
    \n
    \n
    \n \n-
    overlappingmerge.cc File Reference
    \n+Macros |\n+Functions
    \n+
    standardmerge.cc File Reference
    \n
    \n
    \n-\n-

    Go to the source code of this file.

    \n-\n+
    #include "config.h"
    \n+#include "standardmerge.hh"
    \n+
    \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n \n-\n-\n+\n+\n+\n+\n+

    \n Macros

    #define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
     
    #define DECL
     
    #define STANDARD_MERGE_INSTANTIATE(T, A, B, C)
     
    \n+\n+\n+\n+\n+\n+\n+\n

    \n+Functions

     Dune::GridGlue::STANDARD_MERGE_INSTANTIATE (double, 1, 1, 1)
     
     Dune::GridGlue::STANDARD_MERGE_INSTANTIATE (double, 2, 2, 2)
     
     Dune::GridGlue::STANDARD_MERGE_INSTANTIATE (double, 3, 3, 3)
     
    \n

    Macro Definition Documentation

    \n-\n-

    ◆ DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC

    \n+\n+

    ◆ DECL

    \n \n
    \n
    \n \n \n- \n+ \n \n
    #define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC#define DECL
    \n
    \n \n
    \n
    \n+\n+

    ◆ STANDARD_MERGE_INSTANTIATE

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+
    #define STANDARD_MERGE_INSTANTIATE( T,
     A,
     B,
     
    )
    \n+
    \n+Value:
    DECL template \\
    \n+
    void StandardMerge<T,A,B,C>::build(const std::vector<Dune::FieldVector<T,C> >& grid1_coords, \\
    \n+
    const std::vector<unsigned int>& grid1_elements, \\
    \n+
    const std::vector<Dune::GeometryType>& grid1_element_types, \\
    \n+
    const std::vector<Dune::FieldVector<T,C> >& grid2_coords, \\
    \n+
    const std::vector<unsigned int>& grid2_elements, \\
    \n+
    const std::vector<Dune::GeometryType>& grid2_element_types \\
    \n+
    )
    \n+
    #define DECL
    Definition standardmerge.cc:12
    \n+
    \n+
    \n+
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,23 +1,52 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs\n-overlappingmerge.cc File Reference\n-_\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n+_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n+standardmerge.cc File Reference\n+#include \"config.h\"\n+#include \"_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh\"\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n M\bMa\bac\bcr\bro\bos\bs\n-#define\u00a0 _\bD_\bU_\bN_\bE_\b__\bG_\bR_\bI_\bD_\bG_\bL_\bU_\bE_\b__\bO_\bV_\bE_\bR_\bL_\bA_\bP_\bP_\bI_\bN_\bG_\bM_\bE_\bR_\bG_\bE_\b__\bC_\bC\n+#define\u00a0 _\bD_\bE_\bC_\bL\n+\u00a0\n+#define\u00a0 _\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE(T, A, B, C)\n+\u00a0\n+F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n+\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE (double, 1, 1, 1)\n+\u00a0\n+\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE (double, 2, 2, 2)\n+\u00a0\n+\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE (double, 3, 3, 3)\n \u00a0\n *\b**\b**\b**\b**\b* M\bMa\bac\bcr\bro\bo D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn D\bDo\boc\bcu\bum\bme\ben\bnt\bta\bat\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0D\bDU\bUN\bNE\bE_\b_G\bGR\bRI\bID\bDG\bGL\bLU\bUE\bE_\b_O\bOV\bVE\bER\bRL\bLA\bAP\bPP\bPI\bIN\bNG\bGM\bME\bER\bRG\bGE\bE_\b_C\bCC\bC *\b**\b**\b**\b**\b*\n-#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n+*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0D\bDE\bEC\bCL\bL *\b**\b**\b**\b**\b*\n+#define DECL\n+*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0S\bST\bTA\bAN\bND\bDA\bAR\bRD\bD_\b_M\bME\bER\bRG\bGE\bE_\b_I\bIN\bNS\bST\bTA\bAN\bNT\bTI\bIA\bAT\bTE\bE *\b**\b**\b**\b**\b*\n+#define STANDARD_MERGE_INSTANTIATE ( \u00a0 T,\n+ \u00a0 A,\n+ \u00a0 B,\n+ \u00a0 C\u00a0\n+ )\n+V\bVa\bal\blu\bue\be:\b:\n+_\bD_\bE_\bC_\bL template \\\n+void StandardMerge::build(const std::vector >&\n+grid1_coords, \\\n+const std::vector& grid1_elements, \\\n+const std::vector& grid1_element_types, \\\n+const std::vector >& grid2_coords, \\\n+const std::vector& grid2_elements, \\\n+const std::vector& grid2_element_types \\\n+)\n+_\bD_\bE_\bC_\bL\n+#define DECL\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.cc:12\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00074.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00074.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: conformingmerge.hh File Reference\n+dune-grid-glue: merger.hh File Reference\n \n \n \n \n \n \n \n@@ -72,46 +72,37 @@\n
  • dune
  • grid-glue
  • merging
  • \n \n \n
    \n \n-
    conformingmerge.hh File Reference
    \n+
    merger.hh File Reference
    \n
    \n
    \n-\n-

    Implementation of the Merger concept for conforming interfaces. \n-More...

    \n-
    #include <iomanip>
    \n-#include <vector>
    \n-#include <algorithm>
    \n-#include <bitset>
    \n-#include <dune/common/fmatrix.hh>
    \n+
    #include <vector>
    \n #include <dune/common/fvector.hh>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/grid-glue/merging/standardmerge.hh>
    \n+#include <dune/geometry/type.hh>
    \n+#include <dune/grid-glue/merging/intersectionlist.hh>
    \n
    \n

    Go to the source code of this file.

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

    \n Classes

    class  Dune::GridGlue::ConformingMerge< dim, dimworld, T >
     Implementation of the Merger concept for conforming interfaces. More...
    class  Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >
     Abstract base for all classes that take extracted grids and build sets of intersections. More...
     
    \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n-

    Detailed Description

    \n-

    Implementation of the Merger concept for conforming interfaces.

    \n-
    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,31 +2,25 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n _\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-conformingmerge.hh File Reference\n-Implementation of the Merger concept for conforming interfaces. _\bM_\bo_\br_\be_\b._\b._\b.\n-#include \n+merger.hh File Reference\n #include \n-#include \n-#include \n-#include \n #include \n-#include \n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n+#include \n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh>\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b<_\b _\bd_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b _\b>\n-\u00a0 Implementation of the _\bM_\be_\br_\bg_\be_\br concept for conforming interfaces. _\bM_\bo_\br_\be_\b._\b._\b.\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b<_\b _\bc_\bt_\by_\bp_\be_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>\n+\u00a0 Abstract base for all classes that take extracted grids and build sets\n+ of intersections. _\bM_\bo_\br_\be_\b._\b._\b.\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n-*\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-Implementation of the Merger concept for conforming interfaces.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00074_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00074_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: conformingmerge.hh Source File\n+dune-grid-glue: merger.hh Source File\n \n \n \n \n \n \n \n@@ -74,220 +74,110 @@\n \n \n \n
    \n-
    conformingmerge.hh
    \n+
    merger.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    5/*
    \n-
    6 * Filename: conformingmerge.hh
    \n-
    7 * Version: 1.0
    \n-
    8 * Created on: Sep 14, 2009
    \n-
    9 * Author: Oliver Sander
    \n-
    10 * ---------------------------------
    \n-
    11 * Project: dune-grid-glue
    \n-
    12 * Description: implementation of the Merger concept for conforming interfaces
    \n-
    13 *
    \n-
    14 */
    \n-
    21#ifndef DUNE_GRIDGLUE_MERGING_CONFORMINGMERGE_HH
    \n-
    22#define DUNE_GRIDGLUE_MERGING_CONFORMINGMERGE_HH
    \n-
    23
    \n-
    24#include <iomanip>
    \n-
    25#include <vector>
    \n-
    26#include <algorithm>
    \n-
    27#include <bitset>
    \n-
    28
    \n-
    29#include <dune/common/fmatrix.hh>
    \n-
    30#include <dune/common/fvector.hh>
    \n-
    31
    \n-
    32#include <dune/geometry/referenceelements.hh>
    \n-
    33
    \n-\n+
    5#ifndef DUNE_GRIDGLUE_MERGING_MERGER_HH
    \n+
    6#define DUNE_GRIDGLUE_MERGING_MERGER_HH
    \n+
    7
    \n+
    8#include <vector>
    \n+
    9
    \n+
    10#include <dune/common/fvector.hh>
    \n+
    11#include <dune/geometry/type.hh>
    \n+
    12
    \n+\n+
    14
    \n+
    15namespace Dune {
    \n+
    16namespace GridGlue {
    \n+
    17
    \n+
    25template <class ctype, int grid1Dim, int grid2Dim, int dimworld>
    \n+
    \n+
    26class Merger
    \n+
    27{
    \n+
    28public:
    \n+
    29
    \n+
    31 typedef Dune::FieldVector<ctype, grid1Dim> Grid1Coords;
    \n+
    32
    \n+
    34 typedef Dune::FieldVector<ctype, grid2Dim> Grid2Coords;
    \n
    35
    \n-
    36namespace Dune {
    \n-
    37
    \n-
    38 namespace GridGlue {
    \n-
    39
    \n-
    46template<int dim, int dimworld, typename T = double>
    \n-
    \n-\n-
    48 : public StandardMerge<T,dim,dim,dimworld>
    \n-
    49{
    \n-
    50
    \n-
    51public:
    \n-
    52
    \n-
    53 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n-
    54
    \n-
    56 typedef T ctype;
    \n-
    57
    \n-
    59 typedef Dune::FieldVector<T, dimworld> WorldCoords;
    \n+
    37 typedef Dune::FieldVector<ctype, dimworld> WorldCoords;
    \n+
    38
    \n+\n+
    40
    \n+
    54 virtual void build(const std::vector<Dune::FieldVector<ctype,dimworld> >& grid1_coords,
    \n+
    55 const std::vector<unsigned int>& grid1_elements,
    \n+
    56 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    57 const std::vector<Dune::FieldVector<ctype,dimworld> >& grid2_coords,
    \n+
    58 const std::vector<unsigned int>& grid2_elements,
    \n+
    59 const std::vector<Dune::GeometryType>& grid2_element_types) = 0;
    \n
    60
    \n-
    62 typedef Dune::FieldVector<T, dim> LocalCoords;
    \n-
    63
    \n-
    64private:
    \n-
    65
    \n-
    66 /* M E M B E R V A R I A B L E S */
    \n-
    67
    \n-
    69 T tolerance_;
    \n-
    70
    \n-
    71 typedef typename StandardMerge<T,dim,dim,dimworld>::SimplicialIntersection SimplicialIntersection;
    \n-
    72
    \n-
    77 void computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n-
    78 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n-
    79 std::bitset<(1<<dim)>& neighborIntersects1,
    \n-
    80 unsigned int grid1Index,
    \n-
    81 const Dune::GeometryType& grid2ElementType,
    \n-
    82 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n-
    83 std::bitset<(1<<dim)>& neighborIntersects2,
    \n-
    84 unsigned int grid2Index,
    \n-
    85 std::vector<SimplicialIntersection>& intersections);
    \n-
    86
    \n-
    87public:
    \n-
    88
    \n-
    89 static constexpr T default_tolerance = 1e-4;
    \n-
    90
    \n-
    \n-\n-
    92 tolerance_(tolerance)
    \n-
    93 {}
    \n+
    \n+
    64 unsigned int nSimplices() const
    \n+
    65 { return intersectionList()->size(); }
    \n+
    \n+
    66
    \n+
    67 virtual void clear() = 0;
    \n+
    68
    \n+
    74 virtual std::shared_ptr<IntersectionList> intersectionList() const = 0;
    \n+
    75
    \n+
    79 template<int n>
    \n+
    \n+
    80 unsigned int parents(unsigned int idx) const {
    \n+
    81 return intersectionList()->template parents<n>(idx);
    \n+
    82 }
    \n
    \n-
    94};
    \n+
    83
    \n+
    90 template<int n>
    \n+
    \n+
    91 unsigned int parent(unsigned int idx, unsigned int parId = 0) const
    \n+
    92 {
    \n+
    93 return intersectionList()->template parent<n>(idx, parId);
    \n+
    94 }
    \n
    \n
    95
    \n-
    96template<int dim, int dimworld, typename T>
    \n-\n-
    98
    \n-
    99template<int dim, int dimworld, typename T>
    \n-
    100void ConformingMerge<dim, dimworld, T>::computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n-
    101 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n-
    102 std::bitset<(1<<dim)>& neighborIntersects1,
    \n-
    103 unsigned int grid1Index,
    \n-
    104 const Dune::GeometryType& grid2ElementType,
    \n-
    105 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n-
    106 std::bitset<(1<<dim)>& neighborIntersects2,
    \n-
    107 unsigned int grid2Index,
    \n-
    108 std::vector<SimplicialIntersection>& intersections)
    \n-
    109{
    \n-
    110 this->counter++;
    \n-
    111
    \n-
    112 // A few consistency checks
    \n-
    113 assert((unsigned int)(Dune::ReferenceElements<T,dim>::general(grid1ElementType).size(dim)) == grid1ElementCorners.size());
    \n-
    114 assert((unsigned int)(Dune::ReferenceElements<T,dim>::general(grid2ElementType).size(dim)) == grid2ElementCorners.size());
    \n-
    115 // any intersection we may find will be the entire elements.
    \n-
    116 neighborIntersects1.reset();
    \n-
    117 neighborIntersects2.reset();
    \n-
    118
    \n-
    119 // the intersection is either conforming or empty, hence the GeometryTypes have to match
    \n-
    120 if (grid1ElementType != grid2ElementType)
    \n-
    121 return;
    \n-
    122
    \n-
    123 // ////////////////////////////////////////////////////////////
    \n-
    124 // Find correspondences between the different corners
    \n-
    125 // ////////////////////////////////////////////////////////////
    \n-
    126 std::vector<int> other(grid1ElementCorners.size(), -1);
    \n-
    127
    \n-
    128 for (unsigned int i=0; i<grid1ElementCorners.size(); i++) {
    \n-
    129
    \n-
    130 for (unsigned int j=0; j<grid2ElementCorners.size(); j++) {
    \n-
    131
    \n-
    132 if ( (grid1ElementCorners[i]-grid2ElementCorners[j]).two_norm() < tolerance_ ) {
    \n-
    133
    \n-
    134 other[i] = j;
    \n-
    135 break;
    \n-
    136
    \n-
    137 }
    \n-
    138
    \n-
    139 }
    \n-
    140
    \n-
    141 // No corresponding grid2 vertex found for this grid1 vertex
    \n-
    142 if (other[i] == -1)
    \n-
    143 return;
    \n-
    144
    \n-
    145 }
    \n-
    146
    \n-
    147 // ////////////////////////////////////////////////////////////
    \n-
    148 // Set up the new remote intersection
    \n-
    149 // ////////////////////////////////////////////////////////////
    \n-
    150
    \n-
    151 const auto& refElement = Dune::ReferenceElements<T,dim>::general(grid1ElementType);
    \n-
    152
    \n-
    154 if (grid1ElementType.isSimplex()) {
    \n-
    155
    \n-
    156 intersections.emplace_back(grid1Index, grid2Index);
    \n-
    157
    \n-
    158 for (int i=0; i<refElement.size(dim); i++) {
    \n-
    159 intersections.back().corners0[0][i] = refElement.position(i,dim);
    \n-
    160 intersections.back().corners1[0][i] = refElement.position(other[i],dim);
    \n-
    161 }
    \n-
    162
    \n-
    163 } else if (dim == 2 && grid1ElementType.isQuadrilateral()) {
    \n-
    164
    \n-
    165 // split the quadrilateral into two triangles
    \n-
    166 const unsigned int subVertices[2][3] = {{0,1,3}, {0,3,2}};
    \n-
    167
    \n-
    168 for (int i=0; i<2; i++) {
    \n-
    169
    \n-
    170 SimplicialIntersection newSimplicialIntersection(grid1Index, grid2Index);
    \n-
    171
    \n-
    172 for (int j=0; j<dim+1; j++) {
    \n-
    173 newSimplicialIntersection.corners0[0][j] = refElement.position(subVertices[i][j],dim);
    \n-
    174 newSimplicialIntersection.corners1[0][j] = refElement.position(subVertices[i][other[j]],dim);
    \n-
    175 }
    \n-
    176
    \n-
    177 intersections.push_back(newSimplicialIntersection);
    \n-
    178
    \n-
    179 }
    \n-
    180
    \n-
    181 } else if (grid1ElementType.isHexahedron()) {
    \n-
    182
    \n-
    183 // split the hexahedron into five tetrahedra
    \n-
    184 // This can be removed if ever we allow Intersections that are not simplices
    \n-
    185 const unsigned int subVertices[5][4] = {{0,1,3,5}, {0,3,2,6}, {4,5,0,6}, {6,7,6,3}, {6,0,5,3}};
    \n-
    186
    \n-
    187 for (int i=0; i<5; i++) {
    \n-
    188
    \n-
    189 SimplicialIntersection newSimplicialIntersection(grid1Index, grid2Index);
    \n-
    190
    \n-
    191 for (int j=0; j<dim+1; j++) {
    \n-
    192 newSimplicialIntersection.corners0[0][j] = refElement.position(subVertices[i][j],dim);
    \n-
    193 newSimplicialIntersection.corners1[0][j] = refElement.position(subVertices[i][other[j]],dim);
    \n-
    194 }
    \n-
    195
    \n-
    196 intersections.push_back(newSimplicialIntersection);
    \n-
    197
    \n-
    198 }
    \n-
    199
    \n-
    200 } else
    \n-
    201 DUNE_THROW(Dune::GridError, "Unsupported element type");
    \n-
    202
    \n-
    203}
    \n-
    204
    \n-
    205} // namespace GridGlue
    \n-
    206
    \n-
    207} // namespace Dune
    \n-
    208
    \n-
    209#endif // DUNE_GRIDGLUE_MERGING_CONFORMINGMERGE_HH
    \n-
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    \n+
    104 template<int n>
    \n+
    \n+
    105 auto parentLocal(unsigned int idx, unsigned int corner, unsigned int parId = 0) const
    \n+
    106 {
    \n+
    107 return intersectionList()->template corner<n>(idx, corner, parId);
    \n+
    108 }
    \n+
    \n+
    109
    \n+
    114 unsigned int counter;
    \n+
    115};
    \n+
    \n+
    116
    \n+
    117} /* namespace GridGlue */
    \n+
    118} /* namespace Dune */
    \n+
    119
    \n+
    120#endif
    \n+\n
    Definition gridglue.hh:37
    \n-
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n-
    Implementation of the Merger concept for conforming interfaces.
    Definition conformingmerge.hh:49
    \n-
    Dune::FieldVector< T, dim > LocalCoords
    the coordinate type used in this interface
    Definition conformingmerge.hh:62
    \n-
    Dune::FieldVector< T, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition conformingmerge.hh:59
    \n-
    static constexpr T default_tolerance
    Definition conformingmerge.hh:89
    \n-
    T ctype
    the numeric type used in this interface
    Definition conformingmerge.hh:56
    \n-
    ConformingMerge(T tolerance=default_tolerance)
    Definition conformingmerge.hh:91
    \n-
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    Definition standardmerge.hh:58
    \n-
    typename IntersectionListProvider::SimplicialIntersection SimplicialIntersection
    Definition standardmerge.hh:83
    \n+
    Definition intersectionlist.hh:134
    \n+
    Abstract base for all classes that take extracted grids and build sets of intersections.
    Definition merger.hh:27
    \n+
    unsigned int parent(unsigned int idx, unsigned int parId=0) const
    get index of grid-n's parent simplex for given merged grid simplex
    Definition merger.hh:91
    \n+
    virtual void clear()=0
    \n+
    Dune::FieldVector< ctype, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition merger.hh:37
    \n+
    Dune::FieldVector< ctype, grid1Dim > Grid1Coords
    the local coordinate type for the grid1 coordinates
    Definition merger.hh:31
    \n+
    unsigned int counter
    Counts the number of times the computeIntersection method has been called.
    Definition merger.hh:114
    \n+
    auto parentLocal(unsigned int idx, unsigned int corner, unsigned int parId=0) const
    get the grid-n parent's simplex local coordinates for a particular merged grid simplex corner (parent...
    Definition merger.hh:105
    \n+
    virtual void build(const std::vector< Dune::FieldVector< ctype, dimworld > > &grid1_coords, const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< ctype, dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements, const std::vector< Dune::GeometryType > &grid2_element_types)=0
    builds the merged grid
    \n+
    unsigned int nSimplices() const
    get the number of simplices in the merged grid The indices are then in 0..nSimplices()-1
    Definition merger.hh:64
    \n+
    virtual std::shared_ptr< IntersectionList > intersectionList() const =0
    \n+
    unsigned int parents(unsigned int idx) const
    Definition merger.hh:80
    \n+
    Dune::FieldVector< ctype, grid2Dim > Grid2Coords
    the local coordinate type for the grid2 coordinates
    Definition merger.hh:34
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,253 +1,139 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-conformingmerge.hh\n+merger.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-5/*\n-6 * Filename: conformingmerge.hh\n-7 * Version: 1.0\n-8 * Created on: Sep 14, 2009\n-9 * Author: Oliver Sander\n-10 * ---------------------------------\n-11 * Project: dune-grid-glue\n-12 * Description: implementation of the Merger concept for conforming\n-interfaces\n-13 *\n-14 */\n-21#ifndef DUNE_GRIDGLUE_MERGING_CONFORMINGMERGE_HH\n-22#define DUNE_GRIDGLUE_MERGING_CONFORMINGMERGE_HH\n-23\n-24#include \n-25#include \n-26#include \n-27#include \n-28\n-29#include \n-30#include \n-31\n-32#include \n-33\n-34#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n+5#ifndef DUNE_GRIDGLUE_MERGING_MERGER_HH\n+6#define DUNE_GRIDGLUE_MERGING_MERGER_HH\n+7\n+8#include \n+9\n+10#include \n+11#include \n+12\n+13#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh>\n+14\n+15namespace _\bD_\bu_\bn_\be {\n+16namespace GridGlue {\n+17\n+25template \n+_\b2_\b6class _\bM_\be_\br_\bg_\be_\br\n+27{\n+28public:\n+29\n+_\b3_\b1 typedef Dune::FieldVector _\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs;\n+32\n+_\b3_\b4 typedef Dune::FieldVector _\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs;\n 35\n-36namespace _\bD_\bu_\bn_\be {\n-37\n-38 namespace GridGlue {\n-39\n-46template\n-_\b4_\b7class _\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be\n-48 : public _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n-49{\n-50\n-51public:\n-52\n-53 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n-54\n-_\b5_\b6 typedef T _\bc_\bt_\by_\bp_\be;\n-57\n-_\b5_\b9 typedef Dune::FieldVector _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\n+_\b3_\b7 typedef Dune::FieldVector _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\n+38\n+_\b3_\b9 using _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt = _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b<_\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs_\b,\n+_\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs_\b>;\n+40\n+_\b5_\b4 virtual void _\bb_\bu_\bi_\bl_\bd(const std::vector >&\n+grid1_coords,\n+55 const std::vector& grid1_elements,\n+56 const std::vector& grid1_element_types,\n+57 const std::vector >& grid2_coords,\n+58 const std::vector& grid2_elements,\n+59 const std::vector& grid2_element_types) = 0;\n 60\n-_\b6_\b2 typedef Dune::FieldVector _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs;\n-63\n-64private:\n-65\n-66 /* M E M B E R V A R I A B L E S */\n-67\n-69 T tolerance_;\n-70\n-71 typedef typename _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bd_\bi_\bm_\b,_\bd_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-SimplicialIntersection;\n-72\n-77 void computeIntersections(const Dune::GeometryType& grid1ElementType,\n-78 const std::vector >& grid1ElementCorners,\n-79 std::bitset<(1<& neighborIntersects1,\n-80 unsigned int grid1Index,\n-81 const Dune::GeometryType& grid2ElementType,\n-82 const std::vector >& grid2ElementCorners,\n-83 std::bitset<(1<& neighborIntersects2,\n-84 unsigned int grid2Index,\n-85 std::vector& intersections);\n-86\n-87public:\n-88\n-_\b8_\b9 static constexpr T _\bd_\be_\bf_\ba_\bu_\bl_\bt_\b__\bt_\bo_\bl_\be_\br_\ba_\bn_\bc_\be = 1e-4;\n-90\n-_\b9_\b1 _\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be(T tolerance = _\bd_\be_\bf_\ba_\bu_\bl_\bt_\b__\bt_\bo_\bl_\be_\br_\ba_\bn_\bc_\be) :\n-92 tolerance_(tolerance)\n-93 {}\n-94};\n+_\b6_\b4 unsigned int _\bn_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\be_\bs() const\n+65 { return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt()->size(); }\n+66\n+_\b6_\b7 virtual void _\bc_\bl_\be_\ba_\br() = 0;\n+68\n+_\b7_\b4 virtual std::shared_ptr _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt() const = 0;\n+75\n+79 template\n+_\b8_\b0 unsigned int _\bp_\ba_\br_\be_\bn_\bt_\bs(unsigned int idx) const {\n+81 return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt()->template parents(idx);\n+82 }\n+83\n+90 template\n+_\b9_\b1 unsigned int _\bp_\ba_\br_\be_\bn_\bt(unsigned int idx, unsigned int parId = 0) const\n+92 {\n+93 return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt()->template parent(idx, parId);\n+94 }\n 95\n-96template\n-97constexpr T _\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bd_\be_\bf_\ba_\bu_\bl_\bt_\b__\bt_\bo_\bl_\be_\br_\ba_\bn_\bc_\be;\n-98\n-99template\n-100void ConformingMerge::computeIntersections(const Dune::\n-GeometryType& grid1ElementType,\n-101 const std::vector >& grid1ElementCorners,\n-102 std::bitset<(1<& neighborIntersects1,\n-103 unsigned int grid1Index,\n-104 const Dune::GeometryType& grid2ElementType,\n-105 const std::vector >& grid2ElementCorners,\n-106 std::bitset<(1<& neighborIntersects2,\n-107 unsigned int grid2Index,\n-108 std::vector& _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs)\n-109{\n-110 this->counter++;\n-111\n-112 // A few consistency checks\n-113 assert((unsigned int)(Dune::ReferenceElements::general\n-(grid1ElementType).size(dim)) == grid1ElementCorners.size());\n-114 assert((unsigned int)(Dune::ReferenceElements::general\n-(grid2ElementType).size(dim)) == grid2ElementCorners.size());\n-115 // any intersection we may find will be the entire elements.\n-116 neighborIntersects1.reset();\n-117 neighborIntersects2.reset();\n-118\n-119 // the intersection is either conforming or empty, hence the GeometryTypes\n-have to match\n-120 if (grid1ElementType != grid2ElementType)\n-121 return;\n-122\n-123 // ////////////////////////////////////////////////////////////\n-124 // Find correspondences between the different corners\n-125 // ////////////////////////////////////////////////////////////\n-126 std::vector other(grid1ElementCorners.size(), -1);\n-127\n-128 for (unsigned int i=0; i::general\n-(grid1ElementType);\n-152\n-154 if (grid1ElementType.isSimplex()) {\n-155\n-156 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.emplace_back(grid1Index, grid2Index);\n-157\n-158 for (int i=0; i\n+_\b1_\b0_\b5 auto _\bp_\ba_\br_\be_\bn_\bt_\bL_\bo_\bc_\ba_\bl(unsigned int idx, unsigned int corner, unsigned int parId\n+= 0) const\n+106 {\n+107 return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt()->template corner(idx, corner, parId);\n+108 }\n+109\n+_\b1_\b1_\b4 unsigned int _\bc_\bo_\bu_\bn_\bt_\be_\br;\n+115};\n+116\n+117} /* namespace GridGlue */\n+118} /* namespace Dune */\n+119\n+120#endif\n+_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n-> &reverse=!reversed)\n-Iterate over all intersections of a GridGlue.\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be\n-Implementation of the Merger concept for conforming interfaces.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn conformingmerge.hh:49\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, dim > LocalCoords\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:134\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br\n+Abstract base for all classes that take extracted grids and build sets of\n+intersections.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:27\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt\n+unsigned int parent(unsigned int idx, unsigned int parId=0) const\n+get index of grid-n's parent simplex for given merged grid simplex\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:91\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bc_\bl_\be_\ba_\br\n+virtual void clear()=0\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< ctype, dimworld > WorldCoords\n the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn conformingmerge.hh:62\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, dimworld > WorldCoords\n-the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn conformingmerge.hh:59\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bd_\be_\bf_\ba_\bu_\bl_\bt_\b__\bt_\bo_\bl_\be_\br_\ba_\bn_\bc_\be\n-static constexpr T default_tolerance\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn conformingmerge.hh:89\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bt_\by_\bp_\be\n-T ctype\n-the numeric type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn conformingmerge.hh:56\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be\n-ConformingMerge(T tolerance=default_tolerance)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn conformingmerge.hh:91\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n-Common base class for many merger implementations: produce pairs of entities\n-that may intersect.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:58\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-typename IntersectionListProvider::SimplicialIntersection\n-SimplicialIntersection\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:83\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:37\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< ctype, grid1Dim > Grid1Coords\n+the local coordinate type for the grid1 coordinates\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:31\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bc_\bo_\bu_\bn_\bt_\be_\br\n+unsigned int counter\n+Counts the number of times the computeIntersection method has been called.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:114\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bL_\bo_\bc_\ba_\bl\n+auto parentLocal(unsigned int idx, unsigned int corner, unsigned int parId=0)\n+const\n+get the grid-n parent's simplex local coordinates for a particular merged grid\n+simplex corner (parent...\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:105\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bb_\bu_\bi_\bl_\bd\n+virtual void build(const std::vector< Dune::FieldVector< ctype, dimworld > >\n+&grid1_coords, const std::vector< unsigned int > &grid1_elements, const std::\n+vector< Dune::GeometryType > &grid1_element_types, const std::vector< Dune::\n+FieldVector< ctype, dimworld > > &grid2_coords, const std::vector< unsigned int\n+> &grid2_elements, const std::vector< Dune::GeometryType >\n+&grid2_element_types)=0\n+builds the merged grid\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bn_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\be_\bs\n+unsigned int nSimplices() const\n+get the number of simplices in the merged grid The indices are then in\n+0..nSimplices()-1\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:64\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n+virtual std::shared_ptr< IntersectionList > intersectionList() const =0\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs\n+unsigned int parents(unsigned int idx) const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:80\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< ctype, grid2Dim > Grid2Coords\n+the local coordinate type for the grid2 coordinates\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:34\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00077.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00077.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: intersectionlist.hh File Reference\n+dune-grid-glue: standardmerge.hh File Reference\n \n \n \n \n \n \n \n@@ -71,44 +71,139 @@\n \n
    \n
    \n
    \n \n-
    intersectionlist.hh File Reference
    \n+Namespaces |\n+Macros |\n+Functions
    \n+
    standardmerge.hh File Reference
    \n \n
    \n-
    #include <array>
    \n-#include <type_traits>
    \n-#include <utility>
    \n+\n+

    Common base class for many merger implementations: produce pairs of entities that may intersect. \n+More...

    \n+
    #include <iostream>
    \n+#include <iomanip>
    \n #include <vector>
    \n+#include <stack>
    \n+#include <set>
    \n+#include <utility>
    \n+#include <map>
    \n+#include <memory>
    \n+#include <algorithm>
    \n #include <dune/common/fvector.hh>
    \n+#include <dune/common/bitsetvector.hh>
    \n+#include <dune/common/stdstreams.hh>
    \n+#include <dune/common/timer.hh>
    \n+#include <dune/geometry/referenceelements.hh>
    \n+#include <dune/grid/common/grid.hh>
    \n+#include <dune/grid-glue/merging/intersectionlist.hh>
    \n+#include <dune/grid-glue/merging/merger.hh>
    \n+#include <dune/grid-glue/merging/computeintersection.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::GridGlue::IntersectionListProvider< L0, L1 >
     
    class  Dune::GridGlue::IntersectionList< Local0, Local1 >
     
    class  Dune::GridGlue::SimplicialIntersectionListProvider< dim0, dim1 >
     
    struct  Dune::GridGlue::SimplicialIntersectionListProvider< dim0, dim1 >::SimplicialIntersection
    class  Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >
     Common base class for many merger implementations: produce pairs of entities that may intersect. More...
     
    \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n+\n+\n+\n+\n+\n+

    \n+Macros

    #define DECL   extern
     
    #define STANDARD_MERGE_INSTANTIATE(T, A, B, C)
     
    \n+\n+\n+\n+\n+\n+\n+\n

    \n+Functions

     Dune::GridGlue::STANDARD_MERGE_INSTANTIATE (double, 1, 1, 1)
     
     Dune::GridGlue::STANDARD_MERGE_INSTANTIATE (double, 2, 2, 2)
     
     Dune::GridGlue::STANDARD_MERGE_INSTANTIATE (double, 3, 3, 3)
     
    \n+

    Detailed Description

    \n+

    Common base class for many merger implementations: produce pairs of entities that may intersect.

    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ DECL

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define DECL   extern
    \n+
    \n+\n+
    \n+
    \n+\n+

    ◆ STANDARD_MERGE_INSTANTIATE

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+ \n+
    #define STANDARD_MERGE_INSTANTIATE( T,
     A,
     B,
     
    )
    \n+
    \n+Value:
    DECL template \\
    \n+
    void StandardMerge<T,A,B,C>::build(const std::vector<Dune::FieldVector<T,C> >& grid1Coords, \\
    \n+
    const std::vector<unsigned int>& grid1_elements, \\
    \n+
    const std::vector<Dune::GeometryType>& grid1_element_types, \\
    \n+
    const std::vector<Dune::FieldVector<T,C> >& grid2Coords, \\
    \n+
    const std::vector<unsigned int>& grid2_elements, \\
    \n+
    const std::vector<Dune::GeometryType>& grid2_element_types \\
    \n+
    )
    \n+
    #define DECL
    Definition standardmerge.hh:827
    \n+
    \n+
    \n+
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,32 +1,79 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-intersectionlist.hh File Reference\n-#include \n-#include \n-#include \n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n+standardmerge.hh File Reference\n+Common base class for many merger implementations: produce pairs of entities\n+that m\bma\bay\by intersect. _\bM_\bo_\br_\be_\b._\b._\b.\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 <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh>\n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bm_\be_\br_\bg_\be_\br_\b._\bh_\bh>\n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n- class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\b _\bL_\b0_\b,_\b _\bL_\b1_\b _\b>\n-\u00a0\n- class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b<_\b _\bL_\bo_\bc_\ba_\bl_\b0_\b,_\b _\bL_\bo_\bc_\ba_\bl_\b1_\b _\b>\n-\u00a0\n- class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\b _\bd_\bi_\bm_\b0_\b,_\b _\bd_\bi_\bm_\b1_\b _\b>\n-\u00a0\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\b _\bd_\bi_\bm_\b0_\b,_\b _\bd_\bi_\bm_\b1_\b _\b>_\b:_\b:\n- _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\b _\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>\n+\u00a0 Common base class for many merger implementations: produce pairs of\n+ entities that m\bma\bay\by intersect. _\bM_\bo_\br_\be_\b._\b._\b.\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+M\bMa\bac\bcr\bro\bos\bs\n+#define\u00a0 _\bD_\bE_\bC_\bL\u00a0\u00a0\u00a0extern\n+\u00a0\n+#define\u00a0 _\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE(T, A, B, C)\n+\u00a0\n+F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n+\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE (double, 1, 1, 1)\n+\u00a0\n+\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE (double, 2, 2, 2)\n+\u00a0\n+\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE (double, 3, 3, 3)\n+\u00a0\n+*\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n+Common base class for many merger implementations: produce pairs of entities\n+that m\bma\bay\by intersect.\n+*\b**\b**\b**\b**\b* M\bMa\bac\bcr\bro\bo D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn D\bDo\boc\bcu\bum\bme\ben\bnt\bta\bat\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n+*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0D\bDE\bEC\bCL\bL *\b**\b**\b**\b**\b*\n+#define DECL\u00a0\u00a0\u00a0extern\n+*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0S\bST\bTA\bAN\bND\bDA\bAR\bRD\bD_\b_M\bME\bER\bRG\bGE\bE_\b_I\bIN\bNS\bST\bTA\bAN\bNT\bTI\bIA\bAT\bTE\bE *\b**\b**\b**\b**\b*\n+#define STANDARD_MERGE_INSTANTIATE ( \u00a0 T,\n+ \u00a0 A,\n+ \u00a0 B,\n+ \u00a0 C\u00a0\n+ )\n+V\bVa\bal\blu\bue\be:\b:\n+_\bD_\bE_\bC_\bL template \\\n+void StandardMerge::build(const std::vector >&\n+grid1Coords, \\\n+const std::vector& grid1_elements, \\\n+const std::vector& grid1_element_types, \\\n+const std::vector >& grid2Coords, \\\n+const std::vector& grid2_elements, \\\n+const std::vector& grid2_element_types \\\n+)\n+_\bD_\bE_\bC_\bL\n+#define DECL\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:827\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00077_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00077_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: intersectionlist.hh Source File\n+dune-grid-glue: standardmerge.hh Source File\n \n \n \n \n \n \n \n@@ -74,299 +74,857 @@\n \n \n
    \n
    \n-
    intersectionlist.hh
    \n+
    standardmerge.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n-
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#ifndef DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH
    \n-
    4#define DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH 1
    \n-
    5
    \n-
    6#include <array>
    \n-
    7#include <type_traits>
    \n-
    8#include <utility>
    \n-
    9#include <vector>
    \n-
    10
    \n-
    11#include <dune/common/fvector.hh>
    \n+Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+
    2// vi: set et ts=4 sw=2 sts=2:
    \n+
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n+
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+
    10#ifndef DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH
    \n+
    11#define DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH
    \n
    12
    \n-
    13namespace Dune {
    \n-
    14namespace GridGlue {
    \n-
    15
    \n-
    20template<typename L0, typename L1>
    \n-
    \n-\n-
    22{
    \n-
    23public:
    \n-
    24
    \n-
    28 using Local0 = L0;
    \n-
    29
    \n-
    33 using Local1 = L1;
    \n-
    34
    \n-
    38 using Index = unsigned int;
    \n-
    39
    \n-
    43 virtual std::size_t size() const = 0;
    \n-
    44
    \n-
    50 virtual std::size_t parents0(Index intersection) const = 0;
    \n-
    51
    \n-
    57 virtual std::size_t parents1(Index intersection) const = 0;
    \n-
    58
    \n-
    65 virtual Index parent0(Index intersection, unsigned index) const = 0;
    \n-
    66
    \n-
    73 virtual Index parent1(Index intersection, unsigned index) const = 0;
    \n-
    74
    \n-
    82 virtual Local0 corner0(Index intersection, unsigned corner, unsigned index) const = 0;
    \n-
    83
    \n-
    91 virtual Local1 corner1(Index intersection, unsigned corner, unsigned index) const = 0;
    \n-
    92};
    \n-
    \n-
    93
    \n-
    94namespace Impl {
    \n-
    95
    \n-
    96template<typename P, int I>
    \n-
    97struct IntersectionListLocal
    \n-
    98{};
    \n-
    99
    \n-
    100template<typename P>
    \n-
    101struct IntersectionListLocal<P, 0>
    \n-
    102{
    \n-
    103 static std::size_t parents(const P& p, typename P::Index intersection)
    \n-
    104 { return p.parents0(intersection); }
    \n-
    105
    \n-
    106 static typename P::Index parent(const P& p, typename P::Index intersection, unsigned index)
    \n-
    107 { return p.parent0(intersection, index); }
    \n+
    13
    \n+
    14#include <iostream>
    \n+
    15#include <iomanip>
    \n+
    16#include <vector>
    \n+
    17#include <stack>
    \n+
    18#include <set>
    \n+
    19#include <utility>
    \n+
    20#include <map>
    \n+
    21#include <memory>
    \n+
    22#include <algorithm>
    \n+
    23
    \n+
    24#include <dune/common/fvector.hh>
    \n+
    25#include <dune/common/bitsetvector.hh>
    \n+
    26#include <dune/common/stdstreams.hh>
    \n+
    27#include <dune/common/timer.hh>
    \n+
    28
    \n+
    29#include <dune/geometry/referenceelements.hh>
    \n+
    30#include <dune/grid/common/grid.hh>
    \n+
    31
    \n+\n+\n+\n+
    35
    \n+
    36namespace Dune {
    \n+
    37namespace GridGlue {
    \n+
    38
    \n+
    55template<class T, int grid1Dim, int grid2Dim, int dimworld>
    \n+
    \n+\n+
    57 : public Merger<T,grid1Dim,grid2Dim,dimworld>
    \n+
    58{
    \n+\n+
    60
    \n+
    61public:
    \n+
    62
    \n+
    63 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n+
    64
    \n+
    66 typedef T ctype;
    \n+
    67
    \n+\n+
    70
    \n+\n+
    73
    \n+\n+
    76
    \n+\n+
    78
    \n+
    79protected:
    \n+
    80
    \n+\n+\n+\n+
    85
    \n+
    86 bool valid = false;
    \n+
    87
    \n+\n+
    92
    \n+
    93 virtual ~StandardMerge() = default;
    \n+
    94
    \n+
    99 virtual void computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n+
    100 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n+
    101 std::bitset<(1<<grid1Dim)>& neighborIntersects1,
    \n+
    102 unsigned int grid1Index,
    \n+
    103 const Dune::GeometryType& grid2ElementType,
    \n+
    104 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n+
    105 std::bitset<(1<<grid2Dim)>& neighborIntersects2,
    \n+
    106 unsigned int grid2Index,
    \n+
    107 std::vector<SimplicialIntersection>& intersections) = 0;
    \n
    108
    \n-
    109 static typename P::Local0 corner(const P& p, typename P::Index intersection, unsigned corner, unsigned index)
    \n-
    110 { return p.corner0(intersection, corner, index); }
    \n-
    111};
    \n-
    112
    \n-
    113template<typename P>
    \n-
    114struct IntersectionListLocal<P, 1>
    \n-
    115{
    \n-
    116 static std::size_t parents(const P& p, typename P::Index intersection)
    \n-
    117 { return p.parents1(intersection); }
    \n-
    118
    \n-
    119 static typename P::Index parent(const P& p, typename P::Index intersection, unsigned index)
    \n-
    120 { return p.parent1(intersection, index); }
    \n-
    121
    \n-
    122 static typename P::Local1 corner(const P& p, typename P::Index intersection, unsigned corner, unsigned index)
    \n-
    123 { return p.corner1(intersection, corner, index); }
    \n-
    124};
    \n+
    \n+
    112 bool computeIntersection(unsigned int candidate0, unsigned int candidate1,
    \n+
    113 const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n+
    114 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    115 std::bitset<(1<<grid1Dim)>& neighborIntersects1,
    \n+
    116 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n+
    117 const std::vector<Dune::GeometryType>& grid2_element_types,
    \n+
    118 std::bitset<(1<<grid2Dim)>& neighborIntersects2,
    \n+
    119 bool insert = true);
    \n+
    120
    \n+
    121 /* M E M B E R V A R I A B L E S */
    \n+
    122
    \n+
    123 std::shared_ptr<IntersectionListProvider> intersectionListProvider_;
    \n+
    124 std::shared_ptr<IntersectionList> intersectionList_;
    \n
    125
    \n-
    126} /* namespace Impl */
    \n-
    127
    \n-
    132template<typename Local0, typename Local1>
    \n-
    \n-\n-
    134{
    \n-
    135public:
    \n-\n-
    137 using Index = typename Provider::Index;
    \n-
    138
    \n-
    \n-
    139 IntersectionList(const std::shared_ptr<Provider>& provider)
    \n-
    140 : impl_(provider)
    \n-
    141 {}
    \n-
    \n-
    142
    \n-
    \n-
    146 std::size_t size() const
    \n-
    147 { return impl_->size(); }
    \n-
    \n-
    148
    \n-
    155 template<int I>
    \n-
    \n-
    156 std::size_t parents(Index intersection) const
    \n-
    157 {
    \n-
    158 static_assert(I == 0 or I == 1, "I must be 0 or 1");
    \n-
    159 // TODO [C++17]: use `if constexpr` instead of indirection
    \n-
    160 return Impl::IntersectionListLocal<Provider, I>::parents(*impl_, intersection);
    \n-
    161 }
    \n+
    127 std::vector<std::vector<unsigned int> > grid1ElementCorners_;
    \n+
    128 std::vector<std::vector<unsigned int> > grid2ElementCorners_;
    \n+
    129
    \n+
    130 std::vector<std::vector<int> > elementNeighbors1_;
    \n+
    131 std::vector<std::vector<int> > elementNeighbors2_;
    \n+
    132
    \n+
    133public:
    \n+
    134
    \n+
    135 /* C O N C E P T I M P L E M E N T I N G I N T E R F A C E */
    \n+
    136
    \n+
    \n+
    140 void build(const std::vector<Dune::FieldVector<T,dimworld> >& grid1_Coords,
    \n+
    141 const std::vector<unsigned int>& grid1_elements,
    \n+
    142 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    143 const std::vector<Dune::FieldVector<T,dimworld> >& grid2_coords,
    \n+
    144 const std::vector<unsigned int>& grid2_elements,
    \n+
    145 const std::vector<Dune::GeometryType>& grid2_element_types) override;
    \n+
    146
    \n+
    147
    \n+
    148 /* P R O B I N G T H E M E R G E D G R I D */
    \n+
    149
    \n+
    \n+
    150 void clear() override
    \n+
    151 {
    \n+
    152 // Delete old internal data, from a possible previous run
    \n+\n+\n+\n+
    156
    \n+
    157 valid = false;
    \n+
    158 }
    \n+
    \n+
    159
    \n+
    \n+
    160 std::shared_ptr<IntersectionList> intersectionList() const final
    \n+
    161 {
    \n+
    162 assert(valid);
    \n+
    163 return intersectionList_;
    \n+
    164 }
    \n+
    \n+
    165
    \n+
    \n+
    166 void enableFallback(bool fallback)
    \n+
    167 {
    \n+
    168 m_enableFallback = fallback;
    \n+
    169 }
    \n
    \n-
    162
    \n-
    170 template<int I>
    \n+
    170
    \n
    \n-
    171 Index parent(Index intersection, unsigned index = 0) const
    \n-
    172 {
    \n-
    173 static_assert(I == 0 or I == 1, "I must be 0 or 1");
    \n-
    174 // TODO [C++17]: use `if constexpr` instead of indirection
    \n-
    175 return Impl::IntersectionListLocal<Provider, I>::parent(*impl_, intersection, index);
    \n-
    176 }
    \n-
    \n-
    177
    \n-
    186 template<int I>
    \n-
    \n-
    187 auto corner(Index intersection, unsigned corner, unsigned index = 0) const
    \n-
    188 {
    \n-
    189 static_assert(I == 0 or I == 1, "I must be 0 or 1");
    \n-
    190 // TODO [C++17]: use `if constexpr` instead of indirection
    \n-
    191 return Impl::IntersectionListLocal<Provider, I>::corner(*impl_, intersection, corner, index);
    \n-
    192 }
    \n-
    \n-
    193
    \n-
    194private:
    \n-
    195 std::shared_ptr<Provider> impl_;
    \n-
    196};
    \n-
    \n-
    197
    \n-
    204template<int dim0, int dim1>
    \n-
    \n-\n-
    206 : public IntersectionListProvider< FieldVector<double, dim0>, FieldVector<double, dim1> >
    \n-
    207{
    \n-
    208 using Base = IntersectionListProvider< FieldVector<double, dim0>, FieldVector<double, dim1> >;
    \n-
    209
    \n-
    210public:
    \n-
    211 using Index = typename Base::Index;
    \n-
    212 using Local0 = FieldVector<double, dim0>;
    \n-
    213 using Local1 = FieldVector<double, dim1>;
    \n-
    214
    \n-
    215 template<int I>
    \n-
    216 using Local = std::conditional_t< I == 0, Local0, Local1 >;
    \n-
    217
    \n-
    \n-\n-
    222 {
    \n-
    223 private:
    \n-
    224 static constexpr int intersectionDim = dim0 < dim1 ? dim0 : dim1;
    \n-
    225 static constexpr int nVertices = intersectionDim + 1;
    \n-
    226
    \n-
    227 public:
    \n-\n-\n-
    233
    \n-
    237 template<int I>
    \n-
    238 using Corners = std::array<Local<I>, nVertices>;
    \n+
    171 void enableBruteForce(bool bruteForce)
    \n+
    172 {
    \n+
    173 m_enableBruteForce = bruteForce;
    \n+
    174 }
    \n+
    \n+
    175
    \n+
    176private:
    \n+
    180 bool m_enableFallback = false;
    \n+
    181
    \n+
    185 bool m_enableBruteForce = false;
    \n+
    186
    \n+
    187 auto& intersections()
    \n+
    188 { return intersectionListProvider_->intersections(); }
    \n+
    189
    \n+
    191 template<typename V>
    \n+
    192 static void purge(V & v)
    \n+
    193 {
    \n+
    194 v.clear();
    \n+
    195 V v2(v);
    \n+
    196 v.swap(v2);
    \n+
    197 }
    \n+
    198
    \n+
    203 void generateSeed(std::vector<int>& seeds,
    \n+
    204 Dune::BitSetVector<1>& isHandled2,
    \n+
    205 std::stack<unsigned>& candidates2,
    \n+
    206 const std::vector<Dune::FieldVector<T, dimworld> >& grid1Coords,
    \n+
    207 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    208 const std::vector<Dune::FieldVector<T, dimworld> >& grid2Coords,
    \n+
    209 const std::vector<Dune::GeometryType>& grid2_element_types);
    \n+
    210
    \n+
    214 int insertIntersections(unsigned int candidate1, unsigned int candidate2,std::vector<SimplicialIntersection>& intersections);
    \n+
    215
    \n+
    219 int bruteForceSearch(int candidate1,
    \n+
    220 const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n+
    221 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    222 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n+
    223 const std::vector<Dune::GeometryType>& grid2_element_types);
    \n+
    224
    \n+
    228 std::pair<bool, unsigned int>
    \n+
    229 intersectionIndex(unsigned int grid1Index, unsigned int grid2Index,
    \n+
    230 SimplicialIntersection& intersection);
    \n+
    231
    \n+
    235 template <int gridDim>
    \n+
    236 void computeNeighborsPerElement(const std::vector<Dune::GeometryType>& gridElementTypes,
    \n+
    237 const std::vector<std::vector<unsigned int> >& gridElementCorners,
    \n+
    238 std::vector<std::vector<int> >& elementNeighbors);
    \n
    239
    \n-
    243 std::vector< Corners<0> > corners0 = std::vector< Corners<0> >(1);
    \n-
    244
    \n-
    248 std::vector< Index > parents0 = std::vector< Index >(1);
    \n-
    249
    \n-
    253 std::vector< Corners<1> > corners1 = std::vector< Corners<1> >(1);
    \n-
    254
    \n-
    258 std::vector< Index > parents1 = std::vector< Index >(1);
    \n-
    259 };
    \n-
    \n-
    260
    \n-\n-
    \n-
    262 SimplicialIntersectionListProvider(std::vector<SimplicialIntersection>&& intersections)
    \n-
    263 : intersections_(std::move(intersections))
    \n-
    264 {}
    \n-
    \n-
    265
    \n-
    \n-\n-
    267 { return intersections_; }
    \n-
    \n-
    268
    \n-
    \n-
    269 std::size_t size() const override
    \n-
    270 { return intersections_.size(); }
    \n-
    \n-
    271
    \n-
    \n-
    272 std::size_t parents0(Index intersection) const override
    \n-
    273 { return intersections_[intersection].parents0.size(); }
    \n-
    \n-
    274
    \n-
    \n-
    275 std::size_t parents1(Index intersection) const override
    \n-
    276 { return intersections_[intersection].parents1.size(); }
    \n-
    \n+
    240 void buildAdvancingFront(
    \n+
    241 const std::vector<Dune::FieldVector<T,dimworld> >& grid1_Coords,
    \n+
    242 const std::vector<unsigned int>& grid1_elements,
    \n+
    243 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    244 const std::vector<Dune::FieldVector<T,dimworld> >& grid2_coords,
    \n+
    245 const std::vector<unsigned int>& grid2_elements,
    \n+
    246 const std::vector<Dune::GeometryType>& grid2_element_types
    \n+
    247 );
    \n+
    248
    \n+
    249 void buildBruteForce(
    \n+
    250 const std::vector<Dune::FieldVector<T,dimworld> >& grid1_Coords,
    \n+
    251 const std::vector<unsigned int>& grid1_elements,
    \n+
    252 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    253 const std::vector<Dune::FieldVector<T,dimworld> >& grid2_coords,
    \n+
    254 const std::vector<unsigned int>& grid2_elements,
    \n+
    255 const std::vector<Dune::GeometryType>& grid2_element_types
    \n+
    256 );
    \n+
    257};
    \n+
    258
    \n+
    259
    \n+
    260/* IMPLEMENTATION */
    \n+
    261
    \n+
    262template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n+
    \n+
    263bool StandardMerge<T,grid1Dim,grid2Dim,dimworld>::computeIntersection(unsigned int candidate0, unsigned int candidate1,
    \n+
    264 const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n+
    265 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    266 std::bitset<(1<<grid1Dim)>& neighborIntersects1,
    \n+
    267 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n+
    268 const std::vector<Dune::GeometryType>& grid2_element_types,
    \n+
    269 std::bitset<(1<<grid2Dim)>& neighborIntersects2,
    \n+
    270 bool insert)
    \n+
    271{
    \n+
    272 // Select vertices of the grid1 element
    \n+
    273 int grid1NumVertices = grid1ElementCorners_[candidate0].size();
    \n+
    274 std::vector<Dune::FieldVector<T,dimworld> > grid1ElementCorners(grid1NumVertices);
    \n+
    275 for (int i=0; i<grid1NumVertices; i++)
    \n+
    276 grid1ElementCorners[i] = grid1Coords[grid1ElementCorners_[candidate0][i]];
    \n
    277
    \n-
    \n-
    278 Index parent0(Index intersection, unsigned index) const override
    \n-
    279 { return intersections_[intersection].parents0[index]; }
    \n-
    \n-
    280
    \n-
    \n-
    281 Index parent1(Index intersection, unsigned index) const override
    \n-
    282 { return intersections_[intersection].parents1[index]; }
    \n-
    \n+
    278 // Select vertices of the grid2 element
    \n+
    279 int grid2NumVertices = grid2ElementCorners_[candidate1].size();
    \n+
    280 std::vector<Dune::FieldVector<T,dimworld> > grid2ElementCorners(grid2NumVertices);
    \n+
    281 for (int i=0; i<grid2NumVertices; i++)
    \n+
    282 grid2ElementCorners[i] = grid2Coords[grid2ElementCorners_[candidate1][i]];
    \n
    283
    \n-
    \n-
    284 Local0 corner0(Index intersection, unsigned corner, unsigned index) const override
    \n-
    285 { return intersections_[intersection].corners0[index][corner]; }
    \n-
    \n-
    286
    \n-
    \n-
    287 Local1 corner1(Index intersection, unsigned corner, unsigned index) const override
    \n-
    288 { return intersections_[intersection].corners1[index][corner]; }
    \n-
    \n+
    284 // ///////////////////////////////////////////////////////
    \n+
    285 // Compute the intersection between the two elements
    \n+
    286 // ///////////////////////////////////////////////////////
    \n+
    287
    \n+
    288 std::vector<SimplicialIntersection> intersections(0);
    \n
    289
    \n-
    \n-
    290 void clear()
    \n-
    291 {
    \n-
    292 intersections_.clear();
    \n-
    293 }
    \n-
    \n-
    294
    \n-
    295private:
    \n-
    296 std::vector<SimplicialIntersection> intersections_;
    \n-
    297};
    \n-
    \n-
    298
    \n-
    299} /* namespace GridGlue */
    \n-
    300} /* namespace Dune */
    \n-
    301
    \n-
    302#endif
    \n+
    290 // compute the intersections
    \n+
    291 computeIntersections(grid1_element_types[candidate0], grid1ElementCorners,
    \n+
    292 neighborIntersects1, candidate0,
    \n+
    293 grid2_element_types[candidate1], grid2ElementCorners,
    \n+
    294 neighborIntersects2, candidate1,
    \n+\n+
    296
    \n+
    297 // insert intersections if needed
    \n+
    298 if(insert && !intersections.empty())
    \n+
    299 insertIntersections(candidate0,candidate1,intersections);
    \n+
    300
    \n+
    301 // Have we found an intersection?
    \n+
    302 return !intersections.empty() || neighborIntersects1.any() || neighborIntersects2.any();
    \n+
    303
    \n+
    304}
    \n+
    \n+
    305
    \n+
    306template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n+\n+
    308 const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n+
    309 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    310 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n+
    311 const std::vector<Dune::GeometryType>& grid2_element_types)
    \n+
    312{
    \n+
    313 std::bitset<(1<<grid1Dim)> neighborIntersects1;
    \n+
    314 std::bitset<(1<<grid2Dim)> neighborIntersects2;
    \n+
    315 for (std::size_t i=0; i<grid1_element_types.size(); i++) {
    \n+
    316
    \n+
    317 bool intersectionFound = computeIntersection(i, candidate1,
    \n+
    318 grid1Coords, grid1_element_types, neighborIntersects1,
    \n+
    319 grid2Coords, grid2_element_types, neighborIntersects2,
    \n+
    320 false);
    \n+
    321
    \n+
    322 // if there is an intersection, i is our new seed candidate on the grid1 side
    \n+
    323 if (intersectionFound)
    \n+
    324 return i;
    \n+
    325
    \n+
    326 }
    \n+
    327
    \n+
    328 return -1;
    \n+
    329}
    \n+
    330
    \n+
    331
    \n+
    332template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n+
    333template<int gridDim>
    \n+
    334void StandardMerge<T,grid1Dim,grid2Dim,dimworld>::
    \n+
    335computeNeighborsPerElement(const std::vector<Dune::GeometryType>& gridElementTypes,
    \n+
    336 const std::vector<std::vector<unsigned int> >& gridElementCorners,
    \n+
    337 std::vector<std::vector<int> >& elementNeighbors)
    \n+
    338{
    \n+
    339 typedef std::vector<unsigned int> FaceType;
    \n+
    340 typedef std::map<FaceType, std::pair<unsigned int, unsigned int> > FaceSetType;
    \n+
    341
    \n+
    343 // First: grid 1
    \n+
    345 FaceSetType faces;
    \n+
    346 elementNeighbors.resize(gridElementTypes.size());
    \n+
    347
    \n+
    348 for (size_t i=0; i<gridElementTypes.size(); i++)
    \n+
    349 elementNeighbors[i].resize(Dune::ReferenceElements<T,gridDim>::general(gridElementTypes[i]).size(1), -1);
    \n+
    350
    \n+
    351 for (size_t i=0; i<gridElementTypes.size(); i++) { //iterate over all elements
    \n+
    352 const auto& refElement = Dune::ReferenceElements<T,gridDim>::general(gridElementTypes[i]);
    \n+
    353
    \n+
    354 for (size_t j=0; j<(size_t)refElement.size(1); j++) { // iterate over all faces of the element
    \n+
    355
    \n+
    356 FaceType face;
    \n+
    357 // extract element face
    \n+
    358 for (size_t k=0; k<(size_t)refElement.size(j,1,gridDim); k++)
    \n+
    359 face.push_back(gridElementCorners[i][refElement.subEntity(j,1,k,gridDim)]);
    \n+
    360
    \n+
    361 // sort the face vertices to get rid of twists and other permutations
    \n+
    362 std::sort(face.begin(), face.end());
    \n+
    363
    \n+
    364 typename FaceSetType::iterator faceHandle = faces.find(face);
    \n+
    365
    \n+
    366 if (faceHandle == faces.end()) {
    \n+
    367
    \n+
    368 // face has not been visited before
    \n+
    369 faces.insert(std::make_pair(face, std::make_pair(i,j)));
    \n+
    370
    \n+
    371 } else {
    \n+
    372
    \n+
    373 // face has been visited before: store the mutual neighbor information
    \n+
    374 elementNeighbors[i][j] = faceHandle->second.first;
    \n+
    375 elementNeighbors[faceHandle->second.first][faceHandle->second.second] = i;
    \n+
    376
    \n+
    377 faces.erase(faceHandle);
    \n+
    378
    \n+
    379 }
    \n+
    380
    \n+
    381 }
    \n+
    382
    \n+
    383 }
    \n+
    384}
    \n+
    385
    \n+
    386// /////////////////////////////////////////////////////////////////////
    \n+
    387// Compute the intersection of all pairs of elements
    \n+
    388// Linear algorithm by Gander and Japhet, Proc. of DD18
    \n+
    389// /////////////////////////////////////////////////////////////////////
    \n+
    390
    \n+
    391template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n+
    \n+
    392void StandardMerge<T,grid1Dim,grid2Dim,dimworld>::build(const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n+
    393 const std::vector<unsigned int>& grid1_elements,
    \n+
    394 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    395 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n+
    396 const std::vector<unsigned int>& grid2_elements,
    \n+
    397 const std::vector<Dune::GeometryType>& grid2_element_types
    \n+
    398 )
    \n+
    399{
    \n+
    400
    \n+
    401 std::cout << "StandardMerge building merged grid..." << std::endl;
    \n+
    402 Dune::Timer watch;
    \n+
    403
    \n+
    404 clear();
    \n+
    405 // clear global intersection list
    \n+
    406 intersectionListProvider_->clear();
    \n+
    407 this->counter = 0;
    \n+
    408
    \n+
    409 // /////////////////////////////////////////////////////////////////////
    \n+
    410 // Copy element corners into a data structure with block-structure.
    \n+
    411 // This is not as efficient but a lot easier to use.
    \n+
    412 // We may think about efficiency later.
    \n+
    413 // /////////////////////////////////////////////////////////////////////
    \n+
    414
    \n+
    415 // first the grid1 side
    \n+
    416 grid1ElementCorners_.resize(grid1_element_types.size());
    \n+
    417
    \n+
    418 unsigned int grid1CornerCounter = 0;
    \n+
    419
    \n+
    420 for (std::size_t i=0; i<grid1_element_types.size(); i++) {
    \n+
    421
    \n+
    422 // Select vertices of the grid1 element
    \n+
    423 int numVertices = Dune::ReferenceElements<T,grid1Dim>::general(grid1_element_types[i]).size(grid1Dim);
    \n+
    424 grid1ElementCorners_[i].resize(numVertices);
    \n+
    425 for (int j=0; j<numVertices; j++)
    \n+
    426 grid1ElementCorners_[i][j] = grid1_elements[grid1CornerCounter++];
    \n+
    427
    \n+
    428 }
    \n+
    429
    \n+
    430 // then the grid2 side
    \n+
    431 grid2ElementCorners_.resize(grid2_element_types.size());
    \n+
    432
    \n+
    433 unsigned int grid2CornerCounter = 0;
    \n+
    434
    \n+
    435 for (std::size_t i=0; i<grid2_element_types.size(); i++) {
    \n+
    436
    \n+
    437 // Select vertices of the grid2 element
    \n+
    438 int numVertices = Dune::ReferenceElements<T,grid2Dim>::general(grid2_element_types[i]).size(grid2Dim);
    \n+
    439 grid2ElementCorners_[i].resize(numVertices);
    \n+
    440 for (int j=0; j<numVertices; j++)
    \n+
    441 grid2ElementCorners_[i][j] = grid2_elements[grid2CornerCounter++];
    \n+
    442
    \n+
    443 }
    \n+
    444
    \n+
    446 // Compute the face neighbors for each element
    \n+
    448
    \n+
    449 computeNeighborsPerElement<grid1Dim>(grid1_element_types, grid1ElementCorners_, elementNeighbors1_);
    \n+
    450 computeNeighborsPerElement<grid2Dim>(grid2_element_types, grid2ElementCorners_, elementNeighbors2_);
    \n+
    451
    \n+
    452 std::cout << "setup took " << watch.elapsed() << " seconds." << std::endl;
    \n+
    453
    \n+
    454 if (m_enableBruteForce)
    \n+
    455 buildBruteForce(grid1Coords, grid1_elements, grid1_element_types, grid2Coords, grid2_elements, grid2_element_types);
    \n+
    456 else
    \n+
    457 buildAdvancingFront(grid1Coords, grid1_elements, grid1_element_types, grid2Coords, grid2_elements, grid2_element_types);
    \n+
    458
    \n+
    459 valid = true;
    \n+
    460 std::cout << "intersection construction took " << watch.elapsed() << " seconds." << std::endl;
    \n+
    461}
    \n+
    \n+
    \n+
    462
    \n+
    463template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n+\n+
    465 const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n+
    466 const std::vector<unsigned int>& grid1_elements,
    \n+
    467 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    468 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n+
    469 const std::vector<unsigned int>& grid2_elements,
    \n+
    470 const std::vector<Dune::GeometryType>& grid2_element_types
    \n+
    471 )
    \n+
    472{
    \n+
    474 // Data structures for the advancing-front algorithm
    \n+
    476
    \n+
    477 std::stack<unsigned int> candidates1;
    \n+
    478 std::stack<unsigned int> candidates2;
    \n+
    479
    \n+
    480 std::vector<int> seeds(grid2_element_types.size(), -1);
    \n+
    481
    \n+
    482 // /////////////////////////////////////////////////////////////////////
    \n+
    483 // Do a brute-force search to find one pair of intersecting elements
    \n+
    484 // to start the advancing-front type algorithm with.
    \n+
    485 // /////////////////////////////////////////////////////////////////////
    \n+
    486
    \n+
    487 // Set flag if element has been handled
    \n+
    488 Dune::BitSetVector<1> isHandled2(grid2_element_types.size());
    \n+
    489
    \n+
    490 // Set flag if the element has been entered in the queue
    \n+
    491 Dune::BitSetVector<1> isCandidate2(grid2_element_types.size());
    \n+
    492
    \n+
    493 generateSeed(seeds, isHandled2, candidates2, grid1Coords, grid1_element_types, grid2Coords, grid2_element_types);
    \n+
    494
    \n+
    495 // /////////////////////////////////////////////////////////////////////
    \n+
    496 // Main loop
    \n+
    497 // /////////////////////////////////////////////////////////////////////
    \n+
    498
    \n+
    499 std::set<unsigned int> isHandled1;
    \n+
    500
    \n+
    501 std::set<unsigned int> isCandidate1;
    \n+
    502
    \n+
    503 while (!candidates2.empty()) {
    \n+
    504
    \n+
    505 // Get the next element on the grid2 side
    \n+
    506 unsigned int currentCandidate2 = candidates2.top();
    \n+
    507 int seed = seeds[currentCandidate2];
    \n+
    508 assert(seed >= 0);
    \n+
    509
    \n+
    510 candidates2.pop();
    \n+
    511 isHandled2[currentCandidate2] = true;
    \n+
    512
    \n+
    513 // Start advancing front algorithm on the grid1 side from the 'seed' element that
    \n+
    514 // we stored along with the current grid2 element
    \n+
    515 candidates1.push(seed);
    \n+
    516
    \n+
    517 isHandled1.clear();
    \n+
    518 isCandidate1.clear();
    \n+
    519
    \n+
    520 while (!candidates1.empty()) {
    \n+
    521
    \n+
    522 unsigned int currentCandidate1 = candidates1.top();
    \n+
    523 candidates1.pop();
    \n+
    524 isHandled1.insert(currentCandidate1);
    \n+
    525
    \n+
    526 // Test whether there is an intersection between currentCandidate0 and currentCandidate1
    \n+
    527 std::bitset<(1<<grid1Dim)> neighborIntersects1;
    \n+
    528 std::bitset<(1<<grid2Dim)> neighborIntersects2;
    \n+
    529 bool intersectionFound = computeIntersection(currentCandidate1, currentCandidate2,
    \n+
    530 grid1Coords,grid1_element_types, neighborIntersects1,
    \n+
    531 grid2Coords,grid2_element_types, neighborIntersects2);
    \n+
    532
    \n+
    533 for (size_t i=0; i<neighborIntersects2.size(); i++)
    \n+
    534 if (neighborIntersects2[i] && elementNeighbors2_[currentCandidate2][i] != -1)
    \n+
    535 seeds[elementNeighbors2_[currentCandidate2][i]] = currentCandidate1;
    \n+
    536
    \n+
    537 // add neighbors of candidate0 to the list of elements to be checked
    \n+
    538 if (intersectionFound) {
    \n+
    539
    \n+
    540 for (size_t i=0; i<elementNeighbors1_[currentCandidate1].size(); i++) {
    \n+
    541
    \n+
    542 int neighbor = elementNeighbors1_[currentCandidate1][i];
    \n+
    543
    \n+
    544 if (neighbor == -1) // do nothing at the grid boundary
    \n+
    545 continue;
    \n+
    546
    \n+
    547 if (isHandled1.find(neighbor) == isHandled1.end()
    \n+
    548 && isCandidate1.find(neighbor) == isCandidate1.end()) {
    \n+
    549 candidates1.push(neighbor);
    \n+
    550 isCandidate1.insert(neighbor);
    \n+
    551 }
    \n+
    552
    \n+
    553 }
    \n+
    554
    \n+
    555 }
    \n+
    556
    \n+
    557 }
    \n+
    558
    \n+
    559 // We have now found all intersections of elements in the grid1 side with currentCandidate2
    \n+
    560 // Now we add all neighbors of currentCandidate2 that have not been treated yet as new
    \n+
    561 // candidates.
    \n+
    562
    \n+
    563 // Do we have an unhandled neighbor with a seed?
    \n+
    564 bool seedFound = !candidates2.empty();
    \n+
    565 for (size_t i=0; i<elementNeighbors2_[currentCandidate2].size(); i++) {
    \n+
    566
    \n+
    567 int neighbor = elementNeighbors2_[currentCandidate2][i];
    \n+
    568
    \n+
    569 if (neighbor == -1) // do nothing at the grid boundary
    \n+
    570 continue;
    \n+
    571
    \n+
    572 // Add all unhandled intersecting neighbors to the queue
    \n+
    573 if (!isHandled2[neighbor][0] && !isCandidate2[neighbor][0] && seeds[neighbor]>-1) {
    \n+
    574
    \n+
    575 isCandidate2[neighbor][0] = true;
    \n+
    576 candidates2.push(neighbor);
    \n+
    577 seedFound = true;
    \n+
    578 }
    \n+
    579 }
    \n+
    580
    \n+
    581 if (seedFound || !m_enableFallback)
    \n+
    582 continue;
    \n+
    583
    \n+
    584 // There is no neighbor with a seed, so we need to be a bit more aggressive...
    \n+
    585 // get all neighbors of currentCandidate2, but not currentCandidate2 itself
    \n+
    586 for (size_t i=0; i<elementNeighbors2_[currentCandidate2].size(); i++) {
    \n+
    587
    \n+
    588 int neighbor = elementNeighbors2_[currentCandidate2][i];
    \n+
    589
    \n+
    590 if (neighbor == -1) // do nothing at the grid boundary
    \n+
    591 continue;
    \n+
    592
    \n+
    593 if (!isHandled2[neighbor][0] && !isCandidate2[neighbor][0]) {
    \n+
    594
    \n+
    595 // Get a seed element for the new grid2 element
    \n+
    596 // Look for an element on the grid1 side that intersects the new grid2 element.
    \n+
    597 int seed = -1;
    \n+
    598
    \n+
    599 // Look among the ones that have been tested during the last iteration.
    \n+
    600 for (typename std::set<unsigned int>::iterator seedIt = isHandled1.begin();
    \n+
    601 seedIt != isHandled1.end(); ++seedIt) {
    \n+
    602
    \n+
    603 std::bitset<(1<<grid1Dim)> neighborIntersects1;
    \n+
    604 std::bitset<(1<<grid2Dim)> neighborIntersects2;
    \n+
    605 bool intersectionFound = computeIntersection(*seedIt, neighbor,
    \n+
    606 grid1Coords, grid1_element_types, neighborIntersects1,
    \n+
    607 grid2Coords, grid2_element_types, neighborIntersects2,
    \n+
    608 false);
    \n+
    609
    \n+
    610 // if the intersection is nonempty, *seedIt is our new seed candidate on the grid1 side
    \n+
    611 if (intersectionFound) {
    \n+
    612 seed = *seedIt;
    \n+
    613 Dune::dwarn << "Algorithm entered first fallback method and found a new seed in the build algorithm." <<
    \n+
    614 "Probably, the neighborIntersects bitsets computed in computeIntersection specialization is wrong." << std::endl;
    \n+
    615 break;
    \n+
    616 }
    \n+
    617
    \n+
    618 }
    \n+
    619
    \n+
    620 if (seed < 0) {
    \n+
    621 // The fast method didn't find a grid1 element that intersects with
    \n+
    622 // the new grid2 candidate. We have to do a brute-force search.
    \n+
    623 seed = bruteForceSearch(neighbor,
    \n+
    624 grid1Coords,grid1_element_types,
    \n+
    625 grid2Coords,grid2_element_types);
    \n+
    626 Dune::dwarn << "Algorithm entered second fallback method. This probably should not happen." << std::endl;
    \n+
    627
    \n+
    628 }
    \n+
    629
    \n+
    630 // We have tried all we could: the candidate is 'handled' now
    \n+
    631 isCandidate2[neighbor] = true;
    \n+
    632
    \n+
    633 // still no seed? Then the new grid2 candidate isn't overlapped by anything
    \n+
    634 if (seed < 0)
    \n+
    635 continue;
    \n+
    636
    \n+
    637 // we have a seed now
    \n+
    638 candidates2.push(neighbor);
    \n+
    639 seeds[neighbor] = seed;
    \n+
    640 seedFound = true;
    \n+
    641
    \n+
    642 }
    \n+
    643
    \n+
    644 }
    \n+
    645
    \n+
    646 /* Do a brute-force search if there is still no seed:
    \n+
    647 * There might still be a disconnected region out there.
    \n+
    648 */
    \n+
    649 if (!seedFound && candidates2.empty()) {
    \n+
    650 generateSeed(seeds, isHandled2, candidates2, grid1Coords, grid1_element_types, grid2Coords, grid2_element_types);
    \n+
    651 }
    \n+
    652 }
    \n+
    653}
    \n+
    654
    \n+
    655template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n+
    656void StandardMerge<T,grid1Dim,grid2Dim,dimworld>::buildBruteForce(
    \n+
    657 const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n+
    658 const std::vector<unsigned int>& grid1_elements,
    \n+
    659 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    660 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n+
    661 const std::vector<unsigned int>& grid2_elements,
    \n+
    662 const std::vector<Dune::GeometryType>& grid2_element_types
    \n+
    663 )
    \n+
    664{
    \n+
    665 std::bitset<(1<<grid1Dim)> neighborIntersects1;
    \n+
    666 std::bitset<(1<<grid2Dim)> neighborIntersects2;
    \n+
    667
    \n+
    668 for (unsigned i = 0; i < grid1_element_types.size(); ++i) {
    \n+
    669 for (unsigned j = 0; j < grid2_element_types.size(); ++j) {
    \n+
    670 (void) computeIntersection(i, j,
    \n+
    671 grid1Coords, grid1_element_types, neighborIntersects1,
    \n+
    672 grid2Coords, grid2_element_types, neighborIntersects2);
    \n+
    673 }
    \n+
    674 }
    \n+
    675}
    \n+
    676
    \n+
    677template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n+
    678void StandardMerge<T,grid1Dim,grid2Dim,dimworld>::generateSeed(std::vector<int>& seeds, Dune::BitSetVector<1>& isHandled2, std::stack<unsigned>& candidates2, const std::vector<Dune::FieldVector<T, dimworld> >& grid1Coords, const std::vector<Dune::GeometryType>& grid1_element_types, const std::vector<Dune::FieldVector<T, dimworld> >& grid2Coords, const std::vector<Dune::GeometryType>& grid2_element_types)
    \n+
    679{
    \n+
    680 for (std::size_t j=0; j<grid2_element_types.size(); j++) {
    \n+
    681
    \n+
    682 if (seeds[j] > 0 || isHandled2[j][0])
    \n+
    683 continue;
    \n+
    684
    \n+
    685 int seed = bruteForceSearch(j,grid1Coords,grid1_element_types,grid2Coords,grid2_element_types);
    \n+
    686
    \n+
    687 if (seed >= 0) {
    \n+
    688 candidates2.push(j); // the candidate and a seed for the candidate
    \n+
    689 seeds[j] = seed;
    \n+
    690 break;
    \n+
    691 } else // If the brute force search did not find any intersection we can skip this element
    \n+
    692 isHandled2[j] = true;
    \n+
    693 }
    \n+
    694}
    \n+
    695
    \n+
    696template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n+
    697int StandardMerge<T,grid1Dim,grid2Dim,dimworld>::insertIntersections(unsigned int candidate1, unsigned int candidate2,
    \n+
    698 std::vector<SimplicialIntersection>& intersections)
    \n+
    699{
    \n+
    700 typedef typename std::vector<SimplicialIntersection>::size_type size_t;
    \n+
    701 int count = 0;
    \n+
    702
    \n+
    703 for (size_t i = 0; i < intersections.size(); ++i) {
    \n+
    704 // get the intersection index of the current intersection from intersections in this->intersections
    \n+
    705 bool found;
    \n+
    706 unsigned int index;
    \n+
    707 std::tie(found, index) = intersectionIndex(candidate1,candidate2,intersections[i]);
    \n+
    708
    \n+
    709 if (found && index >= this->intersections().size()) { //the intersection is not yet contained in this->intersections
    \n+
    710 this->intersections().push_back(intersections[i]); // insert
    \n+
    711
    \n+
    712 ++count;
    \n+
    713 } else if (found) {
    \n+
    714 auto& intersection = this->intersections()[index];
    \n+
    715
    \n+
    716 // insert each grid1 element and local representation of intersections[i] with parent candidate1
    \n+
    717 for (size_t j = 0; j < intersections[i].parents0.size(); ++j) {
    \n+
    718 intersection.parents0.push_back(candidate1);
    \n+
    719 intersection.corners0.push_back(intersections[i].corners0[j]);
    \n+
    720 }
    \n+
    721
    \n+
    722 // insert each grid2 element and local representation of intersections[i] with parent candidate2
    \n+
    723 for (size_t j = 0; j < intersections[i].parents1.size(); ++j) {
    \n+
    724 intersection.parents1.push_back(candidate2);
    \n+
    725 intersection.corners1.push_back(intersections[i].corners1[j]);
    \n+
    726 }
    \n+
    727
    \n+
    728 ++count;
    \n+
    729 } else {
    \n+
    730 Dune::dwarn << "Computed the same intersection twice!" << std::endl;
    \n+
    731 }
    \n+
    732 }
    \n+
    733 return count;
    \n+
    734}
    \n+
    735
    \n+
    736template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n+
    737std::pair<bool, unsigned int>
    \n+
    738StandardMerge<T,grid1Dim,grid2Dim,dimworld>::intersectionIndex(unsigned int grid1Index, unsigned int grid2Index,
    \n+
    739 SimplicialIntersection& intersection) {
    \n+
    740
    \n+
    741
    \n+
    742 // return index in intersections_ if at least one local representation of a Simplicial Intersection (SI)
    \n+
    743 // of intersections_ is equal to the local representation of one element in intersections
    \n+
    744
    \n+
    745 std::size_t n_intersections = this->intersections().size();
    \n+
    746 if (grid1Dim == grid2Dim)
    \n+
    747 return {true, n_intersections};
    \n+
    748
    \n+
    749 T eps = 1e-10;
    \n+
    750
    \n+
    751 for (std::size_t i = 0; i < n_intersections; ++i) {
    \n+
    752
    \n+
    753 // compare the local representation of the subelements of the SI
    \n+
    754 for (std::size_t ei = 0; ei < this->intersections()[i].parents0.size(); ++ei) // merger subelement
    \n+
    755 {
    \n+
    756 if (this->intersections()[i].parents0[ei] == grid1Index)
    \n+
    757 {
    \n+
    758 for (std::size_t er = 0; er < intersection.parents0.size(); ++er) // list subelement
    \n+
    759 {
    \n+
    760 bool found_all = true;
    \n+
    761 // compare the local coordinate representations
    \n+
    762 for (std::size_t ci = 0; ci < this->intersections()[i].corners0[ei].size(); ++ci)
    \n+
    763 {
    \n+
    764 Dune::FieldVector<T,grid1Dim> ni = this->intersections()[i].corners0[ei][ci];
    \n+
    765 bool found_ni = false;
    \n+
    766 for (std::size_t cr = 0; cr < intersection.corners0[er].size(); ++cr)
    \n+
    767 {
    \n+
    768 Dune::FieldVector<T,grid1Dim> nr = intersection.corners0[er][cr];
    \n+
    769
    \n+
    770 found_ni = found_ni || ((ni-nr).infinity_norm() < eps);
    \n+
    771 if (found_ni)
    \n+
    772 break;
    \n+
    773 }
    \n+
    774 found_all = found_all && found_ni;
    \n+
    775
    \n+
    776 if (!found_ni)
    \n+
    777 break;
    \n+
    778 }
    \n+
    779
    \n+
    780 if (found_all && (this->intersections()[i].parents1[ei] != grid2Index))
    \n+
    781 return {true, i};
    \n+
    782 else if (found_all)
    \n+
    783 return {false, 0};
    \n+
    784 }
    \n+
    785 }
    \n+
    786 }
    \n+
    787
    \n+
    788 // compare the local representation of the subelements of the SI
    \n+
    789 for (std::size_t ei = 0; ei < this->intersections()[i].parents1.size(); ++ei) // merger subelement
    \n+
    790 {
    \n+
    791 if (this->intersections()[i].parents1[ei] == grid2Index)
    \n+
    792 {
    \n+
    793 for (std::size_t er = 0; er < intersection.parents1.size(); ++er) // list subelement
    \n+
    794 {
    \n+
    795 bool found_all = true;
    \n+
    796 // compare the local coordinate representations
    \n+
    797 for (std::size_t ci = 0; ci < this->intersections()[i].corners1[ei].size(); ++ci)
    \n+
    798 {
    \n+
    799 Dune::FieldVector<T,grid2Dim> ni = this->intersections()[i].corners1[ei][ci];
    \n+
    800 bool found_ni = false;
    \n+
    801 for (std::size_t cr = 0; cr < intersection.corners1[er].size(); ++cr)
    \n+
    802 {
    \n+
    803 Dune::FieldVector<T,grid2Dim> nr = intersection.corners1[er][cr];
    \n+
    804 found_ni = found_ni || ((ni-nr).infinity_norm() < eps);
    \n+
    805
    \n+
    806 if (found_ni)
    \n+
    807 break;
    \n+
    808 }
    \n+
    809 found_all = found_all && found_ni;
    \n+
    810
    \n+
    811 if (!found_ni)
    \n+
    812 break;
    \n+
    813 }
    \n+
    814
    \n+
    815 if (found_all && (this->intersections()[i].parents0[ei] != grid1Index))
    \n+
    816 return {true, i};
    \n+
    817 else if (found_all)
    \n+
    818 return {false, 0};
    \n+
    819 }
    \n+
    820 }
    \n+
    821 }
    \n+
    822 }
    \n+
    823
    \n+
    824 return {true, n_intersections};
    \n+
    825}
    \n+
    826
    \n+
    827#define DECL extern
    \n+
    \n+
    828#define STANDARD_MERGE_INSTANTIATE(T,A,B,C) \\
    \n+
    829 DECL template \\
    \n+
    830 void StandardMerge<T,A,B,C>::build(const std::vector<Dune::FieldVector<T,C> >& grid1Coords, \\
    \n+
    831 const std::vector<unsigned int>& grid1_elements, \\
    \n+
    832 const std::vector<Dune::GeometryType>& grid1_element_types, \\
    \n+
    833 const std::vector<Dune::FieldVector<T,C> >& grid2Coords, \\
    \n+
    834 const std::vector<unsigned int>& grid2_elements, \\
    \n+
    835 const std::vector<Dune::GeometryType>& grid2_element_types \\
    \n+
    836 )
    \n+
    \n+
    837
    \n+
    838STANDARD_MERGE_INSTANTIATE(double,1,1,1);
    \n+
    839STANDARD_MERGE_INSTANTIATE(double,2,2,2);
    \n+
    840STANDARD_MERGE_INSTANTIATE(double,3,3,3);
    \n+
    841#undef STANDARD_MERGE_INSTANTIATE
    \n+
    842#undef DECL
    \n+
    843
    \n+
    844} /* namespace GridGlue */
    \n+
    845} /* namespace Dune */
    \n+
    846
    \n+
    847#endif // DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH
    \n+
    \n+
    \n+\n+
    #define STANDARD_MERGE_INSTANTIATE(T, A, B, C)
    Definition standardmerge.cc:13
    \n+\n+\n
    Definition gridglue.hh:37
    \n-
    Coordinate corner(unsigned c)
    Definition projection_impl.hh:24
    \n-
    Definition intersectionlist.hh:22
    \n-
    virtual std::size_t parents0(Index intersection) const =0
    \n-
    virtual Local1 corner1(Index intersection, unsigned corner, unsigned index) const =0
    \n-
    unsigned int Index
    Definition intersectionlist.hh:38
    \n-
    virtual std::size_t size() const =0
    \n-
    L0 Local0
    Definition intersectionlist.hh:28
    \n-
    virtual Local0 corner0(Index intersection, unsigned corner, unsigned index) const =0
    \n-
    L1 Local1
    Definition intersectionlist.hh:33
    \n-
    virtual Index parent1(Index intersection, unsigned index) const =0
    \n-
    virtual std::size_t parents1(Index intersection) const =0
    \n-
    virtual Index parent0(Index intersection, unsigned index) const =0
    \n-
    Definition intersectionlist.hh:134
    \n-
    Index parent(Index intersection, unsigned index=0) const
    Definition intersectionlist.hh:171
    \n-
    auto corner(Index intersection, unsigned corner, unsigned index=0) const
    Definition intersectionlist.hh:187
    \n-
    typename Provider::Index Index
    Definition intersectionlist.hh:137
    \n-
    IntersectionList(const std::shared_ptr< Provider > &provider)
    Definition intersectionlist.hh:139
    \n-
    std::size_t parents(Index intersection) const
    Definition intersectionlist.hh:156
    \n-
    std::size_t size() const
    Definition intersectionlist.hh:146
    \n+
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n
    Definition intersectionlist.hh:207
    \n-
    FieldVector< double, dim0 > Local0
    Definition intersectionlist.hh:212
    \n-
    auto & intersections()
    Definition intersectionlist.hh:266
    \n-
    SimplicialIntersectionListProvider(std::vector< SimplicialIntersection > &&intersections)
    Definition intersectionlist.hh:262
    \n-
    Local1 corner1(Index intersection, unsigned corner, unsigned index) const override
    Definition intersectionlist.hh:287
    \n-
    Local0 corner0(Index intersection, unsigned corner, unsigned index) const override
    Definition intersectionlist.hh:284
    \n-
    Index parent1(Index intersection, unsigned index) const override
    Definition intersectionlist.hh:281
    \n-
    typename Base::Index Index
    Definition intersectionlist.hh:211
    \n-
    std::conditional_t< I==0, Local0, Local1 > Local
    Definition intersectionlist.hh:216
    \n-\n-
    void clear()
    Definition intersectionlist.hh:290
    \n-
    std::size_t size() const override
    Definition intersectionlist.hh:269
    \n-
    FieldVector< double, dim1 > Local1
    Definition intersectionlist.hh:213
    \n-
    std::size_t parents1(Index intersection) const override
    Definition intersectionlist.hh:275
    \n-
    Index parent0(Index intersection, unsigned index) const override
    Definition intersectionlist.hh:278
    \n-
    std::size_t parents0(Index intersection) const override
    Definition intersectionlist.hh:272
    \n \n-
    SimplicialIntersection(Index parent0, Index parent1)
    Definition intersectionlist.hh:229
    \n-
    std::array< Local< I >, nVertices > Corners
    Definition intersectionlist.hh:238
    \n-
    std::vector< Index > parents1
    Definition intersectionlist.hh:258
    \n-
    std::vector< Index > parents0
    Definition intersectionlist.hh:248
    \n-
    std::vector< Corners< 1 > > corners1
    Definition intersectionlist.hh:253
    \n-\n-
    std::vector< Corners< 0 > > corners0
    Definition intersectionlist.hh:243
    \n+
    Abstract base for all classes that take extracted grids and build sets of intersections.
    Definition merger.hh:27
    \n+
    Dune::FieldVector< T, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition merger.hh:37
    \n+
    Dune::GridGlue::IntersectionList< Grid1Coords, Grid2Coords > IntersectionList
    Definition merger.hh:39
    \n+
    Dune::FieldVector< T, grid1Dim > Grid1Coords
    the local coordinate type for the grid1 coordinates
    Definition merger.hh:31
    \n+
    Dune::FieldVector< T, grid2Dim > Grid2Coords
    the local coordinate type for the grid2 coordinates
    Definition merger.hh:34
    \n+
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    Definition standardmerge.hh:58
    \n+
    virtual void computeIntersections(const Dune::GeometryType &grid1ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::bitset<(1<< grid1Dim)> &neighborIntersects1, unsigned int grid1Index, const Dune::GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< grid2Dim)> &neighborIntersects2, unsigned int grid2Index, std::vector< SimplicialIntersection > &intersections)=0
    Compute the intersection between two overlapping elements.
    \n+
    std::shared_ptr< IntersectionList > intersectionList_
    Definition standardmerge.hh:124
    \n+
    typename Base::Grid1Coords Grid1Coords
    Type used for local coordinates on the grid1 side.
    Definition standardmerge.hh:69
    \n+
    void enableFallback(bool fallback)
    Definition standardmerge.hh:166
    \n+
    std::vector< std::vector< int > > elementNeighbors2_
    Definition standardmerge.hh:131
    \n+
    std::vector< std::vector< int > > elementNeighbors1_
    Definition standardmerge.hh:130
    \n+
    T ctype
    the numeric type used in this interface
    Definition standardmerge.hh:66
    \n+
    void clear() override
    Definition standardmerge.hh:150
    \n+
    typename Base::IntersectionList IntersectionList
    Definition standardmerge.hh:77
    \n+
    bool computeIntersection(unsigned int candidate0, unsigned int candidate1, const std::vector< Dune::FieldVector< T, dimworld > > &grid1Coords, const std::vector< Dune::GeometryType > &grid1_element_types, std::bitset<(1<< grid1Dim)> &neighborIntersects1, const std::vector< Dune::FieldVector< T, dimworld > > &grid2Coords, const std::vector< Dune::GeometryType > &grid2_element_types, std::bitset<(1<< grid2Dim)> &neighborIntersects2, bool insert=true)
    Compute the intersection between two overlapping elements.
    Definition standardmerge.hh:263
    \n+
    void enableBruteForce(bool bruteForce)
    Definition standardmerge.hh:171
    \n+
    std::shared_ptr< IntersectionListProvider > intersectionListProvider_
    Definition standardmerge.hh:123
    \n+
    void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1_Coords, const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< T, dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements, const std::vector< Dune::GeometryType > &grid2_element_types) override
    Definition standardmerge.hh:392
    \n+
    std::vector< std::vector< unsigned int > > grid1ElementCorners_
    Temporary internal data.
    Definition standardmerge.hh:127
    \n+
    std::vector< std::vector< unsigned int > > grid2ElementCorners_
    Definition standardmerge.hh:128
    \n+
    typename Base::Grid2Coords Grid2Coords
    Type used for local coordinates on the grid2 side.
    Definition standardmerge.hh:72
    \n+
    std::shared_ptr< IntersectionList > intersectionList() const final
    Definition standardmerge.hh:160
    \n+
    virtual ~StandardMerge()=default
    \n+
    SimplicialIntersection RemoteSimplicialIntersection
    Definition standardmerge.hh:84
    \n+
    bool valid
    Definition standardmerge.hh:86
    \n+
    StandardMerge()
    Definition standardmerge.hh:88
    \n+
    typename IntersectionListProvider::SimplicialIntersection SimplicialIntersection
    Definition standardmerge.hh:83
    \n+
    typename Base::WorldCoords WorldCoords
    the coordinate type used in this interface
    Definition standardmerge.hh:75
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,357 +1,989 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-intersectionlist.hh\n+standardmerge.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n+1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n+2// vi: set et ts=4 sw=2 sts=2:\n+3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n-2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n+4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-3#ifndef DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH\n-4#define DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH 1\n-5\n-6#include \n-7#include \n-8#include \n-9#include \n-10\n-11#include \n+10#ifndef DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH\n+11#define DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH\n 12\n-13namespace _\bD_\bu_\bn_\be {\n-14namespace GridGlue {\n-15\n-20template\n-_\b2_\b1class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br\n-22{\n-23public:\n-24\n-_\b2_\b8 using _\bL_\bo_\bc_\ba_\bl_\b0 = L0;\n-29\n-_\b3_\b3 using _\bL_\bo_\bc_\ba_\bl_\b1 = L1;\n-34\n-_\b3_\b8 using _\bI_\bn_\bd_\be_\bx = unsigned int;\n-39\n-_\b4_\b3 virtual std::size_t _\bs_\bi_\bz_\be() const = 0;\n-44\n-_\b5_\b0 virtual std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs_\b0(_\bI_\bn_\bd_\be_\bx intersection) const = 0;\n-51\n-_\b5_\b7 virtual std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs_\b1(_\bI_\bn_\bd_\be_\bx intersection) const = 0;\n-58\n-_\b6_\b5 virtual _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b0(_\bI_\bn_\bd_\be_\bx intersection, unsigned index) const = 0;\n-66\n-_\b7_\b3 virtual _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b1(_\bI_\bn_\bd_\be_\bx intersection, unsigned index) const = 0;\n-74\n-_\b8_\b2 virtual _\bL_\bo_\bc_\ba_\bl_\b0 _\bc_\bo_\br_\bn_\be_\br_\b0(_\bI_\bn_\bd_\be_\bx intersection, unsigned corner, unsigned index)\n-const = 0;\n-83\n-_\b9_\b1 virtual _\bL_\bo_\bc_\ba_\bl_\b1 _\bc_\bo_\br_\bn_\be_\br_\b1(_\bI_\bn_\bd_\be_\bx intersection, unsigned corner, unsigned index)\n-const = 0;\n-92};\n-93\n-94namespace Impl {\n-95\n-96template\n-97struct IntersectionListLocal\n-98{};\n-99\n-100template\n-101struct IntersectionListLocal\n-102{\n-103 static std::size_t parents(const P& p, typename P::Index intersection)\n-104 { return p.parents0(intersection); }\n-105\n-106 static typename P::Index parent(const P& p, typename P::Index intersection,\n-unsigned index)\n-107 { return p.parent0(intersection, index); }\n+13\n+14#include \n+15#include \n+16#include \n+17#include \n+18#include \n+19#include \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+29#include \n+30#include \n+31\n+32#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh>\n+33#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bm_\be_\br_\bg_\be_\br_\b._\bh_\bh>\n+34#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+35\n+36namespace _\bD_\bu_\bn_\be {\n+37namespace GridGlue {\n+38\n+55template\n+_\b5_\b6class _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n+57 : public _\bM_\be_\br_\bg_\be_\br\n+58{\n+59 using _\bB_\ba_\bs_\be = _\bM_\be_\br_\bg_\be_\br_\b<_\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>;\n+60\n+61public:\n+62\n+63 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n+64\n+_\b6_\b6 typedef T _\bc_\bt_\by_\bp_\be;\n+67\n+_\b6_\b9 using _\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs = typename _\bB_\ba_\bs_\be_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs;\n+70\n+_\b7_\b2 using _\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs = typename _\bB_\ba_\bs_\be_\b:_\b:_\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs;\n+73\n+_\b7_\b5 using _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs = typename _\bB_\ba_\bs_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\n+76\n+_\b7_\b7 using _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt = typename _\bB_\ba_\bs_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt;\n+78\n+79protected:\n+80\n+_\b8_\b2 using _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br =\n+_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b>;\n+_\b8_\b3 using _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn = typename _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:\n+_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n+_\b8_\b4 using _\bR_\be_\bm_\bo_\bt_\be_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn = _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n+85\n+_\b8_\b6 bool _\bv_\ba_\bl_\bi_\bd = false;\n+87\n+_\b8_\b8 _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be()\n+89 : _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b_(std::make_shared<_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br>())\n+90 , _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b_(std::make_shared<_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt>\n+(_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b_))\n+91 {}\n+92\n+_\b9_\b3 virtual _\b~_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be() = default;\n+94\n+_\b9_\b9 virtual void _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(const Dune::GeometryType&\n+grid1ElementType,\n+100 const std::vector >& grid1ElementCorners,\n+101 std::bitset<(1<& neighborIntersects1,\n+102 unsigned int grid1Index,\n+103 const Dune::GeometryType& grid2ElementType,\n+104 const std::vector >& grid2ElementCorners,\n+105 std::bitset<(1<& neighborIntersects2,\n+106 unsigned int grid2Index,\n+107 std::vector& intersections) = 0;\n 108\n-109 static typename P::Local0 _\bc_\bo_\br_\bn_\be_\br(const P& p, typename P::Index\n-intersection, unsigned corner, unsigned index)\n-110 { return p.corner0(intersection, corner, index); }\n-111};\n-112\n-113template\n-114struct IntersectionListLocal\n-115{\n-116 static std::size_t parents(const P& p, typename P::Index intersection)\n-117 { return p.parents1(intersection); }\n-118\n-119 static typename P::Index parent(const P& p, typename P::Index intersection,\n-unsigned index)\n-120 { return p.parent1(intersection, index); }\n-121\n-122 static typename P::Local1 _\bc_\bo_\br_\bn_\be_\br(const P& p, typename P::Index\n-intersection, unsigned corner, unsigned index)\n-123 { return p.corner1(intersection, corner, index); }\n-124};\n+_\b1_\b1_\b2 bool _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(unsigned int candidate0, unsigned int candidate1,\n+113 const std::vector >& grid1Coords,\n+114 const std::vector& grid1_element_types,\n+115 std::bitset<(1<& neighborIntersects1,\n+116 const std::vector >& grid2Coords,\n+117 const std::vector& grid2_element_types,\n+118 std::bitset<(1<& neighborIntersects2,\n+119 bool insert = true);\n+120\n+121 /* M E M B E R V A R I A B L E S */\n+122\n+_\b1_\b2_\b3 std::shared_ptr _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b_;\n+_\b1_\b2_\b4 std::shared_ptr _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b_;\n 125\n-126} /* namespace Impl */\n-127\n-132template\n-_\b1_\b3_\b3class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n-134{\n-135public:\n-_\b1_\b3_\b6 using _\bP_\br_\bo_\bv_\bi_\bd_\be_\br = _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\bL_\bo_\bc_\ba_\bl_\b0_\b,_\b _\bL_\bo_\bc_\ba_\bl_\b1_\b>;\n-_\b1_\b3_\b7 using _\bI_\bn_\bd_\be_\bx = typename _\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx;\n-138\n-_\b1_\b3_\b9 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt(const std::shared_ptr& provider)\n-140 : impl_(provider)\n-141 {}\n-142\n-_\b1_\b4_\b6 std::size_t _\bs_\bi_\bz_\be() const\n-147 { return impl_->size(); }\n-148\n-155 template\n-_\b1_\b5_\b6 std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs(_\bI_\bn_\bd_\be_\bx intersection) const\n-157 {\n-158 static_assert(I == 0 or I == 1, \"I must be 0 or 1\");\n-159 // TODO [C++17]: use `if constexpr` instead of indirection\n-160 return Impl::IntersectionListLocal::parents(*impl_,\n-intersection);\n-161 }\n-162\n-170 template\n-_\b1_\b7_\b1 _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt(_\bI_\bn_\bd_\be_\bx intersection, unsigned index = 0) const\n+_\b1_\b2_\b7 std::vector > _\bg_\br_\bi_\bd_\b1_\bE_\bl_\be_\bm_\be_\bn_\bt_\bC_\bo_\br_\bn_\be_\br_\bs_\b_;\n+_\b1_\b2_\b8 std::vector > _\bg_\br_\bi_\bd_\b2_\bE_\bl_\be_\bm_\be_\bn_\bt_\bC_\bo_\br_\bn_\be_\br_\bs_\b_;\n+129\n+_\b1_\b3_\b0 std::vector > _\be_\bl_\be_\bm_\be_\bn_\bt_\bN_\be_\bi_\bg_\bh_\bb_\bo_\br_\bs_\b1_\b_;\n+_\b1_\b3_\b1 std::vector > _\be_\bl_\be_\bm_\be_\bn_\bt_\bN_\be_\bi_\bg_\bh_\bb_\bo_\br_\bs_\b2_\b_;\n+132\n+133public:\n+134\n+135 /* C O N C E P T I M P L E M E N T I N G I N T E R F A C E */\n+136\n+_\b1_\b4_\b0 void _\bb_\bu_\bi_\bl_\bd(const std::vector >& grid1_Coords,\n+141 const std::vector& grid1_elements,\n+142 const std::vector& grid1_element_types,\n+143 const std::vector >& grid2_coords,\n+144 const std::vector& grid2_elements,\n+145 const std::vector& grid2_element_types) override;\n+146\n+147\n+148 /* P R O B I N G T H E M E R G E D G R I D */\n+149\n+_\b1_\b5_\b0 void _\bc_\bl_\be_\ba_\br() override\n+151 {\n+152 // Delete old internal data, from a possible previous run\n+153 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b_->clear();\n+154 purge(_\bg_\br_\bi_\bd_\b1_\bE_\bl_\be_\bm_\be_\bn_\bt_\bC_\bo_\br_\bn_\be_\br_\bs_\b_);\n+155 purge(_\bg_\br_\bi_\bd_\b2_\bE_\bl_\be_\bm_\be_\bn_\bt_\bC_\bo_\br_\bn_\be_\br_\bs_\b_);\n+156\n+157 _\bv_\ba_\bl_\bi_\bd = false;\n+158 }\n+159\n+_\b1_\b6_\b0 std::shared_ptr _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt() const final\n+161 {\n+162 assert(_\bv_\ba_\bl_\bi_\bd);\n+163 return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b_;\n+164 }\n+165\n+_\b1_\b6_\b6 void _\be_\bn_\ba_\bb_\bl_\be_\bF_\ba_\bl_\bl_\bb_\ba_\bc_\bk(bool fallback)\n+167 {\n+168 m_enableFallback = fallback;\n+169 }\n+170\n+_\b1_\b7_\b1 void _\be_\bn_\ba_\bb_\bl_\be_\bB_\br_\bu_\bt_\be_\bF_\bo_\br_\bc_\be(bool bruteForce)\n 172 {\n-173 static_assert(I == 0 or I == 1, \"I must be 0 or 1\");\n-174 // TODO [C++17]: use `if constexpr` instead of indirection\n-175 return Impl::IntersectionListLocal::parent(*impl_,\n-intersection, index);\n-176 }\n-177\n-186 template\n-_\b1_\b8_\b7 auto _\bc_\bo_\br_\bn_\be_\br(_\bI_\bn_\bd_\be_\bx intersection, unsigned _\bc_\bo_\br_\bn_\be_\br, unsigned index = 0) const\n-188 {\n-189 static_assert(I == 0 or I == 1, \"I must be 0 or 1\");\n-190 // TODO [C++17]: use `if constexpr` instead of indirection\n-191 return Impl::IntersectionListLocal::corner(*impl_,\n-intersection, _\bc_\bo_\br_\bn_\be_\br, index);\n-192 }\n-193\n-194private:\n-195 std::shared_ptr impl_;\n-196};\n-197\n-204template\n-_\b2_\b0_\b5class _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br final\n-206 : public _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br< FieldVector,\n-FieldVector >\n-207{\n-208 using _\bB_\ba_\bs_\be = _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\b _\bF_\bi_\be_\bl_\bd_\bV_\be_\bc_\bt_\bo_\br_\b<_\bd_\bo_\bu_\bb_\bl_\be_\b,_\b _\bd_\bi_\bm_\b0_\b>,\n-FieldVector >;\n-209\n-210public:\n-_\b2_\b1_\b1 using _\bI_\bn_\bd_\be_\bx = typename _\bB_\ba_\bs_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx;\n-_\b2_\b1_\b2 using _\bL_\bo_\bc_\ba_\bl_\b0 = FieldVector;\n-_\b2_\b1_\b3 using _\bL_\bo_\bc_\ba_\bl_\b1 = FieldVector;\n-214\n-215 template\n-_\b2_\b1_\b6 using _\bL_\bo_\bc_\ba_\bl = std::conditional_t< I == 0, Local0, Local1 >;\n-217\n-_\b2_\b2_\b1 struct _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-222 {\n-223 private:\n-224 static constexpr int intersectionDim = dim0 < dim1 ? dim0 : dim1;\n-225 static constexpr int nVertices = intersectionDim + 1;\n-226\n-227 public:\n-_\b2_\b2_\b8 _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn() = default;\n-_\b2_\b2_\b9 _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(_\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b0, _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b1)\n-230 : _\bp_\ba_\br_\be_\bn_\bt_\bs_\b0{_\bp_\ba_\br_\be_\bn_\bt_\b0}\n-231 , _\bp_\ba_\br_\be_\bn_\bt_\bs_\b1{_\bp_\ba_\br_\be_\bn_\bt_\b1}\n-232 {}\n-233\n-237 template\n-_\b2_\b3_\b8 using _\bC_\bo_\br_\bn_\be_\br_\bs = std::array, nVertices>;\n+173 m_enableBruteForce = bruteForce;\n+174 }\n+175\n+176private:\n+180 bool m_enableFallback = false;\n+181\n+185 bool m_enableBruteForce = false;\n+186\n+187 auto& intersections()\n+188 { return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b_->intersections(); }\n+189\n+191 template\n+192 static void purge(V & v)\n+193 {\n+194 v.clear();\n+195 V v2(v);\n+196 v.swap(v2);\n+197 }\n+198\n+203 void generateSeed(std::vector& seeds,\n+204 Dune::BitSetVector<1>& isHandled2,\n+205 std::stack& candidates2,\n+206 const std::vector >& grid1Coords,\n+207 const std::vector& grid1_element_types,\n+208 const std::vector >& grid2Coords,\n+209 const std::vector& grid2_element_types);\n+210\n+214 int insertIntersections(unsigned int candidate1, unsigned int\n+candidate2,std::vector& intersections);\n+215\n+219 int bruteForceSearch(int candidate1,\n+220 const std::vector >& grid1Coords,\n+221 const std::vector& grid1_element_types,\n+222 const std::vector >& grid2Coords,\n+223 const std::vector& grid2_element_types);\n+224\n+228 std::pair\n+229 intersectionIndex(unsigned int grid1Index, unsigned int grid2Index,\n+230 _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn& intersection);\n+231\n+235 template \n+236 void computeNeighborsPerElement(const std::vector&\n+gridElementTypes,\n+237 const std::vector >& gridElementCorners,\n+238 std::vector >& elementNeighbors);\n 239\n-_\b2_\b4_\b3 std::vector< Corners<0> > _\bc_\bo_\br_\bn_\be_\br_\bs_\b0 = std::vector< Corners<0> >(1);\n-244\n-_\b2_\b4_\b8 std::vector< Index > _\bp_\ba_\br_\be_\bn_\bt_\bs_\b0 = std::vector< Index >(1);\n-249\n-_\b2_\b5_\b3 std::vector< Corners<1> > _\bc_\bo_\br_\bn_\be_\br_\bs_\b1 = std::vector< Corners<1> >(1);\n-254\n-_\b2_\b5_\b8 std::vector< Index > _\bp_\ba_\br_\be_\bn_\bt_\bs_\b1 = std::vector< Index >(1);\n-259 };\n-260\n-_\b2_\b6_\b1 _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br() = default;\n-_\b2_\b6_\b2 _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br(std::vector&&\n-_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs)\n-263 : intersections_(std::move(_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs))\n-264 {}\n-265\n-_\b2_\b6_\b6 auto& _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()\n-267 { return intersections_; }\n-268\n-_\b2_\b6_\b9 std::size_t _\bs_\bi_\bz_\be() const override\n-270 { return intersections_.size(); }\n-271\n-_\b2_\b7_\b2 std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs_\b0(_\bI_\bn_\bd_\be_\bx intersection) const override\n-273 { return intersections_[intersection].parents0.size(); }\n-274\n-_\b2_\b7_\b5 std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs_\b1(_\bI_\bn_\bd_\be_\bx intersection) const override\n-276 { return intersections_[intersection].parents1.size(); }\n+240 void buildAdvancingFront(\n+241 const std::vector >& grid1_Coords,\n+242 const std::vector& grid1_elements,\n+243 const std::vector& grid1_element_types,\n+244 const std::vector >& grid2_coords,\n+245 const std::vector& grid2_elements,\n+246 const std::vector& grid2_element_types\n+247 );\n+248\n+249 void buildBruteForce(\n+250 const std::vector >& grid1_Coords,\n+251 const std::vector& grid1_elements,\n+252 const std::vector& grid1_element_types,\n+253 const std::vector >& grid2_coords,\n+254 const std::vector& grid2_elements,\n+255 const std::vector& grid2_element_types\n+256 );\n+257};\n+258\n+259\n+260/* IMPLEMENTATION */\n+261\n+262template\n+_\b2_\b6_\b3bool _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+(unsigned int candidate0, unsigned int candidate1,\n+264 const std::vector >& grid1Coords,\n+265 const std::vector& grid1_element_types,\n+266 std::bitset<(1<& neighborIntersects1,\n+267 const std::vector >& grid2Coords,\n+268 const std::vector& grid2_element_types,\n+269 std::bitset<(1<& neighborIntersects2,\n+270 bool insert)\n+271{\n+272 // Select vertices of the grid1 element\n+273 int grid1NumVertices = grid1ElementCorners_[candidate0].size();\n+274 std::vector > grid1ElementCorners\n+(grid1NumVertices);\n+275 for (int i=0; i > grid2ElementCorners\n+(grid2NumVertices);\n+281 for (int i=0; i _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(0);\n 289\n-_\b2_\b9_\b0 void _\bc_\bl_\be_\ba_\br()\n-291 {\n-292 intersections_.clear();\n-293 }\n-294\n-295private:\n-296 std::vector intersections_;\n-297};\n-298\n-299} /* namespace GridGlue */\n-300} /* namespace Dune */\n-301\n-302#endif\n+290 // compute the intersections\n+291 computeIntersections(grid1_element_types[candidate0], grid1ElementCorners,\n+292 neighborIntersects1, candidate0,\n+293 grid2_element_types[candidate1], grid2ElementCorners,\n+294 neighborIntersects2, candidate1,\n+295 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs);\n+296\n+297 // insert intersections if needed\n+298 if(insert && !_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.empty())\n+299 insertIntersections(candidate0,candidate1,_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs);\n+300\n+301 // Have we found an intersection?\n+302 return !_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.empty() || neighborIntersects1.any() ||\n+neighborIntersects2.any();\n+303\n+304}\n+305\n+306template\n+307int _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bb_\br_\bu_\bt_\be_\bF_\bo_\br_\bc_\be_\bS_\be_\ba_\br_\bc_\bh(int\n+candidate1,\n+308 const std::vector >& grid1Coords,\n+309 const std::vector& grid1_element_types,\n+310 const std::vector >& grid2Coords,\n+311 const std::vector& grid2_element_types)\n+312{\n+313 std::bitset<(1< neighborIntersects1;\n+314 std::bitset<(1< neighborIntersects2;\n+315 for (std::size_t i=0; i\n+333template\n+334void StandardMerge::\n+335computeNeighborsPerElement(const std::vector&\n+gridElementTypes,\n+336 const std::vector >& gridElementCorners,\n+337 std::vector >& elementNeighbors)\n+338{\n+339 typedef std::vector FaceType;\n+340 typedef std::map >\n+FaceSetType;\n+341\n+343 // First: grid 1\n+345 FaceSetType faces;\n+346 elementNeighbors.resize(gridElementTypes.size());\n+347\n+348 for (size_t i=0; i::general\n+(gridElementTypes[i]).size(1), -1);\n+350\n+351 for (size_t i=0; i::general\n+(gridElementTypes[i]);\n+353\n+354 for (size_t j=0; j<(size_t)refElement.size(1); j++) { // iterate over all\n+faces of the element\n+355\n+356 FaceType face;\n+357 // extract element face\n+358 for (size_t k=0; k<(size_t)refElement.size(j,1,gridDim); k++)\n+359 face.push_back(gridElementCorners[i][refElement.subEntity(j,1,k,gridDim)]);\n+360\n+361 // sort the face vertices to get rid of twists and other permutations\n+362 std::sort(face.begin(), face.end());\n+363\n+364 typename FaceSetType::iterator faceHandle = faces.find(face);\n+365\n+366 if (faceHandle == faces.end()) {\n+367\n+368 // face has not been visited before\n+369 faces.insert(std::make_pair(face, std::make_pair(i,j)));\n+370\n+371 } else {\n+372\n+373 // face has been visited before: store the mutual neighbor information\n+374 elementNeighbors[i][j] = faceHandle->second.first;\n+375 elementNeighbors[faceHandle->second.first][faceHandle->second.second] = i;\n+376\n+377 faces.erase(faceHandle);\n+378\n+379 }\n+380\n+381 }\n+382\n+383 }\n+384}\n+385\n+386// /////////////////////////////////////////////////////////////////////\n+387// Compute the intersection of all pairs of elements\n+388// Linear algorithm by Gander and Japhet, Proc. of DD18\n+389// /////////////////////////////////////////////////////////////////////\n+390\n+391template\n+_\b3_\b9_\b2void _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bb_\bu_\bi_\bl_\bd(const std::\n+vector >& grid1Coords,\n+393 const std::vector& grid1_elements,\n+394 const std::vector& grid1_element_types,\n+395 const std::vector >& grid2Coords,\n+396 const std::vector& grid2_elements,\n+397 const std::vector& grid2_element_types\n+398 )\n+399{\n+400\n+401 std::cout << \"StandardMerge building merged grid...\" << std::endl;\n+402 Dune::Timer watch;\n+403\n+404 clear();\n+405 // clear global intersection list\n+406 intersectionListProvider_->clear();\n+407 this->counter = 0;\n+408\n+409 // /////////////////////////////////////////////////////////////////////\n+410 // Copy element corners into a data structure with block-structure.\n+411 // This is not as efficient but a lot easier to use.\n+412 // We may think about efficiency later.\n+413 // /////////////////////////////////////////////////////////////////////\n+414\n+415 // first the grid1 side\n+416 grid1ElementCorners_.resize(grid1_element_types.size());\n+417\n+418 unsigned int grid1CornerCounter = 0;\n+419\n+420 for (std::size_t i=0; i::general\n+(grid1_element_types[i]).size(grid1Dim);\n+424 grid1ElementCorners_[i].resize(numVertices);\n+425 for (int j=0; j::general\n+(grid2_element_types[i]).size(grid2Dim);\n+439 grid2ElementCorners_[i].resize(numVertices);\n+440 for (int j=0; j(grid1_element_types,\n+grid1ElementCorners_, elementNeighbors1_);\n+450 computeNeighborsPerElement(grid2_element_types,\n+grid2ElementCorners_, elementNeighbors2_);\n+451\n+452 std::cout << \"setup took \" << watch.elapsed() << \" seconds.\" << std::endl;\n+453\n+454 if (m_enableBruteForce)\n+455 buildBruteForce(grid1Coords, grid1_elements, grid1_element_types,\n+grid2Coords, grid2_elements, grid2_element_types);\n+456 else\n+457 buildAdvancingFront(grid1Coords, grid1_elements, grid1_element_types,\n+grid2Coords, grid2_elements, grid2_element_types);\n+458\n+459 valid = true;\n+460 std::cout << \"intersection construction took \" << watch.elapsed() << \"\n+seconds.\" << std::endl;\n+461}\n+462\n+463template\n+464void _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bb_\bu_\bi_\bl_\bd_\bA_\bd_\bv_\ba_\bn_\bc_\bi_\bn_\bg_\bF_\br_\bo_\bn_\bt(\n+465 const std::vector >& grid1Coords,\n+466 const std::vector& grid1_elements,\n+467 const std::vector& grid1_element_types,\n+468 const std::vector >& grid2Coords,\n+469 const std::vector& grid2_elements,\n+470 const std::vector& grid2_element_types\n+471 )\n+472{\n+474 // Data structures for the advancing-front algorithm\n+476\n+477 std::stack candidates1;\n+478 std::stack candidates2;\n+479\n+480 std::vector seeds(grid2_element_types.size(), -1);\n+481\n+482 // /////////////////////////////////////////////////////////////////////\n+483 // Do a brute-force search to find one pair of intersecting elements\n+484 // to start the advancing-front type algorithm with.\n+485 // /////////////////////////////////////////////////////////////////////\n+486\n+487 // Set flag if element has been handled\n+488 Dune::BitSetVector<1> isHandled2(grid2_element_types.size());\n+489\n+490 // Set flag if the element has been entered in the queue\n+491 Dune::BitSetVector<1> isCandidate2(grid2_element_types.size());\n+492\n+493 generateSeed(seeds, isHandled2, candidates2, grid1Coords,\n+grid1_element_types, grid2Coords, grid2_element_types);\n+494\n+495 // /////////////////////////////////////////////////////////////////////\n+496 // Main loop\n+497 // /////////////////////////////////////////////////////////////////////\n+498\n+499 std::set isHandled1;\n+500\n+501 std::set isCandidate1;\n+502\n+503 while (!candidates2.empty()) {\n+504\n+505 // Get the next element on the grid2 side\n+506 unsigned int currentCandidate2 = candidates2.top();\n+507 int seed = seeds[currentCandidate2];\n+508 assert(seed >= 0);\n+509\n+510 candidates2.pop();\n+511 isHandled2[currentCandidate2] = true;\n+512\n+513 // Start advancing front algorithm on the grid1 side from the 'seed'\n+element that\n+514 // we stored along with the current grid2 element\n+515 candidates1.push(seed);\n+516\n+517 isHandled1.clear();\n+518 isCandidate1.clear();\n+519\n+520 while (!candidates1.empty()) {\n+521\n+522 unsigned int currentCandidate1 = candidates1.top();\n+523 candidates1.pop();\n+524 isHandled1.insert(currentCandidate1);\n+525\n+526 // Test whether there is an intersection between currentCandidate0 and\n+currentCandidate1\n+527 std::bitset<(1< neighborIntersects1;\n+528 std::bitset<(1< neighborIntersects2;\n+529 bool intersectionFound = computeIntersection(currentCandidate1,\n+currentCandidate2,\n+530 grid1Coords,grid1_element_types, neighborIntersects1,\n+531 grid2Coords,grid2_element_types, neighborIntersects2);\n+532\n+533 for (size_t i=0; i-1) {\n+574\n+575 isCandidate2[neighbor][0] = true;\n+576 candidates2.push(neighbor);\n+577 seedFound = true;\n+578 }\n+579 }\n+580\n+581 if (seedFound || !m_enableFallback)\n+582 continue;\n+583\n+584 // There is no neighbor with a seed, so we need to be a bit more\n+aggressive...\n+585 // get all neighbors of currentCandidate2, but not currentCandidate2 itself\n+586 for (size_t i=0; i::iterator seedIt = isHandled1.begin();\n+601 seedIt != isHandled1.end(); ++seedIt) {\n+602\n+603 std::bitset<(1< neighborIntersects1;\n+604 std::bitset<(1< neighborIntersects2;\n+605 bool intersectionFound = computeIntersection(*seedIt, neighbor,\n+606 grid1Coords, grid1_element_types, neighborIntersects1,\n+607 grid2Coords, grid2_element_types, neighborIntersects2,\n+608 false);\n+609\n+610 // if the intersection is nonempty, *seedIt is our new seed candidate on\n+the grid1 side\n+611 if (intersectionFound) {\n+612 seed = *seedIt;\n+613 Dune::dwarn << \"Algorithm entered first fallback method and found a new\n+seed in the build algorithm.\" <<\n+614 \"Probably, the neighborIntersects bitsets computed in computeIntersection\n+specialization is wrong.\" << std::endl;\n+615 break;\n+616 }\n+617\n+618 }\n+619\n+620 if (seed < 0) {\n+621 // The fast method didn't find a grid1 element that intersects with\n+622 // the new grid2 candidate. We have to do a brute-force search.\n+623 seed = bruteForceSearch(neighbor,\n+624 grid1Coords,grid1_element_types,\n+625 grid2Coords,grid2_element_types);\n+626 Dune::dwarn << \"Algorithm entered second fallback method. This probably\n+should not happen.\" << std::endl;\n+627\n+628 }\n+629\n+630 // We have tried all we could: the candidate is 'handled' now\n+631 isCandidate2[neighbor] = true;\n+632\n+633 // still no seed? Then the new grid2 candidate isn't overlapped by anything\n+634 if (seed < 0)\n+635 continue;\n+636\n+637 // we have a seed now\n+638 candidates2.push(neighbor);\n+639 seeds[neighbor] = seed;\n+640 seedFound = true;\n+641\n+642 }\n+643\n+644 }\n+645\n+646 /* Do a brute-force search if there is still no seed:\n+647 * There might still be a disconnected region out there.\n+648 */\n+649 if (!seedFound && candidates2.empty()) {\n+650 generateSeed(seeds, isHandled2, candidates2, grid1Coords,\n+grid1_element_types, grid2Coords, grid2_element_types);\n+651 }\n+652 }\n+653}\n+654\n+655template\n+656void StandardMerge::buildBruteForce(\n+657 const std::vector >& grid1Coords,\n+658 const std::vector& grid1_elements,\n+659 const std::vector& grid1_element_types,\n+660 const std::vector >& grid2Coords,\n+661 const std::vector& grid2_elements,\n+662 const std::vector& grid2_element_types\n+663 )\n+664{\n+665 std::bitset<(1< neighborIntersects1;\n+666 std::bitset<(1< neighborIntersects2;\n+667\n+668 for (unsigned i = 0; i < grid1_element_types.size(); ++i) {\n+669 for (unsigned j = 0; j < grid2_element_types.size(); ++j) {\n+670 (void) computeIntersection(i, j,\n+671 grid1Coords, grid1_element_types, neighborIntersects1,\n+672 grid2Coords, grid2_element_types, neighborIntersects2);\n+673 }\n+674 }\n+675}\n+676\n+677template\n+678void StandardMerge::generateSeed(std::\n+vector& seeds, Dune::BitSetVector<1>& isHandled2, std::stack&\n+candidates2, const std::vector >& grid1Coords,\n+const std::vector& grid1_element_types, const std::\n+vector >& grid2Coords, const std::vector& grid2_element_types)\n+679{\n+680 for (std::size_t j=0; j 0 || isHandled2[j][0])\n+683 continue;\n+684\n+685 int seed = bruteForceSearch\n+(j,grid1Coords,grid1_element_types,grid2Coords,grid2_element_types);\n+686\n+687 if (seed >= 0) {\n+688 candidates2.push(j); // the candidate and a seed for the candidate\n+689 seeds[j] = seed;\n+690 break;\n+691 } else // If the brute force search did not find any intersection we can\n+skip this element\n+692 isHandled2[j] = true;\n+693 }\n+694}\n+695\n+696template\n+697int StandardMerge::insertIntersections\n+(unsigned int candidate1, unsigned int candidate2,\n+698 std::vector& _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs)\n+699{\n+700 typedef typename std::vector::size_type size_t;\n+701 int count = 0;\n+702\n+703 for (size_t i = 0; i < _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.size(); ++i) {\n+704 // get the intersection index of the current intersection from\n+intersections in this->intersections\n+705 bool found;\n+706 unsigned int index;\n+707 std::tie(found, index) = intersectionIndex\n+(candidate1,candidate2,_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs[i]);\n+708\n+709 if (found && index >= this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs().size()) { //the intersection is\n+not yet contained in this->intersections\n+710 this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs().push_back(intersections[i]); // insert\n+711\n+712 ++count;\n+713 } else if (found) {\n+714 auto& intersection = this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[index];\n+715\n+716 // insert each grid1 element and local representation of intersections[i]\n+with parent candidate1\n+717 for (size_t j = 0; j < _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs[i].parents0.size(); ++j) {\n+718 intersection.parents0.push_back(candidate1);\n+719 intersection.corners0.push_back(_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs[i].corners0[j]);\n+720 }\n+721\n+722 // insert each grid2 element and local representation of intersections[i]\n+with parent candidate2\n+723 for (size_t j = 0; j < _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs[i].parents1.size(); ++j) {\n+724 intersection.parents1.push_back(candidate2);\n+725 intersection.corners1.push_back(_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs[i].corners1[j]);\n+726 }\n+727\n+728 ++count;\n+729 } else {\n+730 Dune::dwarn << \"Computed the same intersection twice!\" << std::endl;\n+731 }\n+732 }\n+733 return count;\n+734}\n+735\n+736template\n+737std::pair\n+738StandardMerge::intersectionIndex(unsigned int\n+grid1Index, unsigned int grid2Index,\n+739 SimplicialIntersection& intersection) {\n+740\n+741\n+742 // return index in intersections_ if at least one local representation of a\n+Simplicial Intersection (SI)\n+743 // of intersections_ is equal to the local representation of one element in\n+intersections\n+744\n+745 std::size_t n_intersections = this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs().size();\n+746 if (grid1Dim == grid2Dim)\n+747 return {true, n_intersections};\n+748\n+749 T eps = 1e-10;\n+750\n+751 for (std::size_t i = 0; i < n_intersections; ++i) {\n+752\n+753 // compare the local representation of the subelements of the SI\n+754 for (std::size_t ei = 0; ei < this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].parents0.size();\n+++ei) // merger subelement\n+755 {\n+756 if (this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].parents0[ei] == grid1Index)\n+757 {\n+758 for (std::size_t er = 0; er < intersection.parents0.size(); ++er) // list\n+subelement\n+759 {\n+760 bool found_all = true;\n+761 // compare the local coordinate representations\n+762 for (std::size_t ci = 0; ci < this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].corners0[ei].size();\n+++ci)\n+763 {\n+764 Dune::FieldVector ni = this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].corners0[ei]\n+[ci];\n+765 bool found_ni = false;\n+766 for (std::size_t cr = 0; cr < intersection.corners0[er].size(); ++cr)\n+767 {\n+768 Dune::FieldVector nr = intersection.corners0[er][cr];\n+769\n+770 found_ni = found_ni || ((ni-nr).infinity_norm() < eps);\n+771 if (found_ni)\n+772 break;\n+773 }\n+774 found_all = found_all && found_ni;\n+775\n+776 if (!found_ni)\n+777 break;\n+778 }\n+779\n+780 if (found_all && (this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].parents1[ei] != grid2Index))\n+781 return {true, i};\n+782 else if (found_all)\n+783 return {false, 0};\n+784 }\n+785 }\n+786 }\n+787\n+788 // compare the local representation of the subelements of the SI\n+789 for (std::size_t ei = 0; ei < this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].parents1.size();\n+++ei) // merger subelement\n+790 {\n+791 if (this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].parents1[ei] == grid2Index)\n+792 {\n+793 for (std::size_t er = 0; er < intersection.parents1.size(); ++er) // list\n+subelement\n+794 {\n+795 bool found_all = true;\n+796 // compare the local coordinate representations\n+797 for (std::size_t ci = 0; ci < this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].corners1[ei].size();\n+++ci)\n+798 {\n+799 Dune::FieldVector ni = this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].corners1[ei]\n+[ci];\n+800 bool found_ni = false;\n+801 for (std::size_t cr = 0; cr < intersection.corners1[er].size(); ++cr)\n+802 {\n+803 Dune::FieldVector nr = intersection.corners1[er][cr];\n+804 found_ni = found_ni || ((ni-nr).infinity_norm() < eps);\n+805\n+806 if (found_ni)\n+807 break;\n+808 }\n+809 found_all = found_all && found_ni;\n+810\n+811 if (!found_ni)\n+812 break;\n+813 }\n+814\n+815 if (found_all && (this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].parents0[ei] != grid1Index))\n+816 return {true, i};\n+817 else if (found_all)\n+818 return {false, 0};\n+819 }\n+820 }\n+821 }\n+822 }\n+823\n+824 return {true, n_intersections};\n+825}\n+826\n+_\b8_\b2_\b7#define DECL extern\n+_\b8_\b2_\b8#define STANDARD_MERGE_INSTANTIATE(T,A,B,C) \\\n+829 DECL template \\\n+830 void StandardMerge::build(const std::vector\n+>& grid1Coords, \\\n+831 const std::vector& grid1_elements, \\\n+832 const std::vector& grid1_element_types, \\\n+833 const std::vector >& grid2Coords, \\\n+834 const std::vector& grid2_elements, \\\n+835 const std::vector& grid2_element_types \\\n+836 )\n+837\n+838_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE(double,1,1,1);\n+839_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE(double,2,2,2);\n+840_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE(double,3,3,3);\n+841#undef STANDARD_MERGE_INSTANTIATE\n+842#undef DECL\n+843\n+844} /* namespace GridGlue */\n+845} /* namespace Dune */\n+846\n+847#endif // DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH\n+_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh\n+_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE\n+#define STANDARD_MERGE_INSTANTIATE(T, A, B, C)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.cc:13\n+_\bm_\be_\br_\bg_\be_\br_\b._\bh_\bh\n+_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\br_\bn_\be_\br\n-Coordinate corner(unsigned c)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:24\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:22\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs_\b0\n-virtual std::size_t parents0(Index intersection) const =0\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bc_\bo_\br_\bn_\be_\br_\b1\n-virtual Local1 corner1(Index intersection, unsigned corner, unsigned index)\n-const =0\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx\n-unsigned int Index\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:38\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bs_\bi_\bz_\be\n-virtual std::size_t size() const =0\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\b0\n-L0 Local0\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:28\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bc_\bo_\br_\bn_\be_\br_\b0\n-virtual Local0 corner0(Index intersection, unsigned corner, unsigned index)\n-const =0\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\b1\n-L1 Local1\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:33\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\b1\n-virtual Index parent1(Index intersection, unsigned index) const =0\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs_\b1\n-virtual std::size_t parents1(Index intersection) const =0\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\b0\n-virtual Index parent0(Index intersection, unsigned index) const =0\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:134\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt\n-Index parent(Index intersection, unsigned index=0) const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:171\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b:_\b:_\bc_\bo_\br_\bn_\be_\br\n-auto corner(Index intersection, unsigned corner, unsigned index=0) const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:187\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b:_\b:_\bI_\bn_\bd_\be_\bx\n-typename Provider::Index Index\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:137\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n-IntersectionList(const std::shared_ptr< Provider > &provider)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:139\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs\n-std::size_t parents(Index intersection) const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:156\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b:_\b:_\bs_\bi_\bz_\be\n-std::size_t size() const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:146\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n+> &reverse=!reversed)\n+Iterate over all intersections of a GridGlue.\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:207\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\b0\n-FieldVector< double, dim0 > Local0\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:212\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-auto & intersections()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:266\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:\n-_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br\n-SimplicialIntersectionListProvider(std::vector< SimplicialIntersection >\n-&&intersections)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:262\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bc_\bo_\br_\bn_\be_\br_\b1\n-Local1 corner1(Index intersection, unsigned corner, unsigned index) const\n-override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:287\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bc_\bo_\br_\bn_\be_\br_\b0\n-Local0 corner0(Index intersection, unsigned corner, unsigned index) const\n-override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:284\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\b1\n-Index parent1(Index intersection, unsigned index) const override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:281\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx\n-typename Base::Index Index\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:211\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl\n-std::conditional_t< I==0, Local0, Local1 > Local\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:216\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:\n-_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br\n-SimplicialIntersectionListProvider()=default\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bc_\bl_\be_\ba_\br\n-void clear()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:290\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bs_\bi_\bz_\be\n-std::size_t size() const override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:269\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\b1\n-FieldVector< double, dim1 > Local1\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:213\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs_\b1\n-std::size_t parents1(Index intersection) const override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:275\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\b0\n-Index parent0(Index intersection, unsigned index) const override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:278\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs_\b0\n-std::size_t parents0(Index intersection) const override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:272\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:222\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n-_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-SimplicialIntersection(Index parent0, Index parent1)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:229\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n-_\bC_\bo_\br_\bn_\be_\br_\bs\n-std::array< Local< I >, nVertices > Corners\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:238\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n-_\bp_\ba_\br_\be_\bn_\bt_\bs_\b1\n-std::vector< Index > parents1\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:258\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n-_\bp_\ba_\br_\be_\bn_\bt_\bs_\b0\n-std::vector< Index > parents0\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:248\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n-_\bc_\bo_\br_\bn_\be_\br_\bs_\b1\n-std::vector< Corners< 1 > > corners1\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:253\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n-_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-SimplicialIntersection()=default\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:\n-_\bc_\bo_\br_\bn_\be_\br_\bs_\b0\n-std::vector< Corners< 0 > > corners0\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:243\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br\n+Abstract base for all classes that take extracted grids and build sets of\n+intersections.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:27\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b<_\b _\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< T, dimworld > WorldCoords\n+the coordinate type used in this interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:37\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b<_\b _\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n+Dune::GridGlue::IntersectionList< Grid1Coords, Grid2Coords > IntersectionList\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:39\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b<_\b _\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< T, grid1Dim > Grid1Coords\n+the local coordinate type for the grid1 coordinates\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:31\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b<_\b _\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>_\b:_\b:_\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< T, grid2Dim > Grid2Coords\n+the local coordinate type for the grid2 coordinates\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:34\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n+Common base class for many merger implementations: produce pairs of entities\n+that may intersect.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:58\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+virtual void computeIntersections(const Dune::GeometryType &grid1ElementType,\n+const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners,\n+std::bitset<(1<< grid1Dim)> &neighborIntersects1, unsigned int grid1Index,\n+const Dune::GeometryType &grid2ElementType, const std::vector< Dune::\n+FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< grid2Dim)>\n+&neighborIntersects2, unsigned int grid2Index, std::vector<\n+SimplicialIntersection > &intersections)=0\n+Compute the intersection between two overlapping elements.\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b_\n+std::shared_ptr< IntersectionList > intersectionList_\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:124\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs\n+typename Base::Grid1Coords Grid1Coords\n+Type used for local coordinates on the grid1 side.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:69\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\be_\bn_\ba_\bb_\bl_\be_\bF_\ba_\bl_\bl_\bb_\ba_\bc_\bk\n+void enableFallback(bool fallback)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:166\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\be_\bl_\be_\bm_\be_\bn_\bt_\bN_\be_\bi_\bg_\bh_\bb_\bo_\br_\bs_\b2_\b_\n+std::vector< std::vector< int > > elementNeighbors2_\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:131\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\be_\bl_\be_\bm_\be_\bn_\bt_\bN_\be_\bi_\bg_\bh_\bb_\bo_\br_\bs_\b1_\b_\n+std::vector< std::vector< int > > elementNeighbors1_\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:130\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bt_\by_\bp_\be\n+T ctype\n+the numeric type used in this interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:66\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bl_\be_\ba_\br\n+void clear() override\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:150\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n+typename Base::IntersectionList IntersectionList\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:77\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+bool computeIntersection(unsigned int candidate0, unsigned int candidate1,\n+const std::vector< Dune::FieldVector< T, dimworld > > &grid1Coords, const std::\n+vector< Dune::GeometryType > &grid1_element_types, std::bitset<(1<< grid1Dim)>\n+&neighborIntersects1, const std::vector< Dune::FieldVector< T, dimworld > >\n+&grid2Coords, const std::vector< Dune::GeometryType > &grid2_element_types,\n+std::bitset<(1<< grid2Dim)> &neighborIntersects2, bool insert=true)\n+Compute the intersection between two overlapping elements.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:263\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\be_\bn_\ba_\bb_\bl_\be_\bB_\br_\bu_\bt_\be_\bF_\bo_\br_\bc_\be\n+void enableBruteForce(bool bruteForce)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:171\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b_\n+std::shared_ptr< IntersectionListProvider > intersectionListProvider_\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:123\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bb_\bu_\bi_\bl_\bd\n+void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1_Coords,\n+const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::\n+GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< T,\n+dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements,\n+const std::vector< Dune::GeometryType > &grid2_element_types) override\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:392\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bg_\br_\bi_\bd_\b1_\bE_\bl_\be_\bm_\be_\bn_\bt_\bC_\bo_\br_\bn_\be_\br_\bs_\b_\n+std::vector< std::vector< unsigned int > > grid1ElementCorners_\n+Temporary internal data.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:127\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bg_\br_\bi_\bd_\b2_\bE_\bl_\be_\bm_\be_\bn_\bt_\bC_\bo_\br_\bn_\be_\br_\bs_\b_\n+std::vector< std::vector< unsigned int > > grid2ElementCorners_\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:128\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs\n+typename Base::Grid2Coords Grid2Coords\n+Type used for local coordinates on the grid2 side.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:72\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n+std::shared_ptr< IntersectionList > intersectionList() const final\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:160\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\b~_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n+virtual ~StandardMerge()=default\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bR_\be_\bm_\bo_\bt_\be_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+SimplicialIntersection RemoteSimplicialIntersection\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:84\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bv_\ba_\bl_\bi_\bd\n+bool valid\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:86\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n+StandardMerge()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:88\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+typename IntersectionListProvider::SimplicialIntersection\n+SimplicialIntersection\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:83\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n+typename Base::WorldCoords WorldCoords\n+the coordinate type used in this interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:75\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00080.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00080.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: computeintersection.cc File Reference\n+dune-grid-glue: contactmerge.hh File Reference\n \n \n \n \n \n \n \n@@ -70,28 +70,56 @@\n \n
    \n
    \n \n-
    computeintersection.cc File Reference
    \n+
    contactmerge.hh File Reference
    \n
    \n
    \n \n+

    Merge two grid boundary surfaces that may be a positive distance apart. \n+More...

    \n+
    #include <iostream>
    \n+#include <fstream>
    \n+#include <iomanip>
    \n+#include <vector>
    \n+#include <algorithm>
    \n+#include <limits>
    \n+#include <memory>
    \n+#include <functional>
    \n+#include <dune/common/fvector.hh>
    \n+#include <dune/common/exceptions.hh>
    \n+#include <dune/common/bitsetvector.hh>
    \n+#include <dune/common/deprecated.hh>
    \n+#include <dune/grid/common/grid.hh>
    \n+#include <dune/grid-glue/merging/standardmerge.hh>
    \n+#include <dune/grid-glue/gridglue.hh>
    \n+#include "contactmerge.cc"
    \n+
    \n

    Go to the source code of this file.

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

    \n+Classes

    class  Dune::GridGlue::ContactMerge< dimworld, T >
     Merge two codimension-1 surfaces that may be a positive distance apart. More...
     
    \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n-
    \n+

    Detailed Description

    \n+

    Merge two grid boundary surfaces that may be a positive distance apart.

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,17 +1,41 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-computeintersection.cc File Reference\n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n+contactmerge.hh File Reference\n+Merge two grid boundary surfaces that may be a positive distance apart. _\bM_\bo_\br_\be_\b._\b._\b.\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 <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n+#include \"_\bc_\bo_\bn_\bt_\ba_\bc_\bt_\bm_\be_\br_\bg_\be_\b._\bc_\bc\"\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n+C\bCl\bla\bas\bss\bse\bes\bs\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b _\b>\n+\u00a0 Merge two codimension-1 surfaces that may be a positive distance apart.\n+ _\bM_\bo_\br_\be_\b._\b._\b.\n+\u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+*\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n+Merge two grid boundary surfaces that may be a positive distance apart.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00080_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00080_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: computeintersection.cc Source File\n+dune-grid-glue: contactmerge.hh Source File\n \n \n \n \n \n \n \n@@ -74,356 +74,235 @@\n \n \n \n
    \n-
    computeintersection.cc
    \n+
    contactmerge.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    5
    \n-
    6namespace Dune {
    \n-
    7namespace GridGlue {
    \n-
    8
    \n-
    9//****************************************************************************************
    \n-
    10// PUBLIC
    \n-
    11//****************************************************************************************
    \n+
    10#ifndef DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH
    \n+
    11#define DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH
    \n
    12
    \n-
    13template<class CM>
    \n-
    \n-\n-
    15 const std::vector<V>& Y,
    \n-
    16 std::vector<std::vector<int> >& SX,
    \n-
    17 std::vector<std::vector<int> >& SY,
    \n-
    18 std::vector<V>& P) {
    \n-
    19
    \n-
    20 std::vector<std::vector<unsigned int> > subElementsX, subElementsY;
    \n-
    21 std::vector<std::vector<int> > faceIdsX, faceIdsY;
    \n-
    22 std::vector<V> subElementX(CM::grid1Dimension+1), subElementY(CM::grid2Dimension+1), sP;
    \n-
    23 std::vector<std::vector<int> > sSX, sSY;
    \n-
    24
    \n-
    25 CM::grid1_subdivisions(X,subElementsX,faceIdsX);
    \n-
    26 CM::grid2_subdivisions(Y,subElementsY,faceIdsY);
    \n+
    13
    \n+
    14#include <iostream>
    \n+
    15#include <fstream>
    \n+
    16#include <iomanip>
    \n+
    17#include <vector>
    \n+
    18#include <algorithm>
    \n+
    19#include <limits>
    \n+
    20#include <memory>
    \n+
    21#include <functional>
    \n+
    22
    \n+
    23#include <dune/common/fvector.hh>
    \n+
    24#include <dune/common/exceptions.hh>
    \n+
    25#include <dune/common/bitsetvector.hh>
    \n+
    26#include <dune/common/deprecated.hh>
    \n
    27
    \n-
    28 bool intersectionFound = false;
    \n+
    28#include <dune/grid/common/grid.hh>
    \n
    29
    \n-
    30 for (unsigned int i = 0; i < subElementsX.size(); ++i) { // iterate over all X subelements
    \n-
    31 for (unsigned int ki = 0; ki < subElementsX[i].size(); ++ki) // define the X subelement
    \n-
    32 subElementX[ki] = X[subElementsX[i][ki]];
    \n-
    33 for (unsigned int j = 0; j < subElementsY.size(); ++j) { // iterate over all Y subelemetns
    \n-
    34 for (unsigned int kj = 0; kj < subElementsY[j].size(); ++kj) // define the Y subleement
    \n-
    35 subElementY[kj] = Y[subElementsY[j][kj]];
    \n-
    36
    \n-
    37 sP.clear();
    \n-
    38
    \n-
    39 // compute the intersection
    \n-
    40 bool b = CM::computeIntersectionPoints(subElementX,subElementY,sSX,sSY,sP);
    \n-
    41 intersectionFound = intersectionFound || b;
    \n-
    42
    \n-
    43 // only insert points on outer faces
    \n-
    44 for (unsigned int ki = 0; ki < sSX.size(); ++ki) { // iterate over all faces
    \n-
    45 if (faceIdsX[i][ki] >= 0) {
    \n-
    46 for (unsigned int kii = 0; kii < sSX[ki].size(); ++kii) {
    \n-
    47 int k = insertPoint(sP[sSX[ki][kii]],P); // determine index in P
    \n-
    48 SX[faceIdsX[i][ki]].push_back(k);
    \n-
    49 }
    \n-
    50 }
    \n-
    51 }
    \n-
    52 for (unsigned int kj = 0; kj < sSY.size(); ++kj) { // iterate over all faces
    \n-
    53 if (faceIdsY[j][kj] >= 0) {
    \n-
    54 for (unsigned int kjj = 0; kjj < sSY[kj].size(); ++kjj) {
    \n-
    55 int k = insertPoint(sP[sSY[kj][kjj]],P); // determine index in P
    \n-
    56 SY[faceIdsY[j][kj]].push_back(k);
    \n-
    57 }
    \n-
    58 }
    \n-
    59 }
    \n-
    60 }
    \n-
    61 }
    \n-
    62
    \n-
    63 return intersectionFound;
    \n-
    64}
    \n-
    \n-
    65
    \n-
    66//****************************************************************************************
    \n-
    67// PRIVATE
    \n-
    68//****************************************************************************************
    \n-
    69
    \n-
    70template<class CM>
    \n-
    71void IntersectionComputation<CM>::orderPoints_(std::integral_constant<int,3>,
    \n-
    72 std::integral_constant<int,3>,
    \n-
    73 const V& centroid,
    \n-
    74 const std::vector<std::vector<int> >& SX,
    \n-
    75 const std::vector<std::vector<int> >& SY,
    \n-
    76 const std::vector<V>& P,
    \n-
    77 std::vector<std::vector<int> >& H)
    \n-
    78{
    \n-
    79 int n_facesX = SX.size();
    \n-
    80 int n_facesY = SY.size();
    \n-
    81 int m;
    \n-
    82
    \n-
    83 std::vector<int> no,id,temp ;
    \n-
    84 std::vector<V> p ;
    \n-
    85 std::vector<std::vector<int> > tempH;
    \n-
    86
    \n-
    87 std::vector<int> faceOrderingX(n_facesX);
    \n-
    88 std::vector<int> faceOrderingY(n_facesY);
    \n-
    89
    \n-
    90 if (n_facesX==3) {
    \n-
    91 faceOrderingX[0] = 0; faceOrderingX[1] = 2; faceOrderingX[2] = 1;
    \n-
    92 } else {
    \n-
    93 faceOrderingX[0] = 0; faceOrderingX[1] = 3; faceOrderingX[2] = 2; faceOrderingX[3] = 1;
    \n-
    94 }
    \n-
    95 if (n_facesY==3) {
    \n-
    96 faceOrderingY[0] = 0; faceOrderingY[1] = 2; faceOrderingY[2] = 1;
    \n-
    97 } else {
    \n-
    98 faceOrderingY[0] = 0; faceOrderingY[1] = 3; faceOrderingY[2] = 2; faceOrderingY[3] = 1;
    \n-
    99 }
    \n-
    100
    \n-
    101 if (P.size() > 3) {
    \n-
    102 for (int i = 0; i < n_facesX; ++i) { // loop on faces of X
    \n-
    103 if (SX[i].size() > 0) {
    \n-
    104 no = SX[faceOrderingX[i]];
    \n-
    105 removeDuplicates(no);
    \n-
    106 m = no.size() ;
    \n-
    107 if ((m>=3) && newFace3D(no,tempH)) // don't compute degenerate polygons and check if face is new
    \n-
    108 {
    \n-
    109 for ( int l=0; l<m; ++l)
    \n-
    110 p.push_back(P[no[l]]);
    \n-
    111 orderPointsCC(std::integral_constant<int,3>(), centroid,id,p); // order points counter-clock-wise
    \n-
    112 for ( int l=0; l<m; ++l)
    \n-
    113 temp.push_back(no[id[l]]) ;
    \n-
    114 tempH.push_back(temp) ;
    \n-
    115 temp.clear();
    \n-
    116 p.clear();
    \n-
    117 id.clear(); // clean
    \n-
    118 }
    \n-
    119 no.clear() ; // clean
    \n-
    120 }
    \n-
    121 }
    \n-
    122 for (int i = 0; i < n_facesY; ++i) { // loop on faces of Y
    \n-
    123 if (SY[i].size() > 0) {
    \n-
    124 no = SY[faceOrderingY[i]];
    \n-
    125 removeDuplicates(no);
    \n-
    126 m = no.size() ;
    \n-
    127 if ((m>=3) && newFace3D(no,tempH)) // don't compute degenerate polygons and check if face is new
    \n-
    128 {
    \n-
    129 for ( int l=0; l<m; ++l)
    \n-
    130 p.push_back(P[no[l]]) ;
    \n-
    131 orderPointsCC(std::integral_constant<int,3>(),centroid,id,p); // order points counter-clock-wise
    \n-
    132 for ( int l=0; l<m; ++l)
    \n-
    133 temp.push_back(no[id[l]]) ;
    \n-
    134 tempH.push_back(temp) ;
    \n-
    135 temp.clear();
    \n-
    136 p.clear();
    \n-
    137 id.clear(); // clean
    \n-
    138 }
    \n-
    139 no.clear() ; // clean
    \n-
    140 }
    \n-
    141 }
    \n-
    142 }
    \n-
    143
    \n-
    144 for (int i = 0; i < tempH.size(); ++i) {
    \n-
    145 int hs = tempH[i].size();
    \n-
    146 if (hs >= 3) {
    \n-
    147 for (int j = 1; j <= hs-2;++j) {
    \n-
    148 temp.clear();
    \n-
    149 temp.push_back(tempH[i][0]);
    \n-
    150 for (int k = 0; k < 2; ++k)
    \n-
    151 temp.push_back(tempH[i][j+k]);
    \n-
    152 H.push_back(temp);
    \n-
    153 }
    \n-
    154 }
    \n-
    155 }
    \n-
    156}
    \n-
    157
    \n-
    158template<class CM>
    \n-
    159void IntersectionComputation<CM>::orderPoints_(std::integral_constant<int,2>,
    \n-
    160 std::integral_constant<int,2>,
    \n-
    161 const V& centroid,
    \n-
    162 const std::vector<std::vector<int> >& SX,
    \n-
    163 const std::vector<std::vector<int> >& SY,
    \n-
    164 const std::vector<V>& P,
    \n-
    165 std::vector<std::vector<int> >& H)
    \n-
    166{
    \n-
    167 H.clear();
    \n-
    168 std::vector<int> id, temp(2);
    \n+\n+\n+
    32
    \n+
    33namespace Dune {
    \n+
    34namespace GridGlue {
    \n+
    35
    \n+
    41template<int dimworld, typename T = double>
    \n+
    \n+\n+
    43: public StandardMerge<T,dimworld-1,dimworld-1,dimworld>
    \n+
    44{
    \n+
    45 static constexpr int dim = dimworld-1;
    \n+
    46
    \n+
    47 static_assert( dim==1 || dim==2,
    \n+
    48 "ContactMerge yet only handles the cases dim==1 and dim==2!");
    \n+
    49
    \n+\n+
    51public:
    \n+
    52
    \n+
    53 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n+
    54
    \n+
    56 typedef T ctype;
    \n+
    57
    \n+
    59 typedef Dune::FieldVector<T, dimworld> WorldCoords;
    \n+
    60
    \n+
    62 typedef Dune::FieldVector<T, dim> LocalCoords;
    \n+
    63
    \n+\n+
    \n+
    73 ContactMerge(const T allowedOverlap=T(0),
    \n+
    74 std::function<WorldCoords(WorldCoords)> domainDirections=nullptr,
    \n+
    75 std::function<WorldCoords(WorldCoords)> targetDirections=nullptr,
    \n+\n+
    77 : domainDirections_(domainDirections), targetDirections_(targetDirections),
    \n+
    78 overlap_(allowedOverlap), type_(type)
    \n+
    79 {}
    \n+
    \n+
    80
    \n+
    \n+
    86 ContactMerge(const T allowedOverlap, ProjectionType type)
    \n+
    87 : overlap_(allowedOverlap),
    \n+
    88 type_(type)
    \n+
    89 {}
    \n+
    \n+
    90
    \n+
    99 inline
    \n+
    \n+
    100 void setSurfaceDirections(std::function<WorldCoords(WorldCoords)> domainDirections,
    \n+
    101 std::function<WorldCoords(WorldCoords)> targetDirections)
    \n+
    102 {
    \n+
    103 domainDirections_ = domainDirections;
    \n+
    104 targetDirections_ = targetDirections;
    \n+
    105 this->valid = false;
    \n+
    106 }
    \n+
    \n+
    107
    \n+
    \n+
    109 void setOverlap(T overlap)
    \n+
    110 {
    \n+
    111 overlap_ = overlap;
    \n+
    112 }
    \n+
    \n+
    113
    \n+
    \n+
    115 T getOverlap() const
    \n+
    116 {
    \n+
    117 return overlap_;
    \n+
    118 }
    \n+
    \n+
    119
    \n+
    \n+
    123 void minNormalAngle(T angle)
    \n+
    124 {
    \n+
    125 using std::cos;
    \n+
    126 maxNormalProduct_ = cos(angle);
    \n+
    127 }
    \n+
    \n+
    128
    \n+
    \n+\n+
    133 {
    \n+
    134 using std::acos;
    \n+
    135 return acos(maxNormalProduct_);
    \n+
    136 }
    \n+
    \n+
    137
    \n+
    138protected:
    \n+
    139 typedef typename StandardMerge<T,dimworld-1,dimworld-1,dimworld>::SimplicialIntersection SimplicialIntersection;
    \n+
    140
    \n+
    141private:
    \n+
    145 std::function<WorldCoords(WorldCoords)> domainDirections_;
    \n+
    146 std::vector<WorldCoords> nodalDomainDirections_;
    \n+
    147
    \n+
    156 std::function<WorldCoords(WorldCoords)> targetDirections_;
    \n+
    157 std::vector<WorldCoords> nodalTargetDirections_;
    \n+
    158
    \n+
    160 T overlap_;
    \n+
    161
    \n+
    163 ProjectionType type_;
    \n+
    164
    \n+
    168 T maxNormalProduct_ = T(-0.1);
    \n
    169
    \n-
    170 orderPointsCC(std::integral_constant<int,2>(),centroid,id,P);
    \n-
    171
    \n-
    172 for (std::size_t i = 0; i < id.size();++i) {
    \n-
    173 temp[0] = id[i];
    \n-
    174 temp[1] = id[(i+1)%(id.size())];
    \n-
    175 H.push_back(temp);
    \n-
    176 }
    \n-
    177}
    \n-
    178
    \n-
    179template<class CM>
    \n-
    180void IntersectionComputation<CM>::orderPoints_(std::integral_constant<int,2>,
    \n-
    181 std::integral_constant<int,3>,
    \n-
    182 const V& centroid,
    \n-
    183 const std::vector<std::vector<int> >& SX,
    \n-
    184 const std::vector<std::vector<int> >& SY,
    \n-
    185 const std::vector<V>& P,
    \n-
    186 std::vector<std::vector<int> >& H)
    \n-
    187{
    \n-
    188 H.clear();
    \n-
    189 std::vector<int> id, temp(2);
    \n-
    190
    \n-
    191 orderPointsCC(std::integral_constant<int,3>(),centroid,id,P);
    \n-
    192
    \n-
    193 for (int i = 0; i < id.size();++i) {
    \n-
    194 temp[0] = id[i];
    \n-
    195 temp[1] = id[(i+1)%(id.size())];
    \n-
    196 H.push_back(temp);
    \n-
    197 }
    \n-
    198}
    \n+
    174 void computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n+
    175 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n+
    176 std::bitset<(1<<dim)>& neighborIntersects1,
    \n+
    177 unsigned int grid1Index,
    \n+
    178 const Dune::GeometryType& grid2ElementType,
    \n+
    179 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n+
    180 std::bitset<(1<<dim)>& neighborIntersects2,
    \n+
    181 unsigned int grid2Index,
    \n+
    182 std::vector<SimplicialIntersection>& intersections) override;
    \n+
    183
    \n+
    187protected:
    \n+
    \n+
    188 void build(const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n+
    189 const std::vector<unsigned int>& grid1Elements,
    \n+
    190 const std::vector<Dune::GeometryType>& grid1ElementTypes,
    \n+
    191 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n+
    192 const std::vector<unsigned int>& grid2Elements,
    \n+
    193 const std::vector<Dune::GeometryType>& grid2ElementTypes) override
    \n+
    194 {
    \n+
    195 std::cout<<"ContactMerge building grid!\\n";
    \n+
    196 // setup the nodal direction vectors
    \n+
    197 setupNodalDirections(grid1Coords, grid1Elements, grid1ElementTypes,
    \n+
    198 grid2Coords, grid2Elements, grid2ElementTypes);
    \n
    199
    \n-
    200template<class CM>
    \n-
    201void IntersectionComputation<CM>::removeDuplicates(std::vector<int> & p)
    \n-
    202{
    \n-
    203 sort(p.begin(),p.end());
    \n-
    204 std::vector<int>::iterator it = std::unique(p.begin(),p.end());
    \n-
    205 p.erase(it,p.end());
    \n-
    206}
    \n-
    207
    \n-
    208template<class CM>
    \n-
    209bool IntersectionComputation<CM>::newFace3D(const std::vector<int>& id,
    \n-
    210 const std::vector<std::vector<int> >& H)
    \n-
    211{
    \n-
    212 // get size_type for all the vectors we are using
    \n-
    213 typedef typename std::vector<Empty>::size_type size_type;
    \n-
    214
    \n-
    215 int n = H.size() ;
    \n-
    216 int m = id.size() ;
    \n-
    217 std::vector<int> A ;
    \n-
    218 std::vector<int> B = id ;
    \n-
    219 sort(B.begin(),B.end()) ;
    \n-
    220 int i = 0 ;
    \n-
    221 bool b = true ;
    \n-
    222 double tp ;
    \n-
    223
    \n-
    224 while ( b && (i<n) )
    \n-
    225 {
    \n-
    226 if ((H[i].size())>=m)
    \n-
    227 {
    \n-
    228 A=H[i] ;
    \n-
    229 sort(A.begin(),A.end());
    \n-
    230 tp = 0 ;
    \n-
    231 for ( size_type j=0 ; j < m; j++)
    \n-
    232 tp += std::fabs(A[j]-B[j]) ;
    \n-
    233 b = (tp>0) ;
    \n-
    234 }
    \n-
    235
    \n-
    236 i += 1 ;
    \n-
    237 }
    \n-
    238
    \n-
    239 return b ;
    \n-
    240}
    \n-
    241
    \n+
    200 Base::build(grid1Coords, grid1Elements, grid1ElementTypes,
    \n+
    201 grid2Coords, grid2Elements, grid2ElementTypes);
    \n+
    202
    \n+
    203 }
    \n+
    \n+
    204
    \n+
    205private:
    \n+
    206
    \n+
    208 static LocalCoords localCornerCoords(int i, const Dune::GeometryType& gt)
    \n+
    209 {
    \n+
    210 const auto& ref = Dune::ReferenceElements<T,dim>::general(gt);
    \n+
    211 return ref.position(i,dim);
    \n+
    212 }
    \n+
    213
    \n+
    214protected:
    \n+
    215
    \n+
    217 void computeCyclicOrder(const std::vector<std::array<LocalCoords,2> >& polytopeCorners,
    \n+
    218 const LocalCoords& center, std::vector<int>& ordering) const;
    \n+
    219
    \n+
    221 void setupNodalDirections(const std::vector<WorldCoords>& coords1,
    \n+
    222 const std::vector<unsigned int>& elements1,
    \n+
    223 const std::vector<Dune::GeometryType>& elementTypes1,
    \n+
    224 const std::vector<WorldCoords>& coords2,
    \n+
    225 const std::vector<unsigned int>& elements2,
    \n+
    226 const std::vector<Dune::GeometryType>& elementTypes2);
    \n+
    227
    \n+
    229 void computeOuterNormalField(const std::vector<WorldCoords>& coords,
    \n+
    230 const std::vector<unsigned int>& elements,
    \n+
    231 const std::vector<Dune::GeometryType>& elementTypes,
    \n+
    232 std::vector<WorldCoords>& normals);
    \n+
    233
    \n+
    235 void removeDoubles(std::vector<std::array<LocalCoords,2> >& polytopeCorners);
    \n+
    236};
    \n+
    \n+
    237
    \n+
    238} /* namespace GridGlue */
    \n+
    239} /* namespace Dune */
    \n+
    240
    \n+
    241#include "contactmerge.cc"
    \n
    242
    \n-
    243template<class CM>
    \n-
    244void IntersectionComputation<CM>::orderPointsCC(std::integral_constant<int,3>,
    \n-
    245 const V& centroid,
    \n-
    246 std::vector<int>& id,
    \n-
    247 const std::vector<V>& P)
    \n-
    248{
    \n-
    249 typedef typename std::vector<Empty>::size_type size_type;
    \n-
    250
    \n-
    251 id.clear();
    \n-
    252
    \n-
    253 // get size_type for all the vectors we are using
    \n-
    254 V c,d1,d2,dr,dn,cross,d ;
    \n-
    255 std::vector<typename V::value_type> ai ;
    \n-
    256
    \n-
    257 d1 = P[1] - P[0] ; // two reference vectors
    \n-
    258 d2 = P[2] - P[0] ;
    \n-
    259
    \n-
    260 cross[0] = d1[1]*d2[2] - d1[2]*d2[1] ; // cross product
    \n-
    261 cross[1] = d1[2]*d2[0] - d1[0]*d2[2] ;
    \n-
    262 cross[2] = d1[0]*d2[1] - d1[1]*d2[0] ;
    \n-
    263
    \n-
    264 if (((centroid - P[0])*cross)<0) // good orientation ?
    \n-
    265 {
    \n-
    266 dr = d1 ;
    \n-
    267 dr /= dr.two_norm() ; // 'x-axis' unit vector
    \n-
    268 dn = dr ;
    \n-
    269 dn *= -(d2*dr) ;
    \n-
    270 dn += d2 ;
    \n-
    271 dn /= dn.two_norm() ; // 'y-axis' unit vector
    \n-
    272 }
    \n-
    273 else
    \n-
    274 {
    \n-
    275 dr = d2 ;
    \n-
    276 dr /= dr.two_norm() ; // 'y-axis' unit vector
    \n-
    277 dn = dr ;
    \n-
    278 dn *= -(d1*dr) ;
    \n-
    279 dn += d1 ;
    \n-
    280 dn /= dn.two_norm() ; // 'x-axis' unit vector
    \n-
    281 }
    \n-
    282
    \n-
    283 // definition of angles, using projection on the local reference, ie by scalarly multipliying by dr and dn resp.
    \n-
    284 for ( size_type j=1 ; j < P.size() ; j++)
    \n-
    285 {
    \n-
    286 ai.push_back(atan2((P[j]-P[0])*dn,(P[j]-P[0])*dr)) ;
    \n-
    287 id.push_back(j) ;
    \n-
    288 }
    \n-
    289
    \n-
    290 // sort according to increasing angles
    \n-
    291 for ( size_type j=1; j < ai.size(); j++) {
    \n-
    292 for ( size_type i=0; i < j; i++) {
    \n-
    293 if (ai[j]<ai[i]) {
    \n-
    294 std::swap<typename V::value_type>(ai[i],ai[j]) ;
    \n-
    295 std::swap<int>(id[i],id[j]) ;
    \n-
    296 }
    \n-
    297 }
    \n-
    298 }
    \n-
    299
    \n-
    300 id.insert(id.begin(),0);
    \n-
    301}
    \n-
    302
    \n-
    303template<class CM>
    \n-
    304void IntersectionComputation<CM>::orderPointsCC(std::integral_constant<int,2>,
    \n-
    305 const V& centroid,
    \n-
    306 std::vector<int>& id,
    \n-
    307 const std::vector<V>& P)
    \n-
    308{
    \n-
    309 typedef typename std::vector<Empty>::size_type size_type;
    \n-
    310
    \n-
    311 // get size_type for all the vectors we are using
    \n-
    312 typedef typename std::vector<Empty>::size_type size_type;
    \n-
    313
    \n-
    314 std::vector<typename V::value_type> ai(P.size());
    \n-
    315 id.resize(P.size());
    \n-
    316
    \n-
    317 // definition of angles
    \n-
    318 for ( size_type i=0; i < P.size(); i++) {
    \n-
    319 ai[i] = atan2(P[i][1]-centroid[1],P[i][0]-centroid[0]);
    \n-
    320 id[i] = i;
    \n-
    321 }
    \n-
    322
    \n-
    323 // sort according to increasing angles
    \n-
    324 for ( size_type j=1; j < ai.size(); j++) {
    \n-
    325 for ( size_type i=0; i < j; i++) if (ai[j]<ai[i]) {
    \n-
    326 std::swap<typename V::value_type>(ai[i],ai[j]);
    \n-
    327 std::swap<int>(id[i],id[j]);
    \n-
    328 }
    \n-
    329 }
    \n-
    330}
    \n-
    331
    \n-
    332} /* namespace Dune::GridGlue */
    \n-
    333} /* namespace Dune */
    \n+
    243#endif // DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH
    \n+
    Central component of the module implementing the coupling of two grids.
    \n+
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    \n+\n
    Definition gridglue.hh:37
    \n-
    int insertPoint(const V p, std::vector< V > &P)
    Definition computeintersection.hh:164
    \n-
    Intersection computation method for two elements of arbitrary dimension.
    Definition computeintersection.hh:39
    \n-
    static bool computeIntersection(const std::vector< V > &X, const std::vector< V > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< V > &P)
    Compute the intersection of two elements X and Y Compute the intersection of two elements X and Y,...
    Definition computeintersection.cc:14
    \n+
    Merge two codimension-1 surfaces that may be a positive distance apart.
    Definition contactmerge.hh:44
    \n+
    void computeCyclicOrder(const std::vector< std::array< LocalCoords, 2 > > &polytopeCorners, const LocalCoords &center, std::vector< int > &ordering) const
    Order the corners of the intersection polytope in cyclic order.
    Definition contactmerge.cc:214
    \n+
    StandardMerge< T, dimworld-1, dimworld-1, dimworld >::SimplicialIntersection SimplicialIntersection
    Definition contactmerge.hh:139
    \n+
    void removeDoubles(std::vector< std::array< LocalCoords, 2 > > &polytopeCorners)
    Remove all multiples.
    Definition contactmerge.cc:335
    \n+
    void setOverlap(T overlap)
    Set the allowed overlap of the surfaces.
    Definition contactmerge.hh:109
    \n+
    Dune::FieldVector< T, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition contactmerge.hh:59
    \n+
    void setupNodalDirections(const std::vector< WorldCoords > &coords1, const std::vector< unsigned int > &elements1, const std::vector< Dune::GeometryType > &elementTypes1, const std::vector< WorldCoords > &coords2, const std::vector< unsigned int > &elements2, const std::vector< Dune::GeometryType > &elementTypes2)
    Setup the direction vectors containing the directions for each vertex.
    Definition contactmerge.cc:269
    \n+
    void minNormalAngle(T angle)
    set minimum angle in radians between normals at x and \u03a6(x)
    Definition contactmerge.hh:123
    \n+
    T ctype
    the numeric type used in this interface
    Definition contactmerge.hh:56
    \n+
    ProjectionType
    Type of the projection, closest point or outer normal projection.
    Definition contactmerge.hh:65
    \n+
    @ CLOSEST_POINT
    Definition contactmerge.hh:65
    \n+
    @ OUTER_NORMAL
    Definition contactmerge.hh:65
    \n+
    void computeOuterNormalField(const std::vector< WorldCoords > &coords, const std::vector< unsigned int > &elements, const std::vector< Dune::GeometryType > &elementTypes, std::vector< WorldCoords > &normals)
    If no direction field was specified compute the outer normal field.
    Definition contactmerge.cc:296
    \n+
    T getOverlap() const
    Get the allowed overlap of the surfaces.
    Definition contactmerge.hh:115
    \n+
    ContactMerge(const T allowedOverlap=T(0), std::function< WorldCoords(WorldCoords)> domainDirections=nullptr, std::function< WorldCoords(WorldCoords)> targetDirections=nullptr, ProjectionType type=OUTER_NORMAL)
    Construct merger given overlap and possible projection directions.
    Definition contactmerge.hh:73
    \n+
    void setSurfaceDirections(std::function< WorldCoords(WorldCoords)> domainDirections, std::function< WorldCoords(WorldCoords)> targetDirections)
    Set surface direction functions.
    Definition contactmerge.hh:100
    \n+
    void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1Coords, const std::vector< unsigned int > &grid1Elements, const std::vector< Dune::GeometryType > &grid1ElementTypes, const std::vector< Dune::FieldVector< T, dimworld > > &grid2Coords, const std::vector< unsigned int > &grid2Elements, const std::vector< Dune::GeometryType > &grid2ElementTypes) override
    Definition contactmerge.hh:188
    \n+
    ContactMerge(const T allowedOverlap, ProjectionType type)
    Construct merger given overlap and type of the projection.
    Definition contactmerge.hh:86
    \n+
    T minNormalAngle() const
    get minimum angle in radians between normals at x and \u03a6(x)
    Definition contactmerge.hh:132
    \n+
    Dune::FieldVector< T, dim > LocalCoords
    the coordinate type used in this interface
    Definition contactmerge.hh:62
    \n+
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    Definition standardmerge.hh:58
    \n+
    void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1_Coords, const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< T, dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements, const std::vector< Dune::GeometryType > &grid2_element_types) override
    Definition standardmerge.hh:392
    \n+
    bool valid
    Definition standardmerge.hh:86
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,382 +1,304 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-computeintersection.cc\n+contactmerge.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-5\n-6namespace _\bD_\bu_\bn_\be {\n-7namespace GridGlue {\n-8\n-9//\n-****************************************************************************************\n-10// PUBLIC\n-11//\n-****************************************************************************************\n+10#ifndef DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH\n+11#define DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH\n 12\n-13template\n-_\b1_\b4bool _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\bC_\bM_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(const std::vector&\n-X,\n-15 const std::vector& Y,\n-16 std::vector >& SX,\n-17 std::vector >& SY,\n-18 std::vector& P) {\n-19\n-20 std::vector > subElementsX, subElementsY;\n-21 std::vector > faceIdsX, faceIdsY;\n-22 std::vector subElementX(CM::grid1Dimension+1), subElementY(CM::\n-grid2Dimension+1), sP;\n-23 std::vector > sSX, sSY;\n-24\n-25 CM::grid1_subdivisions(X,subElementsX,faceIdsX);\n-26 CM::grid2_subdivisions(Y,subElementsY,faceIdsY);\n+13\n+14#include \n+15#include \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#include \n+26#include \n 27\n-28 bool intersectionFound = false;\n+28#include \n 29\n-30 for (unsigned int i = 0; i < subElementsX.size(); ++i) { // iterate over all\n-X subelements\n-31 for (unsigned int ki = 0; ki < subElementsX[i].size(); ++ki) // define the X\n-subelement\n-32 subElementX[ki] = X[subElementsX[i][ki]];\n-33 for (unsigned int j = 0; j < subElementsY.size(); ++j) { // iterate over all\n-Y subelemetns\n-34 for (unsigned int kj = 0; kj < subElementsY[j].size(); ++kj) // define the Y\n-subleement\n-35 subElementY[kj] = Y[subElementsY[j][kj]];\n-36\n-37 sP.clear();\n-38\n-39 // compute the intersection\n-40 bool b = CM::computeIntersectionPoints(subElementX,subElementY,sSX,sSY,sP);\n-41 intersectionFound = intersectionFound || b;\n-42\n-43 // only insert points on outer faces\n-44 for (unsigned int ki = 0; ki < sSX.size(); ++ki) { // iterate over all faces\n-45 if (faceIdsX[i][ki] >= 0) {\n-46 for (unsigned int kii = 0; kii < sSX[ki].size(); ++kii) {\n-47 int k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(sP[sSX[ki][kii]],P); // determine index in P\n-48 SX[faceIdsX[i][ki]].push_back(k);\n-49 }\n-50 }\n-51 }\n-52 for (unsigned int kj = 0; kj < sSY.size(); ++kj) { // iterate over all faces\n-53 if (faceIdsY[j][kj] >= 0) {\n-54 for (unsigned int kjj = 0; kjj < sSY[kj].size(); ++kjj) {\n-55 int k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(sP[sSY[kj][kjj]],P); // determine index in P\n-56 SY[faceIdsY[j][kj]].push_back(k);\n-57 }\n-58 }\n-59 }\n-60 }\n-61 }\n-62\n-63 return intersectionFound;\n-64}\n-65\n-66//\n-****************************************************************************************\n-67// PRIVATE\n-68//\n-****************************************************************************************\n-69\n-70template\n-71void _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\bC_\bM_\b>_\b:_\b:_\bo_\br_\bd_\be_\br_\bP_\bo_\bi_\bn_\bt_\bs_\b_(std::integral_constant,\n-72 std::integral_constant,\n-73 const V& centroid,\n-74 const std::vector >& SX,\n-75 const std::vector >& SY,\n-76 const std::vector& P,\n-77 std::vector >& H)\n-78{\n-79 int n_facesX = SX.size();\n-80 int n_facesY = SY.size();\n-81 int m;\n-82\n-83 std::vector no,id,temp ;\n-84 std::vector p ;\n-85 std::vector > tempH;\n-86\n-87 std::vector faceOrderingX(n_facesX);\n-88 std::vector faceOrderingY(n_facesY);\n-89\n-90 if (n_facesX==3) {\n-91 faceOrderingX[0] = 0; faceOrderingX[1] = 2; faceOrderingX[2] = 1;\n-92 } else {\n-93 faceOrderingX[0] = 0; faceOrderingX[1] = 3; faceOrderingX[2] = 2;\n-faceOrderingX[3] = 1;\n-94 }\n-95 if (n_facesY==3) {\n-96 faceOrderingY[0] = 0; faceOrderingY[1] = 2; faceOrderingY[2] = 1;\n-97 } else {\n-98 faceOrderingY[0] = 0; faceOrderingY[1] = 3; faceOrderingY[2] = 2;\n-faceOrderingY[3] = 1;\n-99 }\n-100\n-101 if (P.size() > 3) {\n-102 for (int i = 0; i < n_facesX; ++i) { // loop on faces of X\n-103 if (SX[i].size() > 0) {\n-104 no = SX[faceOrderingX[i]];\n-105 removeDuplicates(no);\n-106 m = no.size() ;\n-107 if ((m>=3) && newFace3D(no,tempH)) // don't compute degenerate polygons and\n-check if face is new\n-108 {\n-109 for ( int l=0; l(), centroid,id,p); // order\n-points counter-clock-wise\n-112 for ( int l=0; l\n+31#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n+32\n+33namespace _\bD_\bu_\bn_\be {\n+34namespace GridGlue {\n+35\n+41template\n+_\b4_\b2class _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be\n+43: public _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n+44{\n+45 static constexpr int dim = dimworld-1;\n+46\n+47 static_assert( dim==1 || dim==2,\n+48 \"ContactMerge yet only handles the cases dim==1 and dim==2!\");\n+49\n+50 typedef _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bd_\bi_\bm_\b,_\bd_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b> _\bB_\ba_\bs_\be;\n+51public:\n+52\n+53 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n+54\n+_\b5_\b6 typedef T _\bc_\bt_\by_\bp_\be;\n+57\n+_\b5_\b9 typedef Dune::FieldVector _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\n+60\n+_\b6_\b2 typedef Dune::FieldVector _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs;\n+63\n+_\b6_\b5 enum _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be {_\bO_\bU_\bT_\bE_\bR_\b__\bN_\bO_\bR_\bM_\bA_\bL, _\bC_\bL_\bO_\bS_\bE_\bS_\bT_\b__\bP_\bO_\bI_\bN_\bT};\n+_\b7_\b3 _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be(const T allowedOverlap=T(0),\n+74 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> domainDirections=nullptr,\n+75 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> targetDirections=nullptr,\n+76 _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be type = _\bO_\bU_\bT_\bE_\bR_\b__\bN_\bO_\bR_\bM_\bA_\bL)\n+77 : domainDirections_(domainDirections), targetDirections_(targetDirections),\n+78 overlap_(allowedOverlap), type_(type)\n+79 {}\n+80\n+_\b8_\b6 _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be(const T allowedOverlap, _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be type)\n+87 : overlap_(allowedOverlap),\n+88 type_(type)\n+89 {}\n+90\n+99 inline\n+_\b1_\b0_\b0 void _\bs_\be_\bt_\bS_\bu_\br_\bf_\ba_\bc_\be_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs(std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)>\n+domainDirections,\n+101 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> targetDirections)\n+102 {\n+103 domainDirections_ = domainDirections;\n+104 targetDirections_ = targetDirections;\n+105 this->_\bv_\ba_\bl_\bi_\bd = false;\n+106 }\n+107\n+_\b1_\b0_\b9 void _\bs_\be_\bt_\bO_\bv_\be_\br_\bl_\ba_\bp(T overlap)\n+110 {\n+111 overlap_ = overlap;\n+112 }\n+113\n+_\b1_\b1_\b5 T _\bg_\be_\bt_\bO_\bv_\be_\br_\bl_\ba_\bp() const\n+116 {\n+117 return overlap_;\n 118 }\n-119 no.clear() ; // clean\n-120 }\n-121 }\n-122 for (int i = 0; i < n_facesY; ++i) { // loop on faces of Y\n-123 if (SY[i].size() > 0) {\n-124 no = SY[faceOrderingY[i]];\n-125 removeDuplicates(no);\n-126 m = no.size() ;\n-127 if ((m>=3) && newFace3D(no,tempH)) // don't compute degenerate polygons and\n-check if face is new\n-128 {\n-129 for ( int l=0; l(),centroid,id,p); // order\n-points counter-clock-wise\n-132 for ( int l=0; l= 3) {\n-147 for (int j = 1; j <= hs-2;++j) {\n-148 temp.clear();\n-149 temp.push_back(tempH[i][0]);\n-150 for (int k = 0; k < 2; ++k)\n-151 temp.push_back(tempH[i][j+k]);\n-152 H.push_back(temp);\n-153 }\n-154 }\n-155 }\n-156}\n-157\n-158template\n-159void IntersectionComputation::orderPoints_(std::\n-integral_constant,\n-160 std::integral_constant,\n-161 const V& centroid,\n-162 const std::vector >& SX,\n-163 const std::vector >& SY,\n-164 const std::vector& P,\n-165 std::vector >& H)\n-166{\n-167 H.clear();\n-168 std::vector id, temp(2);\n+119\n+_\b1_\b2_\b3 void _\bm_\bi_\bn_\bN_\bo_\br_\bm_\ba_\bl_\bA_\bn_\bg_\bl_\be(T angle)\n+124 {\n+125 using std::cos;\n+126 maxNormalProduct_ = cos(angle);\n+127 }\n+128\n+_\b1_\b3_\b2 T _\bm_\bi_\bn_\bN_\bo_\br_\bm_\ba_\bl_\bA_\bn_\bg_\bl_\be() const\n+133 {\n+134 using std::acos;\n+135 return acos(maxNormalProduct_);\n+136 }\n+137\n+138protected:\n+_\b1_\b3_\b9 typedef typename _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:\n+_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n+140\n+141private:\n+145 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> domainDirections_;\n+146 std::vector nodalDomainDirections_;\n+147\n+156 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> targetDirections_;\n+157 std::vector nodalTargetDirections_;\n+158\n+160 T overlap_;\n+161\n+163 _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be type_;\n+164\n+168 T maxNormalProduct_ = T(-0.1);\n 169\n-170 orderPointsCC(std::integral_constant(),centroid,id,P);\n-171\n-172 for (std::size_t i = 0; i < id.size();++i) {\n-173 temp[0] = id[i];\n-174 temp[1] = id[(i+1)%(id.size())];\n-175 H.push_back(temp);\n-176 }\n-177}\n-178\n-179template\n-180void IntersectionComputation::orderPoints_(std::\n-integral_constant,\n-181 std::integral_constant,\n-182 const V& centroid,\n-183 const std::vector >& SX,\n-184 const std::vector >& SY,\n-185 const std::vector& P,\n-186 std::vector >& H)\n-187{\n-188 H.clear();\n-189 std::vector id, temp(2);\n-190\n-191 orderPointsCC(std::integral_constant(),centroid,id,P);\n-192\n-193 for (int i = 0; i < id.size();++i) {\n-194 temp[0] = id[i];\n-195 temp[1] = id[(i+1)%(id.size())];\n-196 H.push_back(temp);\n-197 }\n-198}\n+174 void computeIntersections(const Dune::GeometryType& grid1ElementType,\n+175 const std::vector >& grid1ElementCorners,\n+176 std::bitset<(1<& neighborIntersects1,\n+177 unsigned int grid1Index,\n+178 const Dune::GeometryType& grid2ElementType,\n+179 const std::vector >& grid2ElementCorners,\n+180 std::bitset<(1<& neighborIntersects2,\n+181 unsigned int grid2Index,\n+182 std::vector& intersections) override;\n+183\n+187protected:\n+_\b1_\b8_\b8 void _\bb_\bu_\bi_\bl_\bd(const std::vector >& grid1Coords,\n+189 const std::vector& grid1Elements,\n+190 const std::vector& grid1ElementTypes,\n+191 const std::vector >& grid2Coords,\n+192 const std::vector& grid2Elements,\n+193 const std::vector& grid2ElementTypes) override\n+194 {\n+195 std::cout<<\"ContactMerge building grid!\\n\";\n+196 // setup the nodal direction vectors\n+197 _\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs(grid1Coords, grid1Elements, grid1ElementTypes,\n+198 grid2Coords, grid2Elements, grid2ElementTypes);\n 199\n-200template\n-201void IntersectionComputation::removeDuplicates(std::vector & p)\n-202{\n-203 sort(p.begin(),p.end());\n-204 std::vector::iterator it = std::unique(p.begin(),p.end());\n-205 p.erase(it,p.end());\n-206}\n-207\n-208template\n-209bool IntersectionComputation::newFace3D(const std::vector& id,\n-210 const std::vector >& H)\n-211{\n-212 // get size_type for all the vectors we are using\n-213 typedef typename std::vector::size_type size_type;\n-214\n-215 int n = H.size() ;\n-216 int m = id.size() ;\n-217 std::vector A ;\n-218 std::vector B = id ;\n-219 sort(B.begin(),B.end()) ;\n-220 int i = 0 ;\n-221 bool b = true ;\n-222 double tp ;\n-223\n-224 while ( b && (i=m)\n-227 {\n-228 A=H[i] ;\n-229 sort(A.begin(),A.end());\n-230 tp = 0 ;\n-231 for ( size_type j=0 ; j < m; j++)\n-232 tp += std::fabs(A[j]-B[j]) ;\n-233 b = (tp>0) ;\n-234 }\n-235\n-236 i += 1 ;\n-237 }\n-238\n-239 return b ;\n-240}\n-241\n+200 _\bB_\ba_\bs_\be_\b:_\b:_\bb_\bu_\bi_\bl_\bd(grid1Coords, grid1Elements, grid1ElementTypes,\n+201 grid2Coords, grid2Elements, grid2ElementTypes);\n+202\n+203 }\n+204\n+205private:\n+206\n+208 static _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs localCornerCoords(int i, const Dune::GeometryType& gt)\n+209 {\n+210 const auto& ref = Dune::ReferenceElements::general(gt);\n+211 return ref.position(i,dim);\n+212 }\n+213\n+214protected:\n+215\n+217 void _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bC_\by_\bc_\bl_\bi_\bc_\bO_\br_\bd_\be_\br(const std::vector >&\n+polytopeCorners,\n+218 const _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs& center, std::vector& ordering) const;\n+219\n+221 void _\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs(const std::vector& coords1,\n+222 const std::vector& elements1,\n+223 const std::vector& elementTypes1,\n+224 const std::vector& coords2,\n+225 const std::vector& elements2,\n+226 const std::vector& elementTypes2);\n+227\n+229 void _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl_\bF_\bi_\be_\bl_\bd(const std::vector& coords,\n+230 const std::vector& elements,\n+231 const std::vector& elementTypes,\n+232 std::vector& normals);\n+233\n+235 void _\br_\be_\bm_\bo_\bv_\be_\bD_\bo_\bu_\bb_\bl_\be_\bs(std::vector >&\n+polytopeCorners);\n+236};\n+237\n+238} /* namespace GridGlue */\n+239} /* namespace Dune */\n+240\n+241#include \"_\bc_\bo_\bn_\bt_\ba_\bc_\bt_\bm_\be_\br_\bg_\be_\b._\bc_\bc\"\n 242\n-243template\n-244void IntersectionComputation::orderPointsCC(std::\n-integral_constant,\n-245 const V& centroid,\n-246 std::vector& id,\n-247 const std::vector& P)\n-248{\n-249 typedef typename std::vector::size_type size_type;\n-250\n-251 id.clear();\n-252\n-253 // get size_type for all the vectors we are using\n-254 V c,d1,d2,dr,dn,cross,d ;\n-255 std::vector ai ;\n-256\n-257 d1 = P[1] - P[0] ; // two reference vectors\n-258 d2 = P[2] - P[0] ;\n-259\n-260 cross[0] = d1[1]*d2[2] - d1[2]*d2[1] ; // cross product\n-261 cross[1] = d1[2]*d2[0] - d1[0]*d2[2] ;\n-262 cross[2] = d1[0]*d2[1] - d1[1]*d2[0] ;\n-263\n-264 if (((centroid - P[0])*cross)<0) // good orientation ?\n-265 {\n-266 dr = d1 ;\n-267 dr /= dr.two_norm() ; // 'x-axis' unit vector\n-268 dn = dr ;\n-269 dn *= -(d2*dr) ;\n-270 dn += d2 ;\n-271 dn /= dn.two_norm() ; // 'y-axis' unit vector\n-272 }\n-273 else\n-274 {\n-275 dr = d2 ;\n-276 dr /= dr.two_norm() ; // 'y-axis' unit vector\n-277 dn = dr ;\n-278 dn *= -(d1*dr) ;\n-279 dn += d1 ;\n-280 dn /= dn.two_norm() ; // 'x-axis' unit vector\n-281 }\n-282\n-283 // definition of angles, using projection on the local reference, ie by\n-scalarly multipliying by dr and dn resp.\n-284 for ( size_type j=1 ; j < P.size() ; j++)\n-285 {\n-286 ai.push_back(atan2((P[j]-P[0])*dn,(P[j]-P[0])*dr)) ;\n-287 id.push_back(j) ;\n-288 }\n-289\n-290 // sort according to increasing angles\n-291 for ( size_type j=1; j < ai.size(); j++) {\n-292 for ( size_type i=0; i < j; i++) {\n-293 if (ai[j](ai[i],ai[j]) ;\n-295 std::swap(id[i],id[j]) ;\n-296 }\n-297 }\n-298 }\n-299\n-300 id.insert(id.begin(),0);\n-301}\n-302\n-303template\n-304void IntersectionComputation::orderPointsCC(std::\n-integral_constant,\n-305 const V& centroid,\n-306 std::vector& id,\n-307 const std::vector& P)\n-308{\n-309 typedef typename std::vector::size_type size_type;\n-310\n-311 // get size_type for all the vectors we are using\n-312 typedef typename std::vector::size_type size_type;\n-313\n-314 std::vector ai(P.size());\n-315 id.resize(P.size());\n-316\n-317 // definition of angles\n-318 for ( size_type i=0; i < P.size(); i++) {\n-319 ai[i] = atan2(P[i][1]-centroid[1],P[i][0]-centroid[0]);\n-320 id[i] = i;\n-321 }\n-322\n-323 // sort according to increasing angles\n-324 for ( size_type j=1; j < ai.size(); j++) {\n-325 for ( size_type i=0; i < j; i++) if (ai[j](ai[i],ai[j]);\n-327 std::swap(id[i],id[j]);\n-328 }\n-329 }\n-330}\n-331\n-332} /* namespace Dune::GridGlue */\n-333} /* namespace Dune */\n+243#endif // DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH\n+_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh\n+Central component of the module implementing the coupling of two grids.\n+_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh\n+Common base class for many merger implementations: produce pairs of entities\n+that may intersect.\n+_\bc_\bo_\bn_\bt_\ba_\bc_\bt_\bm_\be_\br_\bg_\be_\b._\bc_\bc\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt\n-int insertPoint(const V p, std::vector< V > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:164\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn\n-Intersection computation method for two elements of arbitrary dimension.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:39\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-static bool computeIntersection(const std::vector< V > &X, const std::vector< V\n-> &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > >\n-&SY, std::vector< V > &P)\n-Compute the intersection of two elements X and Y Compute the intersection of\n-two elements X and Y,...\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.cc:14\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be\n+Merge two codimension-1 surfaces that may be a positive distance apart.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:44\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bC_\by_\bc_\bl_\bi_\bc_\bO_\br_\bd_\be_\br\n+void computeCyclicOrder(const std::vector< std::array< LocalCoords, 2 > >\n+&polytopeCorners, const LocalCoords ¢er, std::vector< int > &ordering)\n+const\n+Order the corners of the intersection polytope in cyclic order.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:214\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+StandardMerge< T, dimworld-1, dimworld-1, dimworld >::SimplicialIntersection\n+SimplicialIntersection\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:139\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\br_\be_\bm_\bo_\bv_\be_\bD_\bo_\bu_\bb_\bl_\be_\bs\n+void removeDoubles(std::vector< std::array< LocalCoords, 2 > >\n+&polytopeCorners)\n+Remove all multiples.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:335\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bs_\be_\bt_\bO_\bv_\be_\br_\bl_\ba_\bp\n+void setOverlap(T overlap)\n+Set the allowed overlap of the surfaces.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:109\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< T, dimworld > WorldCoords\n+the coordinate type used in this interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:59\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+void setupNodalDirections(const std::vector< WorldCoords > &coords1, const\n+std::vector< unsigned int > &elements1, const std::vector< Dune::GeometryType >\n+&elementTypes1, const std::vector< WorldCoords > &coords2, const std::vector<\n+unsigned int > &elements2, const std::vector< Dune::GeometryType >\n+&elementTypes2)\n+Setup the direction vectors containing the directions for each vertex.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:269\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bm_\bi_\bn_\bN_\bo_\br_\bm_\ba_\bl_\bA_\bn_\bg_\bl_\be\n+void minNormalAngle(T angle)\n+set minimum angle in radians between normals at x and \u00ce\u00a6(x)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:123\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bt_\by_\bp_\be\n+T ctype\n+the numeric type used in this interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:56\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be\n+ProjectionType\n+Type of the projection, closest point or outer normal projection.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:65\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bC_\bL_\bO_\bS_\bE_\bS_\bT_\b__\bP_\bO_\bI_\bN_\bT\n+@ CLOSEST_POINT\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:65\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bO_\bU_\bT_\bE_\bR_\b__\bN_\bO_\bR_\bM_\bA_\bL\n+@ OUTER_NORMAL\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:65\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl_\bF_\bi_\be_\bl_\bd\n+void computeOuterNormalField(const std::vector< WorldCoords > &coords, const\n+std::vector< unsigned int > &elements, const std::vector< Dune::GeometryType >\n+&elementTypes, std::vector< WorldCoords > &normals)\n+If no direction field was specified compute the outer normal field.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:296\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bg_\be_\bt_\bO_\bv_\be_\br_\bl_\ba_\bp\n+T getOverlap() const\n+Get the allowed overlap of the surfaces.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:115\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be\n+ContactMerge(const T allowedOverlap=T(0), std::function< WorldCoords\n+(WorldCoords)> domainDirections=nullptr, std::function< WorldCoords\n+(WorldCoords)> targetDirections=nullptr, ProjectionType type=OUTER_NORMAL)\n+Construct merger given overlap and possible projection directions.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:73\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bs_\be_\bt_\bS_\bu_\br_\bf_\ba_\bc_\be_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+void setSurfaceDirections(std::function< WorldCoords(WorldCoords)>\n+domainDirections, std::function< WorldCoords(WorldCoords)> targetDirections)\n+Set surface direction functions.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:100\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bb_\bu_\bi_\bl_\bd\n+void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1Coords,\n+const std::vector< unsigned int > &grid1Elements, const std::vector< Dune::\n+GeometryType > &grid1ElementTypes, const std::vector< Dune::FieldVector< T,\n+dimworld > > &grid2Coords, const std::vector< unsigned int > &grid2Elements,\n+const std::vector< Dune::GeometryType > &grid2ElementTypes) override\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:188\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be\n+ContactMerge(const T allowedOverlap, ProjectionType type)\n+Construct merger given overlap and type of the projection.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:86\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bm_\bi_\bn_\bN_\bo_\br_\bm_\ba_\bl_\bA_\bn_\bg_\bl_\be\n+T minNormalAngle() const\n+get minimum angle in radians between normals at x and \u00ce\u00a6(x)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:132\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< T, dim > LocalCoords\n+the coordinate type used in this interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:62\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n+Common base class for many merger implementations: produce pairs of entities\n+that may intersect.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:58\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bb_\bu_\bi_\bl_\bd\n+void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1_Coords,\n+const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::\n+GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< T,\n+dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements,\n+const std::vector< Dune::GeometryType > &grid2_element_types) override\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:392\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bv_\ba_\bl_\bi_\bd\n+bool valid\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:86\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00083.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00083.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: standardmerge.cc File Reference\n+dune-grid-glue: contactmerge.cc File Reference\n \n \n \n \n \n \n \n@@ -70,110 +70,30 @@\n \n \n
    \n \n-
    standardmerge.cc File Reference
    \n+Namespaces
    \n+
    contactmerge.cc File Reference
    \n \n
    \n-
    #include "config.h"
    \n-#include "standardmerge.hh"
    \n-
    \n+\n+

    Go to the source code of this file.

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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n-\n-\n-\n-\n-\n-

    \n-Macros

    #define DECL
     
    #define STANDARD_MERGE_INSTANTIATE(T, A, B, C)
     
    \n-\n-\n-\n-\n-\n-\n-\n

    \n-Functions

     Dune::GridGlue::STANDARD_MERGE_INSTANTIATE (double, 1, 1, 1)
     
     Dune::GridGlue::STANDARD_MERGE_INSTANTIATE (double, 2, 2, 2)
     
     Dune::GridGlue::STANDARD_MERGE_INSTANTIATE (double, 3, 3, 3)
     
    \n-

    Macro Definition Documentation

    \n-\n-

    ◆ DECL

    \n-\n-
    \n-
    \n- \n- \n- \n- \n-
    #define DECL
    \n-
    \n-\n-
    \n-
    \n-\n-

    ◆ STANDARD_MERGE_INSTANTIATE

    \n-\n-
    \n-
    \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n-
    #define STANDARD_MERGE_INSTANTIATE( T,
     A,
     B,
     
    )
    \n-
    \n-Value:
    DECL template \\
    \n-
    void StandardMerge<T,A,B,C>::build(const std::vector<Dune::FieldVector<T,C> >& grid1_coords, \\
    \n-
    const std::vector<unsigned int>& grid1_elements, \\
    \n-
    const std::vector<Dune::GeometryType>& grid1_element_types, \\
    \n-
    const std::vector<Dune::FieldVector<T,C> >& grid2_coords, \\
    \n-
    const std::vector<unsigned int>& grid2_elements, \\
    \n-
    const std::vector<Dune::GeometryType>& grid2_element_types \\
    \n-
    )
    \n-
    #define DECL
    Definition standardmerge.cc:12
    \n-
    \n-
    \n-
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,52 +1,19 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-standardmerge.cc File Reference\n-#include \"config.h\"\n-#include \"_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh\"\n+_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n+contactmerge.cc File Reference\n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bc_\br_\bo_\bs_\bs_\bp_\br_\bo_\bd_\bu_\bc_\bt_\b._\bh_\bh>\n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+_\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n-M\bMa\bac\bcr\bro\bos\bs\n-#define\u00a0 _\bD_\bE_\bC_\bL\n-\u00a0\n-#define\u00a0 _\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE(T, A, B, C)\n-\u00a0\n-F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE (double, 1, 1, 1)\n-\u00a0\n-\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE (double, 2, 2, 2)\n-\u00a0\n-\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE (double, 3, 3, 3)\n-\u00a0\n-*\b**\b**\b**\b**\b* M\bMa\bac\bcr\bro\bo D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn D\bDo\boc\bcu\bum\bme\ben\bnt\bta\bat\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0D\bDE\bEC\bCL\bL *\b**\b**\b**\b**\b*\n-#define DECL\n-*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0S\bST\bTA\bAN\bND\bDA\bAR\bRD\bD_\b_M\bME\bER\bRG\bGE\bE_\b_I\bIN\bNS\bST\bTA\bAN\bNT\bTI\bIA\bAT\bTE\bE *\b**\b**\b**\b**\b*\n-#define STANDARD_MERGE_INSTANTIATE ( \u00a0 T,\n- \u00a0 A,\n- \u00a0 B,\n- \u00a0 C\u00a0\n- )\n-V\bVa\bal\blu\bue\be:\b:\n-_\bD_\bE_\bC_\bL template \\\n-void StandardMerge::build(const std::vector >&\n-grid1_coords, \\\n-const std::vector& grid1_elements, \\\n-const std::vector& grid1_element_types, \\\n-const std::vector >& grid2_coords, \\\n-const std::vector& grid2_elements, \\\n-const std::vector& grid2_element_types \\\n-)\n-_\bD_\bE_\bC_\bL\n-#define DECL\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.cc:12\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00086.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00086.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: contactmerge.hh File Reference\n+dune-grid-glue: computeintersection.cc File Reference\n \n \n \n \n \n \n \n@@ -70,56 +70,28 @@\n \n \n
    \n \n-
    contactmerge.hh File Reference
    \n+
    computeintersection.cc File Reference
    \n
    \n
    \n \n-

    Merge two grid boundary surfaces that may be a positive distance apart. \n-More...

    \n-
    #include <iostream>
    \n-#include <fstream>
    \n-#include <iomanip>
    \n-#include <vector>
    \n-#include <algorithm>
    \n-#include <limits>
    \n-#include <memory>
    \n-#include <functional>
    \n-#include <dune/common/fvector.hh>
    \n-#include <dune/common/exceptions.hh>
    \n-#include <dune/common/bitsetvector.hh>
    \n-#include <dune/common/deprecated.hh>
    \n-#include <dune/grid/common/grid.hh>
    \n-#include <dune/grid-glue/merging/standardmerge.hh>
    \n-#include <dune/grid-glue/gridglue.hh>
    \n-#include "contactmerge.cc"
    \n-
    \n

    Go to the source code of this file.

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

    \n-Classes

    class  Dune::GridGlue::ContactMerge< dimworld, T >
     Merge two codimension-1 surfaces that may be a positive distance apart. More...
     
    \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n-

    Detailed Description

    \n-

    Merge two grid boundary surfaces that may be a positive distance apart.

    \n-
    \n+\n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,41 +1,17 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-contactmerge.hh File Reference\n-Merge two grid boundary surfaces that may be a positive distance apart. _\bM_\bo_\br_\be_\b._\b._\b.\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 <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n-#include \"_\bc_\bo_\bn_\bt_\ba_\bc_\bt_\bm_\be_\br_\bg_\be_\b._\bc_\bc\"\n+_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n+computeintersection.cc File Reference\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b _\b>\n-\u00a0 Merge two codimension-1 surfaces that may be a positive distance apart.\n- _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n-*\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-Merge two grid boundary surfaces that may be a positive distance apart.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00086_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00086_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: contactmerge.hh Source File\n+dune-grid-glue: computeintersection.cc Source File\n \n \n \n \n \n \n \n@@ -74,235 +74,356 @@\n \n \n \n
    \n-
    contactmerge.hh
    \n+
    computeintersection.cc
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    10#ifndef DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH
    \n-
    11#define DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH
    \n+
    5
    \n+
    6namespace Dune {
    \n+
    7namespace GridGlue {
    \n+
    8
    \n+
    9//****************************************************************************************
    \n+
    10// PUBLIC
    \n+
    11//****************************************************************************************
    \n
    12
    \n-
    13
    \n-
    14#include <iostream>
    \n-
    15#include <fstream>
    \n-
    16#include <iomanip>
    \n-
    17#include <vector>
    \n-
    18#include <algorithm>
    \n-
    19#include <limits>
    \n-
    20#include <memory>
    \n-
    21#include <functional>
    \n-
    22
    \n-
    23#include <dune/common/fvector.hh>
    \n-
    24#include <dune/common/exceptions.hh>
    \n-
    25#include <dune/common/bitsetvector.hh>
    \n-
    26#include <dune/common/deprecated.hh>
    \n+
    13template<class CM>
    \n+
    \n+\n+
    15 const std::vector<V>& Y,
    \n+
    16 std::vector<std::vector<int> >& SX,
    \n+
    17 std::vector<std::vector<int> >& SY,
    \n+
    18 std::vector<V>& P) {
    \n+
    19
    \n+
    20 std::vector<std::vector<unsigned int> > subElementsX, subElementsY;
    \n+
    21 std::vector<std::vector<int> > faceIdsX, faceIdsY;
    \n+
    22 std::vector<V> subElementX(CM::grid1Dimension+1), subElementY(CM::grid2Dimension+1), sP;
    \n+
    23 std::vector<std::vector<int> > sSX, sSY;
    \n+
    24
    \n+
    25 CM::grid1_subdivisions(X,subElementsX,faceIdsX);
    \n+
    26 CM::grid2_subdivisions(Y,subElementsY,faceIdsY);
    \n
    27
    \n-
    28#include <dune/grid/common/grid.hh>
    \n+
    28 bool intersectionFound = false;
    \n
    29
    \n-\n-\n-
    32
    \n-
    33namespace Dune {
    \n-
    34namespace GridGlue {
    \n-
    35
    \n-
    41template<int dimworld, typename T = double>
    \n-
    \n-\n-
    43: public StandardMerge<T,dimworld-1,dimworld-1,dimworld>
    \n-
    44{
    \n-
    45 static constexpr int dim = dimworld-1;
    \n-
    46
    \n-
    47 static_assert( dim==1 || dim==2,
    \n-
    48 "ContactMerge yet only handles the cases dim==1 and dim==2!");
    \n-
    49
    \n-\n-
    51public:
    \n-
    52
    \n-
    53 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n-
    54
    \n-
    56 typedef T ctype;
    \n-
    57
    \n-
    59 typedef Dune::FieldVector<T, dimworld> WorldCoords;
    \n-
    60
    \n-
    62 typedef Dune::FieldVector<T, dim> LocalCoords;
    \n-
    63
    \n-\n-
    \n-
    73 ContactMerge(const T allowedOverlap=T(0),
    \n-
    74 std::function<WorldCoords(WorldCoords)> domainDirections=nullptr,
    \n-
    75 std::function<WorldCoords(WorldCoords)> targetDirections=nullptr,
    \n-\n-
    77 : domainDirections_(domainDirections), targetDirections_(targetDirections),
    \n-
    78 overlap_(allowedOverlap), type_(type)
    \n-
    79 {}
    \n-
    \n-
    80
    \n-
    \n-
    86 ContactMerge(const T allowedOverlap, ProjectionType type)
    \n-
    87 : overlap_(allowedOverlap),
    \n-
    88 type_(type)
    \n-
    89 {}
    \n-
    \n-
    90
    \n-
    99 inline
    \n-
    \n-
    100 void setSurfaceDirections(std::function<WorldCoords(WorldCoords)> domainDirections,
    \n-
    101 std::function<WorldCoords(WorldCoords)> targetDirections)
    \n-
    102 {
    \n-
    103 domainDirections_ = domainDirections;
    \n-
    104 targetDirections_ = targetDirections;
    \n-
    105 this->valid = false;
    \n-
    106 }
    \n-
    \n-
    107
    \n-
    \n-
    109 void setOverlap(T overlap)
    \n-
    110 {
    \n-
    111 overlap_ = overlap;
    \n-
    112 }
    \n-
    \n-
    113
    \n-
    \n-
    115 T getOverlap() const
    \n-
    116 {
    \n-
    117 return overlap_;
    \n-
    118 }
    \n-
    \n-
    119
    \n-
    \n-
    123 void minNormalAngle(T angle)
    \n-
    124 {
    \n-
    125 using std::cos;
    \n-
    126 maxNormalProduct_ = cos(angle);
    \n-
    127 }
    \n-
    \n-
    128
    \n-
    \n-\n-
    133 {
    \n-
    134 using std::acos;
    \n-
    135 return acos(maxNormalProduct_);
    \n-
    136 }
    \n-
    \n-
    137
    \n-
    138protected:
    \n-
    139 typedef typename StandardMerge<T,dimworld-1,dimworld-1,dimworld>::SimplicialIntersection SimplicialIntersection;
    \n-
    140
    \n-
    141private:
    \n-
    145 std::function<WorldCoords(WorldCoords)> domainDirections_;
    \n-
    146 std::vector<WorldCoords> nodalDomainDirections_;
    \n-
    147
    \n-
    156 std::function<WorldCoords(WorldCoords)> targetDirections_;
    \n-
    157 std::vector<WorldCoords> nodalTargetDirections_;
    \n-
    158
    \n-
    160 T overlap_;
    \n-
    161
    \n-
    163 ProjectionType type_;
    \n-
    164
    \n-
    168 T maxNormalProduct_ = T(-0.1);
    \n+
    30 for (unsigned int i = 0; i < subElementsX.size(); ++i) { // iterate over all X subelements
    \n+
    31 for (unsigned int ki = 0; ki < subElementsX[i].size(); ++ki) // define the X subelement
    \n+
    32 subElementX[ki] = X[subElementsX[i][ki]];
    \n+
    33 for (unsigned int j = 0; j < subElementsY.size(); ++j) { // iterate over all Y subelemetns
    \n+
    34 for (unsigned int kj = 0; kj < subElementsY[j].size(); ++kj) // define the Y subleement
    \n+
    35 subElementY[kj] = Y[subElementsY[j][kj]];
    \n+
    36
    \n+
    37 sP.clear();
    \n+
    38
    \n+
    39 // compute the intersection
    \n+
    40 bool b = CM::computeIntersectionPoints(subElementX,subElementY,sSX,sSY,sP);
    \n+
    41 intersectionFound = intersectionFound || b;
    \n+
    42
    \n+
    43 // only insert points on outer faces
    \n+
    44 for (unsigned int ki = 0; ki < sSX.size(); ++ki) { // iterate over all faces
    \n+
    45 if (faceIdsX[i][ki] >= 0) {
    \n+
    46 for (unsigned int kii = 0; kii < sSX[ki].size(); ++kii) {
    \n+
    47 int k = insertPoint(sP[sSX[ki][kii]],P); // determine index in P
    \n+
    48 SX[faceIdsX[i][ki]].push_back(k);
    \n+
    49 }
    \n+
    50 }
    \n+
    51 }
    \n+
    52 for (unsigned int kj = 0; kj < sSY.size(); ++kj) { // iterate over all faces
    \n+
    53 if (faceIdsY[j][kj] >= 0) {
    \n+
    54 for (unsigned int kjj = 0; kjj < sSY[kj].size(); ++kjj) {
    \n+
    55 int k = insertPoint(sP[sSY[kj][kjj]],P); // determine index in P
    \n+
    56 SY[faceIdsY[j][kj]].push_back(k);
    \n+
    57 }
    \n+
    58 }
    \n+
    59 }
    \n+
    60 }
    \n+
    61 }
    \n+
    62
    \n+
    63 return intersectionFound;
    \n+
    64}
    \n+
    \n+
    65
    \n+
    66//****************************************************************************************
    \n+
    67// PRIVATE
    \n+
    68//****************************************************************************************
    \n+
    69
    \n+
    70template<class CM>
    \n+
    71void IntersectionComputation<CM>::orderPoints_(std::integral_constant<int,3>,
    \n+
    72 std::integral_constant<int,3>,
    \n+
    73 const V& centroid,
    \n+
    74 const std::vector<std::vector<int> >& SX,
    \n+
    75 const std::vector<std::vector<int> >& SY,
    \n+
    76 const std::vector<V>& P,
    \n+
    77 std::vector<std::vector<int> >& H)
    \n+
    78{
    \n+
    79 int n_facesX = SX.size();
    \n+
    80 int n_facesY = SY.size();
    \n+
    81 int m;
    \n+
    82
    \n+
    83 std::vector<int> no,id,temp ;
    \n+
    84 std::vector<V> p ;
    \n+
    85 std::vector<std::vector<int> > tempH;
    \n+
    86
    \n+
    87 std::vector<int> faceOrderingX(n_facesX);
    \n+
    88 std::vector<int> faceOrderingY(n_facesY);
    \n+
    89
    \n+
    90 if (n_facesX==3) {
    \n+
    91 faceOrderingX[0] = 0; faceOrderingX[1] = 2; faceOrderingX[2] = 1;
    \n+
    92 } else {
    \n+
    93 faceOrderingX[0] = 0; faceOrderingX[1] = 3; faceOrderingX[2] = 2; faceOrderingX[3] = 1;
    \n+
    94 }
    \n+
    95 if (n_facesY==3) {
    \n+
    96 faceOrderingY[0] = 0; faceOrderingY[1] = 2; faceOrderingY[2] = 1;
    \n+
    97 } else {
    \n+
    98 faceOrderingY[0] = 0; faceOrderingY[1] = 3; faceOrderingY[2] = 2; faceOrderingY[3] = 1;
    \n+
    99 }
    \n+
    100
    \n+
    101 if (P.size() > 3) {
    \n+
    102 for (int i = 0; i < n_facesX; ++i) { // loop on faces of X
    \n+
    103 if (SX[i].size() > 0) {
    \n+
    104 no = SX[faceOrderingX[i]];
    \n+
    105 removeDuplicates(no);
    \n+
    106 m = no.size() ;
    \n+
    107 if ((m>=3) && newFace3D(no,tempH)) // don't compute degenerate polygons and check if face is new
    \n+
    108 {
    \n+
    109 for ( int l=0; l<m; ++l)
    \n+
    110 p.push_back(P[no[l]]);
    \n+
    111 orderPointsCC(std::integral_constant<int,3>(), centroid,id,p); // order points counter-clock-wise
    \n+
    112 for ( int l=0; l<m; ++l)
    \n+
    113 temp.push_back(no[id[l]]) ;
    \n+
    114 tempH.push_back(temp) ;
    \n+
    115 temp.clear();
    \n+
    116 p.clear();
    \n+
    117 id.clear(); // clean
    \n+
    118 }
    \n+
    119 no.clear() ; // clean
    \n+
    120 }
    \n+
    121 }
    \n+
    122 for (int i = 0; i < n_facesY; ++i) { // loop on faces of Y
    \n+
    123 if (SY[i].size() > 0) {
    \n+
    124 no = SY[faceOrderingY[i]];
    \n+
    125 removeDuplicates(no);
    \n+
    126 m = no.size() ;
    \n+
    127 if ((m>=3) && newFace3D(no,tempH)) // don't compute degenerate polygons and check if face is new
    \n+
    128 {
    \n+
    129 for ( int l=0; l<m; ++l)
    \n+
    130 p.push_back(P[no[l]]) ;
    \n+
    131 orderPointsCC(std::integral_constant<int,3>(),centroid,id,p); // order points counter-clock-wise
    \n+
    132 for ( int l=0; l<m; ++l)
    \n+
    133 temp.push_back(no[id[l]]) ;
    \n+
    134 tempH.push_back(temp) ;
    \n+
    135 temp.clear();
    \n+
    136 p.clear();
    \n+
    137 id.clear(); // clean
    \n+
    138 }
    \n+
    139 no.clear() ; // clean
    \n+
    140 }
    \n+
    141 }
    \n+
    142 }
    \n+
    143
    \n+
    144 for (int i = 0; i < tempH.size(); ++i) {
    \n+
    145 int hs = tempH[i].size();
    \n+
    146 if (hs >= 3) {
    \n+
    147 for (int j = 1; j <= hs-2;++j) {
    \n+
    148 temp.clear();
    \n+
    149 temp.push_back(tempH[i][0]);
    \n+
    150 for (int k = 0; k < 2; ++k)
    \n+
    151 temp.push_back(tempH[i][j+k]);
    \n+
    152 H.push_back(temp);
    \n+
    153 }
    \n+
    154 }
    \n+
    155 }
    \n+
    156}
    \n+
    157
    \n+
    158template<class CM>
    \n+
    159void IntersectionComputation<CM>::orderPoints_(std::integral_constant<int,2>,
    \n+
    160 std::integral_constant<int,2>,
    \n+
    161 const V& centroid,
    \n+
    162 const std::vector<std::vector<int> >& SX,
    \n+
    163 const std::vector<std::vector<int> >& SY,
    \n+
    164 const std::vector<V>& P,
    \n+
    165 std::vector<std::vector<int> >& H)
    \n+
    166{
    \n+
    167 H.clear();
    \n+
    168 std::vector<int> id, temp(2);
    \n
    169
    \n-
    174 void computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n-
    175 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n-
    176 std::bitset<(1<<dim)>& neighborIntersects1,
    \n-
    177 unsigned int grid1Index,
    \n-
    178 const Dune::GeometryType& grid2ElementType,
    \n-
    179 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n-
    180 std::bitset<(1<<dim)>& neighborIntersects2,
    \n-
    181 unsigned int grid2Index,
    \n-
    182 std::vector<SimplicialIntersection>& intersections) override;
    \n-
    183
    \n-
    187protected:
    \n-
    \n-
    188 void build(const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n-
    189 const std::vector<unsigned int>& grid1Elements,
    \n-
    190 const std::vector<Dune::GeometryType>& grid1ElementTypes,
    \n-
    191 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n-
    192 const std::vector<unsigned int>& grid2Elements,
    \n-
    193 const std::vector<Dune::GeometryType>& grid2ElementTypes) override
    \n-
    194 {
    \n-
    195 std::cout<<"ContactMerge building grid!\\n";
    \n-
    196 // setup the nodal direction vectors
    \n-
    197 setupNodalDirections(grid1Coords, grid1Elements, grid1ElementTypes,
    \n-
    198 grid2Coords, grid2Elements, grid2ElementTypes);
    \n+
    170 orderPointsCC(std::integral_constant<int,2>(),centroid,id,P);
    \n+
    171
    \n+
    172 for (std::size_t i = 0; i < id.size();++i) {
    \n+
    173 temp[0] = id[i];
    \n+
    174 temp[1] = id[(i+1)%(id.size())];
    \n+
    175 H.push_back(temp);
    \n+
    176 }
    \n+
    177}
    \n+
    178
    \n+
    179template<class CM>
    \n+
    180void IntersectionComputation<CM>::orderPoints_(std::integral_constant<int,2>,
    \n+
    181 std::integral_constant<int,3>,
    \n+
    182 const V& centroid,
    \n+
    183 const std::vector<std::vector<int> >& SX,
    \n+
    184 const std::vector<std::vector<int> >& SY,
    \n+
    185 const std::vector<V>& P,
    \n+
    186 std::vector<std::vector<int> >& H)
    \n+
    187{
    \n+
    188 H.clear();
    \n+
    189 std::vector<int> id, temp(2);
    \n+
    190
    \n+
    191 orderPointsCC(std::integral_constant<int,3>(),centroid,id,P);
    \n+
    192
    \n+
    193 for (int i = 0; i < id.size();++i) {
    \n+
    194 temp[0] = id[i];
    \n+
    195 temp[1] = id[(i+1)%(id.size())];
    \n+
    196 H.push_back(temp);
    \n+
    197 }
    \n+
    198}
    \n
    199
    \n-
    200 Base::build(grid1Coords, grid1Elements, grid1ElementTypes,
    \n-
    201 grid2Coords, grid2Elements, grid2ElementTypes);
    \n-
    202
    \n-
    203 }
    \n-
    \n-
    204
    \n-
    205private:
    \n-
    206
    \n-
    208 static LocalCoords localCornerCoords(int i, const Dune::GeometryType& gt)
    \n-
    209 {
    \n-
    210 const auto& ref = Dune::ReferenceElements<T,dim>::general(gt);
    \n-
    211 return ref.position(i,dim);
    \n-
    212 }
    \n-
    213
    \n-
    214protected:
    \n-
    215
    \n-
    217 void computeCyclicOrder(const std::vector<std::array<LocalCoords,2> >& polytopeCorners,
    \n-
    218 const LocalCoords& center, std::vector<int>& ordering) const;
    \n-
    219
    \n-
    221 void setupNodalDirections(const std::vector<WorldCoords>& coords1,
    \n-
    222 const std::vector<unsigned int>& elements1,
    \n-
    223 const std::vector<Dune::GeometryType>& elementTypes1,
    \n-
    224 const std::vector<WorldCoords>& coords2,
    \n-
    225 const std::vector<unsigned int>& elements2,
    \n-
    226 const std::vector<Dune::GeometryType>& elementTypes2);
    \n-
    227
    \n-
    229 void computeOuterNormalField(const std::vector<WorldCoords>& coords,
    \n-
    230 const std::vector<unsigned int>& elements,
    \n-
    231 const std::vector<Dune::GeometryType>& elementTypes,
    \n-
    232 std::vector<WorldCoords>& normals);
    \n-
    233
    \n-
    235 void removeDoubles(std::vector<std::array<LocalCoords,2> >& polytopeCorners);
    \n-
    236};
    \n-
    \n-
    237
    \n-
    238} /* namespace GridGlue */
    \n-
    239} /* namespace Dune */
    \n-
    240
    \n-
    241#include "contactmerge.cc"
    \n+
    200template<class CM>
    \n+
    201void IntersectionComputation<CM>::removeDuplicates(std::vector<int> & p)
    \n+
    202{
    \n+
    203 sort(p.begin(),p.end());
    \n+
    204 std::vector<int>::iterator it = std::unique(p.begin(),p.end());
    \n+
    205 p.erase(it,p.end());
    \n+
    206}
    \n+
    207
    \n+
    208template<class CM>
    \n+
    209bool IntersectionComputation<CM>::newFace3D(const std::vector<int>& id,
    \n+
    210 const std::vector<std::vector<int> >& H)
    \n+
    211{
    \n+
    212 // get size_type for all the vectors we are using
    \n+
    213 typedef typename std::vector<Empty>::size_type size_type;
    \n+
    214
    \n+
    215 int n = H.size() ;
    \n+
    216 int m = id.size() ;
    \n+
    217 std::vector<int> A ;
    \n+
    218 std::vector<int> B = id ;
    \n+
    219 sort(B.begin(),B.end()) ;
    \n+
    220 int i = 0 ;
    \n+
    221 bool b = true ;
    \n+
    222 double tp ;
    \n+
    223
    \n+
    224 while ( b && (i<n) )
    \n+
    225 {
    \n+
    226 if ((H[i].size())>=m)
    \n+
    227 {
    \n+
    228 A=H[i] ;
    \n+
    229 sort(A.begin(),A.end());
    \n+
    230 tp = 0 ;
    \n+
    231 for ( size_type j=0 ; j < m; j++)
    \n+
    232 tp += std::fabs(A[j]-B[j]) ;
    \n+
    233 b = (tp>0) ;
    \n+
    234 }
    \n+
    235
    \n+
    236 i += 1 ;
    \n+
    237 }
    \n+
    238
    \n+
    239 return b ;
    \n+
    240}
    \n+
    241
    \n
    242
    \n-
    243#endif // DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH
    \n-
    Central component of the module implementing the coupling of two grids.
    \n-\n-
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    \n+
    243template<class CM>
    \n+
    244void IntersectionComputation<CM>::orderPointsCC(std::integral_constant<int,3>,
    \n+
    245 const V& centroid,
    \n+
    246 std::vector<int>& id,
    \n+
    247 const std::vector<V>& P)
    \n+
    248{
    \n+
    249 typedef typename std::vector<Empty>::size_type size_type;
    \n+
    250
    \n+
    251 id.clear();
    \n+
    252
    \n+
    253 // get size_type for all the vectors we are using
    \n+
    254 V c,d1,d2,dr,dn,cross,d ;
    \n+
    255 std::vector<typename V::value_type> ai ;
    \n+
    256
    \n+
    257 d1 = P[1] - P[0] ; // two reference vectors
    \n+
    258 d2 = P[2] - P[0] ;
    \n+
    259
    \n+
    260 cross[0] = d1[1]*d2[2] - d1[2]*d2[1] ; // cross product
    \n+
    261 cross[1] = d1[2]*d2[0] - d1[0]*d2[2] ;
    \n+
    262 cross[2] = d1[0]*d2[1] - d1[1]*d2[0] ;
    \n+
    263
    \n+
    264 if (((centroid - P[0])*cross)<0) // good orientation ?
    \n+
    265 {
    \n+
    266 dr = d1 ;
    \n+
    267 dr /= dr.two_norm() ; // 'x-axis' unit vector
    \n+
    268 dn = dr ;
    \n+
    269 dn *= -(d2*dr) ;
    \n+
    270 dn += d2 ;
    \n+
    271 dn /= dn.two_norm() ; // 'y-axis' unit vector
    \n+
    272 }
    \n+
    273 else
    \n+
    274 {
    \n+
    275 dr = d2 ;
    \n+
    276 dr /= dr.two_norm() ; // 'y-axis' unit vector
    \n+
    277 dn = dr ;
    \n+
    278 dn *= -(d1*dr) ;
    \n+
    279 dn += d1 ;
    \n+
    280 dn /= dn.two_norm() ; // 'x-axis' unit vector
    \n+
    281 }
    \n+
    282
    \n+
    283 // definition of angles, using projection on the local reference, ie by scalarly multipliying by dr and dn resp.
    \n+
    284 for ( size_type j=1 ; j < P.size() ; j++)
    \n+
    285 {
    \n+
    286 ai.push_back(atan2((P[j]-P[0])*dn,(P[j]-P[0])*dr)) ;
    \n+
    287 id.push_back(j) ;
    \n+
    288 }
    \n+
    289
    \n+
    290 // sort according to increasing angles
    \n+
    291 for ( size_type j=1; j < ai.size(); j++) {
    \n+
    292 for ( size_type i=0; i < j; i++) {
    \n+
    293 if (ai[j]<ai[i]) {
    \n+
    294 std::swap<typename V::value_type>(ai[i],ai[j]) ;
    \n+
    295 std::swap<int>(id[i],id[j]) ;
    \n+
    296 }
    \n+
    297 }
    \n+
    298 }
    \n+
    299
    \n+
    300 id.insert(id.begin(),0);
    \n+
    301}
    \n+
    302
    \n+
    303template<class CM>
    \n+
    304void IntersectionComputation<CM>::orderPointsCC(std::integral_constant<int,2>,
    \n+
    305 const V& centroid,
    \n+
    306 std::vector<int>& id,
    \n+
    307 const std::vector<V>& P)
    \n+
    308{
    \n+
    309 typedef typename std::vector<Empty>::size_type size_type;
    \n+
    310
    \n+
    311 // get size_type for all the vectors we are using
    \n+
    312 typedef typename std::vector<Empty>::size_type size_type;
    \n+
    313
    \n+
    314 std::vector<typename V::value_type> ai(P.size());
    \n+
    315 id.resize(P.size());
    \n+
    316
    \n+
    317 // definition of angles
    \n+
    318 for ( size_type i=0; i < P.size(); i++) {
    \n+
    319 ai[i] = atan2(P[i][1]-centroid[1],P[i][0]-centroid[0]);
    \n+
    320 id[i] = i;
    \n+
    321 }
    \n+
    322
    \n+
    323 // sort according to increasing angles
    \n+
    324 for ( size_type j=1; j < ai.size(); j++) {
    \n+
    325 for ( size_type i=0; i < j; i++) if (ai[j]<ai[i]) {
    \n+
    326 std::swap<typename V::value_type>(ai[i],ai[j]);
    \n+
    327 std::swap<int>(id[i],id[j]);
    \n+
    328 }
    \n+
    329 }
    \n+
    330}
    \n+
    331
    \n+
    332} /* namespace Dune::GridGlue */
    \n+
    333} /* namespace Dune */
    \n
    Definition gridglue.hh:37
    \n-
    Merge two codimension-1 surfaces that may be a positive distance apart.
    Definition contactmerge.hh:44
    \n-
    void computeCyclicOrder(const std::vector< std::array< LocalCoords, 2 > > &polytopeCorners, const LocalCoords &center, std::vector< int > &ordering) const
    Order the corners of the intersection polytope in cyclic order.
    Definition contactmerge.cc:214
    \n-
    StandardMerge< T, dimworld-1, dimworld-1, dimworld >::SimplicialIntersection SimplicialIntersection
    Definition contactmerge.hh:139
    \n-
    void removeDoubles(std::vector< std::array< LocalCoords, 2 > > &polytopeCorners)
    Remove all multiples.
    Definition contactmerge.cc:335
    \n-
    void setOverlap(T overlap)
    Set the allowed overlap of the surfaces.
    Definition contactmerge.hh:109
    \n-
    Dune::FieldVector< T, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition contactmerge.hh:59
    \n-
    void setupNodalDirections(const std::vector< WorldCoords > &coords1, const std::vector< unsigned int > &elements1, const std::vector< Dune::GeometryType > &elementTypes1, const std::vector< WorldCoords > &coords2, const std::vector< unsigned int > &elements2, const std::vector< Dune::GeometryType > &elementTypes2)
    Setup the direction vectors containing the directions for each vertex.
    Definition contactmerge.cc:269
    \n-
    void minNormalAngle(T angle)
    set minimum angle in radians between normals at x and \u03a6(x)
    Definition contactmerge.hh:123
    \n-
    T ctype
    the numeric type used in this interface
    Definition contactmerge.hh:56
    \n-
    ProjectionType
    Type of the projection, closest point or outer normal projection.
    Definition contactmerge.hh:65
    \n-
    @ CLOSEST_POINT
    Definition contactmerge.hh:65
    \n-
    @ OUTER_NORMAL
    Definition contactmerge.hh:65
    \n-
    void computeOuterNormalField(const std::vector< WorldCoords > &coords, const std::vector< unsigned int > &elements, const std::vector< Dune::GeometryType > &elementTypes, std::vector< WorldCoords > &normals)
    If no direction field was specified compute the outer normal field.
    Definition contactmerge.cc:296
    \n-
    T getOverlap() const
    Get the allowed overlap of the surfaces.
    Definition contactmerge.hh:115
    \n-
    ContactMerge(const T allowedOverlap=T(0), std::function< WorldCoords(WorldCoords)> domainDirections=nullptr, std::function< WorldCoords(WorldCoords)> targetDirections=nullptr, ProjectionType type=OUTER_NORMAL)
    Construct merger given overlap and possible projection directions.
    Definition contactmerge.hh:73
    \n-
    void setSurfaceDirections(std::function< WorldCoords(WorldCoords)> domainDirections, std::function< WorldCoords(WorldCoords)> targetDirections)
    Set surface direction functions.
    Definition contactmerge.hh:100
    \n-
    void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1Coords, const std::vector< unsigned int > &grid1Elements, const std::vector< Dune::GeometryType > &grid1ElementTypes, const std::vector< Dune::FieldVector< T, dimworld > > &grid2Coords, const std::vector< unsigned int > &grid2Elements, const std::vector< Dune::GeometryType > &grid2ElementTypes) override
    Definition contactmerge.hh:188
    \n-
    ContactMerge(const T allowedOverlap, ProjectionType type)
    Construct merger given overlap and type of the projection.
    Definition contactmerge.hh:86
    \n-
    T minNormalAngle() const
    get minimum angle in radians between normals at x and \u03a6(x)
    Definition contactmerge.hh:132
    \n-
    Dune::FieldVector< T, dim > LocalCoords
    the coordinate type used in this interface
    Definition contactmerge.hh:62
    \n-
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    Definition standardmerge.hh:58
    \n-
    void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1_Coords, const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< T, dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements, const std::vector< Dune::GeometryType > &grid2_element_types) override
    Definition standardmerge.hh:392
    \n-
    bool valid
    Definition standardmerge.hh:86
    \n+
    int insertPoint(const V p, std::vector< V > &P)
    Definition computeintersection.hh:164
    \n+
    Intersection computation method for two elements of arbitrary dimension.
    Definition computeintersection.hh:39
    \n+
    static bool computeIntersection(const std::vector< V > &X, const std::vector< V > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< V > &P)
    Compute the intersection of two elements X and Y Compute the intersection of two elements X and Y,...
    Definition computeintersection.cc:14
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,304 +1,382 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-contactmerge.hh\n+computeintersection.cc\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-10#ifndef DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH\n-11#define DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH\n+5\n+6namespace _\bD_\bu_\bn_\be {\n+7namespace GridGlue {\n+8\n+9//\n+****************************************************************************************\n+10// PUBLIC\n+11//\n+****************************************************************************************\n 12\n-13\n-14#include \n-15#include \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#include \n-26#include \n+13template\n+_\b1_\b4bool _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\bC_\bM_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(const std::vector&\n+X,\n+15 const std::vector& Y,\n+16 std::vector >& SX,\n+17 std::vector >& SY,\n+18 std::vector& P) {\n+19\n+20 std::vector > subElementsX, subElementsY;\n+21 std::vector > faceIdsX, faceIdsY;\n+22 std::vector subElementX(CM::grid1Dimension+1), subElementY(CM::\n+grid2Dimension+1), sP;\n+23 std::vector > sSX, sSY;\n+24\n+25 CM::grid1_subdivisions(X,subElementsX,faceIdsX);\n+26 CM::grid2_subdivisions(Y,subElementsY,faceIdsY);\n 27\n-28#include \n+28 bool intersectionFound = false;\n 29\n-30#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n-31#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n-32\n-33namespace _\bD_\bu_\bn_\be {\n-34namespace GridGlue {\n-35\n-41template\n-_\b4_\b2class _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be\n-43: public _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n-44{\n-45 static constexpr int dim = dimworld-1;\n-46\n-47 static_assert( dim==1 || dim==2,\n-48 \"ContactMerge yet only handles the cases dim==1 and dim==2!\");\n-49\n-50 typedef _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bd_\bi_\bm_\b,_\bd_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b> _\bB_\ba_\bs_\be;\n-51public:\n-52\n-53 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n-54\n-_\b5_\b6 typedef T _\bc_\bt_\by_\bp_\be;\n-57\n-_\b5_\b9 typedef Dune::FieldVector _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\n-60\n-_\b6_\b2 typedef Dune::FieldVector _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs;\n-63\n-_\b6_\b5 enum _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be {_\bO_\bU_\bT_\bE_\bR_\b__\bN_\bO_\bR_\bM_\bA_\bL, _\bC_\bL_\bO_\bS_\bE_\bS_\bT_\b__\bP_\bO_\bI_\bN_\bT};\n-_\b7_\b3 _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be(const T allowedOverlap=T(0),\n-74 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> domainDirections=nullptr,\n-75 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> targetDirections=nullptr,\n-76 _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be type = _\bO_\bU_\bT_\bE_\bR_\b__\bN_\bO_\bR_\bM_\bA_\bL)\n-77 : domainDirections_(domainDirections), targetDirections_(targetDirections),\n-78 overlap_(allowedOverlap), type_(type)\n-79 {}\n-80\n-_\b8_\b6 _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be(const T allowedOverlap, _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be type)\n-87 : overlap_(allowedOverlap),\n-88 type_(type)\n-89 {}\n-90\n-99 inline\n-_\b1_\b0_\b0 void _\bs_\be_\bt_\bS_\bu_\br_\bf_\ba_\bc_\be_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs(std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)>\n-domainDirections,\n-101 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> targetDirections)\n-102 {\n-103 domainDirections_ = domainDirections;\n-104 targetDirections_ = targetDirections;\n-105 this->_\bv_\ba_\bl_\bi_\bd = false;\n-106 }\n-107\n-_\b1_\b0_\b9 void _\bs_\be_\bt_\bO_\bv_\be_\br_\bl_\ba_\bp(T overlap)\n-110 {\n-111 overlap_ = overlap;\n-112 }\n-113\n-_\b1_\b1_\b5 T _\bg_\be_\bt_\bO_\bv_\be_\br_\bl_\ba_\bp() const\n-116 {\n-117 return overlap_;\n+30 for (unsigned int i = 0; i < subElementsX.size(); ++i) { // iterate over all\n+X subelements\n+31 for (unsigned int ki = 0; ki < subElementsX[i].size(); ++ki) // define the X\n+subelement\n+32 subElementX[ki] = X[subElementsX[i][ki]];\n+33 for (unsigned int j = 0; j < subElementsY.size(); ++j) { // iterate over all\n+Y subelemetns\n+34 for (unsigned int kj = 0; kj < subElementsY[j].size(); ++kj) // define the Y\n+subleement\n+35 subElementY[kj] = Y[subElementsY[j][kj]];\n+36\n+37 sP.clear();\n+38\n+39 // compute the intersection\n+40 bool b = CM::computeIntersectionPoints(subElementX,subElementY,sSX,sSY,sP);\n+41 intersectionFound = intersectionFound || b;\n+42\n+43 // only insert points on outer faces\n+44 for (unsigned int ki = 0; ki < sSX.size(); ++ki) { // iterate over all faces\n+45 if (faceIdsX[i][ki] >= 0) {\n+46 for (unsigned int kii = 0; kii < sSX[ki].size(); ++kii) {\n+47 int k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(sP[sSX[ki][kii]],P); // determine index in P\n+48 SX[faceIdsX[i][ki]].push_back(k);\n+49 }\n+50 }\n+51 }\n+52 for (unsigned int kj = 0; kj < sSY.size(); ++kj) { // iterate over all faces\n+53 if (faceIdsY[j][kj] >= 0) {\n+54 for (unsigned int kjj = 0; kjj < sSY[kj].size(); ++kjj) {\n+55 int k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(sP[sSY[kj][kjj]],P); // determine index in P\n+56 SY[faceIdsY[j][kj]].push_back(k);\n+57 }\n+58 }\n+59 }\n+60 }\n+61 }\n+62\n+63 return intersectionFound;\n+64}\n+65\n+66//\n+****************************************************************************************\n+67// PRIVATE\n+68//\n+****************************************************************************************\n+69\n+70template\n+71void _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\bC_\bM_\b>_\b:_\b:_\bo_\br_\bd_\be_\br_\bP_\bo_\bi_\bn_\bt_\bs_\b_(std::integral_constant,\n+72 std::integral_constant,\n+73 const V& centroid,\n+74 const std::vector >& SX,\n+75 const std::vector >& SY,\n+76 const std::vector& P,\n+77 std::vector >& H)\n+78{\n+79 int n_facesX = SX.size();\n+80 int n_facesY = SY.size();\n+81 int m;\n+82\n+83 std::vector no,id,temp ;\n+84 std::vector p ;\n+85 std::vector > tempH;\n+86\n+87 std::vector faceOrderingX(n_facesX);\n+88 std::vector faceOrderingY(n_facesY);\n+89\n+90 if (n_facesX==3) {\n+91 faceOrderingX[0] = 0; faceOrderingX[1] = 2; faceOrderingX[2] = 1;\n+92 } else {\n+93 faceOrderingX[0] = 0; faceOrderingX[1] = 3; faceOrderingX[2] = 2;\n+faceOrderingX[3] = 1;\n+94 }\n+95 if (n_facesY==3) {\n+96 faceOrderingY[0] = 0; faceOrderingY[1] = 2; faceOrderingY[2] = 1;\n+97 } else {\n+98 faceOrderingY[0] = 0; faceOrderingY[1] = 3; faceOrderingY[2] = 2;\n+faceOrderingY[3] = 1;\n+99 }\n+100\n+101 if (P.size() > 3) {\n+102 for (int i = 0; i < n_facesX; ++i) { // loop on faces of X\n+103 if (SX[i].size() > 0) {\n+104 no = SX[faceOrderingX[i]];\n+105 removeDuplicates(no);\n+106 m = no.size() ;\n+107 if ((m>=3) && newFace3D(no,tempH)) // don't compute degenerate polygons and\n+check if face is new\n+108 {\n+109 for ( int l=0; l(), centroid,id,p); // order\n+points counter-clock-wise\n+112 for ( int l=0; l_\b:_\b:\n-_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n-140\n-141private:\n-145 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> domainDirections_;\n-146 std::vector nodalDomainDirections_;\n-147\n-156 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> targetDirections_;\n-157 std::vector nodalTargetDirections_;\n-158\n-160 T overlap_;\n-161\n-163 _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be type_;\n-164\n-168 T maxNormalProduct_ = T(-0.1);\n+119 no.clear() ; // clean\n+120 }\n+121 }\n+122 for (int i = 0; i < n_facesY; ++i) { // loop on faces of Y\n+123 if (SY[i].size() > 0) {\n+124 no = SY[faceOrderingY[i]];\n+125 removeDuplicates(no);\n+126 m = no.size() ;\n+127 if ((m>=3) && newFace3D(no,tempH)) // don't compute degenerate polygons and\n+check if face is new\n+128 {\n+129 for ( int l=0; l(),centroid,id,p); // order\n+points counter-clock-wise\n+132 for ( int l=0; l= 3) {\n+147 for (int j = 1; j <= hs-2;++j) {\n+148 temp.clear();\n+149 temp.push_back(tempH[i][0]);\n+150 for (int k = 0; k < 2; ++k)\n+151 temp.push_back(tempH[i][j+k]);\n+152 H.push_back(temp);\n+153 }\n+154 }\n+155 }\n+156}\n+157\n+158template\n+159void IntersectionComputation::orderPoints_(std::\n+integral_constant,\n+160 std::integral_constant,\n+161 const V& centroid,\n+162 const std::vector >& SX,\n+163 const std::vector >& SY,\n+164 const std::vector& P,\n+165 std::vector >& H)\n+166{\n+167 H.clear();\n+168 std::vector id, temp(2);\n 169\n-174 void computeIntersections(const Dune::GeometryType& grid1ElementType,\n-175 const std::vector >& grid1ElementCorners,\n-176 std::bitset<(1<& neighborIntersects1,\n-177 unsigned int grid1Index,\n-178 const Dune::GeometryType& grid2ElementType,\n-179 const std::vector >& grid2ElementCorners,\n-180 std::bitset<(1<& neighborIntersects2,\n-181 unsigned int grid2Index,\n-182 std::vector& intersections) override;\n-183\n-187protected:\n-_\b1_\b8_\b8 void _\bb_\bu_\bi_\bl_\bd(const std::vector >& grid1Coords,\n-189 const std::vector& grid1Elements,\n-190 const std::vector& grid1ElementTypes,\n-191 const std::vector >& grid2Coords,\n-192 const std::vector& grid2Elements,\n-193 const std::vector& grid2ElementTypes) override\n-194 {\n-195 std::cout<<\"ContactMerge building grid!\\n\";\n-196 // setup the nodal direction vectors\n-197 _\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs(grid1Coords, grid1Elements, grid1ElementTypes,\n-198 grid2Coords, grid2Elements, grid2ElementTypes);\n+170 orderPointsCC(std::integral_constant(),centroid,id,P);\n+171\n+172 for (std::size_t i = 0; i < id.size();++i) {\n+173 temp[0] = id[i];\n+174 temp[1] = id[(i+1)%(id.size())];\n+175 H.push_back(temp);\n+176 }\n+177}\n+178\n+179template\n+180void IntersectionComputation::orderPoints_(std::\n+integral_constant,\n+181 std::integral_constant,\n+182 const V& centroid,\n+183 const std::vector >& SX,\n+184 const std::vector >& SY,\n+185 const std::vector& P,\n+186 std::vector >& H)\n+187{\n+188 H.clear();\n+189 std::vector id, temp(2);\n+190\n+191 orderPointsCC(std::integral_constant(),centroid,id,P);\n+192\n+193 for (int i = 0; i < id.size();++i) {\n+194 temp[0] = id[i];\n+195 temp[1] = id[(i+1)%(id.size())];\n+196 H.push_back(temp);\n+197 }\n+198}\n 199\n-200 _\bB_\ba_\bs_\be_\b:_\b:_\bb_\bu_\bi_\bl_\bd(grid1Coords, grid1Elements, grid1ElementTypes,\n-201 grid2Coords, grid2Elements, grid2ElementTypes);\n-202\n-203 }\n-204\n-205private:\n-206\n-208 static _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs localCornerCoords(int i, const Dune::GeometryType& gt)\n-209 {\n-210 const auto& ref = Dune::ReferenceElements::general(gt);\n-211 return ref.position(i,dim);\n-212 }\n-213\n-214protected:\n-215\n-217 void _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bC_\by_\bc_\bl_\bi_\bc_\bO_\br_\bd_\be_\br(const std::vector >&\n-polytopeCorners,\n-218 const _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs& center, std::vector& ordering) const;\n-219\n-221 void _\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs(const std::vector& coords1,\n-222 const std::vector& elements1,\n-223 const std::vector& elementTypes1,\n-224 const std::vector& coords2,\n-225 const std::vector& elements2,\n-226 const std::vector& elementTypes2);\n-227\n-229 void _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl_\bF_\bi_\be_\bl_\bd(const std::vector& coords,\n-230 const std::vector& elements,\n-231 const std::vector& elementTypes,\n-232 std::vector& normals);\n-233\n-235 void _\br_\be_\bm_\bo_\bv_\be_\bD_\bo_\bu_\bb_\bl_\be_\bs(std::vector >&\n-polytopeCorners);\n-236};\n-237\n-238} /* namespace GridGlue */\n-239} /* namespace Dune */\n-240\n-241#include \"_\bc_\bo_\bn_\bt_\ba_\bc_\bt_\bm_\be_\br_\bg_\be_\b._\bc_\bc\"\n+200template\n+201void IntersectionComputation::removeDuplicates(std::vector & p)\n+202{\n+203 sort(p.begin(),p.end());\n+204 std::vector::iterator it = std::unique(p.begin(),p.end());\n+205 p.erase(it,p.end());\n+206}\n+207\n+208template\n+209bool IntersectionComputation::newFace3D(const std::vector& id,\n+210 const std::vector >& H)\n+211{\n+212 // get size_type for all the vectors we are using\n+213 typedef typename std::vector::size_type size_type;\n+214\n+215 int n = H.size() ;\n+216 int m = id.size() ;\n+217 std::vector A ;\n+218 std::vector B = id ;\n+219 sort(B.begin(),B.end()) ;\n+220 int i = 0 ;\n+221 bool b = true ;\n+222 double tp ;\n+223\n+224 while ( b && (i=m)\n+227 {\n+228 A=H[i] ;\n+229 sort(A.begin(),A.end());\n+230 tp = 0 ;\n+231 for ( size_type j=0 ; j < m; j++)\n+232 tp += std::fabs(A[j]-B[j]) ;\n+233 b = (tp>0) ;\n+234 }\n+235\n+236 i += 1 ;\n+237 }\n+238\n+239 return b ;\n+240}\n+241\n 242\n-243#endif // DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH\n-_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh\n-Central component of the module implementing the coupling of two grids.\n-_\bc_\bo_\bn_\bt_\ba_\bc_\bt_\bm_\be_\br_\bg_\be_\b._\bc_\bc\n-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh\n-Common base class for many merger implementations: produce pairs of entities\n-that may intersect.\n+243template\n+244void IntersectionComputation::orderPointsCC(std::\n+integral_constant,\n+245 const V& centroid,\n+246 std::vector& id,\n+247 const std::vector& P)\n+248{\n+249 typedef typename std::vector::size_type size_type;\n+250\n+251 id.clear();\n+252\n+253 // get size_type for all the vectors we are using\n+254 V c,d1,d2,dr,dn,cross,d ;\n+255 std::vector ai ;\n+256\n+257 d1 = P[1] - P[0] ; // two reference vectors\n+258 d2 = P[2] - P[0] ;\n+259\n+260 cross[0] = d1[1]*d2[2] - d1[2]*d2[1] ; // cross product\n+261 cross[1] = d1[2]*d2[0] - d1[0]*d2[2] ;\n+262 cross[2] = d1[0]*d2[1] - d1[1]*d2[0] ;\n+263\n+264 if (((centroid - P[0])*cross)<0) // good orientation ?\n+265 {\n+266 dr = d1 ;\n+267 dr /= dr.two_norm() ; // 'x-axis' unit vector\n+268 dn = dr ;\n+269 dn *= -(d2*dr) ;\n+270 dn += d2 ;\n+271 dn /= dn.two_norm() ; // 'y-axis' unit vector\n+272 }\n+273 else\n+274 {\n+275 dr = d2 ;\n+276 dr /= dr.two_norm() ; // 'y-axis' unit vector\n+277 dn = dr ;\n+278 dn *= -(d1*dr) ;\n+279 dn += d1 ;\n+280 dn /= dn.two_norm() ; // 'x-axis' unit vector\n+281 }\n+282\n+283 // definition of angles, using projection on the local reference, ie by\n+scalarly multipliying by dr and dn resp.\n+284 for ( size_type j=1 ; j < P.size() ; j++)\n+285 {\n+286 ai.push_back(atan2((P[j]-P[0])*dn,(P[j]-P[0])*dr)) ;\n+287 id.push_back(j) ;\n+288 }\n+289\n+290 // sort according to increasing angles\n+291 for ( size_type j=1; j < ai.size(); j++) {\n+292 for ( size_type i=0; i < j; i++) {\n+293 if (ai[j](ai[i],ai[j]) ;\n+295 std::swap(id[i],id[j]) ;\n+296 }\n+297 }\n+298 }\n+299\n+300 id.insert(id.begin(),0);\n+301}\n+302\n+303template\n+304void IntersectionComputation::orderPointsCC(std::\n+integral_constant,\n+305 const V& centroid,\n+306 std::vector& id,\n+307 const std::vector& P)\n+308{\n+309 typedef typename std::vector::size_type size_type;\n+310\n+311 // get size_type for all the vectors we are using\n+312 typedef typename std::vector::size_type size_type;\n+313\n+314 std::vector ai(P.size());\n+315 id.resize(P.size());\n+316\n+317 // definition of angles\n+318 for ( size_type i=0; i < P.size(); i++) {\n+319 ai[i] = atan2(P[i][1]-centroid[1],P[i][0]-centroid[0]);\n+320 id[i] = i;\n+321 }\n+322\n+323 // sort according to increasing angles\n+324 for ( size_type j=1; j < ai.size(); j++) {\n+325 for ( size_type i=0; i < j; i++) if (ai[j](ai[i],ai[j]);\n+327 std::swap(id[i],id[j]);\n+328 }\n+329 }\n+330}\n+331\n+332} /* namespace Dune::GridGlue */\n+333} /* namespace Dune */\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be\n-Merge two codimension-1 surfaces that may be a positive distance apart.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:44\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bC_\by_\bc_\bl_\bi_\bc_\bO_\br_\bd_\be_\br\n-void computeCyclicOrder(const std::vector< std::array< LocalCoords, 2 > >\n-&polytopeCorners, const LocalCoords ¢er, std::vector< int > &ordering)\n-const\n-Order the corners of the intersection polytope in cyclic order.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:214\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-StandardMerge< T, dimworld-1, dimworld-1, dimworld >::SimplicialIntersection\n-SimplicialIntersection\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:139\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\br_\be_\bm_\bo_\bv_\be_\bD_\bo_\bu_\bb_\bl_\be_\bs\n-void removeDoubles(std::vector< std::array< LocalCoords, 2 > >\n-&polytopeCorners)\n-Remove all multiples.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:335\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bs_\be_\bt_\bO_\bv_\be_\br_\bl_\ba_\bp\n-void setOverlap(T overlap)\n-Set the allowed overlap of the surfaces.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:109\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, dimworld > WorldCoords\n-the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:59\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-void setupNodalDirections(const std::vector< WorldCoords > &coords1, const\n-std::vector< unsigned int > &elements1, const std::vector< Dune::GeometryType >\n-&elementTypes1, const std::vector< WorldCoords > &coords2, const std::vector<\n-unsigned int > &elements2, const std::vector< Dune::GeometryType >\n-&elementTypes2)\n-Setup the direction vectors containing the directions for each vertex.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:269\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bm_\bi_\bn_\bN_\bo_\br_\bm_\ba_\bl_\bA_\bn_\bg_\bl_\be\n-void minNormalAngle(T angle)\n-set minimum angle in radians between normals at x and \u00ce\u00a6(x)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:123\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bt_\by_\bp_\be\n-T ctype\n-the numeric type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:56\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be\n-ProjectionType\n-Type of the projection, closest point or outer normal projection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:65\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bC_\bL_\bO_\bS_\bE_\bS_\bT_\b__\bP_\bO_\bI_\bN_\bT\n-@ CLOSEST_POINT\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:65\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bO_\bU_\bT_\bE_\bR_\b__\bN_\bO_\bR_\bM_\bA_\bL\n-@ OUTER_NORMAL\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:65\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl_\bF_\bi_\be_\bl_\bd\n-void computeOuterNormalField(const std::vector< WorldCoords > &coords, const\n-std::vector< unsigned int > &elements, const std::vector< Dune::GeometryType >\n-&elementTypes, std::vector< WorldCoords > &normals)\n-If no direction field was specified compute the outer normal field.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:296\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bg_\be_\bt_\bO_\bv_\be_\br_\bl_\ba_\bp\n-T getOverlap() const\n-Get the allowed overlap of the surfaces.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:115\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be\n-ContactMerge(const T allowedOverlap=T(0), std::function< WorldCoords\n-(WorldCoords)> domainDirections=nullptr, std::function< WorldCoords\n-(WorldCoords)> targetDirections=nullptr, ProjectionType type=OUTER_NORMAL)\n-Construct merger given overlap and possible projection directions.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:73\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bs_\be_\bt_\bS_\bu_\br_\bf_\ba_\bc_\be_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-void setSurfaceDirections(std::function< WorldCoords(WorldCoords)>\n-domainDirections, std::function< WorldCoords(WorldCoords)> targetDirections)\n-Set surface direction functions.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:100\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bb_\bu_\bi_\bl_\bd\n-void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1Coords,\n-const std::vector< unsigned int > &grid1Elements, const std::vector< Dune::\n-GeometryType > &grid1ElementTypes, const std::vector< Dune::FieldVector< T,\n-dimworld > > &grid2Coords, const std::vector< unsigned int > &grid2Elements,\n-const std::vector< Dune::GeometryType > &grid2ElementTypes) override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:188\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be\n-ContactMerge(const T allowedOverlap, ProjectionType type)\n-Construct merger given overlap and type of the projection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:86\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bm_\bi_\bn_\bN_\bo_\br_\bm_\ba_\bl_\bA_\bn_\bg_\bl_\be\n-T minNormalAngle() const\n-get minimum angle in radians between normals at x and \u00ce\u00a6(x)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:132\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, dim > LocalCoords\n-the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:62\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n-Common base class for many merger implementations: produce pairs of entities\n-that may intersect.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:58\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bb_\bu_\bi_\bl_\bd\n-void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1_Coords,\n-const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::\n-GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< T,\n-dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements,\n-const std::vector< Dune::GeometryType > &grid2_element_types) override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:392\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bv_\ba_\bl_\bi_\bd\n-bool valid\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:86\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt\n+int insertPoint(const V p, std::vector< V > &P)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:164\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn\n+Intersection computation method for two elements of arbitrary dimension.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:39\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+static bool computeIntersection(const std::vector< V > &X, const std::vector< V\n+> &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > >\n+&SY, std::vector< V > &P)\n+Compute the intersection of two elements X and Y Compute the intersection of\n+two elements X and Y,...\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.cc:14\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00089.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00089.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: standardmerge.hh File Reference\n+dune-grid-glue: overlappingmerge.cc File Reference\n \n \n \n \n \n \n \n@@ -70,140 +70,49 @@\n \n \n
    \n \n-
    standardmerge.hh File Reference
    \n+Macros
    \n+
    overlappingmerge.cc File Reference
    \n \n
    \n \n-

    Common base class for many merger implementations: produce pairs of entities that may intersect. \n-More...

    \n-
    #include <iostream>
    \n-#include <iomanip>
    \n-#include <vector>
    \n-#include <stack>
    \n-#include <set>
    \n-#include <utility>
    \n-#include <map>
    \n-#include <memory>
    \n-#include <algorithm>
    \n-#include <dune/common/fvector.hh>
    \n-#include <dune/common/bitsetvector.hh>
    \n-#include <dune/common/stdstreams.hh>
    \n-#include <dune/common/timer.hh>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/grid/common/grid.hh>
    \n-#include <dune/grid-glue/merging/intersectionlist.hh>
    \n-#include <dune/grid-glue/merging/merger.hh>
    \n-#include <dune/grid-glue/merging/computeintersection.hh>
    \n-
    \n

    Go to the source code of this file.

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

    \n-Classes

    class  Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >
     Common base class for many merger implementations: produce pairs of entities that may intersect. More...
     
    \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n \n-\n-\n-\n-\n-

    \n Macros

    #define DECL   extern
     
    #define STANDARD_MERGE_INSTANTIATE(T, A, B, C)
     
    \n-\n-\n-\n-\n-\n-\n-\n+\n+\n

    \n-Functions

     Dune::GridGlue::STANDARD_MERGE_INSTANTIATE (double, 1, 1, 1)
     
     Dune::GridGlue::STANDARD_MERGE_INSTANTIATE (double, 2, 2, 2)
     
     Dune::GridGlue::STANDARD_MERGE_INSTANTIATE (double, 3, 3, 3)
     
    #define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
     
    \n-

    Detailed Description

    \n-

    Common base class for many merger implementations: produce pairs of entities that may intersect.

    \n-

    Macro Definition Documentation

    \n-\n-

    ◆ DECL

    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC

    \n \n
    \n
    \n \n \n- \n+ \n \n
    #define DECL   extern#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n
    \n \n
    \n
    \n-\n-

    ◆ STANDARD_MERGE_INSTANTIATE

    \n-\n-
    \n-
    \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n-
    #define STANDARD_MERGE_INSTANTIATE( T,
     A,
     B,
     
    )
    \n-
    \n-Value:
    DECL template \\
    \n-
    void StandardMerge<T,A,B,C>::build(const std::vector<Dune::FieldVector<T,C> >& grid1Coords, \\
    \n-
    const std::vector<unsigned int>& grid1_elements, \\
    \n-
    const std::vector<Dune::GeometryType>& grid1_element_types, \\
    \n-
    const std::vector<Dune::FieldVector<T,C> >& grid2Coords, \\
    \n-
    const std::vector<unsigned int>& grid2_elements, \\
    \n-
    const std::vector<Dune::GeometryType>& grid2_element_types \\
    \n-
    )
    \n-
    #define DECL
    Definition standardmerge.hh:827
    \n-
    \n-
    \n-
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,79 +1,23 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-standardmerge.hh File Reference\n-Common base class for many merger implementations: produce pairs of entities\n-that m\bma\bay\by intersect. _\bM_\bo_\br_\be_\b._\b._\b.\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 <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh>\n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bm_\be_\br_\bg_\be_\br_\b._\bh_\bh>\n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs\n+overlappingmerge.cc File Reference\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\b _\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>\n-\u00a0 Common base class for many merger implementations: produce pairs of\n- entities that m\bma\bay\by intersect. _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n M\bMa\bac\bcr\bro\bos\bs\n-#define\u00a0 _\bD_\bE_\bC_\bL\u00a0\u00a0\u00a0extern\n-\u00a0\n-#define\u00a0 _\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE(T, A, B, C)\n-\u00a0\n-F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE (double, 1, 1, 1)\n-\u00a0\n-\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE (double, 2, 2, 2)\n-\u00a0\n-\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE (double, 3, 3, 3)\n+#define\u00a0 _\bD_\bU_\bN_\bE_\b__\bG_\bR_\bI_\bD_\bG_\bL_\bU_\bE_\b__\bO_\bV_\bE_\bR_\bL_\bA_\bP_\bP_\bI_\bN_\bG_\bM_\bE_\bR_\bG_\bE_\b__\bC_\bC\n \u00a0\n-*\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-Common base class for many merger implementations: produce pairs of entities\n-that m\bma\bay\by intersect.\n *\b**\b**\b**\b**\b* M\bMa\bac\bcr\bro\bo D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn D\bDo\boc\bcu\bum\bme\ben\bnt\bta\bat\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0D\bDE\bEC\bCL\bL *\b**\b**\b**\b**\b*\n-#define DECL\u00a0\u00a0\u00a0extern\n-*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0S\bST\bTA\bAN\bND\bDA\bAR\bRD\bD_\b_M\bME\bER\bRG\bGE\bE_\b_I\bIN\bNS\bST\bTA\bAN\bNT\bTI\bIA\bAT\bTE\bE *\b**\b**\b**\b**\b*\n-#define STANDARD_MERGE_INSTANTIATE ( \u00a0 T,\n- \u00a0 A,\n- \u00a0 B,\n- \u00a0 C\u00a0\n- )\n-V\bVa\bal\blu\bue\be:\b:\n-_\bD_\bE_\bC_\bL template \\\n-void StandardMerge::build(const std::vector >&\n-grid1Coords, \\\n-const std::vector& grid1_elements, \\\n-const std::vector& grid1_element_types, \\\n-const std::vector >& grid2Coords, \\\n-const std::vector& grid2_elements, \\\n-const std::vector& grid2_element_types \\\n-)\n-_\bD_\bE_\bC_\bL\n-#define DECL\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:827\n+*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0D\bDU\bUN\bNE\bE_\b_G\bGR\bRI\bID\bDG\bGL\bLU\bUE\bE_\b_O\bOV\bVE\bER\bRL\bLA\bAP\bPP\bPI\bIN\bNG\bGM\bME\bER\bRG\bGE\bE_\b_C\bCC\bC *\b**\b**\b**\b**\b*\n+#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00089_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00089_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: standardmerge.hh Source File\n+dune-grid-glue: overlappingmerge.cc Source File\n \n \n \n \n \n \n \n@@ -74,857 +74,215 @@\n \n \n \n
    \n-
    standardmerge.hh
    \n+
    overlappingmerge.cc
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    10#ifndef DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH
    \n-
    11#define DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH
    \n+
    5
    \n+
    6#ifndef DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n+
    7#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n+
    8//#include <algorithm>
    \n+
    9
    \n+
    10namespace Dune {
    \n+
    11namespace GridGlue {
    \n
    12
    \n-
    13
    \n-
    14#include <iostream>
    \n-
    15#include <iomanip>
    \n-
    16#include <vector>
    \n-
    17#include <stack>
    \n-
    18#include <set>
    \n-
    19#include <utility>
    \n-
    20#include <map>
    \n-
    21#include <memory>
    \n-
    22#include <algorithm>
    \n-
    23
    \n-
    24#include <dune/common/fvector.hh>
    \n-
    25#include <dune/common/bitsetvector.hh>
    \n-
    26#include <dune/common/stdstreams.hh>
    \n-
    27#include <dune/common/timer.hh>
    \n-
    28
    \n-
    29#include <dune/geometry/referenceelements.hh>
    \n-
    30#include <dune/grid/common/grid.hh>
    \n-
    31
    \n-\n-\n-\n-
    35
    \n-
    36namespace Dune {
    \n-
    37namespace GridGlue {
    \n-
    38
    \n-
    55template<class T, int grid1Dim, int grid2Dim, int dimworld>
    \n-
    \n-\n-
    57 : public Merger<T,grid1Dim,grid2Dim,dimworld>
    \n-
    58{
    \n-\n-
    60
    \n-
    61public:
    \n-
    62
    \n-
    63 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n+
    13template<int dim1, int dim2, int dimworld, typename T>
    \n+
    14bool OverlappingMerge<dim1,dim2,dimworld, T>::inPlane(std::vector<FieldVector<T,dimworld> >& points) {
    \n+
    15
    \n+
    16 T eps = 1e-8;
    \n+
    17
    \n+
    18 assert(dim1 == 3 && dim2 == 3 && dimworld == 3);
    \n+
    19 assert(points.size() == 4);
    \n+
    20
    \n+
    21 FieldVector<T,dimworld> v1 = points[1]-points[0];
    \n+
    22 FieldVector<T,dimworld> v2 = points[2]-points[0];
    \n+
    23 FieldVector<T,dimworld> v3 = points[3]-points[0];
    \n+
    24
    \n+
    25 FieldVector<T,dimworld> v1xv2;
    \n+
    26 v1xv2[0] = v1[1]*v2[2] - v1[2]*v2[1];
    \n+
    27 v1xv2[1] = v1[2]*v2[0] - v1[0]*v2[2];
    \n+
    28 v1xv2[2] = v1[0]*v2[1] - v1[1]*v2[0];
    \n+
    29
    \n+
    30 return (std::abs(v3.dot(v1xv2)) < eps);
    \n+
    31}
    \n+
    32
    \n+
    33template<int dim1, int dim2, int dimworld, typename T>
    \n+
    \n+
    34void OverlappingMerge<dim1,dim2,dimworld, T>::computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n+
    35 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n+
    36 std::bitset<(1<<dim1)>& neighborIntersects1,
    \n+
    37 unsigned int grid1Index,
    \n+
    38 const Dune::GeometryType& grid2ElementType,
    \n+
    39 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n+
    40 std::bitset<(1<<dim2)>& neighborIntersects2,
    \n+
    41 unsigned int grid2Index,
    \n+
    42 std::vector<SimplicialIntersection>& intersections)
    \n+
    43{
    \n+
    44 using std::min;
    \n+
    45
    \n+
    46 this->counter++;
    \n+
    47 intersections.clear();
    \n+
    48
    \n+\n+
    50
    \n+
    51#ifndef NDEBUG
    \n+
    52 const auto& refElement1 = Dune::ReferenceElements<T,dim1>::general(grid1ElementType);
    \n+
    53 const auto& refElement2 = Dune::ReferenceElements<T,dim2>::general(grid2ElementType);
    \n+
    54
    \n+
    55 // A few consistency checks
    \n+
    56 assert((unsigned int)(refElement1.size(dim1)) == grid1ElementCorners.size());
    \n+
    57 assert((unsigned int)(refElement2.size(dim2)) == grid2ElementCorners.size());
    \n+
    58#endif
    \n+
    59
    \n+
    60 // Make generic geometries representing the grid1- and grid2 element.
    \n+
    61 // this eases computation of local coordinates.
    \n+
    62 typedef MultiLinearGeometry<T,dim1,dimworld> Geometry1;
    \n+
    63 typedef MultiLinearGeometry<T,dim2,dimworld> Geometry2;
    \n
    64
    \n-
    66 typedef T ctype;
    \n+
    65 Geometry1 grid1Geometry(grid1ElementType, grid1ElementCorners);
    \n+
    66 Geometry2 grid2Geometry(grid2ElementType, grid2ElementCorners);
    \n
    67
    \n-\n-
    70
    \n-\n-
    73
    \n-\n+
    68 // Dirty workaround for the intersection computation scaling problem (part 1/2)
    \n+
    69 std::vector<Dune::FieldVector<T,dimworld> > scaledGrid1ElementCorners(grid1ElementCorners.size());
    \n+
    70 std::vector<Dune::FieldVector<T,dimworld> > scaledGrid2ElementCorners(grid2ElementCorners.size());
    \n+
    71
    \n+
    72 // the scaling parameter is the length minimum of the lengths of the first edge in the grid1 geometry
    \n+
    73 // and the first edge in the grid2 geometry
    \n+
    74 T scaling = min((grid1ElementCorners[0] - grid1ElementCorners[1]).two_norm(),
    \n+
    75 (grid2ElementCorners[0] - grid2ElementCorners[1]).two_norm());
    \n
    76
    \n-\n-
    78
    \n-
    79protected:
    \n-
    80
    \n-\n-\n-\n-
    85
    \n-
    86 bool valid = false;
    \n-
    87
    \n-\n-
    92
    \n-
    93 virtual ~StandardMerge() = default;
    \n-
    94
    \n-
    99 virtual void computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n-
    100 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n-
    101 std::bitset<(1<<grid1Dim)>& neighborIntersects1,
    \n-
    102 unsigned int grid1Index,
    \n-
    103 const Dune::GeometryType& grid2ElementType,
    \n-
    104 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n-
    105 std::bitset<(1<<grid2Dim)>& neighborIntersects2,
    \n-
    106 unsigned int grid2Index,
    \n-
    107 std::vector<SimplicialIntersection>& intersections) = 0;
    \n-
    108
    \n-
    \n-
    112 bool computeIntersection(unsigned int candidate0, unsigned int candidate1,
    \n-
    113 const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n-
    114 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n-
    115 std::bitset<(1<<grid1Dim)>& neighborIntersects1,
    \n-
    116 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n-
    117 const std::vector<Dune::GeometryType>& grid2_element_types,
    \n-
    118 std::bitset<(1<<grid2Dim)>& neighborIntersects2,
    \n-
    119 bool insert = true);
    \n-
    120
    \n-
    121 /* M E M B E R V A R I A B L E S */
    \n-
    122
    \n-
    123 std::shared_ptr<IntersectionListProvider> intersectionListProvider_;
    \n-
    124 std::shared_ptr<IntersectionList> intersectionList_;
    \n-
    125
    \n-
    127 std::vector<std::vector<unsigned int> > grid1ElementCorners_;
    \n-
    128 std::vector<std::vector<unsigned int> > grid2ElementCorners_;
    \n+
    77 // scale the coordinates according to scaling parameter
    \n+
    78 for (unsigned int i = 0; i < grid1ElementCorners.size(); ++i) {
    \n+
    79 scaledGrid1ElementCorners[i] = grid1ElementCorners[i];
    \n+
    80 scaledGrid1ElementCorners[i] *= (1.0/scaling);
    \n+
    81 }
    \n+
    82 for (unsigned int i = 0; i < grid2ElementCorners.size(); ++i) {
    \n+
    83 scaledGrid2ElementCorners[i] = grid2ElementCorners[i];
    \n+
    84 scaledGrid2ElementCorners[i] *= (1.0/scaling);
    \n+
    85 }
    \n+
    86
    \n+
    87 // get size_type for all the vectors we are using
    \n+
    88 typedef typename std::vector<Empty>::size_type size_type;
    \n+
    89
    \n+
    90 const int dimis = dim1 < dim2 ? dim1 : dim2;
    \n+
    91 const size_type n_intersectionnodes = dimis+1;
    \n+
    92 size_type i;
    \n+
    93
    \n+
    94 std::vector<FieldVector<T,dimworld> > scaledP(0), P(0);
    \n+
    95 std::vector<std::vector<int> > H,SX(1<<dim1),SY(1<<dim2);
    \n+
    96 FieldVector<T,dimworld> centroid;
    \n+
    97 // local grid1 coordinates of the intersections
    \n+
    98 std::vector<FieldVector<T,dim1> > g1local(n_intersectionnodes);
    \n+
    99 // local grid2 coordinates of the intersections
    \n+
    100 std::vector<FieldVector<T,dim2> > g2local(n_intersectionnodes);
    \n+
    101
    \n+
    102 // compute the intersection nodes
    \n+
    103 IntersectionComputation<CM>::computeIntersection(scaledGrid1ElementCorners,
    \n+
    104 scaledGrid2ElementCorners,
    \n+
    105 SX,SY,scaledP);
    \n+
    106
    \n+
    107 // Dirty workaround - rescale the result (part 2/2)
    \n+
    108 P.resize(scaledP.size());
    \n+
    109 for (unsigned int i = 0; i < scaledP.size(); ++i) {
    \n+
    110 P[i] = scaledP[i];
    \n+
    111 P[i] *= scaling;
    \n+
    112 }
    \n+
    113
    \n+
    114 for (size_type i = 0; i < neighborIntersects1.size(); ++i) {
    \n+
    115 if (i < SX.size())
    \n+
    116 neighborIntersects1[i] = (SX[i].size() > 0);
    \n+
    117 else
    \n+
    118 neighborIntersects1[i] = false;
    \n+
    119 }
    \n+
    120 for (size_type i = 0; i < neighborIntersects2.size(); ++i) {
    \n+
    121 if (i < SY.size())
    \n+
    122 neighborIntersects2[i] = (SY[i].size() > 0);
    \n+
    123 else
    \n+
    124 neighborIntersects2[i] = false;
    \n+
    125 }
    \n+
    126
    \n+
    127 // P is an simplex of dimension dimis
    \n+
    128 if (P.size() == n_intersectionnodes) {
    \n
    129
    \n-
    130 std::vector<std::vector<int> > elementNeighbors1_;
    \n-
    131 std::vector<std::vector<int> > elementNeighbors2_;
    \n-
    132
    \n-
    133public:
    \n+
    130 for (i = 0; i < n_intersectionnodes; ++i) {
    \n+
    131 g1local[i] = grid1Geometry.local(P[i]);
    \n+
    132 g2local[i] = grid2Geometry.local(P[i]);
    \n+
    133 }
    \n
    134
    \n-
    135 /* C O N C E P T I M P L E M E N T I N G I N T E R F A C E */
    \n-
    136
    \n-
    \n-
    140 void build(const std::vector<Dune::FieldVector<T,dimworld> >& grid1_Coords,
    \n-
    141 const std::vector<unsigned int>& grid1_elements,
    \n-
    142 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n-
    143 const std::vector<Dune::FieldVector<T,dimworld> >& grid2_coords,
    \n-
    144 const std::vector<unsigned int>& grid2_elements,
    \n-
    145 const std::vector<Dune::GeometryType>& grid2_element_types) override;
    \n-
    146
    \n-
    147
    \n-
    148 /* P R O B I N G T H E M E R G E D G R I D */
    \n-
    149
    \n-
    \n-
    150 void clear() override
    \n-
    151 {
    \n-
    152 // Delete old internal data, from a possible previous run
    \n-\n-\n-\n-
    156
    \n-
    157 valid = false;
    \n-
    158 }
    \n-
    \n+
    135 intersections.emplace_back(grid1Index, grid2Index);
    \n+
    136 for (i = 0; i < n_intersectionnodes; ++i) {
    \n+
    137 intersections.back().corners0[0][i] = g1local[i];
    \n+
    138 intersections.back().corners1[0][i] = g2local[i];
    \n+
    139 }
    \n+
    140
    \n+
    141 } else if (P.size() > n_intersectionnodes) { // P is a union of simplices of dimension dimis
    \n+
    142
    \n+
    143 assert(dimis != 1);
    \n+
    144 std::vector<FieldVector<T,dimworld> > global(n_intersectionnodes);
    \n+
    145
    \n+
    146 // Compute the centroid
    \n+
    147 centroid=0;
    \n+
    148 for (size_type i=0; i < P.size(); i++)
    \n+
    149 centroid += P[i] ;
    \n+
    150 centroid /= static_cast<T>(P.size()) ;
    \n+
    151
    \n+
    152 // order the points and get intersection face indices
    \n+
    153 H.clear() ;
    \n+
    154 IntersectionComputation<CM>::template orderPoints<dimis,dimworld>(centroid,SX,SY,P,H);
    \n+
    155
    \n+
    156 // Loop over all intersection elements
    \n+
    157 for (size_type i=0; i < H.size(); i++) {
    \n+
    158 int hs = H[i].size(); // number of nodes of the intersection
    \n
    159
    \n-
    \n-
    160 std::shared_ptr<IntersectionList> intersectionList() const final
    \n-
    161 {
    \n-
    162 assert(valid);
    \n-
    163 return intersectionList_;
    \n-
    164 }
    \n-
    \n-
    165
    \n-
    \n-
    166 void enableFallback(bool fallback)
    \n-
    167 {
    \n-
    168 m_enableFallback = fallback;
    \n-
    169 }
    \n-
    \n+
    160 // if the intersection element is not degenerated
    \n+
    161 if (hs==dimis) {
    \n+
    162
    \n+
    163 // create the intersection geometry
    \n+
    164 for ( size_type j=0 ; j < dimis; ++j) {
    \n+
    165 global[j]= P[H[i][j]]; // get the intersection face
    \n+
    166 }
    \n+
    167
    \n+
    168 // intersection face + centroid = new element
    \n+
    169 global[dimis]=centroid;
    \n
    170
    \n-
    \n-
    171 void enableBruteForce(bool bruteForce)
    \n-
    172 {
    \n-
    173 m_enableBruteForce = bruteForce;
    \n-
    174 }
    \n+
    171 // create local representation of the intersection
    \n+
    172 for (size_type j = 0; j < n_intersectionnodes; ++j) {
    \n+
    173 g1local[j] = grid1Geometry.local(global[j]);
    \n+
    174 g2local[j] = grid2Geometry.local(global[j]);
    \n+
    175 }
    \n+
    176
    \n+
    177 intersections.emplace_back(grid1Index,grid2Index);
    \n+
    178 for (size_type j = 0; j < n_intersectionnodes; ++j) {
    \n+
    179 intersections.back().corners0[0][j] = g1local[j];
    \n+
    180 intersections.back().corners1[0][j] = g2local[j];
    \n+
    181 }
    \n+
    182 }
    \n+
    183 }
    \n+
    184 }
    \n+
    185}
    \n
    \n-
    175
    \n-
    176private:
    \n-
    180 bool m_enableFallback = false;
    \n-
    181
    \n-
    185 bool m_enableBruteForce = false;
    \n
    186
    \n-
    187 auto& intersections()
    \n-
    188 { return intersectionListProvider_->intersections(); }
    \n+
    187} /* namespace Dune::GridGlue */
    \n+
    188} /* namespace Dune */
    \n
    189
    \n-
    191 template<typename V>
    \n-
    192 static void purge(V & v)
    \n-
    193 {
    \n-
    194 v.clear();
    \n-
    195 V v2(v);
    \n-
    196 v.swap(v2);
    \n-
    197 }
    \n-
    198
    \n-
    203 void generateSeed(std::vector<int>& seeds,
    \n-
    204 Dune::BitSetVector<1>& isHandled2,
    \n-
    205 std::stack<unsigned>& candidates2,
    \n-
    206 const std::vector<Dune::FieldVector<T, dimworld> >& grid1Coords,
    \n-
    207 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n-
    208 const std::vector<Dune::FieldVector<T, dimworld> >& grid2Coords,
    \n-
    209 const std::vector<Dune::GeometryType>& grid2_element_types);
    \n-
    210
    \n-
    214 int insertIntersections(unsigned int candidate1, unsigned int candidate2,std::vector<SimplicialIntersection>& intersections);
    \n-
    215
    \n-
    219 int bruteForceSearch(int candidate1,
    \n-
    220 const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n-
    221 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n-
    222 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n-
    223 const std::vector<Dune::GeometryType>& grid2_element_types);
    \n-
    224
    \n-
    228 std::pair<bool, unsigned int>
    \n-
    229 intersectionIndex(unsigned int grid1Index, unsigned int grid2Index,
    \n-
    230 SimplicialIntersection& intersection);
    \n-
    231
    \n-
    235 template <int gridDim>
    \n-
    236 void computeNeighborsPerElement(const std::vector<Dune::GeometryType>& gridElementTypes,
    \n-
    237 const std::vector<std::vector<unsigned int> >& gridElementCorners,
    \n-
    238 std::vector<std::vector<int> >& elementNeighbors);
    \n-
    239
    \n-
    240 void buildAdvancingFront(
    \n-
    241 const std::vector<Dune::FieldVector<T,dimworld> >& grid1_Coords,
    \n-
    242 const std::vector<unsigned int>& grid1_elements,
    \n-
    243 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n-
    244 const std::vector<Dune::FieldVector<T,dimworld> >& grid2_coords,
    \n-
    245 const std::vector<unsigned int>& grid2_elements,
    \n-
    246 const std::vector<Dune::GeometryType>& grid2_element_types
    \n-
    247 );
    \n-
    248
    \n-
    249 void buildBruteForce(
    \n-
    250 const std::vector<Dune::FieldVector<T,dimworld> >& grid1_Coords,
    \n-
    251 const std::vector<unsigned int>& grid1_elements,
    \n-
    252 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n-
    253 const std::vector<Dune::FieldVector<T,dimworld> >& grid2_coords,
    \n-
    254 const std::vector<unsigned int>& grid2_elements,
    \n-
    255 const std::vector<Dune::GeometryType>& grid2_element_types
    \n-
    256 );
    \n-
    257};
    \n-
    258
    \n-
    259
    \n-
    260/* IMPLEMENTATION */
    \n-
    261
    \n-
    262template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n-
    \n-
    263bool StandardMerge<T,grid1Dim,grid2Dim,dimworld>::computeIntersection(unsigned int candidate0, unsigned int candidate1,
    \n-
    264 const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n-
    265 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n-
    266 std::bitset<(1<<grid1Dim)>& neighborIntersects1,
    \n-
    267 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n-
    268 const std::vector<Dune::GeometryType>& grid2_element_types,
    \n-
    269 std::bitset<(1<<grid2Dim)>& neighborIntersects2,
    \n-
    270 bool insert)
    \n-
    271{
    \n-
    272 // Select vertices of the grid1 element
    \n-
    273 int grid1NumVertices = grid1ElementCorners_[candidate0].size();
    \n-
    274 std::vector<Dune::FieldVector<T,dimworld> > grid1ElementCorners(grid1NumVertices);
    \n-
    275 for (int i=0; i<grid1NumVertices; i++)
    \n-
    276 grid1ElementCorners[i] = grid1Coords[grid1ElementCorners_[candidate0][i]];
    \n-
    277
    \n-
    278 // Select vertices of the grid2 element
    \n-
    279 int grid2NumVertices = grid2ElementCorners_[candidate1].size();
    \n-
    280 std::vector<Dune::FieldVector<T,dimworld> > grid2ElementCorners(grid2NumVertices);
    \n-
    281 for (int i=0; i<grid2NumVertices; i++)
    \n-
    282 grid2ElementCorners[i] = grid2Coords[grid2ElementCorners_[candidate1][i]];
    \n-
    283
    \n-
    284 // ///////////////////////////////////////////////////////
    \n-
    285 // Compute the intersection between the two elements
    \n-
    286 // ///////////////////////////////////////////////////////
    \n-
    287
    \n-
    288 std::vector<SimplicialIntersection> intersections(0);
    \n-
    289
    \n-
    290 // compute the intersections
    \n-
    291 computeIntersections(grid1_element_types[candidate0], grid1ElementCorners,
    \n-
    292 neighborIntersects1, candidate0,
    \n-
    293 grid2_element_types[candidate1], grid2ElementCorners,
    \n-
    294 neighborIntersects2, candidate1,
    \n-\n-
    296
    \n-
    297 // insert intersections if needed
    \n-
    298 if(insert && !intersections.empty())
    \n-
    299 insertIntersections(candidate0,candidate1,intersections);
    \n-
    300
    \n-
    301 // Have we found an intersection?
    \n-
    302 return !intersections.empty() || neighborIntersects1.any() || neighborIntersects2.any();
    \n-
    303
    \n-
    304}
    \n-
    \n-
    305
    \n-
    306template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n-\n-
    308 const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n-
    309 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n-
    310 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n-
    311 const std::vector<Dune::GeometryType>& grid2_element_types)
    \n-
    312{
    \n-
    313 std::bitset<(1<<grid1Dim)> neighborIntersects1;
    \n-
    314 std::bitset<(1<<grid2Dim)> neighborIntersects2;
    \n-
    315 for (std::size_t i=0; i<grid1_element_types.size(); i++) {
    \n-
    316
    \n-
    317 bool intersectionFound = computeIntersection(i, candidate1,
    \n-
    318 grid1Coords, grid1_element_types, neighborIntersects1,
    \n-
    319 grid2Coords, grid2_element_types, neighborIntersects2,
    \n-
    320 false);
    \n-
    321
    \n-
    322 // if there is an intersection, i is our new seed candidate on the grid1 side
    \n-
    323 if (intersectionFound)
    \n-
    324 return i;
    \n-
    325
    \n-
    326 }
    \n-
    327
    \n-
    328 return -1;
    \n-
    329}
    \n-
    330
    \n-
    331
    \n-
    332template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n-
    333template<int gridDim>
    \n-
    334void StandardMerge<T,grid1Dim,grid2Dim,dimworld>::
    \n-
    335computeNeighborsPerElement(const std::vector<Dune::GeometryType>& gridElementTypes,
    \n-
    336 const std::vector<std::vector<unsigned int> >& gridElementCorners,
    \n-
    337 std::vector<std::vector<int> >& elementNeighbors)
    \n-
    338{
    \n-
    339 typedef std::vector<unsigned int> FaceType;
    \n-
    340 typedef std::map<FaceType, std::pair<unsigned int, unsigned int> > FaceSetType;
    \n-
    341
    \n-
    343 // First: grid 1
    \n-
    345 FaceSetType faces;
    \n-
    346 elementNeighbors.resize(gridElementTypes.size());
    \n-
    347
    \n-
    348 for (size_t i=0; i<gridElementTypes.size(); i++)
    \n-
    349 elementNeighbors[i].resize(Dune::ReferenceElements<T,gridDim>::general(gridElementTypes[i]).size(1), -1);
    \n-
    350
    \n-
    351 for (size_t i=0; i<gridElementTypes.size(); i++) { //iterate over all elements
    \n-
    352 const auto& refElement = Dune::ReferenceElements<T,gridDim>::general(gridElementTypes[i]);
    \n-
    353
    \n-
    354 for (size_t j=0; j<(size_t)refElement.size(1); j++) { // iterate over all faces of the element
    \n-
    355
    \n-
    356 FaceType face;
    \n-
    357 // extract element face
    \n-
    358 for (size_t k=0; k<(size_t)refElement.size(j,1,gridDim); k++)
    \n-
    359 face.push_back(gridElementCorners[i][refElement.subEntity(j,1,k,gridDim)]);
    \n-
    360
    \n-
    361 // sort the face vertices to get rid of twists and other permutations
    \n-
    362 std::sort(face.begin(), face.end());
    \n-
    363
    \n-
    364 typename FaceSetType::iterator faceHandle = faces.find(face);
    \n-
    365
    \n-
    366 if (faceHandle == faces.end()) {
    \n-
    367
    \n-
    368 // face has not been visited before
    \n-
    369 faces.insert(std::make_pair(face, std::make_pair(i,j)));
    \n-
    370
    \n-
    371 } else {
    \n-
    372
    \n-
    373 // face has been visited before: store the mutual neighbor information
    \n-
    374 elementNeighbors[i][j] = faceHandle->second.first;
    \n-
    375 elementNeighbors[faceHandle->second.first][faceHandle->second.second] = i;
    \n-
    376
    \n-
    377 faces.erase(faceHandle);
    \n-
    378
    \n-
    379 }
    \n-
    380
    \n-
    381 }
    \n-
    382
    \n-
    383 }
    \n-
    384}
    \n-
    385
    \n-
    386// /////////////////////////////////////////////////////////////////////
    \n-
    387// Compute the intersection of all pairs of elements
    \n-
    388// Linear algorithm by Gander and Japhet, Proc. of DD18
    \n-
    389// /////////////////////////////////////////////////////////////////////
    \n-
    390
    \n-
    391template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n-
    \n-
    392void StandardMerge<T,grid1Dim,grid2Dim,dimworld>::build(const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n-
    393 const std::vector<unsigned int>& grid1_elements,
    \n-
    394 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n-
    395 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n-
    396 const std::vector<unsigned int>& grid2_elements,
    \n-
    397 const std::vector<Dune::GeometryType>& grid2_element_types
    \n-
    398 )
    \n-
    399{
    \n-
    400
    \n-
    401 std::cout << "StandardMerge building merged grid..." << std::endl;
    \n-
    402 Dune::Timer watch;
    \n-
    403
    \n-
    404 clear();
    \n-
    405 // clear global intersection list
    \n-
    406 intersectionListProvider_->clear();
    \n-
    407 this->counter = 0;
    \n-
    408
    \n-
    409 // /////////////////////////////////////////////////////////////////////
    \n-
    410 // Copy element corners into a data structure with block-structure.
    \n-
    411 // This is not as efficient but a lot easier to use.
    \n-
    412 // We may think about efficiency later.
    \n-
    413 // /////////////////////////////////////////////////////////////////////
    \n-
    414
    \n-
    415 // first the grid1 side
    \n-
    416 grid1ElementCorners_.resize(grid1_element_types.size());
    \n-
    417
    \n-
    418 unsigned int grid1CornerCounter = 0;
    \n-
    419
    \n-
    420 for (std::size_t i=0; i<grid1_element_types.size(); i++) {
    \n-
    421
    \n-
    422 // Select vertices of the grid1 element
    \n-
    423 int numVertices = Dune::ReferenceElements<T,grid1Dim>::general(grid1_element_types[i]).size(grid1Dim);
    \n-
    424 grid1ElementCorners_[i].resize(numVertices);
    \n-
    425 for (int j=0; j<numVertices; j++)
    \n-
    426 grid1ElementCorners_[i][j] = grid1_elements[grid1CornerCounter++];
    \n-
    427
    \n-
    428 }
    \n-
    429
    \n-
    430 // then the grid2 side
    \n-
    431 grid2ElementCorners_.resize(grid2_element_types.size());
    \n-
    432
    \n-
    433 unsigned int grid2CornerCounter = 0;
    \n-
    434
    \n-
    435 for (std::size_t i=0; i<grid2_element_types.size(); i++) {
    \n-
    436
    \n-
    437 // Select vertices of the grid2 element
    \n-
    438 int numVertices = Dune::ReferenceElements<T,grid2Dim>::general(grid2_element_types[i]).size(grid2Dim);
    \n-
    439 grid2ElementCorners_[i].resize(numVertices);
    \n-
    440 for (int j=0; j<numVertices; j++)
    \n-
    441 grid2ElementCorners_[i][j] = grid2_elements[grid2CornerCounter++];
    \n-
    442
    \n-
    443 }
    \n-
    444
    \n-
    446 // Compute the face neighbors for each element
    \n-
    448
    \n-
    449 computeNeighborsPerElement<grid1Dim>(grid1_element_types, grid1ElementCorners_, elementNeighbors1_);
    \n-
    450 computeNeighborsPerElement<grid2Dim>(grid2_element_types, grid2ElementCorners_, elementNeighbors2_);
    \n-
    451
    \n-
    452 std::cout << "setup took " << watch.elapsed() << " seconds." << std::endl;
    \n-
    453
    \n-
    454 if (m_enableBruteForce)
    \n-
    455 buildBruteForce(grid1Coords, grid1_elements, grid1_element_types, grid2Coords, grid2_elements, grid2_element_types);
    \n-
    456 else
    \n-
    457 buildAdvancingFront(grid1Coords, grid1_elements, grid1_element_types, grid2Coords, grid2_elements, grid2_element_types);
    \n-
    458
    \n-
    459 valid = true;
    \n-
    460 std::cout << "intersection construction took " << watch.elapsed() << " seconds." << std::endl;
    \n-
    461}
    \n-
    \n-
    \n-
    462
    \n-
    463template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n-\n-
    465 const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n-
    466 const std::vector<unsigned int>& grid1_elements,
    \n-
    467 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n-
    468 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n-
    469 const std::vector<unsigned int>& grid2_elements,
    \n-
    470 const std::vector<Dune::GeometryType>& grid2_element_types
    \n-
    471 )
    \n-
    472{
    \n-
    474 // Data structures for the advancing-front algorithm
    \n-
    476
    \n-
    477 std::stack<unsigned int> candidates1;
    \n-
    478 std::stack<unsigned int> candidates2;
    \n-
    479
    \n-
    480 std::vector<int> seeds(grid2_element_types.size(), -1);
    \n-
    481
    \n-
    482 // /////////////////////////////////////////////////////////////////////
    \n-
    483 // Do a brute-force search to find one pair of intersecting elements
    \n-
    484 // to start the advancing-front type algorithm with.
    \n-
    485 // /////////////////////////////////////////////////////////////////////
    \n-
    486
    \n-
    487 // Set flag if element has been handled
    \n-
    488 Dune::BitSetVector<1> isHandled2(grid2_element_types.size());
    \n-
    489
    \n-
    490 // Set flag if the element has been entered in the queue
    \n-
    491 Dune::BitSetVector<1> isCandidate2(grid2_element_types.size());
    \n-
    492
    \n-
    493 generateSeed(seeds, isHandled2, candidates2, grid1Coords, grid1_element_types, grid2Coords, grid2_element_types);
    \n-
    494
    \n-
    495 // /////////////////////////////////////////////////////////////////////
    \n-
    496 // Main loop
    \n-
    497 // /////////////////////////////////////////////////////////////////////
    \n-
    498
    \n-
    499 std::set<unsigned int> isHandled1;
    \n-
    500
    \n-
    501 std::set<unsigned int> isCandidate1;
    \n-
    502
    \n-
    503 while (!candidates2.empty()) {
    \n-
    504
    \n-
    505 // Get the next element on the grid2 side
    \n-
    506 unsigned int currentCandidate2 = candidates2.top();
    \n-
    507 int seed = seeds[currentCandidate2];
    \n-
    508 assert(seed >= 0);
    \n-
    509
    \n-
    510 candidates2.pop();
    \n-
    511 isHandled2[currentCandidate2] = true;
    \n-
    512
    \n-
    513 // Start advancing front algorithm on the grid1 side from the 'seed' element that
    \n-
    514 // we stored along with the current grid2 element
    \n-
    515 candidates1.push(seed);
    \n-
    516
    \n-
    517 isHandled1.clear();
    \n-
    518 isCandidate1.clear();
    \n-
    519
    \n-
    520 while (!candidates1.empty()) {
    \n-
    521
    \n-
    522 unsigned int currentCandidate1 = candidates1.top();
    \n-
    523 candidates1.pop();
    \n-
    524 isHandled1.insert(currentCandidate1);
    \n-
    525
    \n-
    526 // Test whether there is an intersection between currentCandidate0 and currentCandidate1
    \n-
    527 std::bitset<(1<<grid1Dim)> neighborIntersects1;
    \n-
    528 std::bitset<(1<<grid2Dim)> neighborIntersects2;
    \n-
    529 bool intersectionFound = computeIntersection(currentCandidate1, currentCandidate2,
    \n-
    530 grid1Coords,grid1_element_types, neighborIntersects1,
    \n-
    531 grid2Coords,grid2_element_types, neighborIntersects2);
    \n-
    532
    \n-
    533 for (size_t i=0; i<neighborIntersects2.size(); i++)
    \n-
    534 if (neighborIntersects2[i] && elementNeighbors2_[currentCandidate2][i] != -1)
    \n-
    535 seeds[elementNeighbors2_[currentCandidate2][i]] = currentCandidate1;
    \n-
    536
    \n-
    537 // add neighbors of candidate0 to the list of elements to be checked
    \n-
    538 if (intersectionFound) {
    \n-
    539
    \n-
    540 for (size_t i=0; i<elementNeighbors1_[currentCandidate1].size(); i++) {
    \n-
    541
    \n-
    542 int neighbor = elementNeighbors1_[currentCandidate1][i];
    \n-
    543
    \n-
    544 if (neighbor == -1) // do nothing at the grid boundary
    \n-
    545 continue;
    \n-
    546
    \n-
    547 if (isHandled1.find(neighbor) == isHandled1.end()
    \n-
    548 && isCandidate1.find(neighbor) == isCandidate1.end()) {
    \n-
    549 candidates1.push(neighbor);
    \n-
    550 isCandidate1.insert(neighbor);
    \n-
    551 }
    \n-
    552
    \n-
    553 }
    \n-
    554
    \n-
    555 }
    \n-
    556
    \n-
    557 }
    \n-
    558
    \n-
    559 // We have now found all intersections of elements in the grid1 side with currentCandidate2
    \n-
    560 // Now we add all neighbors of currentCandidate2 that have not been treated yet as new
    \n-
    561 // candidates.
    \n-
    562
    \n-
    563 // Do we have an unhandled neighbor with a seed?
    \n-
    564 bool seedFound = !candidates2.empty();
    \n-
    565 for (size_t i=0; i<elementNeighbors2_[currentCandidate2].size(); i++) {
    \n-
    566
    \n-
    567 int neighbor = elementNeighbors2_[currentCandidate2][i];
    \n-
    568
    \n-
    569 if (neighbor == -1) // do nothing at the grid boundary
    \n-
    570 continue;
    \n-
    571
    \n-
    572 // Add all unhandled intersecting neighbors to the queue
    \n-
    573 if (!isHandled2[neighbor][0] && !isCandidate2[neighbor][0] && seeds[neighbor]>-1) {
    \n-
    574
    \n-
    575 isCandidate2[neighbor][0] = true;
    \n-
    576 candidates2.push(neighbor);
    \n-
    577 seedFound = true;
    \n-
    578 }
    \n-
    579 }
    \n-
    580
    \n-
    581 if (seedFound || !m_enableFallback)
    \n-
    582 continue;
    \n-
    583
    \n-
    584 // There is no neighbor with a seed, so we need to be a bit more aggressive...
    \n-
    585 // get all neighbors of currentCandidate2, but not currentCandidate2 itself
    \n-
    586 for (size_t i=0; i<elementNeighbors2_[currentCandidate2].size(); i++) {
    \n-
    587
    \n-
    588 int neighbor = elementNeighbors2_[currentCandidate2][i];
    \n-
    589
    \n-
    590 if (neighbor == -1) // do nothing at the grid boundary
    \n-
    591 continue;
    \n-
    592
    \n-
    593 if (!isHandled2[neighbor][0] && !isCandidate2[neighbor][0]) {
    \n-
    594
    \n-
    595 // Get a seed element for the new grid2 element
    \n-
    596 // Look for an element on the grid1 side that intersects the new grid2 element.
    \n-
    597 int seed = -1;
    \n-
    598
    \n-
    599 // Look among the ones that have been tested during the last iteration.
    \n-
    600 for (typename std::set<unsigned int>::iterator seedIt = isHandled1.begin();
    \n-
    601 seedIt != isHandled1.end(); ++seedIt) {
    \n-
    602
    \n-
    603 std::bitset<(1<<grid1Dim)> neighborIntersects1;
    \n-
    604 std::bitset<(1<<grid2Dim)> neighborIntersects2;
    \n-
    605 bool intersectionFound = computeIntersection(*seedIt, neighbor,
    \n-
    606 grid1Coords, grid1_element_types, neighborIntersects1,
    \n-
    607 grid2Coords, grid2_element_types, neighborIntersects2,
    \n-
    608 false);
    \n-
    609
    \n-
    610 // if the intersection is nonempty, *seedIt is our new seed candidate on the grid1 side
    \n-
    611 if (intersectionFound) {
    \n-
    612 seed = *seedIt;
    \n-
    613 Dune::dwarn << "Algorithm entered first fallback method and found a new seed in the build algorithm." <<
    \n-
    614 "Probably, the neighborIntersects bitsets computed in computeIntersection specialization is wrong." << std::endl;
    \n-
    615 break;
    \n-
    616 }
    \n-
    617
    \n-
    618 }
    \n-
    619
    \n-
    620 if (seed < 0) {
    \n-
    621 // The fast method didn't find a grid1 element that intersects with
    \n-
    622 // the new grid2 candidate. We have to do a brute-force search.
    \n-
    623 seed = bruteForceSearch(neighbor,
    \n-
    624 grid1Coords,grid1_element_types,
    \n-
    625 grid2Coords,grid2_element_types);
    \n-
    626 Dune::dwarn << "Algorithm entered second fallback method. This probably should not happen." << std::endl;
    \n-
    627
    \n-
    628 }
    \n-
    629
    \n-
    630 // We have tried all we could: the candidate is 'handled' now
    \n-
    631 isCandidate2[neighbor] = true;
    \n-
    632
    \n-
    633 // still no seed? Then the new grid2 candidate isn't overlapped by anything
    \n-
    634 if (seed < 0)
    \n-
    635 continue;
    \n-
    636
    \n-
    637 // we have a seed now
    \n-
    638 candidates2.push(neighbor);
    \n-
    639 seeds[neighbor] = seed;
    \n-
    640 seedFound = true;
    \n-
    641
    \n-
    642 }
    \n-
    643
    \n-
    644 }
    \n-
    645
    \n-
    646 /* Do a brute-force search if there is still no seed:
    \n-
    647 * There might still be a disconnected region out there.
    \n-
    648 */
    \n-
    649 if (!seedFound && candidates2.empty()) {
    \n-
    650 generateSeed(seeds, isHandled2, candidates2, grid1Coords, grid1_element_types, grid2Coords, grid2_element_types);
    \n-
    651 }
    \n-
    652 }
    \n-
    653}
    \n-
    654
    \n-
    655template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n-
    656void StandardMerge<T,grid1Dim,grid2Dim,dimworld>::buildBruteForce(
    \n-
    657 const std::vector<Dune::FieldVector<T,dimworld> >& grid1Coords,
    \n-
    658 const std::vector<unsigned int>& grid1_elements,
    \n-
    659 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n-
    660 const std::vector<Dune::FieldVector<T,dimworld> >& grid2Coords,
    \n-
    661 const std::vector<unsigned int>& grid2_elements,
    \n-
    662 const std::vector<Dune::GeometryType>& grid2_element_types
    \n-
    663 )
    \n-
    664{
    \n-
    665 std::bitset<(1<<grid1Dim)> neighborIntersects1;
    \n-
    666 std::bitset<(1<<grid2Dim)> neighborIntersects2;
    \n-
    667
    \n-
    668 for (unsigned i = 0; i < grid1_element_types.size(); ++i) {
    \n-
    669 for (unsigned j = 0; j < grid2_element_types.size(); ++j) {
    \n-
    670 (void) computeIntersection(i, j,
    \n-
    671 grid1Coords, grid1_element_types, neighborIntersects1,
    \n-
    672 grid2Coords, grid2_element_types, neighborIntersects2);
    \n-
    673 }
    \n-
    674 }
    \n-
    675}
    \n-
    676
    \n-
    677template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n-
    678void StandardMerge<T,grid1Dim,grid2Dim,dimworld>::generateSeed(std::vector<int>& seeds, Dune::BitSetVector<1>& isHandled2, std::stack<unsigned>& candidates2, const std::vector<Dune::FieldVector<T, dimworld> >& grid1Coords, const std::vector<Dune::GeometryType>& grid1_element_types, const std::vector<Dune::FieldVector<T, dimworld> >& grid2Coords, const std::vector<Dune::GeometryType>& grid2_element_types)
    \n-
    679{
    \n-
    680 for (std::size_t j=0; j<grid2_element_types.size(); j++) {
    \n-
    681
    \n-
    682 if (seeds[j] > 0 || isHandled2[j][0])
    \n-
    683 continue;
    \n-
    684
    \n-
    685 int seed = bruteForceSearch(j,grid1Coords,grid1_element_types,grid2Coords,grid2_element_types);
    \n-
    686
    \n-
    687 if (seed >= 0) {
    \n-
    688 candidates2.push(j); // the candidate and a seed for the candidate
    \n-
    689 seeds[j] = seed;
    \n-
    690 break;
    \n-
    691 } else // If the brute force search did not find any intersection we can skip this element
    \n-
    692 isHandled2[j] = true;
    \n-
    693 }
    \n-
    694}
    \n-
    695
    \n-
    696template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n-
    697int StandardMerge<T,grid1Dim,grid2Dim,dimworld>::insertIntersections(unsigned int candidate1, unsigned int candidate2,
    \n-
    698 std::vector<SimplicialIntersection>& intersections)
    \n-
    699{
    \n-
    700 typedef typename std::vector<SimplicialIntersection>::size_type size_t;
    \n-
    701 int count = 0;
    \n-
    702
    \n-
    703 for (size_t i = 0; i < intersections.size(); ++i) {
    \n-
    704 // get the intersection index of the current intersection from intersections in this->intersections
    \n-
    705 bool found;
    \n-
    706 unsigned int index;
    \n-
    707 std::tie(found, index) = intersectionIndex(candidate1,candidate2,intersections[i]);
    \n-
    708
    \n-
    709 if (found && index >= this->intersections().size()) { //the intersection is not yet contained in this->intersections
    \n-
    710 this->intersections().push_back(intersections[i]); // insert
    \n-
    711
    \n-
    712 ++count;
    \n-
    713 } else if (found) {
    \n-
    714 auto& intersection = this->intersections()[index];
    \n-
    715
    \n-
    716 // insert each grid1 element and local representation of intersections[i] with parent candidate1
    \n-
    717 for (size_t j = 0; j < intersections[i].parents0.size(); ++j) {
    \n-
    718 intersection.parents0.push_back(candidate1);
    \n-
    719 intersection.corners0.push_back(intersections[i].corners0[j]);
    \n-
    720 }
    \n-
    721
    \n-
    722 // insert each grid2 element and local representation of intersections[i] with parent candidate2
    \n-
    723 for (size_t j = 0; j < intersections[i].parents1.size(); ++j) {
    \n-
    724 intersection.parents1.push_back(candidate2);
    \n-
    725 intersection.corners1.push_back(intersections[i].corners1[j]);
    \n-
    726 }
    \n-
    727
    \n-
    728 ++count;
    \n-
    729 } else {
    \n-
    730 Dune::dwarn << "Computed the same intersection twice!" << std::endl;
    \n-
    731 }
    \n-
    732 }
    \n-
    733 return count;
    \n-
    734}
    \n-
    735
    \n-
    736template<typename T, int grid1Dim, int grid2Dim, int dimworld>
    \n-
    737std::pair<bool, unsigned int>
    \n-
    738StandardMerge<T,grid1Dim,grid2Dim,dimworld>::intersectionIndex(unsigned int grid1Index, unsigned int grid2Index,
    \n-
    739 SimplicialIntersection& intersection) {
    \n-
    740
    \n-
    741
    \n-
    742 // return index in intersections_ if at least one local representation of a Simplicial Intersection (SI)
    \n-
    743 // of intersections_ is equal to the local representation of one element in intersections
    \n-
    744
    \n-
    745 std::size_t n_intersections = this->intersections().size();
    \n-
    746 if (grid1Dim == grid2Dim)
    \n-
    747 return {true, n_intersections};
    \n-
    748
    \n-
    749 T eps = 1e-10;
    \n-
    750
    \n-
    751 for (std::size_t i = 0; i < n_intersections; ++i) {
    \n-
    752
    \n-
    753 // compare the local representation of the subelements of the SI
    \n-
    754 for (std::size_t ei = 0; ei < this->intersections()[i].parents0.size(); ++ei) // merger subelement
    \n-
    755 {
    \n-
    756 if (this->intersections()[i].parents0[ei] == grid1Index)
    \n-
    757 {
    \n-
    758 for (std::size_t er = 0; er < intersection.parents0.size(); ++er) // list subelement
    \n-
    759 {
    \n-
    760 bool found_all = true;
    \n-
    761 // compare the local coordinate representations
    \n-
    762 for (std::size_t ci = 0; ci < this->intersections()[i].corners0[ei].size(); ++ci)
    \n-
    763 {
    \n-
    764 Dune::FieldVector<T,grid1Dim> ni = this->intersections()[i].corners0[ei][ci];
    \n-
    765 bool found_ni = false;
    \n-
    766 for (std::size_t cr = 0; cr < intersection.corners0[er].size(); ++cr)
    \n-
    767 {
    \n-
    768 Dune::FieldVector<T,grid1Dim> nr = intersection.corners0[er][cr];
    \n-
    769
    \n-
    770 found_ni = found_ni || ((ni-nr).infinity_norm() < eps);
    \n-
    771 if (found_ni)
    \n-
    772 break;
    \n-
    773 }
    \n-
    774 found_all = found_all && found_ni;
    \n-
    775
    \n-
    776 if (!found_ni)
    \n-
    777 break;
    \n-
    778 }
    \n-
    779
    \n-
    780 if (found_all && (this->intersections()[i].parents1[ei] != grid2Index))
    \n-
    781 return {true, i};
    \n-
    782 else if (found_all)
    \n-
    783 return {false, 0};
    \n-
    784 }
    \n-
    785 }
    \n-
    786 }
    \n-
    787
    \n-
    788 // compare the local representation of the subelements of the SI
    \n-
    789 for (std::size_t ei = 0; ei < this->intersections()[i].parents1.size(); ++ei) // merger subelement
    \n-
    790 {
    \n-
    791 if (this->intersections()[i].parents1[ei] == grid2Index)
    \n-
    792 {
    \n-
    793 for (std::size_t er = 0; er < intersection.parents1.size(); ++er) // list subelement
    \n-
    794 {
    \n-
    795 bool found_all = true;
    \n-
    796 // compare the local coordinate representations
    \n-
    797 for (std::size_t ci = 0; ci < this->intersections()[i].corners1[ei].size(); ++ci)
    \n-
    798 {
    \n-
    799 Dune::FieldVector<T,grid2Dim> ni = this->intersections()[i].corners1[ei][ci];
    \n-
    800 bool found_ni = false;
    \n-
    801 for (std::size_t cr = 0; cr < intersection.corners1[er].size(); ++cr)
    \n-
    802 {
    \n-
    803 Dune::FieldVector<T,grid2Dim> nr = intersection.corners1[er][cr];
    \n-
    804 found_ni = found_ni || ((ni-nr).infinity_norm() < eps);
    \n-
    805
    \n-
    806 if (found_ni)
    \n-
    807 break;
    \n-
    808 }
    \n-
    809 found_all = found_all && found_ni;
    \n-
    810
    \n-
    811 if (!found_ni)
    \n-
    812 break;
    \n-
    813 }
    \n-
    814
    \n-
    815 if (found_all && (this->intersections()[i].parents0[ei] != grid1Index))
    \n-
    816 return {true, i};
    \n-
    817 else if (found_all)
    \n-
    818 return {false, 0};
    \n-
    819 }
    \n-
    820 }
    \n-
    821 }
    \n-
    822 }
    \n-
    823
    \n-
    824 return {true, n_intersections};
    \n-
    825}
    \n-
    826
    \n-
    827#define DECL extern
    \n-
    \n-
    828#define STANDARD_MERGE_INSTANTIATE(T,A,B,C) \\
    \n-
    829 DECL template \\
    \n-
    830 void StandardMerge<T,A,B,C>::build(const std::vector<Dune::FieldVector<T,C> >& grid1Coords, \\
    \n-
    831 const std::vector<unsigned int>& grid1_elements, \\
    \n-
    832 const std::vector<Dune::GeometryType>& grid1_element_types, \\
    \n-
    833 const std::vector<Dune::FieldVector<T,C> >& grid2Coords, \\
    \n-
    834 const std::vector<unsigned int>& grid2_elements, \\
    \n-
    835 const std::vector<Dune::GeometryType>& grid2_element_types \\
    \n-
    836 )
    \n-
    \n-
    837
    \n-
    838STANDARD_MERGE_INSTANTIATE(double,1,1,1);
    \n-
    839STANDARD_MERGE_INSTANTIATE(double,2,2,2);
    \n-
    840STANDARD_MERGE_INSTANTIATE(double,3,3,3);
    \n-
    841#undef STANDARD_MERGE_INSTANTIATE
    \n-
    842#undef DECL
    \n-
    843
    \n-
    844} /* namespace GridGlue */
    \n-
    845} /* namespace Dune */
    \n-
    846
    \n-
    847#endif // DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH
    \n-
    \n-
    \n-\n-\n-
    #define STANDARD_MERGE_INSTANTIATE(T, A, B, C)
    Definition standardmerge.cc:13
    \n-\n+
    190#endif // DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n
    Definition gridglue.hh:37
    \n
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n-
    Definition intersectionlist.hh:207
    \n-\n-
    Abstract base for all classes that take extracted grids and build sets of intersections.
    Definition merger.hh:27
    \n-
    Dune::FieldVector< T, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition merger.hh:37
    \n-
    Dune::GridGlue::IntersectionList< Grid1Coords, Grid2Coords > IntersectionList
    Definition merger.hh:39
    \n-
    Dune::FieldVector< T, grid1Dim > Grid1Coords
    the local coordinate type for the grid1 coordinates
    Definition merger.hh:31
    \n-
    Dune::FieldVector< T, grid2Dim > Grid2Coords
    the local coordinate type for the grid2 coordinates
    Definition merger.hh:34
    \n-
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    Definition standardmerge.hh:58
    \n-
    virtual void computeIntersections(const Dune::GeometryType &grid1ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::bitset<(1<< grid1Dim)> &neighborIntersects1, unsigned int grid1Index, const Dune::GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< grid2Dim)> &neighborIntersects2, unsigned int grid2Index, std::vector< SimplicialIntersection > &intersections)=0
    Compute the intersection between two overlapping elements.
    \n-
    std::shared_ptr< IntersectionList > intersectionList_
    Definition standardmerge.hh:124
    \n-
    typename Base::Grid1Coords Grid1Coords
    Type used for local coordinates on the grid1 side.
    Definition standardmerge.hh:69
    \n-
    void enableFallback(bool fallback)
    Definition standardmerge.hh:166
    \n-
    std::vector< std::vector< int > > elementNeighbors2_
    Definition standardmerge.hh:131
    \n-
    std::vector< std::vector< int > > elementNeighbors1_
    Definition standardmerge.hh:130
    \n-
    T ctype
    the numeric type used in this interface
    Definition standardmerge.hh:66
    \n-
    void clear() override
    Definition standardmerge.hh:150
    \n-
    typename Base::IntersectionList IntersectionList
    Definition standardmerge.hh:77
    \n-
    bool computeIntersection(unsigned int candidate0, unsigned int candidate1, const std::vector< Dune::FieldVector< T, dimworld > > &grid1Coords, const std::vector< Dune::GeometryType > &grid1_element_types, std::bitset<(1<< grid1Dim)> &neighborIntersects1, const std::vector< Dune::FieldVector< T, dimworld > > &grid2Coords, const std::vector< Dune::GeometryType > &grid2_element_types, std::bitset<(1<< grid2Dim)> &neighborIntersects2, bool insert=true)
    Compute the intersection between two overlapping elements.
    Definition standardmerge.hh:263
    \n-
    void enableBruteForce(bool bruteForce)
    Definition standardmerge.hh:171
    \n-
    std::shared_ptr< IntersectionListProvider > intersectionListProvider_
    Definition standardmerge.hh:123
    \n-
    void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1_Coords, const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< T, dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements, const std::vector< Dune::GeometryType > &grid2_element_types) override
    Definition standardmerge.hh:392
    \n-
    std::vector< std::vector< unsigned int > > grid1ElementCorners_
    Temporary internal data.
    Definition standardmerge.hh:127
    \n-
    std::vector< std::vector< unsigned int > > grid2ElementCorners_
    Definition standardmerge.hh:128
    \n-
    typename Base::Grid2Coords Grid2Coords
    Type used for local coordinates on the grid2 side.
    Definition standardmerge.hh:72
    \n-
    std::shared_ptr< IntersectionList > intersectionList() const final
    Definition standardmerge.hh:160
    \n-
    virtual ~StandardMerge()=default
    \n-
    SimplicialIntersection RemoteSimplicialIntersection
    Definition standardmerge.hh:84
    \n-
    bool valid
    Definition standardmerge.hh:86
    \n-
    StandardMerge()
    Definition standardmerge.hh:88
    \n-
    typename IntersectionListProvider::SimplicialIntersection SimplicialIntersection
    Definition standardmerge.hh:83
    \n-
    typename Base::WorldCoords WorldCoords
    the coordinate type used in this interface
    Definition standardmerge.hh:75
    \n+
    Intersection computation method for two elements of arbitrary dimension.
    Definition computeintersection.hh:39
    \n+
    static bool computeIntersection(const std::vector< V > &X, const std::vector< V > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< V > &P)
    Compute the intersection of two elements X and Y Compute the intersection of two elements X and Y,...
    Definition computeintersection.cc:14
    \n+
    void computeIntersections(const Dune::GeometryType &grid1ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)> &neighborIntersects2, unsigned int grid2Index, std::vector< SimplicialIntersection > &intersections)
    Compute the intersection between two overlapping elements.
    Definition overlappingmerge.cc:34
    \n+
    Definition simplexintersection.cc:30
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,989 +1,244 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-standardmerge.hh\n+overlappingmerge.cc\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-10#ifndef DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH\n-11#define DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH\n+5\n+6#ifndef DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n+_\b7#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n+8//#include \n+9\n+10namespace _\bD_\bu_\bn_\be {\n+11namespace GridGlue {\n 12\n-13\n-14#include \n-15#include \n-16#include \n-17#include \n-18#include \n-19#include \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-29#include \n-30#include \n-31\n-32#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh>\n-33#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bm_\be_\br_\bg_\be_\br_\b._\bh_\bh>\n-34#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n-35\n-36namespace _\bD_\bu_\bn_\be {\n-37namespace GridGlue {\n-38\n-55template\n-_\b5_\b6class _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n-57 : public _\bM_\be_\br_\bg_\be_\br\n-58{\n-59 using _\bB_\ba_\bs_\be = _\bM_\be_\br_\bg_\be_\br_\b<_\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>;\n-60\n-61public:\n-62\n-63 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n+13template\n+14bool OverlappingMerge::inPlane(std::\n+vector >& points) {\n+15\n+16 T eps = 1e-8;\n+17\n+18 assert(dim1 == 3 && dim2 == 3 && dimworld == 3);\n+19 assert(points.size() == 4);\n+20\n+21 FieldVector v1 = points[1]-points[0];\n+22 FieldVector v2 = points[2]-points[0];\n+23 FieldVector v3 = points[3]-points[0];\n+24\n+25 FieldVector v1xv2;\n+26 v1xv2[0] = v1[1]*v2[2] - v1[2]*v2[1];\n+27 v1xv2[1] = v1[2]*v2[0] - v1[0]*v2[2];\n+28 v1xv2[2] = v1[0]*v2[1] - v1[1]*v2[0];\n+29\n+30 return (std::abs(v3.dot(v1xv2)) < eps);\n+31}\n+32\n+33template\n+_\b3_\b4void _\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\b1_\b,_\bd_\bi_\bm_\b2_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(const\n+Dune::GeometryType& grid1ElementType,\n+35 const std::vector >& grid1ElementCorners,\n+36 std::bitset<(1<& neighborIntersects1,\n+37 unsigned int grid1Index,\n+38 const Dune::GeometryType& grid2ElementType,\n+39 const std::vector >& grid2ElementCorners,\n+40 std::bitset<(1<& neighborIntersects2,\n+41 unsigned int grid2Index,\n+42 std::vector& _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs)\n+43{\n+44 using std::min;\n+45\n+46 this->counter++;\n+47 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.clear();\n+48\n+49 typedef _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\bd_\bi_\bm_\b1_\b,_\bd_\bi_\bm_\b2_\b,_\bT_\b> CM;\n+50\n+51#ifndef NDEBUG\n+52 const auto& refElement1 = Dune::ReferenceElements::general\n+(grid1ElementType);\n+53 const auto& refElement2 = Dune::ReferenceElements::general\n+(grid2ElementType);\n+54\n+55 // A few consistency checks\n+56 assert((unsigned int)(refElement1.size(dim1)) == grid1ElementCorners.size\n+());\n+57 assert((unsigned int)(refElement2.size(dim2)) == grid2ElementCorners.size\n+());\n+58#endif\n+59\n+60 // Make generic geometries representing the grid1- and grid2 element.\n+61 // this eases computation of local coordinates.\n+62 typedef MultiLinearGeometry Geometry1;\n+63 typedef MultiLinearGeometry Geometry2;\n 64\n-_\b6_\b6 typedef T _\bc_\bt_\by_\bp_\be;\n+65 Geometry1 grid1Geometry(grid1ElementType, grid1ElementCorners);\n+66 Geometry2 grid2Geometry(grid2ElementType, grid2ElementCorners);\n 67\n-_\b6_\b9 using _\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs = typename _\bB_\ba_\bs_\be_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs;\n-70\n-_\b7_\b2 using _\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs = typename _\bB_\ba_\bs_\be_\b:_\b:_\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs;\n-73\n-_\b7_\b5 using _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs = typename _\bB_\ba_\bs_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\n+68 // Dirty workaround for the intersection computation scaling problem (part\n+1/2)\n+69 std::vector > scaledGrid1ElementCorners\n+(grid1ElementCorners.size());\n+70 std::vector > scaledGrid2ElementCorners\n+(grid2ElementCorners.size());\n+71\n+72 // the scaling parameter is the length minimum of the lengths of the first\n+edge in the grid1 geometry\n+73 // and the first edge in the grid2 geometry\n+74 T scaling = min((grid1ElementCorners[0] - grid1ElementCorners[1]).two_norm\n+(),\n+75 (grid2ElementCorners[0] - grid2ElementCorners[1]).two_norm());\n 76\n-_\b7_\b7 using _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt = typename _\bB_\ba_\bs_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt;\n-78\n-79protected:\n-80\n-_\b8_\b2 using _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br =\n-_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b>;\n-_\b8_\b3 using _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn = typename _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:\n-_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n-_\b8_\b4 using _\bR_\be_\bm_\bo_\bt_\be_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn = _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n-85\n-_\b8_\b6 bool _\bv_\ba_\bl_\bi_\bd = false;\n-87\n-_\b8_\b8 _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be()\n-89 : _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b_(std::make_shared<_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br>())\n-90 , _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b_(std::make_shared<_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt>\n-(_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b_))\n-91 {}\n-92\n-_\b9_\b3 virtual _\b~_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be() = default;\n-94\n-_\b9_\b9 virtual void _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(const Dune::GeometryType&\n-grid1ElementType,\n-100 const std::vector >& grid1ElementCorners,\n-101 std::bitset<(1<& neighborIntersects1,\n-102 unsigned int grid1Index,\n-103 const Dune::GeometryType& grid2ElementType,\n-104 const std::vector >& grid2ElementCorners,\n-105 std::bitset<(1<& neighborIntersects2,\n-106 unsigned int grid2Index,\n-107 std::vector& intersections) = 0;\n-108\n-_\b1_\b1_\b2 bool _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(unsigned int candidate0, unsigned int candidate1,\n-113 const std::vector >& grid1Coords,\n-114 const std::vector& grid1_element_types,\n-115 std::bitset<(1<& neighborIntersects1,\n-116 const std::vector >& grid2Coords,\n-117 const std::vector& grid2_element_types,\n-118 std::bitset<(1<& neighborIntersects2,\n-119 bool insert = true);\n-120\n-121 /* M E M B E R V A R I A B L E S */\n-122\n-_\b1_\b2_\b3 std::shared_ptr _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b_;\n-_\b1_\b2_\b4 std::shared_ptr _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b_;\n-125\n-_\b1_\b2_\b7 std::vector > _\bg_\br_\bi_\bd_\b1_\bE_\bl_\be_\bm_\be_\bn_\bt_\bC_\bo_\br_\bn_\be_\br_\bs_\b_;\n-_\b1_\b2_\b8 std::vector > _\bg_\br_\bi_\bd_\b2_\bE_\bl_\be_\bm_\be_\bn_\bt_\bC_\bo_\br_\bn_\be_\br_\bs_\b_;\n+77 // scale the coordinates according to scaling parameter\n+78 for (unsigned int i = 0; i < grid1ElementCorners.size(); ++i) {\n+79 scaledGrid1ElementCorners[i] = grid1ElementCorners[i];\n+80 scaledGrid1ElementCorners[i] *= (1.0/scaling);\n+81 }\n+82 for (unsigned int i = 0; i < grid2ElementCorners.size(); ++i) {\n+83 scaledGrid2ElementCorners[i] = grid2ElementCorners[i];\n+84 scaledGrid2ElementCorners[i] *= (1.0/scaling);\n+85 }\n+86\n+87 // get size_type for all the vectors we are using\n+88 typedef typename std::vector::size_type size_type;\n+89\n+90 const int dimis = dim1 < dim2 ? dim1 : dim2;\n+91 const size_type n_intersectionnodes = dimis+1;\n+92 size_type i;\n+93\n+94 std::vector > scaledP(0), P(0);\n+95 std::vector > H,SX(1< centroid;\n+97 // local grid1 coordinates of the intersections\n+98 std::vector > g1local(n_intersectionnodes);\n+99 // local grid2 coordinates of the intersections\n+100 std::vector > g2local(n_intersectionnodes);\n+101\n+102 // compute the intersection nodes\n+103 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\bC_\bM_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(scaledGrid1ElementCorners,\n+104 scaledGrid2ElementCorners,\n+105 SX,SY,scaledP);\n+106\n+107 // Dirty workaround - rescale the result (part 2/2)\n+108 P.resize(scaledP.size());\n+109 for (unsigned int i = 0; i < scaledP.size(); ++i) {\n+110 P[i] = scaledP[i];\n+111 P[i] *= scaling;\n+112 }\n+113\n+114 for (size_type i = 0; i < neighborIntersects1.size(); ++i) {\n+115 if (i < SX.size())\n+116 neighborIntersects1[i] = (SX[i].size() > 0);\n+117 else\n+118 neighborIntersects1[i] = false;\n+119 }\n+120 for (size_type i = 0; i < neighborIntersects2.size(); ++i) {\n+121 if (i < SY.size())\n+122 neighborIntersects2[i] = (SY[i].size() > 0);\n+123 else\n+124 neighborIntersects2[i] = false;\n+125 }\n+126\n+127 // P is an simplex of dimension dimis\n+128 if (P.size() == n_intersectionnodes) {\n 129\n-_\b1_\b3_\b0 std::vector > _\be_\bl_\be_\bm_\be_\bn_\bt_\bN_\be_\bi_\bg_\bh_\bb_\bo_\br_\bs_\b1_\b_;\n-_\b1_\b3_\b1 std::vector > _\be_\bl_\be_\bm_\be_\bn_\bt_\bN_\be_\bi_\bg_\bh_\bb_\bo_\br_\bs_\b2_\b_;\n-132\n-133public:\n+130 for (i = 0; i < n_intersectionnodes; ++i) {\n+131 g1local[i] = grid1Geometry.local(P[i]);\n+132 g2local[i] = grid2Geometry.local(P[i]);\n+133 }\n 134\n-135 /* C O N C E P T I M P L E M E N T I N G I N T E R F A C E */\n-136\n-_\b1_\b4_\b0 void _\bb_\bu_\bi_\bl_\bd(const std::vector >& grid1_Coords,\n-141 const std::vector& grid1_elements,\n-142 const std::vector& grid1_element_types,\n-143 const std::vector >& grid2_coords,\n-144 const std::vector& grid2_elements,\n-145 const std::vector& grid2_element_types) override;\n-146\n-147\n-148 /* P R O B I N G T H E M E R G E D G R I D */\n-149\n-_\b1_\b5_\b0 void _\bc_\bl_\be_\ba_\br() override\n-151 {\n-152 // Delete old internal data, from a possible previous run\n-153 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b_->clear();\n-154 purge(_\bg_\br_\bi_\bd_\b1_\bE_\bl_\be_\bm_\be_\bn_\bt_\bC_\bo_\br_\bn_\be_\br_\bs_\b_);\n-155 purge(_\bg_\br_\bi_\bd_\b2_\bE_\bl_\be_\bm_\be_\bn_\bt_\bC_\bo_\br_\bn_\be_\br_\bs_\b_);\n-156\n-157 _\bv_\ba_\bl_\bi_\bd = false;\n-158 }\n+135 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.emplace_back(grid1Index, grid2Index);\n+136 for (i = 0; i < n_intersectionnodes; ++i) {\n+137 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.back().corners0[0][i] = g1local[i];\n+138 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.back().corners1[0][i] = g2local[i];\n+139 }\n+140\n+141 } else if (P.size() > n_intersectionnodes) { // P is a union of simplices\n+of dimension dimis\n+142\n+143 assert(dimis != 1);\n+144 std::vector > global(n_intersectionnodes);\n+145\n+146 // Compute the centroid\n+147 centroid=0;\n+148 for (size_type i=0; i < P.size(); i++)\n+149 centroid += P[i] ;\n+150 centroid /= static_cast(P.size()) ;\n+151\n+152 // order the points and get intersection face indices\n+153 H.clear() ;\n+154 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\bC_\bM_\b>_\b:_\b:_\bt_\be_\bm_\bp_\bl_\ba_\bt_\be orderPoints\n+(centroid,SX,SY,P,H);\n+155\n+156 // Loop over all intersection elements\n+157 for (size_type i=0; i < H.size(); i++) {\n+158 int hs = H[i].size(); // number of nodes of the intersection\n 159\n-_\b1_\b6_\b0 std::shared_ptr _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt() const final\n-161 {\n-162 assert(_\bv_\ba_\bl_\bi_\bd);\n-163 return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b_;\n-164 }\n-165\n-_\b1_\b6_\b6 void _\be_\bn_\ba_\bb_\bl_\be_\bF_\ba_\bl_\bl_\bb_\ba_\bc_\bk(bool fallback)\n-167 {\n-168 m_enableFallback = fallback;\n-169 }\n+160 // if the intersection element is not degenerated\n+161 if (hs==dimis) {\n+162\n+163 // create the intersection geometry\n+164 for ( size_type j=0 ; j < dimis; ++j) {\n+165 global[j]= P[H[i][j]]; // get the intersection face\n+166 }\n+167\n+168 // intersection face + centroid = new element\n+169 global[dimis]=centroid;\n 170\n-_\b1_\b7_\b1 void _\be_\bn_\ba_\bb_\bl_\be_\bB_\br_\bu_\bt_\be_\bF_\bo_\br_\bc_\be(bool bruteForce)\n-172 {\n-173 m_enableBruteForce = bruteForce;\n-174 }\n-175\n-176private:\n-180 bool m_enableFallback = false;\n-181\n-185 bool m_enableBruteForce = false;\n+171 // create local representation of the intersection\n+172 for (size_type j = 0; j < n_intersectionnodes; ++j) {\n+173 g1local[j] = grid1Geometry.local(global[j]);\n+174 g2local[j] = grid2Geometry.local(global[j]);\n+175 }\n+176\n+177 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.emplace_back(grid1Index,grid2Index);\n+178 for (size_type j = 0; j < n_intersectionnodes; ++j) {\n+179 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.back().corners0[0][j] = g1local[j];\n+180 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.back().corners1[0][j] = g2local[j];\n+181 }\n+182 }\n+183 }\n+184 }\n+185}\n 186\n-187 auto& intersections()\n-188 { return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b_->intersections(); }\n+187} /* namespace Dune::GridGlue */\n+188} /* namespace Dune */\n 189\n-191 template\n-192 static void purge(V & v)\n-193 {\n-194 v.clear();\n-195 V v2(v);\n-196 v.swap(v2);\n-197 }\n-198\n-203 void generateSeed(std::vector& seeds,\n-204 Dune::BitSetVector<1>& isHandled2,\n-205 std::stack& candidates2,\n-206 const std::vector >& grid1Coords,\n-207 const std::vector& grid1_element_types,\n-208 const std::vector >& grid2Coords,\n-209 const std::vector& grid2_element_types);\n-210\n-214 int insertIntersections(unsigned int candidate1, unsigned int\n-candidate2,std::vector& intersections);\n-215\n-219 int bruteForceSearch(int candidate1,\n-220 const std::vector >& grid1Coords,\n-221 const std::vector& grid1_element_types,\n-222 const std::vector >& grid2Coords,\n-223 const std::vector& grid2_element_types);\n-224\n-228 std::pair\n-229 intersectionIndex(unsigned int grid1Index, unsigned int grid2Index,\n-230 _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn& intersection);\n-231\n-235 template \n-236 void computeNeighborsPerElement(const std::vector&\n-gridElementTypes,\n-237 const std::vector >& gridElementCorners,\n-238 std::vector >& elementNeighbors);\n-239\n-240 void buildAdvancingFront(\n-241 const std::vector >& grid1_Coords,\n-242 const std::vector& grid1_elements,\n-243 const std::vector& grid1_element_types,\n-244 const std::vector >& grid2_coords,\n-245 const std::vector& grid2_elements,\n-246 const std::vector& grid2_element_types\n-247 );\n-248\n-249 void buildBruteForce(\n-250 const std::vector >& grid1_Coords,\n-251 const std::vector& grid1_elements,\n-252 const std::vector& grid1_element_types,\n-253 const std::vector >& grid2_coords,\n-254 const std::vector& grid2_elements,\n-255 const std::vector& grid2_element_types\n-256 );\n-257};\n-258\n-259\n-260/* IMPLEMENTATION */\n-261\n-262template\n-_\b2_\b6_\b3bool _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-(unsigned int candidate0, unsigned int candidate1,\n-264 const std::vector >& grid1Coords,\n-265 const std::vector& grid1_element_types,\n-266 std::bitset<(1<& neighborIntersects1,\n-267 const std::vector >& grid2Coords,\n-268 const std::vector& grid2_element_types,\n-269 std::bitset<(1<& neighborIntersects2,\n-270 bool insert)\n-271{\n-272 // Select vertices of the grid1 element\n-273 int grid1NumVertices = grid1ElementCorners_[candidate0].size();\n-274 std::vector > grid1ElementCorners\n-(grid1NumVertices);\n-275 for (int i=0; i > grid2ElementCorners\n-(grid2NumVertices);\n-281 for (int i=0; i _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(0);\n-289\n-290 // compute the intersections\n-291 computeIntersections(grid1_element_types[candidate0], grid1ElementCorners,\n-292 neighborIntersects1, candidate0,\n-293 grid2_element_types[candidate1], grid2ElementCorners,\n-294 neighborIntersects2, candidate1,\n-295 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs);\n-296\n-297 // insert intersections if needed\n-298 if(insert && !_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.empty())\n-299 insertIntersections(candidate0,candidate1,_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs);\n-300\n-301 // Have we found an intersection?\n-302 return !_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.empty() || neighborIntersects1.any() ||\n-neighborIntersects2.any();\n-303\n-304}\n-305\n-306template\n-307int _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bb_\br_\bu_\bt_\be_\bF_\bo_\br_\bc_\be_\bS_\be_\ba_\br_\bc_\bh(int\n-candidate1,\n-308 const std::vector >& grid1Coords,\n-309 const std::vector& grid1_element_types,\n-310 const std::vector >& grid2Coords,\n-311 const std::vector& grid2_element_types)\n-312{\n-313 std::bitset<(1< neighborIntersects1;\n-314 std::bitset<(1< neighborIntersects2;\n-315 for (std::size_t i=0; i\n-333template\n-334void StandardMerge::\n-335computeNeighborsPerElement(const std::vector&\n-gridElementTypes,\n-336 const std::vector >& gridElementCorners,\n-337 std::vector >& elementNeighbors)\n-338{\n-339 typedef std::vector FaceType;\n-340 typedef std::map >\n-FaceSetType;\n-341\n-343 // First: grid 1\n-345 FaceSetType faces;\n-346 elementNeighbors.resize(gridElementTypes.size());\n-347\n-348 for (size_t i=0; i::general\n-(gridElementTypes[i]).size(1), -1);\n-350\n-351 for (size_t i=0; i::general\n-(gridElementTypes[i]);\n-353\n-354 for (size_t j=0; j<(size_t)refElement.size(1); j++) { // iterate over all\n-faces of the element\n-355\n-356 FaceType face;\n-357 // extract element face\n-358 for (size_t k=0; k<(size_t)refElement.size(j,1,gridDim); k++)\n-359 face.push_back(gridElementCorners[i][refElement.subEntity(j,1,k,gridDim)]);\n-360\n-361 // sort the face vertices to get rid of twists and other permutations\n-362 std::sort(face.begin(), face.end());\n-363\n-364 typename FaceSetType::iterator faceHandle = faces.find(face);\n-365\n-366 if (faceHandle == faces.end()) {\n-367\n-368 // face has not been visited before\n-369 faces.insert(std::make_pair(face, std::make_pair(i,j)));\n-370\n-371 } else {\n-372\n-373 // face has been visited before: store the mutual neighbor information\n-374 elementNeighbors[i][j] = faceHandle->second.first;\n-375 elementNeighbors[faceHandle->second.first][faceHandle->second.second] = i;\n-376\n-377 faces.erase(faceHandle);\n-378\n-379 }\n-380\n-381 }\n-382\n-383 }\n-384}\n-385\n-386// /////////////////////////////////////////////////////////////////////\n-387// Compute the intersection of all pairs of elements\n-388// Linear algorithm by Gander and Japhet, Proc. of DD18\n-389// /////////////////////////////////////////////////////////////////////\n-390\n-391template\n-_\b3_\b9_\b2void _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bb_\bu_\bi_\bl_\bd(const std::\n-vector >& grid1Coords,\n-393 const std::vector& grid1_elements,\n-394 const std::vector& grid1_element_types,\n-395 const std::vector >& grid2Coords,\n-396 const std::vector& grid2_elements,\n-397 const std::vector& grid2_element_types\n-398 )\n-399{\n-400\n-401 std::cout << \"StandardMerge building merged grid...\" << std::endl;\n-402 Dune::Timer watch;\n-403\n-404 clear();\n-405 // clear global intersection list\n-406 intersectionListProvider_->clear();\n-407 this->counter = 0;\n-408\n-409 // /////////////////////////////////////////////////////////////////////\n-410 // Copy element corners into a data structure with block-structure.\n-411 // This is not as efficient but a lot easier to use.\n-412 // We may think about efficiency later.\n-413 // /////////////////////////////////////////////////////////////////////\n-414\n-415 // first the grid1 side\n-416 grid1ElementCorners_.resize(grid1_element_types.size());\n-417\n-418 unsigned int grid1CornerCounter = 0;\n-419\n-420 for (std::size_t i=0; i::general\n-(grid1_element_types[i]).size(grid1Dim);\n-424 grid1ElementCorners_[i].resize(numVertices);\n-425 for (int j=0; j::general\n-(grid2_element_types[i]).size(grid2Dim);\n-439 grid2ElementCorners_[i].resize(numVertices);\n-440 for (int j=0; j(grid1_element_types,\n-grid1ElementCorners_, elementNeighbors1_);\n-450 computeNeighborsPerElement(grid2_element_types,\n-grid2ElementCorners_, elementNeighbors2_);\n-451\n-452 std::cout << \"setup took \" << watch.elapsed() << \" seconds.\" << std::endl;\n-453\n-454 if (m_enableBruteForce)\n-455 buildBruteForce(grid1Coords, grid1_elements, grid1_element_types,\n-grid2Coords, grid2_elements, grid2_element_types);\n-456 else\n-457 buildAdvancingFront(grid1Coords, grid1_elements, grid1_element_types,\n-grid2Coords, grid2_elements, grid2_element_types);\n-458\n-459 valid = true;\n-460 std::cout << \"intersection construction took \" << watch.elapsed() << \"\n-seconds.\" << std::endl;\n-461}\n-462\n-463template\n-464void _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bb_\bu_\bi_\bl_\bd_\bA_\bd_\bv_\ba_\bn_\bc_\bi_\bn_\bg_\bF_\br_\bo_\bn_\bt(\n-465 const std::vector >& grid1Coords,\n-466 const std::vector& grid1_elements,\n-467 const std::vector& grid1_element_types,\n-468 const std::vector >& grid2Coords,\n-469 const std::vector& grid2_elements,\n-470 const std::vector& grid2_element_types\n-471 )\n-472{\n-474 // Data structures for the advancing-front algorithm\n-476\n-477 std::stack candidates1;\n-478 std::stack candidates2;\n-479\n-480 std::vector seeds(grid2_element_types.size(), -1);\n-481\n-482 // /////////////////////////////////////////////////////////////////////\n-483 // Do a brute-force search to find one pair of intersecting elements\n-484 // to start the advancing-front type algorithm with.\n-485 // /////////////////////////////////////////////////////////////////////\n-486\n-487 // Set flag if element has been handled\n-488 Dune::BitSetVector<1> isHandled2(grid2_element_types.size());\n-489\n-490 // Set flag if the element has been entered in the queue\n-491 Dune::BitSetVector<1> isCandidate2(grid2_element_types.size());\n-492\n-493 generateSeed(seeds, isHandled2, candidates2, grid1Coords,\n-grid1_element_types, grid2Coords, grid2_element_types);\n-494\n-495 // /////////////////////////////////////////////////////////////////////\n-496 // Main loop\n-497 // /////////////////////////////////////////////////////////////////////\n-498\n-499 std::set isHandled1;\n-500\n-501 std::set isCandidate1;\n-502\n-503 while (!candidates2.empty()) {\n-504\n-505 // Get the next element on the grid2 side\n-506 unsigned int currentCandidate2 = candidates2.top();\n-507 int seed = seeds[currentCandidate2];\n-508 assert(seed >= 0);\n-509\n-510 candidates2.pop();\n-511 isHandled2[currentCandidate2] = true;\n-512\n-513 // Start advancing front algorithm on the grid1 side from the 'seed'\n-element that\n-514 // we stored along with the current grid2 element\n-515 candidates1.push(seed);\n-516\n-517 isHandled1.clear();\n-518 isCandidate1.clear();\n-519\n-520 while (!candidates1.empty()) {\n-521\n-522 unsigned int currentCandidate1 = candidates1.top();\n-523 candidates1.pop();\n-524 isHandled1.insert(currentCandidate1);\n-525\n-526 // Test whether there is an intersection between currentCandidate0 and\n-currentCandidate1\n-527 std::bitset<(1< neighborIntersects1;\n-528 std::bitset<(1< neighborIntersects2;\n-529 bool intersectionFound = computeIntersection(currentCandidate1,\n-currentCandidate2,\n-530 grid1Coords,grid1_element_types, neighborIntersects1,\n-531 grid2Coords,grid2_element_types, neighborIntersects2);\n-532\n-533 for (size_t i=0; i-1) {\n-574\n-575 isCandidate2[neighbor][0] = true;\n-576 candidates2.push(neighbor);\n-577 seedFound = true;\n-578 }\n-579 }\n-580\n-581 if (seedFound || !m_enableFallback)\n-582 continue;\n-583\n-584 // There is no neighbor with a seed, so we need to be a bit more\n-aggressive...\n-585 // get all neighbors of currentCandidate2, but not currentCandidate2 itself\n-586 for (size_t i=0; i::iterator seedIt = isHandled1.begin();\n-601 seedIt != isHandled1.end(); ++seedIt) {\n-602\n-603 std::bitset<(1< neighborIntersects1;\n-604 std::bitset<(1< neighborIntersects2;\n-605 bool intersectionFound = computeIntersection(*seedIt, neighbor,\n-606 grid1Coords, grid1_element_types, neighborIntersects1,\n-607 grid2Coords, grid2_element_types, neighborIntersects2,\n-608 false);\n-609\n-610 // if the intersection is nonempty, *seedIt is our new seed candidate on\n-the grid1 side\n-611 if (intersectionFound) {\n-612 seed = *seedIt;\n-613 Dune::dwarn << \"Algorithm entered first fallback method and found a new\n-seed in the build algorithm.\" <<\n-614 \"Probably, the neighborIntersects bitsets computed in computeIntersection\n-specialization is wrong.\" << std::endl;\n-615 break;\n-616 }\n-617\n-618 }\n-619\n-620 if (seed < 0) {\n-621 // The fast method didn't find a grid1 element that intersects with\n-622 // the new grid2 candidate. We have to do a brute-force search.\n-623 seed = bruteForceSearch(neighbor,\n-624 grid1Coords,grid1_element_types,\n-625 grid2Coords,grid2_element_types);\n-626 Dune::dwarn << \"Algorithm entered second fallback method. This probably\n-should not happen.\" << std::endl;\n-627\n-628 }\n-629\n-630 // We have tried all we could: the candidate is 'handled' now\n-631 isCandidate2[neighbor] = true;\n-632\n-633 // still no seed? Then the new grid2 candidate isn't overlapped by anything\n-634 if (seed < 0)\n-635 continue;\n-636\n-637 // we have a seed now\n-638 candidates2.push(neighbor);\n-639 seeds[neighbor] = seed;\n-640 seedFound = true;\n-641\n-642 }\n-643\n-644 }\n-645\n-646 /* Do a brute-force search if there is still no seed:\n-647 * There might still be a disconnected region out there.\n-648 */\n-649 if (!seedFound && candidates2.empty()) {\n-650 generateSeed(seeds, isHandled2, candidates2, grid1Coords,\n-grid1_element_types, grid2Coords, grid2_element_types);\n-651 }\n-652 }\n-653}\n-654\n-655template\n-656void StandardMerge::buildBruteForce(\n-657 const std::vector >& grid1Coords,\n-658 const std::vector& grid1_elements,\n-659 const std::vector& grid1_element_types,\n-660 const std::vector >& grid2Coords,\n-661 const std::vector& grid2_elements,\n-662 const std::vector& grid2_element_types\n-663 )\n-664{\n-665 std::bitset<(1< neighborIntersects1;\n-666 std::bitset<(1< neighborIntersects2;\n-667\n-668 for (unsigned i = 0; i < grid1_element_types.size(); ++i) {\n-669 for (unsigned j = 0; j < grid2_element_types.size(); ++j) {\n-670 (void) computeIntersection(i, j,\n-671 grid1Coords, grid1_element_types, neighborIntersects1,\n-672 grid2Coords, grid2_element_types, neighborIntersects2);\n-673 }\n-674 }\n-675}\n-676\n-677template\n-678void StandardMerge::generateSeed(std::\n-vector& seeds, Dune::BitSetVector<1>& isHandled2, std::stack&\n-candidates2, const std::vector >& grid1Coords,\n-const std::vector& grid1_element_types, const std::\n-vector >& grid2Coords, const std::vector& grid2_element_types)\n-679{\n-680 for (std::size_t j=0; j 0 || isHandled2[j][0])\n-683 continue;\n-684\n-685 int seed = bruteForceSearch\n-(j,grid1Coords,grid1_element_types,grid2Coords,grid2_element_types);\n-686\n-687 if (seed >= 0) {\n-688 candidates2.push(j); // the candidate and a seed for the candidate\n-689 seeds[j] = seed;\n-690 break;\n-691 } else // If the brute force search did not find any intersection we can\n-skip this element\n-692 isHandled2[j] = true;\n-693 }\n-694}\n-695\n-696template\n-697int StandardMerge::insertIntersections\n-(unsigned int candidate1, unsigned int candidate2,\n-698 std::vector& _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs)\n-699{\n-700 typedef typename std::vector::size_type size_t;\n-701 int count = 0;\n-702\n-703 for (size_t i = 0; i < _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.size(); ++i) {\n-704 // get the intersection index of the current intersection from\n-intersections in this->intersections\n-705 bool found;\n-706 unsigned int index;\n-707 std::tie(found, index) = intersectionIndex\n-(candidate1,candidate2,_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs[i]);\n-708\n-709 if (found && index >= this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs().size()) { //the intersection is\n-not yet contained in this->intersections\n-710 this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs().push_back(intersections[i]); // insert\n-711\n-712 ++count;\n-713 } else if (found) {\n-714 auto& intersection = this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[index];\n-715\n-716 // insert each grid1 element and local representation of intersections[i]\n-with parent candidate1\n-717 for (size_t j = 0; j < _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs[i].parents0.size(); ++j) {\n-718 intersection.parents0.push_back(candidate1);\n-719 intersection.corners0.push_back(_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs[i].corners0[j]);\n-720 }\n-721\n-722 // insert each grid2 element and local representation of intersections[i]\n-with parent candidate2\n-723 for (size_t j = 0; j < _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs[i].parents1.size(); ++j) {\n-724 intersection.parents1.push_back(candidate2);\n-725 intersection.corners1.push_back(_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs[i].corners1[j]);\n-726 }\n-727\n-728 ++count;\n-729 } else {\n-730 Dune::dwarn << \"Computed the same intersection twice!\" << std::endl;\n-731 }\n-732 }\n-733 return count;\n-734}\n-735\n-736template\n-737std::pair\n-738StandardMerge::intersectionIndex(unsigned int\n-grid1Index, unsigned int grid2Index,\n-739 SimplicialIntersection& intersection) {\n-740\n-741\n-742 // return index in intersections_ if at least one local representation of a\n-Simplicial Intersection (SI)\n-743 // of intersections_ is equal to the local representation of one element in\n-intersections\n-744\n-745 std::size_t n_intersections = this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs().size();\n-746 if (grid1Dim == grid2Dim)\n-747 return {true, n_intersections};\n-748\n-749 T eps = 1e-10;\n-750\n-751 for (std::size_t i = 0; i < n_intersections; ++i) {\n-752\n-753 // compare the local representation of the subelements of the SI\n-754 for (std::size_t ei = 0; ei < this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].parents0.size();\n-++ei) // merger subelement\n-755 {\n-756 if (this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].parents0[ei] == grid1Index)\n-757 {\n-758 for (std::size_t er = 0; er < intersection.parents0.size(); ++er) // list\n-subelement\n-759 {\n-760 bool found_all = true;\n-761 // compare the local coordinate representations\n-762 for (std::size_t ci = 0; ci < this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].corners0[ei].size();\n-++ci)\n-763 {\n-764 Dune::FieldVector ni = this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].corners0[ei]\n-[ci];\n-765 bool found_ni = false;\n-766 for (std::size_t cr = 0; cr < intersection.corners0[er].size(); ++cr)\n-767 {\n-768 Dune::FieldVector nr = intersection.corners0[er][cr];\n-769\n-770 found_ni = found_ni || ((ni-nr).infinity_norm() < eps);\n-771 if (found_ni)\n-772 break;\n-773 }\n-774 found_all = found_all && found_ni;\n-775\n-776 if (!found_ni)\n-777 break;\n-778 }\n-779\n-780 if (found_all && (this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].parents1[ei] != grid2Index))\n-781 return {true, i};\n-782 else if (found_all)\n-783 return {false, 0};\n-784 }\n-785 }\n-786 }\n-787\n-788 // compare the local representation of the subelements of the SI\n-789 for (std::size_t ei = 0; ei < this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].parents1.size();\n-++ei) // merger subelement\n-790 {\n-791 if (this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].parents1[ei] == grid2Index)\n-792 {\n-793 for (std::size_t er = 0; er < intersection.parents1.size(); ++er) // list\n-subelement\n-794 {\n-795 bool found_all = true;\n-796 // compare the local coordinate representations\n-797 for (std::size_t ci = 0; ci < this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].corners1[ei].size();\n-++ci)\n-798 {\n-799 Dune::FieldVector ni = this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].corners1[ei]\n-[ci];\n-800 bool found_ni = false;\n-801 for (std::size_t cr = 0; cr < intersection.corners1[er].size(); ++cr)\n-802 {\n-803 Dune::FieldVector nr = intersection.corners1[er][cr];\n-804 found_ni = found_ni || ((ni-nr).infinity_norm() < eps);\n-805\n-806 if (found_ni)\n-807 break;\n-808 }\n-809 found_all = found_all && found_ni;\n-810\n-811 if (!found_ni)\n-812 break;\n-813 }\n-814\n-815 if (found_all && (this->_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs()[i].parents0[ei] != grid1Index))\n-816 return {true, i};\n-817 else if (found_all)\n-818 return {false, 0};\n-819 }\n-820 }\n-821 }\n-822 }\n-823\n-824 return {true, n_intersections};\n-825}\n-826\n-_\b8_\b2_\b7#define DECL extern\n-_\b8_\b2_\b8#define STANDARD_MERGE_INSTANTIATE(T,A,B,C) \\\n-829 DECL template \\\n-830 void StandardMerge::build(const std::vector\n->& grid1Coords, \\\n-831 const std::vector& grid1_elements, \\\n-832 const std::vector& grid1_element_types, \\\n-833 const std::vector >& grid2Coords, \\\n-834 const std::vector& grid2_elements, \\\n-835 const std::vector& grid2_element_types \\\n-836 )\n-837\n-838_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE(double,1,1,1);\n-839_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE(double,2,2,2);\n-840_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE(double,3,3,3);\n-841#undef STANDARD_MERGE_INSTANTIATE\n-842#undef DECL\n-843\n-844} /* namespace GridGlue */\n-845} /* namespace Dune */\n-846\n-847#endif // DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH\n-_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n-_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh\n-_\bS_\bT_\bA_\bN_\bD_\bA_\bR_\bD_\b__\bM_\bE_\bR_\bG_\bE_\b__\bI_\bN_\bS_\bT_\bA_\bN_\bT_\bI_\bA_\bT_\bE\n-#define STANDARD_MERGE_INSTANTIATE(T, A, B, C)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.cc:13\n-_\bm_\be_\br_\bg_\be_\br_\b._\bh_\bh\n+190#endif // DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n > &reverse=!reversed)\n Iterate over all intersections of a GridGlue.\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:207\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:222\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br\n-Abstract base for all classes that take extracted grids and build sets of\n-intersections.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:27\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b<_\b _\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, dimworld > WorldCoords\n-the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b<_\b _\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n-Dune::GridGlue::IntersectionList< Grid1Coords, Grid2Coords > IntersectionList\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:39\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b<_\b _\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, grid1Dim > Grid1Coords\n-the local coordinate type for the grid1 coordinates\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:31\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b<_\b _\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>_\b:_\b:_\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, grid2Dim > Grid2Coords\n-the local coordinate type for the grid2 coordinates\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:34\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n-Common base class for many merger implementations: produce pairs of entities\n-that may intersect.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:58\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-virtual void computeIntersections(const Dune::GeometryType &grid1ElementType,\n-const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners,\n-std::bitset<(1<< grid1Dim)> &neighborIntersects1, unsigned int grid1Index,\n-const Dune::GeometryType &grid2ElementType, const std::vector< Dune::\n-FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< grid2Dim)>\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn\n+Intersection computation method for two elements of arbitrary dimension.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:39\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+static bool computeIntersection(const std::vector< V > &X, const std::vector< V\n+> &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > >\n+&SY, std::vector< V > &P)\n+Compute the intersection of two elements X and Y Compute the intersection of\n+two elements X and Y,...\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.cc:14\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+void computeIntersections(const Dune::GeometryType &grid1ElementType, const\n+std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::\n+bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::\n+GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T,\n+dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)>\n &neighborIntersects2, unsigned int grid2Index, std::vector<\n-SimplicialIntersection > &intersections)=0\n+SimplicialIntersection > &intersections)\n Compute the intersection between two overlapping elements.\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b_\n-std::shared_ptr< IntersectionList > intersectionList_\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:124\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs\n-typename Base::Grid1Coords Grid1Coords\n-Type used for local coordinates on the grid1 side.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:69\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\be_\bn_\ba_\bb_\bl_\be_\bF_\ba_\bl_\bl_\bb_\ba_\bc_\bk\n-void enableFallback(bool fallback)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:166\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\be_\bl_\be_\bm_\be_\bn_\bt_\bN_\be_\bi_\bg_\bh_\bb_\bo_\br_\bs_\b2_\b_\n-std::vector< std::vector< int > > elementNeighbors2_\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:131\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\be_\bl_\be_\bm_\be_\bn_\bt_\bN_\be_\bi_\bg_\bh_\bb_\bo_\br_\bs_\b1_\b_\n-std::vector< std::vector< int > > elementNeighbors1_\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:130\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bt_\by_\bp_\be\n-T ctype\n-the numeric type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:66\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bl_\be_\ba_\br\n-void clear() override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:150\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n-typename Base::IntersectionList IntersectionList\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:77\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-bool computeIntersection(unsigned int candidate0, unsigned int candidate1,\n-const std::vector< Dune::FieldVector< T, dimworld > > &grid1Coords, const std::\n-vector< Dune::GeometryType > &grid1_element_types, std::bitset<(1<< grid1Dim)>\n-&neighborIntersects1, const std::vector< Dune::FieldVector< T, dimworld > >\n-&grid2Coords, const std::vector< Dune::GeometryType > &grid2_element_types,\n-std::bitset<(1<< grid2Dim)> &neighborIntersects2, bool insert=true)\n-Compute the intersection between two overlapping elements.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:263\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\be_\bn_\ba_\bb_\bl_\be_\bB_\br_\bu_\bt_\be_\bF_\bo_\br_\bc_\be\n-void enableBruteForce(bool bruteForce)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:171\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b_\n-std::shared_ptr< IntersectionListProvider > intersectionListProvider_\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:123\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bb_\bu_\bi_\bl_\bd\n-void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1_Coords,\n-const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::\n-GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< T,\n-dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements,\n-const std::vector< Dune::GeometryType > &grid2_element_types) override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:392\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bg_\br_\bi_\bd_\b1_\bE_\bl_\be_\bm_\be_\bn_\bt_\bC_\bo_\br_\bn_\be_\br_\bs_\b_\n-std::vector< std::vector< unsigned int > > grid1ElementCorners_\n-Temporary internal data.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:127\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bg_\br_\bi_\bd_\b2_\bE_\bl_\be_\bm_\be_\bn_\bt_\bC_\bo_\br_\bn_\be_\br_\bs_\b_\n-std::vector< std::vector< unsigned int > > grid2ElementCorners_\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:128\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs\n-typename Base::Grid2Coords Grid2Coords\n-Type used for local coordinates on the grid2 side.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:72\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n-std::shared_ptr< IntersectionList > intersectionList() const final\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:160\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\b~_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n-virtual ~StandardMerge()=default\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bR_\be_\bm_\bo_\bt_\be_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-SimplicialIntersection RemoteSimplicialIntersection\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:84\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bv_\ba_\bl_\bi_\bd\n-bool valid\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:86\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n-StandardMerge()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:88\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-typename IntersectionListProvider::SimplicialIntersection\n-SimplicialIntersection\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:83\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n-typename Base::WorldCoords WorldCoords\n-the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:75\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.cc:34\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:30\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: overlappingmerge.hh File Reference\n+dune-grid-glue: conformingmerge.hh File Reference\n \n \n \n \n \n \n \n@@ -72,45 +72,46 @@\n
  • dune
  • grid-glue
  • merging
  • \n
    \n \n
    \n \n-
    overlappingmerge.hh File Reference
    \n+
    conformingmerge.hh File Reference
    \n
    \n
    \n-
    #include <iostream>
    \n-#include <iomanip>
    \n+\n+

    Implementation of the Merger concept for conforming interfaces. \n+More...

    \n+
    #include <iomanip>
    \n #include <vector>
    \n #include <algorithm>
    \n+#include <bitset>
    \n #include <dune/common/fmatrix.hh>
    \n #include <dune/common/fvector.hh>
    \n #include <dune/geometry/referenceelements.hh>
    \n-#include <dune/geometry/multilineargeometry.hh>
    \n-#include <dune/grid/common/grid.hh>
    \n-#include <dune/grid-glue/merging/standardmerge.hh>
    \n-#include <dune/grid-glue/merging/computeintersection.hh>
    \n-#include "overlappingmerge.cc"
    \n+#include <dune/grid-glue/merging/standardmerge.hh>
    \n
    \n

    Go to the source code of this file.

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

    \n Classes

    class  Dune::GridGlue::OverlappingMerge< dim1, dim2, dimworld, T >
     Computing overlapping grid intersections for grids of different dimensions. More...
    class  Dune::GridGlue::ConformingMerge< dim, dimworld, T >
     Implementation of the Merger concept for conforming interfaces. More...
     
    \n \n \n \n \n \n

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n-
    \n+

    Detailed Description

    \n+

    Implementation of the Merger concept for conforming interfaces.

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,33 +2,31 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n _\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-overlappingmerge.hh File Reference\n-#include \n+conformingmerge.hh File Reference\n+Implementation of the Merger concept for conforming interfaces. _\bM_\bo_\br_\be_\b._\b._\b.\n #include \n #include \n #include \n+#include \n #include \n #include \n #include \n-#include \n-#include \n #include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n-#include \"_\bo_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bm_\be_\br_\bg_\be_\b._\bc_\bc\"\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b<_\b _\bd_\bi_\bm_\b1_\b,_\b _\bd_\bi_\bm_\b2_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b _\b>\n-\u00a0 Computing overlapping grid intersections for grids of different\n- dimensions. _\bM_\bo_\br_\be_\b._\b._\b.\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b<_\b _\bd_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b _\b>\n+\u00a0 Implementation of the _\bM_\be_\br_\bg_\be_\br concept for conforming interfaces. _\bM_\bo_\br_\be_\b._\b._\b.\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+*\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n+Implementation of the Merger concept for conforming interfaces.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: overlappingmerge.hh Source File\n+dune-grid-glue: conformingmerge.hh Source File\n \n \n \n \n \n \n \n@@ -74,100 +74,218 @@\n \n \n \n
    \n-
    overlappingmerge.hh
    \n+
    conformingmerge.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    5#ifndef DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
    \n-
    6#define DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
    \n-
    7
    \n-
    8#include <iostream>
    \n-
    9#include <iomanip>
    \n-
    10#include <vector>
    \n-
    11#include <algorithm>
    \n-
    12
    \n-
    13#include <dune/common/fmatrix.hh>
    \n-
    14#include <dune/common/fvector.hh>
    \n-
    15
    \n-
    16#include <dune/geometry/referenceelements.hh>
    \n-
    17#include <dune/geometry/multilineargeometry.hh>
    \n-
    18
    \n-
    19#include <dune/grid/common/grid.hh>
    \n-
    20
    \n-\n-\n+
    5/*
    \n+
    6 * Filename: conformingmerge.hh
    \n+
    7 * Version: 1.0
    \n+
    8 * Created on: Sep 14, 2009
    \n+
    9 * Author: Oliver Sander
    \n+
    10 * ---------------------------------
    \n+
    11 * Project: dune-grid-glue
    \n+
    12 * Description: implementation of the Merger concept for conforming interfaces
    \n+
    13 *
    \n+
    14 */
    \n+
    21#ifndef DUNE_GRIDGLUE_MERGING_CONFORMINGMERGE_HH
    \n+
    22#define DUNE_GRIDGLUE_MERGING_CONFORMINGMERGE_HH
    \n
    23
    \n-
    24namespace Dune {
    \n-
    25namespace GridGlue {
    \n-
    26
    \n-
    34template<int dim1, int dim2, int dimworld, typename T = double>
    \n-
    \n-\n-
    36 : public StandardMerge<T,dim1,dim2,dimworld>
    \n-
    37{
    \n-
    38
    \n-
    39public:
    \n-
    40
    \n-
    41 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n-
    42
    \n-
    44 typedef T ctype;
    \n-
    45
    \n-
    47 typedef Dune::FieldVector<T, dimworld> WorldCoords;
    \n-
    48
    \n-
    50 //typedef Dune::FieldVector<T, dim> LocalCoords;
    \n-
    51
    \n-
    \n-\n-
    53 {}
    \n-
    \n+
    24#include <iomanip>
    \n+
    25#include <vector>
    \n+
    26#include <algorithm>
    \n+
    27#include <bitset>
    \n+
    28
    \n+
    29#include <dune/common/fmatrix.hh>
    \n+
    30#include <dune/common/fvector.hh>
    \n+
    31
    \n+
    32#include <dune/geometry/referenceelements.hh>
    \n+
    33
    \n+\n+
    35
    \n+
    36namespace Dune {
    \n+
    37
    \n+
    38 namespace GridGlue {
    \n+
    39
    \n+
    46template<int dim, int dimworld, typename T = double>
    \n+
    \n+\n+
    48 : public StandardMerge<T,dim,dim,dimworld>
    \n+
    49{
    \n+
    50
    \n+
    51public:
    \n+
    52
    \n+
    53 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n
    54
    \n-
    55protected:
    \n-\n+
    56 typedef T ctype;
    \n
    57
    \n-
    69 void computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n-
    70 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n-
    71 std::bitset<(1<<dim1)>& neighborIntersects1,
    \n-
    72 unsigned int grid1Index,
    \n-
    73 const Dune::GeometryType& grid2ElementType,
    \n-
    74 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n-
    75 std::bitset<(1<<dim2)>& neighborIntersects2,
    \n-
    76 unsigned int grid2Index,
    \n-
    77 std::vector<SimplicialIntersection>& intersections);
    \n-
    78
    \n-
    79private:
    \n-
    80 bool inPlane(std::vector<FieldVector<T,dimworld> >& points);
    \n-
    81
    \n-
    82};
    \n-
    \n-
    83
    \n-
    84} /* namespace Dune::GridGlue */
    \n-
    85} /* namespace Dune */
    \n+
    59 typedef Dune::FieldVector<T, dimworld> WorldCoords;
    \n+
    60
    \n+
    62 typedef Dune::FieldVector<T, dim> LocalCoords;
    \n+
    63
    \n+
    64private:
    \n+
    65
    \n+
    66 /* M E M B E R V A R I A B L E S */
    \n+
    67
    \n+
    69 T tolerance_;
    \n+
    70
    \n+
    71 typedef typename StandardMerge<T,dim,dim,dimworld>::SimplicialIntersection SimplicialIntersection;
    \n+
    72
    \n+
    77 void computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n+
    78 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n+
    79 std::bitset<(1<<dim)>& neighborIntersects1,
    \n+
    80 unsigned int grid1Index,
    \n+
    81 const Dune::GeometryType& grid2ElementType,
    \n+
    82 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n+
    83 std::bitset<(1<<dim)>& neighborIntersects2,
    \n+
    84 unsigned int grid2Index,
    \n+
    85 std::vector<SimplicialIntersection>& intersections);
    \n
    86
    \n-
    87#include "overlappingmerge.cc"
    \n+
    87public:
    \n
    88
    \n-
    89
    \n-
    90#endif // DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH
    \n-\n-\n-
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    \n+
    89 static constexpr T default_tolerance = 1e-4;
    \n+
    90
    \n+
    \n+\n+
    92 tolerance_(tolerance)
    \n+
    93 {}
    \n+
    \n+
    94};
    \n+
    \n+
    95
    \n+
    96template<int dim, int dimworld, typename T>
    \n+\n+
    98
    \n+
    99template<int dim, int dimworld, typename T>
    \n+
    100void ConformingMerge<dim, dimworld, T>::computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n+
    101 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n+
    102 std::bitset<(1<<dim)>& neighborIntersects1,
    \n+
    103 unsigned int grid1Index,
    \n+
    104 const Dune::GeometryType& grid2ElementType,
    \n+
    105 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n+
    106 std::bitset<(1<<dim)>& neighborIntersects2,
    \n+
    107 unsigned int grid2Index,
    \n+
    108 std::vector<SimplicialIntersection>& intersections)
    \n+
    109{
    \n+
    110 this->counter++;
    \n+
    111
    \n+
    112 // A few consistency checks
    \n+
    113 assert((unsigned int)(Dune::ReferenceElements<T,dim>::general(grid1ElementType).size(dim)) == grid1ElementCorners.size());
    \n+
    114 assert((unsigned int)(Dune::ReferenceElements<T,dim>::general(grid2ElementType).size(dim)) == grid2ElementCorners.size());
    \n+
    115 // any intersection we may find will be the entire elements.
    \n+
    116 neighborIntersects1.reset();
    \n+
    117 neighborIntersects2.reset();
    \n+
    118
    \n+
    119 // the intersection is either conforming or empty, hence the GeometryTypes have to match
    \n+
    120 if (grid1ElementType != grid2ElementType)
    \n+
    121 return;
    \n+
    122
    \n+
    123 // ////////////////////////////////////////////////////////////
    \n+
    124 // Find correspondences between the different corners
    \n+
    125 // ////////////////////////////////////////////////////////////
    \n+
    126 std::vector<int> other(grid1ElementCorners.size(), -1);
    \n+
    127
    \n+
    128 for (unsigned int i=0; i<grid1ElementCorners.size(); i++) {
    \n+
    129
    \n+
    130 for (unsigned int j=0; j<grid2ElementCorners.size(); j++) {
    \n+
    131
    \n+
    132 if ( (grid1ElementCorners[i]-grid2ElementCorners[j]).two_norm() < tolerance_ ) {
    \n+
    133
    \n+
    134 other[i] = j;
    \n+
    135 break;
    \n+
    136
    \n+
    137 }
    \n+
    138
    \n+
    139 }
    \n+
    140
    \n+
    141 // No corresponding grid2 vertex found for this grid1 vertex
    \n+
    142 if (other[i] == -1)
    \n+
    143 return;
    \n+
    144
    \n+
    145 }
    \n+
    146
    \n+
    147 // ////////////////////////////////////////////////////////////
    \n+
    148 // Set up the new remote intersection
    \n+
    149 // ////////////////////////////////////////////////////////////
    \n+
    150
    \n+
    151 const auto& refElement = Dune::ReferenceElements<T,dim>::general(grid1ElementType);
    \n+
    152
    \n+
    154 if (grid1ElementType.isSimplex()) {
    \n+
    155
    \n+
    156 intersections.emplace_back(grid1Index, grid2Index);
    \n+
    157
    \n+
    158 for (int i=0; i<refElement.size(dim); i++) {
    \n+
    159 intersections.back().corners0[0][i] = refElement.position(i,dim);
    \n+
    160 intersections.back().corners1[0][i] = refElement.position(other[i],dim);
    \n+
    161 }
    \n+
    162
    \n+
    163 } else if (dim == 2 && grid1ElementType.isQuadrilateral()) {
    \n+
    164
    \n+
    165 // split the quadrilateral into two triangles
    \n+
    166 const unsigned int subVertices[2][3] = {{0,1,3}, {0,3,2}};
    \n+
    167
    \n+
    168 for (int i=0; i<2; i++) {
    \n+
    169
    \n+
    170 SimplicialIntersection newSimplicialIntersection(grid1Index, grid2Index);
    \n+
    171
    \n+
    172 for (int j=0; j<dim+1; j++) {
    \n+
    173 newSimplicialIntersection.corners0[0][j] = refElement.position(subVertices[i][j],dim);
    \n+
    174 newSimplicialIntersection.corners1[0][j] = refElement.position(subVertices[i][other[j]],dim);
    \n+
    175 }
    \n+
    176
    \n+
    177 intersections.push_back(newSimplicialIntersection);
    \n+
    178
    \n+
    179 }
    \n+
    180
    \n+
    181 } else if (grid1ElementType.isHexahedron()) {
    \n+
    182
    \n+
    183 // split the hexahedron into five tetrahedra
    \n+
    184 // This can be removed if ever we allow Intersections that are not simplices
    \n+
    185 const unsigned int subVertices[5][4] = {{0,1,3,5}, {0,3,2,6}, {4,5,0,6}, {6,7,6,3}, {6,0,5,3}};
    \n+
    186
    \n+
    187 for (int i=0; i<5; i++) {
    \n+
    188
    \n+
    189 SimplicialIntersection newSimplicialIntersection(grid1Index, grid2Index);
    \n+
    190
    \n+
    191 for (int j=0; j<dim+1; j++) {
    \n+
    192 newSimplicialIntersection.corners0[0][j] = refElement.position(subVertices[i][j],dim);
    \n+
    193 newSimplicialIntersection.corners1[0][j] = refElement.position(subVertices[i][other[j]],dim);
    \n+
    194 }
    \n+
    195
    \n+
    196 intersections.push_back(newSimplicialIntersection);
    \n+
    197
    \n+
    198 }
    \n+
    199
    \n+
    200 } else
    \n+
    201 DUNE_THROW(Dune::GridError, "Unsupported element type");
    \n+
    202
    \n+
    203}
    \n+
    204
    \n+
    205} // namespace GridGlue
    \n+
    206
    \n+
    207} // namespace Dune
    \n+
    208
    \n+
    209#endif // DUNE_GRIDGLUE_MERGING_CONFORMINGMERGE_HH
    \n+
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    \n
    Definition gridglue.hh:37
    \n-
    Computing overlapping grid intersections for grids of different dimensions.
    Definition overlappingmerge.hh:37
    \n-
    StandardMerge< T, dim1, dim2, dimworld >::SimplicialIntersection SimplicialIntersection
    Definition overlappingmerge.hh:56
    \n-
    OverlappingMerge()
    the coordinate type used in this interface
    Definition overlappingmerge.hh:52
    \n-
    void computeIntersections(const Dune::GeometryType &grid1ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)> &neighborIntersects2, unsigned int grid2Index, std::vector< SimplicialIntersection > &intersections)
    Compute the intersection between two overlapping elements.
    Definition overlappingmerge.cc:34
    \n-
    Dune::FieldVector< T, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition overlappingmerge.hh:47
    \n-
    T ctype
    the numeric type used in this interface
    Definition overlappingmerge.hh:44
    \n+
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n+
    Implementation of the Merger concept for conforming interfaces.
    Definition conformingmerge.hh:49
    \n+
    Dune::FieldVector< T, dim > LocalCoords
    the coordinate type used in this interface
    Definition conformingmerge.hh:62
    \n+
    Dune::FieldVector< T, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition conformingmerge.hh:59
    \n+
    static constexpr T default_tolerance
    Definition conformingmerge.hh:89
    \n+
    T ctype
    the numeric type used in this interface
    Definition conformingmerge.hh:56
    \n+
    ConformingMerge(T tolerance=default_tolerance)
    Definition conformingmerge.hh:91
    \n
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    Definition standardmerge.hh:58
    \n
    typename IntersectionListProvider::SimplicialIntersection SimplicialIntersection
    Definition standardmerge.hh:83
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,124 +1,250 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-overlappingmerge.hh\n+conformingmerge.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-5#ifndef DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH\n-6#define DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_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\n-21#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n-22#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+5/*\n+6 * Filename: conformingmerge.hh\n+7 * Version: 1.0\n+8 * Created on: Sep 14, 2009\n+9 * Author: Oliver Sander\n+10 * ---------------------------------\n+11 * Project: dune-grid-glue\n+12 * Description: implementation of the Merger concept for conforming\n+interfaces\n+13 *\n+14 */\n+21#ifndef DUNE_GRIDGLUE_MERGING_CONFORMINGMERGE_HH\n+22#define DUNE_GRIDGLUE_MERGING_CONFORMINGMERGE_HH\n 23\n-24namespace _\bD_\bu_\bn_\be {\n-25namespace GridGlue {\n-26\n-34template\n-_\b3_\b5class _\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be\n-36 : public _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n-37{\n-38\n-39public:\n-40\n-41 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n-42\n-_\b4_\b4 typedef T _\bc_\bt_\by_\bp_\be;\n-45\n-_\b4_\b7 typedef Dune::FieldVector _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\n-48\n-50 //typedef Dune::FieldVector LocalCoords;\n-51\n-_\b5_\b2 _\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be()\n-53 {}\n+24#include \n+25#include \n+26#include \n+27#include \n+28\n+29#include \n+30#include \n+31\n+32#include \n+33\n+34#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n+35\n+36namespace _\bD_\bu_\bn_\be {\n+37\n+38 namespace GridGlue {\n+39\n+46template\n+_\b4_\b7class _\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be\n+48 : public _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n+49{\n+50\n+51public:\n+52\n+53 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n 54\n-55protected:\n-_\b5_\b6 typedef typename _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bd_\bi_\bm_\b1_\b,_\bd_\bi_\bm_\b2_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn;\n+_\b5_\b6 typedef T _\bc_\bt_\by_\bp_\be;\n 57\n-69 void _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(const Dune::GeometryType& grid1ElementType,\n-70 const std::vector >& grid1ElementCorners,\n-71 std::bitset<(1<& neighborIntersects1,\n-72 unsigned int grid1Index,\n-73 const Dune::GeometryType& grid2ElementType,\n-74 const std::vector >& grid2ElementCorners,\n-75 std::bitset<(1<& neighborIntersects2,\n-76 unsigned int grid2Index,\n-77 std::vector& intersections);\n-78\n-79private:\n-80 bool inPlane(std::vector >& points);\n-81\n-82};\n-83\n-84} /* namespace Dune::GridGlue */\n-85} /* namespace Dune */\n+_\b5_\b9 typedef Dune::FieldVector _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\n+60\n+_\b6_\b2 typedef Dune::FieldVector _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs;\n+63\n+64private:\n+65\n+66 /* M E M B E R V A R I A B L E S */\n+67\n+69 T tolerance_;\n+70\n+71 typedef typename _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bd_\bi_\bm_\b,_\bd_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+SimplicialIntersection;\n+72\n+77 void computeIntersections(const Dune::GeometryType& grid1ElementType,\n+78 const std::vector >& grid1ElementCorners,\n+79 std::bitset<(1<& neighborIntersects1,\n+80 unsigned int grid1Index,\n+81 const Dune::GeometryType& grid2ElementType,\n+82 const std::vector >& grid2ElementCorners,\n+83 std::bitset<(1<& neighborIntersects2,\n+84 unsigned int grid2Index,\n+85 std::vector& intersections);\n 86\n-87#include \"_\bo_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bm_\be_\br_\bg_\be_\b._\bc_\bc\"\n+87public:\n 88\n-89\n-90#endif // DUNE_GRIDGLUE_MERGING_OVERLAPPINGMERGE_HH\n-_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n-_\bo_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bm_\be_\br_\bg_\be_\b._\bc_\bc\n+_\b8_\b9 static constexpr T _\bd_\be_\bf_\ba_\bu_\bl_\bt_\b__\bt_\bo_\bl_\be_\br_\ba_\bn_\bc_\be = 1e-4;\n+90\n+_\b9_\b1 _\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be(T tolerance = _\bd_\be_\bf_\ba_\bu_\bl_\bt_\b__\bt_\bo_\bl_\be_\br_\ba_\bn_\bc_\be) :\n+92 tolerance_(tolerance)\n+93 {}\n+94};\n+95\n+96template\n+97constexpr T _\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bd_\be_\bf_\ba_\bu_\bl_\bt_\b__\bt_\bo_\bl_\be_\br_\ba_\bn_\bc_\be;\n+98\n+99template\n+100void ConformingMerge::computeIntersections(const Dune::\n+GeometryType& grid1ElementType,\n+101 const std::vector >& grid1ElementCorners,\n+102 std::bitset<(1<& neighborIntersects1,\n+103 unsigned int grid1Index,\n+104 const Dune::GeometryType& grid2ElementType,\n+105 const std::vector >& grid2ElementCorners,\n+106 std::bitset<(1<& neighborIntersects2,\n+107 unsigned int grid2Index,\n+108 std::vector& _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs)\n+109{\n+110 this->counter++;\n+111\n+112 // A few consistency checks\n+113 assert((unsigned int)(Dune::ReferenceElements::general\n+(grid1ElementType).size(dim)) == grid1ElementCorners.size());\n+114 assert((unsigned int)(Dune::ReferenceElements::general\n+(grid2ElementType).size(dim)) == grid2ElementCorners.size());\n+115 // any intersection we may find will be the entire elements.\n+116 neighborIntersects1.reset();\n+117 neighborIntersects2.reset();\n+118\n+119 // the intersection is either conforming or empty, hence the GeometryTypes\n+have to match\n+120 if (grid1ElementType != grid2ElementType)\n+121 return;\n+122\n+123 // ////////////////////////////////////////////////////////////\n+124 // Find correspondences between the different corners\n+125 // ////////////////////////////////////////////////////////////\n+126 std::vector other(grid1ElementCorners.size(), -1);\n+127\n+128 for (unsigned int i=0; i::general\n+(grid1ElementType);\n+152\n+154 if (grid1ElementType.isSimplex()) {\n+155\n+156 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.emplace_back(grid1Index, grid2Index);\n+157\n+158 for (int i=0; i::SimplicialIntersection\n-SimplicialIntersection\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.hh:56\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be\n-OverlappingMerge()\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<...\n+> &reverse=!reversed)\n+Iterate over all intersections of a GridGlue.\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be\n+Implementation of the Merger concept for conforming interfaces.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn conformingmerge.hh:49\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< T, dim > LocalCoords\n the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.hh:52\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-void computeIntersections(const Dune::GeometryType &grid1ElementType, const\n-std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::\n-bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::\n-GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T,\n-dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)>\n-&neighborIntersects2, unsigned int grid2Index, std::vector<\n-SimplicialIntersection > &intersections)\n-Compute the intersection between two overlapping elements.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.cc:34\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn conformingmerge.hh:62\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n Dune::FieldVector< T, dimworld > WorldCoords\n the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.hh:47\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bt_\by_\bp_\be\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn conformingmerge.hh:59\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bd_\be_\bf_\ba_\bu_\bl_\bt_\b__\bt_\bo_\bl_\be_\br_\ba_\bn_\bc_\be\n+static constexpr T default_tolerance\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn conformingmerge.hh:89\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bt_\by_\bp_\be\n T ctype\n the numeric type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.hh:44\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn conformingmerge.hh:56\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bC_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg_\bM_\be_\br_\bg_\be\n+ConformingMerge(T tolerance=default_tolerance)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn conformingmerge.hh:91\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n Common base class for many merger implementations: produce pairs of entities\n that may intersect.\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:58\n _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n typename IntersectionListProvider::SimplicialIntersection\n SimplicialIntersection\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00098.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00098.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: merger.hh File Reference\n+dune-grid-glue: computeintersection.hh File Reference\n \n \n \n \n \n \n \n@@ -71,37 +71,46 @@\n \n \n \n
    \n \n-
    merger.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    computeintersection.hh File Reference
    \n \n
    \n-
    #include <vector>
    \n-#include <dune/common/fvector.hh>
    \n-#include <dune/geometry/type.hh>
    \n-#include <dune/grid-glue/merging/intersectionlist.hh>
    \n+
    #include <dune/common/fvector.hh>
    \n+#include <dune/common/fmatrix.hh>
    \n+#include "simplexintersection.cc"
    \n+#include "computeintersection.cc"
    \n
    \n

    Go to the source code of this file.

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

    \n Classes

    class  Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >
     Abstract base for all classes that take extracted grids and build sets of intersections. More...
    class  Dune::GridGlue::ComputationMethod< dimWorld, dim1, dim2, T >
     
    class  Dune::GridGlue::IntersectionComputation< CM >
     Intersection computation method for two elements of arbitrary dimension. More...
     
    \n \n \n \n \n \n+

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n+\n+\n+\n+\n

    \n+Functions

    template<class V >
    int Dune::GridGlue::insertPoint (const V p, std::vector< V > &P)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,26 +1,32 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-merger.hh File Reference\n-#include \n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n+computeintersection.hh File Reference\n #include \n-#include \n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh>\n+#include \n+#include \"_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\"\n+#include \"_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\"\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b<_\b _\bc_\bt_\by_\bp_\be_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>\n-\u00a0 Abstract base for all classes that take extracted grids and build sets\n- of intersections. _\bM_\bo_\br_\be_\b._\b._\b.\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\bd_\bi_\bm_\b1_\b,_\b _\bd_\bi_\bm_\b2_\b,_\b _\bT_\b _\b>\n+\u00a0\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\b _\bC_\bM_\b _\b>\n+\u00a0 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn computation method for two elements of arbitrary\n+ dimension. _\bM_\bo_\br_\be_\b._\b._\b.\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n+template\n+int\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt (const V p, std::vector< V > &P)\n+\u00a0\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00098_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00098_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: merger.hh Source File\n+dune-grid-glue: computeintersection.hh Source File\n \n \n \n \n \n \n \n@@ -74,110 +74,190 @@\n \n \n
    \n
    \n-
    merger.hh
    \n+
    computeintersection.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n-
    2// vi: set et ts=4 sw=2 sts=2:
    \n-
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n-
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    5#ifndef DUNE_GRIDGLUE_MERGING_MERGER_HH
    \n-
    6#define DUNE_GRIDGLUE_MERGING_MERGER_HH
    \n-
    7
    \n-
    8#include <vector>
    \n-
    9
    \n-
    10#include <dune/common/fvector.hh>
    \n-
    11#include <dune/geometry/type.hh>
    \n-
    12
    \n-\n-
    14
    \n-
    15namespace Dune {
    \n-
    16namespace GridGlue {
    \n-
    17
    \n-
    25template <class ctype, int grid1Dim, int grid2Dim, int dimworld>
    \n-
    \n-
    26class Merger
    \n-
    27{
    \n-
    28public:
    \n-
    29
    \n-
    31 typedef Dune::FieldVector<ctype, grid1Dim> Grid1Coords;
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n+
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+
    3#ifndef DUNE_GRIDGLUE_MERGING_COMPUTEINTERSECTION_HH
    \n+
    4#define DUNE_GRIDGLUE_MERGING_COMPUTEINTERSECTION_HH
    \n+
    5
    \n+
    6#include <dune/common/fvector.hh>
    \n+
    7#include <dune/common/fmatrix.hh>
    \n+
    8
    \n+
    9namespace Dune {
    \n+
    10namespace GridGlue {
    \n+
    11
    \n+
    12template<int dimWorld, int dim1, int dim2, typename T = double>
    \n+
    \n+\n+
    14public:
    \n+
    15 typedef FieldVector<T, dimWorld> Vector;
    \n+
    16 static const int grid1Dimension = dim1;
    \n+
    17 static const int grid2Dimension = dim2;
    \n+
    18 static const int intersectionDimension = (dim1 < dim2)?(dim1):(dim2);
    \n+
    19
    \n+
    20 static bool computeIntersectionPoints(const std::vector<Vector> X,
    \n+
    21 const std::vector<Vector> Y,
    \n+
    22 std::vector<std::vector<int> >& SX,
    \n+
    23 std::vector<std::vector<int> >& SY,
    \n+
    24 std::vector<Vector>& P);
    \n+
    25 static void grid1_subdivisions(const std::vector<Vector> elementCorners,
    \n+
    26 std::vector<std::vector<unsigned int> >& subElements,
    \n+
    27 std::vector<std::vector<int> >& faceIds);
    \n+
    28 static void grid2_subdivisions(const std::vector<Vector> elementCorners,
    \n+
    29 std::vector<std::vector<unsigned int> >& subElements,
    \n+
    30 std::vector<std::vector<int> >& faceIds);
    \n+
    31};
    \n+
    \n
    32
    \n-
    34 typedef Dune::FieldVector<ctype, grid2Dim> Grid2Coords;
    \n-
    35
    \n-
    37 typedef Dune::FieldVector<ctype, dimworld> WorldCoords;
    \n-
    38
    \n-\n-
    40
    \n-
    54 virtual void build(const std::vector<Dune::FieldVector<ctype,dimworld> >& grid1_coords,
    \n-
    55 const std::vector<unsigned int>& grid1_elements,
    \n-
    56 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n-
    57 const std::vector<Dune::FieldVector<ctype,dimworld> >& grid2_coords,
    \n-
    58 const std::vector<unsigned int>& grid2_elements,
    \n-
    59 const std::vector<Dune::GeometryType>& grid2_element_types) = 0;
    \n-
    60
    \n-
    \n-
    64 unsigned int nSimplices() const
    \n-
    65 { return intersectionList()->size(); }
    \n-
    \n-
    66
    \n-
    67 virtual void clear() = 0;
    \n-
    68
    \n-
    74 virtual std::shared_ptr<IntersectionList> intersectionList() const = 0;
    \n-
    75
    \n-
    79 template<int n>
    \n-
    \n-
    80 unsigned int parents(unsigned int idx) const {
    \n-
    81 return intersectionList()->template parents<n>(idx);
    \n-
    82 }
    \n-
    \n-
    83
    \n-
    90 template<int n>
    \n-
    \n-
    91 unsigned int parent(unsigned int idx, unsigned int parId = 0) const
    \n-
    92 {
    \n-
    93 return intersectionList()->template parent<n>(idx, parId);
    \n-
    94 }
    \n-
    \n-
    95
    \n-
    104 template<int n>
    \n-
    \n-
    105 auto parentLocal(unsigned int idx, unsigned int corner, unsigned int parId = 0) const
    \n-
    106 {
    \n-
    107 return intersectionList()->template corner<n>(idx, corner, parId);
    \n-
    108 }
    \n-
    \n-
    109
    \n-
    114 unsigned int counter;
    \n-
    115};
    \n-
    \n-
    116
    \n-
    117} /* namespace GridGlue */
    \n-
    118} /* namespace Dune */
    \n-
    119
    \n-
    120#endif
    \n-\n+
    38template<class CM>
    \n+
    \n+\n+
    40private:
    \n+
    41 typedef typename CM::Vector V;
    \n+
    42 const int dimWorld = V::dimension;
    \n+
    43 const int dim1 = CM::grid1Dimension;
    \n+
    44 const int dim2 = CM::grid2Dimension;
    \n+
    45public:
    \n+
    59 static bool computeIntersection(const std::vector<V>& X,
    \n+
    60 const std::vector<V>& Y,
    \n+
    61 std::vector<std::vector<int> >& SX,
    \n+
    62 std::vector<std::vector<int> >& SY,
    \n+
    63 std::vector<V>& P);
    \n+
    64
    \n+
    74 template<int isDim, int dW>
    \n+
    \n+
    75 static void orderPoints(const V& centroid,
    \n+
    76 const std::vector<std::vector<int> >& SX,
    \n+
    77 const std::vector<std::vector<int> >& SY,
    \n+
    78 const std::vector<V>& P,
    \n+
    79 std::vector<std::vector<int> >& H)
    \n+
    80 {
    \n+
    81 if (isDim > 1)
    \n+
    82 orderPoints_(std::integral_constant<int,isDim>(),std::integral_constant<int,dW>(),
    \n+
    83 centroid, SX, SY, P,H);
    \n+
    84 }
    \n+
    \n+
    85
    \n+
    86private:
    \n+
    87 static void orderPoints_(std::integral_constant<int,1>,
    \n+
    88 std::integral_constant<int,1>,
    \n+
    89 const V& centroid,
    \n+
    90 const std::vector<std::vector<int> >& SX,
    \n+
    91 const std::vector<std::vector<int> >& SY,
    \n+
    92 const std::vector<V>& P,
    \n+
    93 std::vector<std::vector<int> >& H) {}
    \n+
    94 static void orderPoints_(std::integral_constant<int,1>,
    \n+
    95 std::integral_constant<int,2>,
    \n+
    96 const V& centroid,
    \n+
    97 const std::vector<std::vector<int> >& SX,
    \n+
    98 const std::vector<std::vector<int> >& SY,
    \n+
    99 const std::vector<V>& P,
    \n+
    100 std::vector<std::vector<int> >& H) {}
    \n+
    101 static void orderPoints_(std::integral_constant<int,1>,
    \n+
    102 std::integral_constant<int,3>,
    \n+
    103 const V& centroid,
    \n+
    104 const std::vector<std::vector<int> >& SX,
    \n+
    105 const std::vector<std::vector<int> >& SY,
    \n+
    106 const std::vector<V>& P,
    \n+
    107 std::vector<std::vector<int> >& H) {}
    \n+
    108 static void orderPoints_(std::integral_constant<int,2>,
    \n+
    109 std::integral_constant<int,2>,
    \n+
    110 const V& centroid,
    \n+
    111 const std::vector<std::vector<int> >& SX,
    \n+
    112 const std::vector<std::vector<int> >& SY,
    \n+
    113 const std::vector<V>& P,
    \n+
    114 std::vector<std::vector<int> >& H);
    \n+
    115 static void orderPoints_(std::integral_constant<int,2>,
    \n+
    116 std::integral_constant<int,3>,
    \n+
    117 const V& centroid,
    \n+
    118 const std::vector<std::vector<int> >& SX,
    \n+
    119 const std::vector<std::vector<int> >& SY,
    \n+
    120 const std::vector<V>& P,
    \n+
    121 std::vector<std::vector<int> >& H);
    \n+
    122 static void orderPoints_(std::integral_constant<int,3>,
    \n+
    123 std::integral_constant<int,3>,
    \n+
    124 const V& centroid,
    \n+
    125 const std::vector<std::vector<int> >& SX,
    \n+
    126 const std::vector<std::vector<int> >& SY,
    \n+
    127 const std::vector<V>& P,
    \n+
    128 std::vector<std::vector<int> > & H);
    \n+
    129
    \n+
    137 static void orderPointsCC(std::integral_constant<int,2>,
    \n+
    138 const V& centroid,
    \n+
    139 std::vector<int> &id,
    \n+
    140 const std::vector<V>& P);
    \n+
    141 static void orderPointsCC(std::integral_constant<int,3>,
    \n+
    142 const V& centroid,
    \n+
    143 std::vector<int> &id,
    \n+
    144 const std::vector<V>& P);
    \n+
    145
    \n+
    150 static void removeDuplicates( std::vector<int> & p);
    \n+
    151
    \n+
    159 static bool newFace3D(const std::vector<int>& id,
    \n+
    160 const std::vector<std::vector<int> >& H);
    \n+
    161};
    \n+
    \n+
    162
    \n+
    163template<class V>
    \n+
    \n+
    164inline int insertPoint(const V p, std::vector<V>& P)
    \n+
    165{
    \n+
    166 double eps= 1e-8; // tolerance for identical nodes
    \n+
    167 std::size_t k=0 ;
    \n+
    168
    \n+
    169 if (P.size()>0) {
    \n+
    170
    \n+
    171 while ((k<P.size())&&
    \n+
    172 ((p - P[k]).infinity_norm()>eps*(P[k].infinity_norm()) &&
    \n+
    173 (p - P[k]).infinity_norm()>eps*(p.infinity_norm())) &&
    \n+
    174 !(p.infinity_norm() < eps && P[k].infinity_norm() <eps &&
    \n+
    175 (p - P[k]).infinity_norm() < eps))
    \n+
    176 k++ ;
    \n+
    177
    \n+
    178 if (k>=P.size())
    \n+
    179 P.push_back(p) ; // new node is not contained in P
    \n+
    180
    \n+
    181 }
    \n+
    182 else
    \n+
    183 P.push_back(p);
    \n+
    184
    \n+
    185 return k ;
    \n+
    186}
    \n+
    \n+
    187
    \n+
    188
    \n+
    189} /* namespace Dune::GridGlue */
    \n+
    190} /* namespace Dune */
    \n+
    191
    \n+
    192#include "simplexintersection.cc"
    \n+
    193#include "computeintersection.cc"
    \n+
    194
    \n+
    195#endif
    \n+\n+\n
    Definition gridglue.hh:37
    \n-
    Definition intersectionlist.hh:134
    \n-
    Abstract base for all classes that take extracted grids and build sets of intersections.
    Definition merger.hh:27
    \n-
    unsigned int parent(unsigned int idx, unsigned int parId=0) const
    get index of grid-n's parent simplex for given merged grid simplex
    Definition merger.hh:91
    \n-
    virtual void clear()=0
    \n-
    Dune::FieldVector< ctype, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition merger.hh:37
    \n-
    Dune::FieldVector< ctype, grid1Dim > Grid1Coords
    the local coordinate type for the grid1 coordinates
    Definition merger.hh:31
    \n-
    unsigned int counter
    Counts the number of times the computeIntersection method has been called.
    Definition merger.hh:114
    \n-
    auto parentLocal(unsigned int idx, unsigned int corner, unsigned int parId=0) const
    get the grid-n parent's simplex local coordinates for a particular merged grid simplex corner (parent...
    Definition merger.hh:105
    \n-
    virtual void build(const std::vector< Dune::FieldVector< ctype, dimworld > > &grid1_coords, const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< ctype, dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements, const std::vector< Dune::GeometryType > &grid2_element_types)=0
    builds the merged grid
    \n-
    unsigned int nSimplices() const
    get the number of simplices in the merged grid The indices are then in 0..nSimplices()-1
    Definition merger.hh:64
    \n-
    virtual std::shared_ptr< IntersectionList > intersectionList() const =0
    \n-
    unsigned int parents(unsigned int idx) const
    Definition merger.hh:80
    \n-
    Dune::FieldVector< ctype, grid2Dim > Grid2Coords
    the local coordinate type for the grid2 coordinates
    Definition merger.hh:34
    \n+
    int insertPoint(const V p, std::vector< V > &P)
    Definition computeintersection.hh:164
    \n+
    Definition computeintersection.hh:13
    \n+
    static void grid2_subdivisions(const std::vector< Vector > elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    \n+
    static bool computeIntersectionPoints(const std::vector< Vector > X, const std::vector< Vector > Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< Vector > &P)
    \n+
    FieldVector< T, dimWorld > Vector
    Definition computeintersection.hh:15
    \n+
    static const int grid1Dimension
    Definition computeintersection.hh:16
    \n+
    static void grid1_subdivisions(const std::vector< Vector > elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    \n+
    static const int grid2Dimension
    Definition computeintersection.hh:17
    \n+
    static const int intersectionDimension
    Definition computeintersection.hh:18
    \n+
    Intersection computation method for two elements of arbitrary dimension.
    Definition computeintersection.hh:39
    \n+
    static void orderPoints(const V &centroid, const std::vector< std::vector< int > > &SX, const std::vector< std::vector< int > > &SY, const std::vector< V > &P, std::vector< std::vector< int > > &H)
    Order Points in the point list P face-wise such that a subsimplex subdivision can be constructed.
    Definition computeintersection.hh:75
    \n+
    static bool computeIntersection(const std::vector< V > &X, const std::vector< V > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< V > &P)
    Compute the intersection of two elements X and Y Compute the intersection of two elements X and Y,...
    Definition computeintersection.cc:14
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,139 +1,214 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-merger.hh\n+computeintersection.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n-2// vi: set et ts=4 sw=2 sts=2:\n-3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n+1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n-4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n+2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-5#ifndef DUNE_GRIDGLUE_MERGING_MERGER_HH\n-6#define DUNE_GRIDGLUE_MERGING_MERGER_HH\n-7\n-8#include \n-9\n-10#include \n-11#include \n-12\n-13#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh>\n-14\n-15namespace _\bD_\bu_\bn_\be {\n-16namespace GridGlue {\n-17\n-25template \n-_\b2_\b6class _\bM_\be_\br_\bg_\be_\br\n-27{\n-28public:\n-29\n-_\b3_\b1 typedef Dune::FieldVector _\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs;\n+3#ifndef DUNE_GRIDGLUE_MERGING_COMPUTEINTERSECTION_HH\n+4#define DUNE_GRIDGLUE_MERGING_COMPUTEINTERSECTION_HH\n+5\n+6#include \n+7#include \n+8\n+9namespace _\bD_\bu_\bn_\be {\n+10namespace GridGlue {\n+11\n+12template\n+_\b1_\b3class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd {\n+14public:\n+_\b1_\b5 typedef FieldVector _\bV_\be_\bc_\bt_\bo_\br;\n+_\b1_\b6 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = dim1;\n+_\b1_\b7 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = dim2;\n+_\b1_\b8 static const int _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = (dim1 < dim2)?(dim1):(dim2);\n+19\n+_\b2_\b0 static bool _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bP_\bo_\bi_\bn_\bt_\bs(const std::vector X,\n+21 const std::vector Y,\n+22 std::vector >& SX,\n+23 std::vector >& SY,\n+24 std::vector& P);\n+_\b2_\b5 static void _\bg_\br_\bi_\bd_\b1_\b__\bs_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn_\bs(const std::vector elementCorners,\n+26 std::vector >& subElements,\n+27 std::vector >& faceIds);\n+_\b2_\b8 static void _\bg_\br_\bi_\bd_\b2_\b__\bs_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn_\bs(const std::vector elementCorners,\n+29 std::vector >& subElements,\n+30 std::vector >& faceIds);\n+31};\n 32\n-_\b3_\b4 typedef Dune::FieldVector _\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs;\n-35\n-_\b3_\b7 typedef Dune::FieldVector _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\n-38\n-_\b3_\b9 using _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt = _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b<_\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs_\b,\n-_\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs_\b>;\n-40\n-_\b5_\b4 virtual void _\bb_\bu_\bi_\bl_\bd(const std::vector >&\n-grid1_coords,\n-55 const std::vector& grid1_elements,\n-56 const std::vector& grid1_element_types,\n-57 const std::vector >& grid2_coords,\n-58 const std::vector& grid2_elements,\n-59 const std::vector& grid2_element_types) = 0;\n-60\n-_\b6_\b4 unsigned int _\bn_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\be_\bs() const\n-65 { return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt()->size(); }\n-66\n-_\b6_\b7 virtual void _\bc_\bl_\be_\ba_\br() = 0;\n-68\n-_\b7_\b4 virtual std::shared_ptr _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt() const = 0;\n-75\n-79 template\n-_\b8_\b0 unsigned int _\bp_\ba_\br_\be_\bn_\bt_\bs(unsigned int idx) const {\n-81 return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt()->template parents(idx);\n-82 }\n-83\n-90 template\n-_\b9_\b1 unsigned int _\bp_\ba_\br_\be_\bn_\bt(unsigned int idx, unsigned int parId = 0) const\n-92 {\n-93 return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt()->template parent(idx, parId);\n-94 }\n-95\n-104 template\n-_\b1_\b0_\b5 auto _\bp_\ba_\br_\be_\bn_\bt_\bL_\bo_\bc_\ba_\bl(unsigned int idx, unsigned int corner, unsigned int parId\n-= 0) const\n-106 {\n-107 return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt()->template corner(idx, corner, parId);\n-108 }\n-109\n-_\b1_\b1_\b4 unsigned int _\bc_\bo_\bu_\bn_\bt_\be_\br;\n-115};\n-116\n-117} /* namespace GridGlue */\n-118} /* namespace Dune */\n-119\n-120#endif\n-_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh\n+38template\n+_\b3_\b9class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn {\n+40private:\n+41 typedef typename CM::Vector V;\n+42 const int dimWorld = V::dimension;\n+43 const int dim1 = CM::grid1Dimension;\n+44 const int dim2 = CM::grid2Dimension;\n+45public:\n+59 static bool _\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(const std::vector& X,\n+60 const std::vector& Y,\n+61 std::vector >& SX,\n+62 std::vector >& SY,\n+63 std::vector& P);\n+64\n+74 template\n+_\b7_\b5 static void _\bo_\br_\bd_\be_\br_\bP_\bo_\bi_\bn_\bt_\bs(const V& centroid,\n+76 const std::vector >& SX,\n+77 const std::vector >& SY,\n+78 const std::vector& P,\n+79 std::vector >& H)\n+80 {\n+81 if (isDim > 1)\n+82 orderPoints_(std::integral_constant(),std::\n+integral_constant(),\n+83 centroid, SX, SY, P,H);\n+84 }\n+85\n+86private:\n+87 static void orderPoints_(std::integral_constant,\n+88 std::integral_constant,\n+89 const V& centroid,\n+90 const std::vector >& SX,\n+91 const std::vector >& SY,\n+92 const std::vector& P,\n+93 std::vector >& H) {}\n+94 static void orderPoints_(std::integral_constant,\n+95 std::integral_constant,\n+96 const V& centroid,\n+97 const std::vector >& SX,\n+98 const std::vector >& SY,\n+99 const std::vector& P,\n+100 std::vector >& H) {}\n+101 static void orderPoints_(std::integral_constant,\n+102 std::integral_constant,\n+103 const V& centroid,\n+104 const std::vector >& SX,\n+105 const std::vector >& SY,\n+106 const std::vector& P,\n+107 std::vector >& H) {}\n+108 static void orderPoints_(std::integral_constant,\n+109 std::integral_constant,\n+110 const V& centroid,\n+111 const std::vector >& SX,\n+112 const std::vector >& SY,\n+113 const std::vector& P,\n+114 std::vector >& H);\n+115 static void orderPoints_(std::integral_constant,\n+116 std::integral_constant,\n+117 const V& centroid,\n+118 const std::vector >& SX,\n+119 const std::vector >& SY,\n+120 const std::vector& P,\n+121 std::vector >& H);\n+122 static void orderPoints_(std::integral_constant,\n+123 std::integral_constant,\n+124 const V& centroid,\n+125 const std::vector >& SX,\n+126 const std::vector >& SY,\n+127 const std::vector& P,\n+128 std::vector > & H);\n+129\n+137 static void orderPointsCC(std::integral_constant,\n+138 const V& centroid,\n+139 std::vector &id,\n+140 const std::vector& P);\n+141 static void orderPointsCC(std::integral_constant,\n+142 const V& centroid,\n+143 std::vector &id,\n+144 const std::vector& P);\n+145\n+150 static void removeDuplicates( std::vector & p);\n+151\n+159 static bool newFace3D(const std::vector& id,\n+160 const std::vector >& H);\n+161};\n+162\n+163template\n+_\b1_\b6_\b4inline int _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(const V p, std::vector& P)\n+165{\n+166 double eps= 1e-8; // tolerance for identical nodes\n+167 std::size_t k=0 ;\n+168\n+169 if (P.size()>0) {\n+170\n+171 while ((keps*(P[k].infinity_norm()) &&\n+173 (p - P[k]).infinity_norm()>eps*(p.infinity_norm())) &&\n+174 !(p.infinity_norm() < eps && P[k].infinity_norm() =P.size())\n+179 P.push_back(p) ; // new node is not contained in P\n+180\n+181 }\n+182 else\n+183 P.push_back(p);\n+184\n+185 return k ;\n+186}\n+187\n+188\n+189} /* namespace Dune::GridGlue */\n+190} /* namespace Dune */\n+191\n+192#include \"_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\"\n+193#include \"_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\"\n+194\n+195#endif\n+_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\n+_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersectionlist.hh:134\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br\n-Abstract base for all classes that take extracted grids and build sets of\n-intersections.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:27\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt\n-unsigned int parent(unsigned int idx, unsigned int parId=0) const\n-get index of grid-n's parent simplex for given merged grid simplex\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:91\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bc_\bl_\be_\ba_\br\n-virtual void clear()=0\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< ctype, dimworld > WorldCoords\n-the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< ctype, grid1Dim > Grid1Coords\n-the local coordinate type for the grid1 coordinates\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:31\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bc_\bo_\bu_\bn_\bt_\be_\br\n-unsigned int counter\n-Counts the number of times the computeIntersection method has been called.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:114\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bL_\bo_\bc_\ba_\bl\n-auto parentLocal(unsigned int idx, unsigned int corner, unsigned int parId=0)\n-const\n-get the grid-n parent's simplex local coordinates for a particular merged grid\n-simplex corner (parent...\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:105\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bb_\bu_\bi_\bl_\bd\n-virtual void build(const std::vector< Dune::FieldVector< ctype, dimworld > >\n-&grid1_coords, const std::vector< unsigned int > &grid1_elements, const std::\n-vector< Dune::GeometryType > &grid1_element_types, const std::vector< Dune::\n-FieldVector< ctype, dimworld > > &grid2_coords, const std::vector< unsigned int\n-> &grid2_elements, const std::vector< Dune::GeometryType >\n-&grid2_element_types)=0\n-builds the merged grid\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bn_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\be_\bs\n-unsigned int nSimplices() const\n-get the number of simplices in the merged grid The indices are then in\n-0..nSimplices()-1\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:64\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt\n-virtual std::shared_ptr< IntersectionList > intersectionList() const =0\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bp_\ba_\br_\be_\bn_\bt_\bs\n-unsigned int parents(unsigned int idx) const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:80\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bM_\be_\br_\bg_\be_\br_\b:_\b:_\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< ctype, grid2Dim > Grid2Coords\n-the local coordinate type for the grid2 coordinates\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn merger.hh:34\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt\n+int insertPoint(const V p, std::vector< V > &P)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:164\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:13\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bg_\br_\bi_\bd_\b2_\b__\bs_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn_\bs\n+static void grid2_subdivisions(const std::vector< Vector > elementCorners,\n+std::vector< std::vector< unsigned int > > &subElements, std::vector< std::\n+vector< int > > &faceIds)\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bP_\bo_\bi_\bn_\bt_\bs\n+static bool computeIntersectionPoints(const std::vector< Vector > X, const\n+std::vector< Vector > Y, std::vector< std::vector< int > > &SX, std::vector<\n+std::vector< int > > &SY, std::vector< Vector > &P)\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bV_\be_\bc_\bt_\bo_\br\n+FieldVector< T, dimWorld > Vector\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:15\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn\n+static const int grid1Dimension\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:16\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bg_\br_\bi_\bd_\b1_\b__\bs_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn_\bs\n+static void grid1_subdivisions(const std::vector< Vector > elementCorners,\n+std::vector< std::vector< unsigned int > > &subElements, std::vector< std::\n+vector< int > > &faceIds)\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn\n+static const int grid2Dimension\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:17\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd_\b:_\b:_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn\n+static const int intersectionDimension\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:18\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn\n+Intersection computation method for two elements of arbitrary dimension.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:39\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bo_\br_\bd_\be_\br_\bP_\bo_\bi_\bn_\bt_\bs\n+static void orderPoints(const V ¢roid, const std::vector< std::vector< int\n+> > &SX, const std::vector< std::vector< int > > &SY, const std::vector< V >\n+&P, std::vector< std::vector< int > > &H)\n+Order Points in the point list P face-wise such that a subsimplex subdivision\n+can be constructed.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:75\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+static bool computeIntersection(const std::vector< V > &X, const std::vector< V\n+> &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > >\n+&SY, std::vector< V > &P)\n+Compute the intersection of two elements X and Y Compute the intersection of\n+two elements X and Y,...\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.cc:14\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00101.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00101.html", "unified_diff": "@@ -69,15 +69,15 @@\n \n
    \n
    \n
    Todo List
    \n
    \n
    \n
    \n-
    Member CheckMPIStatus (A, B)
    \n+
    Member CheckMPIStatus (A, B)
    \n
    Implement MPI Status check with exception handling
    \n
    Class Dune::GridGlue::GridGlue< P0, P1 >
    \n
    adapt member names according to style guide
    \n
    Member Dune::GridGlue::GridGlue< P0, P1 >::communicate (Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > &data, Dune::InterfaceType iftype, Dune::CommunicationDirection dir) const
    \n

    fix mixed communication: seq->par use commSeq, par->seq use commPar

    \n

    \n

    add directed version communicate<FROM,TO, DH,DT>(data,iftype,dir)

    \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00926.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00926.html", "unified_diff": "@@ -1530,16 +1530,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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00930.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00930.html", "unified_diff": "@@ -83,15 +83,15 @@\n
    Dune::GridGlue::IntersectionData< P0, P1 > Class Template Reference
    \n \n
    \n \n

    storage class for Dune::GridGlue::Intersection related data \n More...

    \n \n-

    #include <dune/grid-glue/adapter/intersection.hh>

    \n+

    #include <dune/grid-glue/adapter/intersection.hh>

    \n \n \n \n \n \n \n@@ -640,15 +640,15 @@\n \n

    Dimension of the intersection.

    \n \n \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00934.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00934.html", "unified_diff": "@@ -81,15 +81,15 @@\n
    Dune::GridGlue::Intersection< P0, P1, I, O > Class Template Reference
    \n \n
    \n \n

    The intersection of two entities of the two patches of a GridGlue. \n More...

    \n \n-

    #include <dune/grid-glue/adapter/intersection.hh>

    \n+

    #include <dune/grid-glue/adapter/intersection.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::Intersection< P0, P1, I, O >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1082,15 +1082,15 @@\n \n

    outside patch

    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00938.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00938.html", "unified_diff": "@@ -77,15 +77,15 @@\n Public Types |\n Public Member Functions |\n List of all members\n
    Dune::GridGlue::IntersectionIterator< P0, P1, inside, outside > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid-glue/adapter/intersectioniterator.hh>

    \n+

    #include <dune/grid-glue/adapter/intersectioniterator.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::IntersectionIterator< P0, P1, inside, outside >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -267,15 +267,15 @@\n

    \n Public Types

    typedef ::Dune::GridGlue::GridGlue< P0, P1 > GridGlue
     
    typedef GridGlue::IndexType IndexType
     
    \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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00942.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00942.html", "unified_diff": "@@ -77,15 +77,15 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::GridGlue::IntersectionIndexSet< P0, P1 > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid-glue/adapter/intersectionindexset.hh>

    \n+

    #include <dune/grid-glue/adapter/intersectionindexset.hh>

    \n \n \n \n \n \n \n@@ -199,15 +199,15 @@\n \n

    Return total number of intersections.

    \n \n \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00946.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00946.html", "unified_diff": "@@ -79,15 +79,15 @@\n
    Dune::GridGlue::GridGlueAmiraWriter Class Reference
    \n \n
    \n \n

    Write remote intersections to a AmiraMesh file for debugging purposes. \n More...

    \n \n-

    #include <dune/grid-glue/adapter/gridglueamirawriter.hh>

    \n+

    #include <dune/grid-glue/adapter/gridglueamirawriter.hh>

    \n

    \n Public Types

    typedef GridGlue::IndexType IndexType
     The type used for the indices.
     
    typedef size_t SizeType
    \n \n \n \n \n

    \n Static Public Member Functions

    template<typename Glue >
    static void write (const Glue &glue, const std::string &path, int appendix=1)
     
    \n@@ -135,15 +135,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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00950.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00950.html", "unified_diff": "@@ -76,15 +76,15 @@\n \n
    Dune::GridGlue::GlobalId Struct Reference
    \n \n
    \n \n-

    #include <dune/grid-glue/adapter/gridgluecommunicate.hh>

    \n+

    #include <dune/grid-glue/adapter/gridgluecommunicate.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::GlobalId:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -202,15 +202,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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00954.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00954.html", "unified_diff": "@@ -81,15 +81,15 @@\n
    Dune::GridGlue::CommDataHandle< DataHandleImp, DataTypeImp > Class Template Reference
    \n \n
    \n \n

    describes the features of a data handle for communication in parallel runs using the GridGlue::communicate methods. \n More...

    \n \n-

    #include <dune/grid-glue/adapter/gridgluecommunicate.hh>

    \n+

    #include <dune/grid-glue/adapter/gridgluecommunicate.hh>

    \n \n \n \n \n \n

    \n Public Types

    typedef DataTypeImp DataType
     data type of data to communicate
     
    \n@@ -315,15 +315,15 @@\n
    \n
    \n

    how many objects of type DataType have to be sent for a given intersection Note: Both sender and receiver side need to know this size.

    \n \n
    \n \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00958.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00958.html", "unified_diff": "@@ -78,15 +78,15 @@\n Public Member Functions |\n Public Attributes |\n List of all members \n
    Dune::GridGlue::StreamingMessageBuffer< DT > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid-glue/adapter/gridgluecommunicate.hh>

    \n+

    #include <dune/grid-glue/adapter/gridgluecommunicate.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::StreamingMessageBuffer< DT >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -341,15 +341,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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00962.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00962.html", "unified_diff": "@@ -79,15 +79,15 @@\n
    Dune::GridGlue::CommunicationOperator< dir > Class Template Reference
    \n \n
    \n \n

    forward gather scatter to user defined CommInfo class \n More...

    \n \n-

    #include <dune/grid-glue/adapter/gridgluecommunicate.hh>

    \n+

    #include <dune/grid-glue/adapter/gridgluecommunicate.hh>

    \n \n \n \n \n \n \n@@ -197,15 +197,15 @@\n \n

    \n Static Public Member Functions

    template<class CommInfo >
    static const CommInfo::DataTypegather (const CommInfo &commInfo, size_t i, size_t j=0)
     
    template<class CommInfo >
    \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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00966.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00966.html", "unified_diff": "@@ -81,15 +81,15 @@\n
    Dune::GridGlue::CommInfo< GG, DataHandleImp, DataTypeImp > Struct Template Reference
    \n \n
    \n \n

    collects all GridGlue data requried for communication \n More...

    \n \n-

    #include <dune/grid-glue/adapter/gridgluecommunicate.hh>

    \n+

    #include <dune/grid-glue/adapter/gridgluecommunicate.hh>

    \n \n \n \n \n \n \n@@ -290,15 +290,15 @@\n \n

    \n Public Types

    typedef DataTypeImp value_type
     
    typedef GG GridGlue
     
    \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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00970.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00970.html", "unified_diff": "@@ -80,15 +80,15 @@\n
    Dune::CommPolicy< ::Dune::GridGlue::CommInfo< GG, DataHandleImp, DataTypeImp > > Struct Template Reference
    \n \n
    \n \n

    specialization of the CommPolicy struct, required for the ParallelIndexsets \n More...

    \n \n-

    #include <dune/grid-glue/adapter/gridgluecommunicate.hh>

    \n+

    #include <dune/grid-glue/adapter/gridgluecommunicate.hh>

    \n \n \n \n \n \n \n@@ -200,15 +200,15 @@\n
    \n \n

    Get the number of objects at an intersection.

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00982.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00982.html", "unified_diff": "@@ -77,15 +77,15 @@\n Public Types |\n Static Public Attributes |\n List of all members\n
    Dune::GridGlue::IntersectionTraits< P0, P1, inside, outside > Struct Template Reference
    \n \n

    \n Public Types

    typedef ::Dune::GridGlue::CommInfo< GG, DataHandleImp, DataTypeImp > Type
     The type of the GridGlueCommInfo.
     
    typedef DataTypeImp IndexedType
    \n \n \n \n \n \n@@ -393,15 +393,15 @@\n \n

    \n Public Types

    using GridGlue = ::Dune::GridGlue::GridGlue< P0, P1 >
     
    using IntersectionData = Dune::GridGlue::IntersectionData< P0, P1 >
     
    \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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00986.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00986.html", "unified_diff": "@@ -78,15 +78,15 @@\n Public Member Functions |\n Related Symbols |\n List of all members \n
    Dune::GridGlue::Reverse< reverse > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid-glue/adapter/rangegenerators.hh>

    \n+

    #include <dune/grid-glue/adapter/rangegenerators.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::Reverse< reverse >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -182,15 +182,15 @@\n \n
    \n

    Static tag representing reversal of in- and outside of intersections.

    \n \n
    \n
    \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00990.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00990.html", "unified_diff": "@@ -76,15 +76,15 @@\n \n
    Dune::GridGlue::AreaWriterImplementation::FacetLayout< dimgrid > Struct Template Reference
    \n \n
    \n \n-

    #include <dune/grid-glue/common/areawriter_impl.hh>

    \n+

    #include <dune/grid-glue/common/areawriter_impl.hh>

    \n \n \n \n \n

    \n Public Member Functions

    bool contains (Dune::GeometryType gt) const
     
    \n

    Member Function Documentation

    \n@@ -113,15 +113,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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00994.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00994.html", "unified_diff": "@@ -82,15 +82,15 @@\n
    Dune::GridGlue::Projection< Coordinate > Class Template Reference
    \n \n
    \n \n

    Projection of a line (triangle) on another line (triangle). \n More...

    \n \n-

    #include <dune/grid-glue/common/projection.hh>

    \n+

    #include <dune/grid-glue/common/projection.hh>

    \n \n \n \n \n \n

    \n Classes

    struct  EdgeIntersection
     Intersection between two edges of a triangle. More...
     
    \n@@ -492,16 +492,16 @@\n \n

    maximum number of edge-edge intersections

    \n

    See also \\seealso edgeIntersections()

    \n \n \n \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00998.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00998.html", "unified_diff": "@@ -79,15 +79,15 @@\n
    Dune::GridGlue::Projection< Coordinate >::EdgeIntersection Struct Reference
    \n \n
    \n \n

    Intersection between two edges of a triangle. \n More...

    \n \n-

    #include <dune/grid-glue/common/projection.hh>

    \n+

    #include <dune/grid-glue/common/projection.hh>

    \n
    \n \n \n \n \n \n@@ -133,15 +133,15 @@\n \n

    Local coordinates of intersection and distance along normals.

    \n

    Local coordinate of intersection point in barycentric coordinates with respect to image and preimage triangle.

    \n \n \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01030.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01030.html", "unified_diff": "@@ -80,15 +80,15 @@\n Protected Types |\n Protected Attributes |\n List of all members\n
    Dune::GridGlue::Codim0Extractor< GV > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid-glue/extractors/codim0extractor.hh>

    \n+

    #include <dune/grid-glue/extractors/codim0extractor.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::Codim0Extractor< GV >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1403,15 +1403,15 @@\n \n

    a map enabling faster access to vertices and coordinates

    \n

    Maps a vertex' index (from index set) to an object holding the locally associated index of the vertex' coordinate in coords_ and an entity pointer to the codim<dim> 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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01034.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01034.html", "unified_diff": "@@ -80,15 +80,15 @@\n Protected Types |\n Protected Attributes |\n List of all members\n
    Dune::GridGlue::Codim1Extractor< GV > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid-glue/extractors/codim1extractor.hh>

    \n+

    #include <dune/grid-glue/extractors/codim1extractor.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::Codim1Extractor< GV >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1336,15 +1336,15 @@\n \n

    a map enabling faster access to vertices and coordinates

    \n

    Maps a vertex' index (from index set) to an object holding the locally associated index of the vertex' coordinate in coords_ and an entity pointer to the codim<dim> 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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01038.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01038.html", "unified_diff": "@@ -84,15 +84,15 @@\n
    Dune::GridGlue::Extractor< GV, cd > Class Template Reference
    \n \n
    \n \n

    Provides codimension-independent methods for grid extraction. \n More...

    \n \n-

    #include <dune/grid-glue/extractors/extractor.hh>

    \n+

    #include <dune/grid-glue/extractors/extractor.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::Extractor< GV, cd >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1230,15 +1230,15 @@\n \n

    a map enabling faster access to vertices and coordinates

    \n

    Maps a vertex' index (from index set) to an object holding the locally associated index of the vertex' coordinate in coords_ and an entity pointer to the codim<dim> 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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01042.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01042.html", "unified_diff": "@@ -79,15 +79,15 @@\n
    Dune::GridGlue::Extractor< GV, cd >::CornerInfo Struct Reference
    \n \n
    \n \n

    Helpful struct holding one index for the coordinate (vertex) to which it is associated and the element's corner index;. \n More...

    \n \n-

    #include <dune/grid-glue/extractors/extractor.hh>

    \n+

    #include <dune/grid-glue/extractors/extractor.hh>

    \n

    \n Public Attributes

    std::array< unsigned, 2 > edge
     Edge numbers in image and preimage triangle.
     
    std::array< Coordinate, 2 > local
    \n \n \n \n \n \n@@ -131,15 +131,15 @@\n
    \n \n

    element corner

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01046.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01046.html", "unified_diff": "@@ -77,15 +77,15 @@\n Public Member Functions |\n Public Attributes |\n List of all members\n
    Dune::GridGlue::Extractor< GV, cd >::CoordinateInfo Struct Reference
    \n \n

    \n Public Attributes

    unsigned int idx: 28
     index of the vertex
     
    unsigned int num: 4
    \n \n \n \n \n \n@@ -220,15 +220,15 @@\n
    \n \n

    the index of the parent element (from index set)

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01050.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01050.html", "unified_diff": "@@ -80,15 +80,15 @@\n
    Dune::GridGlue::Extractor< GV, cd >::VertexInfo Struct Reference
    \n \n
    \n \n

    simple struct holding a vertex pointer and an index \n More...

    \n \n-

    #include <dune/grid-glue/extractors/extractor.hh>

    \n+

    #include <dune/grid-glue/extractors/extractor.hh>

    \n

    \n Public Member Functions

     CoordinateInfo ()
     
     CoordinateInfo (unsigned int index_, IndexType vtxindex_)
     
    \n \n \n \n

    \n Public Member Functions

     VertexInfo (unsigned int idx_, const Vertex &p_)
     
    \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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01054.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01054.html", "unified_diff": "@@ -80,15 +80,15 @@\n
    Dune::GridGlue::Extractor< GV, cd >::ElementInfo Struct Reference
    \n \n
    \n \n

    simple struct holding an element seed and an index \n More...

    \n \n-

    #include <dune/grid-glue/extractors/extractor.hh>

    \n+

    #include <dune/grid-glue/extractors/extractor.hh>

    \n \n \n \n \n

    \n Public Member Functions

     ElementInfo (unsigned int idx_, const Element &p_, unsigned int f_)
     
    \n \n

    \n@@ -203,15 +203,15 @@\n
    \n \n

    the entity seed for the element

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01058.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01058.html", "unified_diff": "@@ -80,15 +80,15 @@\n
    Dune::GridGlue::Extractor< GV, cd >::SubEntityInfo Struct Reference
    \n \n
    \n \n

    Holds some information about an element's subentity involved in a coupling. \n More...

    \n \n-

    #include <dune/grid-glue/extractors/extractor.hh>

    \n+

    #include <dune/grid-glue/extractors/extractor.hh>

    \n \n \n \n \n \n \n@@ -284,15 +284,15 @@\n
    \n \n

    the index of the parent element (from index set)

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01066.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01066.html", "unified_diff": "@@ -78,15 +78,15 @@\n Static Public Member Functions |\n Static Public Attributes |\n List of all members\n
    Dune::GridGlue::ComputationMethod< dimWorld, dim1, dim2, T > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid-glue/merging/computeintersection.hh>

    \n+

    #include <dune/grid-glue/merging/computeintersection.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::ComputationMethod< dimWorld, dim1, dim2, T >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -391,15 +391,15 @@\n \n

    \n Public Member Functions

     SubEntityInfo ()
     
     SubEntityInfo (IndexType parent_, unsigned int num_in_parent_, const Dune::GeometryType &geometryType)
     
    \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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01070.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01070.html", "unified_diff": "@@ -79,15 +79,15 @@\n
    Dune::GridGlue::IntersectionComputation< CM > Class Template Reference
    \n \n
    \n \n

    Intersection computation method for two elements of arbitrary dimension. \n More...

    \n \n-

    #include <dune/grid-glue/merging/computeintersection.hh>

    \n+

    #include <dune/grid-glue/merging/computeintersection.hh>

    \n \n \n \n \n \n \n@@ -248,16 +248,16 @@\n

    \n Static Public Member Functions

    static bool computeIntersection (const std::vector< V > &X, const std::vector< V > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< V > &P)
     Compute the intersection of two elements X and Y Compute the intersection of two elements X and Y, where X is of dimension dim1 and Y is of dimension dim2 and return a vector P containing the corner points of the intersection polyhedron.
     
    template<int isDim, int dW>
    \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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01074.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01074.html", "unified_diff": "@@ -85,15 +85,15 @@\n
    Dune::GridGlue::ConformingMerge< dim, dimworld, T > Class Template Referenceabstract
    \n \n
    \n \n

    Implementation of the Merger concept for conforming interfaces. \n More...

    \n \n-

    #include <dune/grid-glue/merging/conformingmerge.hh>

    \n+

    #include <dune/grid-glue/merging/conformingmerge.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::ConformingMerge< dim, dimworld, T >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1147,15 +1147,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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01078.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01078.html", "unified_diff": "@@ -84,15 +84,15 @@\n
    Dune::GridGlue::ContactMerge< dimworld, T > Class Template Referenceabstract
    \n \n
    \n \n

    Merge two codimension-1 surfaces that may be a positive distance apart. \n More...

    \n \n-

    #include <dune/grid-glue/merging/contactmerge.hh>

    \n+

    #include <dune/grid-glue/merging/contactmerge.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::ContactMerge< dimworld, T >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1636,16 +1636,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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01082.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01082.html", "unified_diff": "@@ -77,15 +77,15 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::GridGlue::IntersectionListProvider< L0, L1 > Class Template Referenceabstract
    \n \n
    \n \n-

    #include <dune/grid-glue/merging/intersectionlist.hh>

    \n+

    #include <dune/grid-glue/merging/intersectionlist.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::IntersectionListProvider< L0, L1 >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -490,15 +490,15 @@\n

    number of intersections in the merged grid

    \n \n

    Implemented in Dune::GridGlue::SimplicialIntersectionListProvider< dim0, dim1 >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01098.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01098.html", "unified_diff": "@@ -77,15 +77,15 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::GridGlue::IntersectionList< Local0, Local1 > Class Template Reference
    \n \n
    \n \n-

    #include <dune/grid-glue/merging/intersectionlist.hh>

    \n+

    #include <dune/grid-glue/merging/intersectionlist.hh>

    \n \n \n \n \n \n \n@@ -361,15 +361,15 @@\n

    \n Public Types

    using Provider = IntersectionListProvider< Local0, Local1 >
     
    using Index = typename Provider::Index
     
    \n
    \n

    number of intersections in the merged 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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01102.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01102.html", "unified_diff": "@@ -78,15 +78,15 @@\n Public Types |\n Public Member Functions |\n List of all members \n
    Dune::GridGlue::SimplicialIntersectionListProvider< dim0, dim1 > Class Template Referencefinal
    \n \n
    \n \n-

    #include <dune/grid-glue/merging/intersectionlist.hh>

    \n+

    #include <dune/grid-glue/merging/intersectionlist.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::SimplicialIntersectionListProvider< dim0, dim1 >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -633,15 +633,15 @@\n

    number of intersections in the merged grid

    \n \n

    Implements Dune::GridGlue::IntersectionListProvider< FieldVector< double, dim0 >, FieldVector< double, dim1 > >.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01106.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01106.html", "unified_diff": "@@ -78,15 +78,15 @@\n Public Member Functions |\n Public Attributes |\n List of all members \n
    Dune::GridGlue::SimplicialIntersectionListProvider< dim0, dim1 >::SimplicialIntersection Struct Reference
    \n \n
    \n \n-

    #include <dune/grid-glue/merging/intersectionlist.hh>

    \n+

    #include <dune/grid-glue/merging/intersectionlist.hh>

    \n \n \n \n \n \n

    \n Public Types

    template<int I>
    using Corners = std::array< Local< I >, nVertices >
     
    \n@@ -263,15 +263,15 @@\n
    \n
    \n

    list of parent entities for embeddings into the second grid

    \n \n
    \n \n
    The documentation for this struct was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01110.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01110.html", "unified_diff": "@@ -81,15 +81,15 @@\n
    Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld > Class Template Referenceabstract
    \n \n
    \n \n

    Abstract base for all classes that take extracted grids and build sets of intersections. \n More...

    \n \n-

    #include <dune/grid-glue/merging/merger.hh>

    \n+

    #include <dune/grid-glue/merging/merger.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -576,15 +576,15 @@\n \n

    Counts the number of times the computeIntersection method has been called.

    \n

    Used temporarily to speed up the implementation

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01114.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01114.html", "unified_diff": "@@ -84,15 +84,15 @@\n
    Dune::GridGlue::OverlappingMerge< dim1, dim2, dimworld, T > Class Template Referenceabstract
    \n \n
    \n \n

    Computing overlapping grid intersections for grids of different dimensions. \n More...

    \n \n-

    #include <dune/grid-glue/merging/overlappingmerge.hh>

    \n+

    #include <dune/grid-glue/merging/overlappingmerge.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::OverlappingMerge< dim1, dim2, dimworld, T >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1220,16 +1220,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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01162.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01162.html", "unified_diff": "@@ -84,15 +84,15 @@\n
    Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld > Class Template Referenceabstract
    \n \n
    \n \n

    Common base class for many merger implementations: produce pairs of entities that may intersect. \n More...

    \n \n-

    #include <dune/grid-glue/merging/standardmerge.hh>

    \n+

    #include <dune/grid-glue/merging/standardmerge.hh>

    \n
    \n Inheritance diagram for Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1138,15 +1138,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.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000000_000001.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000000_000001.html", "unified_diff": "@@ -69,14 +69,14 @@\n \n \n \n
    \n-

    adapter → common Relation

    File in dune/grid-glue/adapterIncludes file in dune/grid-glue/common
    gridglue.ccringcomm.hh
    \n+

    adapter → common Relation

    File in dune/grid-glue/adapterIncludes file in dune/grid-glue/common
    gridglue.ccringcomm.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000003_000001.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000003_000001.html", "unified_diff": "@@ -69,14 +69,14 @@\n \n \n \n
    \n-

    extractors → common Relation

    File in dune/grid-glue/extractorsIncludes file in dune/grid-glue/common
    codim1extractor.hhcrossproduct.hh
    \n+

    extractors → common Relation

    File in dune/grid-glue/extractorsIncludes file in dune/grid-glue/common
    codim1extractor.hhcrossproduct.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000004_000000.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000004_000000.html", "unified_diff": "@@ -69,14 +69,14 @@\n \n
    \n \n
    \n \n \n+

    grid-glue → adapter Relation

    File in dune/grid-glueIncludes file in dune/grid-glue/adapter
    gridglue.hhgridglue.cc
    gridglue.hhgridgluecommunicate.hh
    gridglue.hhintersection.hh
    gridglue.hhintersectionindexset.hh
    gridglue.hhintersectioniterator.hh
    gridglue.hhrangegenerators.hh
    extractors / vtksurfacewriter.hhgridgluevtkwriter.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000004_000005.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000004_000005.html", "unified_diff": "@@ -69,14 +69,14 @@\n \n
    \n \n
    \n \n
    \n-

    grid-glue → merging Relation

    File in dune/grid-glueIncludes file in dune/grid-glue/merging
    gridglue.hhmerger.hh
    \n+

    grid-glue → merging Relation

    File in dune/grid-glueIncludes file in dune/grid-glue/merging
    gridglue.hhmerger.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000005_000001.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000005_000001.html", "unified_diff": "@@ -69,14 +69,14 @@\n \n \n \n
    \n-

    merging → common Relation

    File in dune/grid-glue/mergingIncludes file in dune/grid-glue/common
    contactmerge.cccrossproduct.hh
    contactmerge.ccprojection.hh
    \n+

    merging → common Relation

    File in dune/grid-glue/mergingIncludes file in dune/grid-glue/common
    contactmerge.cccrossproduct.hh
    contactmerge.ccprojection.hh
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_0d8f660a135565b225f6b14e80c278b4.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_0d8f660a135565b225f6b14e80c278b4.html", "unified_diff": "@@ -87,40 +87,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

     computeintersection.cc
     computeintersection.cc
     
     computeintersection.hh
     computeintersection.hh
     
     conformingmerge.hh
     Implementation of the Merger concept for conforming interfaces.
     conformingmerge.hh
     Implementation of the Merger concept for conforming interfaces.
     
     contactmerge.cc
     contactmerge.cc
     
     contactmerge.hh
     Merge two grid boundary surfaces that may be a positive distance apart.
     contactmerge.hh
     Merge two grid boundary surfaces that may be a positive distance apart.
     
     intersectionlist.hh
     intersectionlist.hh
     
     merger.hh
     merger.hh
     
     overlappingmerge.cc
     overlappingmerge.cc
     
     overlappingmerge.hh
     overlappingmerge.hh
     
     simplexintersection.cc
     
     standardmerge.cc
     standardmerge.cc
     
     standardmerge.hh
     Common base class for many merger implementations: produce pairs of entities that may intersect.
     standardmerge.hh
     Common base class for many merger implementations: produce pairs of entities that may intersect.
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_1b444a177590012656060e8a0bca20fc.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_1b444a177590012656060e8a0bca20fc.html", "unified_diff": "@@ -87,36 +87,36 @@\n \"\"\n \"\"\n \n \n \n \n-\n+\n \n \n \n-\n-\n+\n+\n \n-\n-\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

     gridglue.cc
     gridglue.cc
     
     gridglue.hh
     
     gridglueamirawriter.hh
     Write all remote intersections to a AmiraMesh file.
     gridglueamirawriter.hh
     Write all remote intersections to a AmiraMesh file.
     
     gridgluecommunicate.hh
     Describes the parallel communication interface class for Dune::GridGlue.
     gridgluecommunicate.hh
     Describes the parallel communication interface class for Dune::GridGlue.
     
     gridgluevtkwriter.hh
     Write all remote intersections to a vtk file for debugging.
     
     intersection.hh
     Model of the Intersection concept provided by GridGlue.
     intersection.hh
     Model of the Intersection concept provided by GridGlue.
     
     intersectionindexset.hh
     intersectionindexset.hh
     
     intersectioniterator.hh
     Implement iterators over GridGlue intersections.
     intersectioniterator.hh
     Implement iterators over GridGlue intersections.
     
     rangegenerators.hh
     rangegenerators.hh
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_65f347cff0208f20f00d27c542208238.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_65f347cff0208f20f00d27c542208238.html", "unified_diff": "@@ -84,29 +84,29 @@\n \"\"\n \"\"\n \n \n \n \n-\n+\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

     areawriter.hh
     areawriter.hh
     
     areawriter_impl.hh
     areawriter_impl.hh
     
     crossproduct.hh
     crossproduct.hh
     
     projection.hh
     projection.hh
     
     projection_impl.hh
     projection_impl.hh
     
     projectionwriter.hh
     projectionwriter.hh
     
     projectionwriter_impl.hh
     projectionwriter_impl.hh
     
     ringcomm.hh
     ringcomm.hh
     
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_eaad0bdad6fc03850e65b1fdad9faad4.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_eaad0bdad6fc03850e65b1fdad9faad4.html", "unified_diff": "@@ -90,22 +90,22 @@\n \"\"\n \"\"\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

     codim0extractor.hh
     Mesh grid extractor base class.
     codim0extractor.hh
     Mesh grid extractor base class.
     
     codim1extractor.hh
     Grid extractor class for codim 1 subgrids.
     codim1extractor.hh
     Grid extractor class for codim 1 subgrids.
     
     extractor.hh
     extractor base class
     extractor.hh
     extractor base class
     
     vtksurfacewriter.hh
     helper class for graphical output of grids in generic representation
     
    \n \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dune-grid-glue.tag.gz", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dune-grid-glue.tag.gz", "unified_diff": null, "details": [{"source1": "dune-grid-glue.tag", "source2": "dune-grid-glue.tag", "unified_diff": null, "details": [{"source1": "dune-grid-glue.tag", "source2": "dune-grid-glue.tag", "unified_diff": "@@ -1,31 +1,31 @@\n \n \n \n gridglue.cc\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/adapter/\n- a00008.html\n- intersection.hh\n+ a00020.html\n+ intersection.hh\n ../gridglue.hh\n- ../common/ringcomm.hh\n+ ../common/ringcomm.hh\n Dune\n Dune::GridGlue\n \n \n gridglueamirawriter.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/adapter/\n- a00011.html\n+ a00023.html\n Dune::GridGlue::GridGlueAmiraWriter\n Dune\n Dune::GridGlue\n \n \n gridgluecommunicate.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/adapter/\n- a00023.html\n+ a00014.html\n Dune::GridGlue::GlobalId\n Dune::GridGlue::CommDataHandle\n Dune::GridGlue::StreamingMessageBuffer\n Dune::GridGlue::CommunicationOperator\n Dune::GridGlue::CommInfo\n Dune::CommPolicy< ::Dune::GridGlue::CommInfo< GG, DataHandleImp, DataTypeImp > >\n Dune\n@@ -39,152 +39,152 @@\n Dune::GridGlue::GridGlueVtkWriter\n Dune\n Dune::GridGlue\n \n \n intersection.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/adapter/\n- a00017.html\n+ a00026.html\n dune/grid-glue/gridglue.hh\n Dune::GridGlue::IntersectionData\n Dune::GridGlue::IntersectionTraits\n Dune::GridGlue::Intersection\n Dune\n Dune::GridGlue\n \n #define\n ONLY_SIMPLEX_INTERSECTIONS\n- a00017.html\n+ a00026.html\n aac752eae6e9ad7d1e576f1fe3f7c8a6b\n \n \n \n \n intersectionindexset.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/adapter/\n- a00020.html\n+ a00011.html\n dune/grid-glue/gridglue.hh\n- dune/grid-glue/adapter/intersection.hh\n+ dune/grid-glue/adapter/intersection.hh\n Dune::GridGlue::IntersectionIndexSet\n Dune\n Dune::GridGlue\n \n \n intersectioniterator.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/adapter/\n- a00026.html\n+ a00017.html\n dune/grid-glue/gridglue.hh\n Dune::GridGlue::IntersectionIterator\n Dune\n Dune::GridGlue\n \n \n rangegenerators.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/adapter/\n- a00014.html\n+ a00008.html\n Dune::GridGlue::Reverse\n Dune\n Dune::GridGlue\n \n \n areawriter.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/common/\n- a00038.html\n- areawriter_impl.hh\n+ a00035.html\n+ areawriter_impl.hh\n Dune\n Dune::GridGlue\n \n \n areawriter_impl.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/common/\n- a00050.html\n+ a00038.html\n Dune::GridGlue::AreaWriterImplementation::FacetLayout\n Dune\n Dune::GridGlue\n Dune::GridGlue::AreaWriterImplementation\n \n \n crossproduct.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/common/\n- a00032.html\n+ a00047.html\n Dune\n Dune::GridGlue\n \n \n projection.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/common/\n- a00047.html\n- projection_impl.hh\n+ a00050.html\n+ projection_impl.hh\n Dune::GridGlue::Projection\n Dune::GridGlue::Projection::EdgeIntersection\n Dune\n Dune::GridGlue\n \n \n projection_impl.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/common/\n- a00041.html\n+ a00029.html\n Dune\n Dune::GridGlue\n Dune::GridGlue::ProjectionImplementation\n \n \n projectionwriter.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/common/\n- a00029.html\n- dune/grid-glue/common/projection.hh\n- projectionwriter_impl.hh\n+ a00044.html\n+ dune/grid-glue/common/projection.hh\n+ projectionwriter_impl.hh\n Dune\n Dune::GridGlue\n \n \n projectionwriter_impl.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/common/\n- a00035.html\n+ a00041.html\n Dune\n Dune::GridGlue\n Dune::GridGlue::ProjectionWriterImplementation\n \n \n ringcomm.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/common/\n- a00044.html\n+ a00032.html\n Dune\n Dune::Parallel\n \n #define\n CheckMPIStatus\n- a00044.html\n+ a00032.html\n a1a95f4074572a7a9e13bcb072afef070\n (A, B)\n \n \n \n codim0extractor.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/extractors/\n- a00059.html\n- extractor.hh\n+ a00062.html\n+ extractor.hh\n Dune::GridGlue::Codim0Extractor\n Dune\n Dune::GridGlue\n \n \n codim1extractor.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/extractors/\n- a00056.html\n- extractor.hh\n- dune/grid-glue/common/crossproduct.hh\n+ a00059.html\n+ extractor.hh\n+ dune/grid-glue/common/crossproduct.hh\n Dune::GridGlue::Codim1Extractor\n Dune\n Dune::GridGlue\n \n \n extractor.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/extractors/\n- a00062.html\n+ a00056.html\n Dune::GridGlue::Extractor\n Dune::GridGlue::Extractor::CornerInfo\n Dune::GridGlue::Extractor::CoordinateInfo\n Dune::GridGlue::Extractor::VertexInfo\n Dune::GridGlue::Extractor::ElementInfo\n Dune::GridGlue::Extractor::SubEntityInfo\n Dune\n@@ -205,113 +205,113 @@\n a01963.html\n dune/grid-glue/gridglue.hh\n \n \n gridglue.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/\n a00002.html\n- adapter/gridgluecommunicate.hh\n- dune/grid-glue/merging/merger.hh\n- adapter/rangegenerators.hh\n- adapter/gridglue.cc\n- adapter/intersection.hh\n- adapter/intersectioniterator.hh\n- adapter/intersectionindexset.hh\n+ adapter/gridgluecommunicate.hh\n+ dune/grid-glue/merging/merger.hh\n+ adapter/rangegenerators.hh\n+ adapter/gridglue.cc\n+ adapter/intersection.hh\n+ adapter/intersectioniterator.hh\n+ adapter/intersectionindexset.hh\n Dune::GridGlue::GridGlue\n Dune\n Dune::GridGlue\n \n \n computeintersection.cc\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n- a00080.html\n+ a00086.html\n Dune\n Dune::GridGlue\n \n \n computeintersection.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n- a00065.html\n+ a00098.html\n simplexintersection.cc\n- computeintersection.cc\n+ computeintersection.cc\n Dune::GridGlue::ComputationMethod\n Dune::GridGlue::IntersectionComputation\n Dune\n Dune::GridGlue\n \n \n conformingmerge.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n- a00074.html\n- dune/grid-glue/merging/standardmerge.hh\n+ a00092.html\n+ dune/grid-glue/merging/standardmerge.hh\n Dune::GridGlue::ConformingMerge\n Dune\n Dune::GridGlue\n \n \n contactmerge.cc\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n- a00068.html\n- dune/grid-glue/common/crossproduct.hh\n- dune/grid-glue/common/projection.hh\n+ a00083.html\n+ dune/grid-glue/common/crossproduct.hh\n+ dune/grid-glue/common/projection.hh\n Dune\n Dune::GridGlue\n \n \n contactmerge.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n- a00086.html\n- dune/grid-glue/merging/standardmerge.hh\n+ a00080.html\n+ dune/grid-glue/merging/standardmerge.hh\n dune/grid-glue/gridglue.hh\n- contactmerge.cc\n+ contactmerge.cc\n Dune::GridGlue::ContactMerge\n Dune\n Dune::GridGlue\n \n \n intersectionlist.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n- a00077.html\n+ a00068.html\n Dune::GridGlue::IntersectionListProvider\n Dune::GridGlue::IntersectionList\n Dune::GridGlue::SimplicialIntersectionListProvider\n Dune::GridGlue::SimplicialIntersectionListProvider::SimplicialIntersection\n Dune\n Dune::GridGlue\n \n \n merger.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n- a00098.html\n- dune/grid-glue/merging/intersectionlist.hh\n+ a00074.html\n+ dune/grid-glue/merging/intersectionlist.hh\n Dune::GridGlue::Merger\n Dune\n Dune::GridGlue\n \n \n overlappingmerge.cc\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n- a00071.html\n+ a00089.html\n Dune\n Dune::GridGlue\n \n #define\n DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n- a00071.html\n+ a00089.html\n ad63267c6d27a8f09d98506419b206db8\n \n \n \n \n overlappingmerge.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n- a00092.html\n- dune/grid-glue/merging/standardmerge.hh\n- dune/grid-glue/merging/computeintersection.hh\n- overlappingmerge.cc\n+ a00065.html\n+ dune/grid-glue/merging/standardmerge.hh\n+ dune/grid-glue/merging/computeintersection.hh\n+ overlappingmerge.cc\n Dune::GridGlue::OverlappingMerge\n Dune\n Dune::GridGlue\n \n \n simplexintersection.cc\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n@@ -329,54 +329,54 @@\n Dune::GridGlue::SimplexMethod< dimWorld, 3, 3, T >\n Dune\n Dune::GridGlue\n \n \n standardmerge.cc\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n- a00083.html\n- standardmerge.hh\n+ a00071.html\n+ standardmerge.hh\n Dune\n Dune::GridGlue\n \n #define\n DECL\n- a00083.html\n+ a00071.html\n ad5c7ca0181fea7823b37d06d5f61e9cd\n \n \n \n #define\n STANDARD_MERGE_INSTANTIATE\n- a00083.html\n+ a00071.html\n a4a2b0f7fb92723749fc6d5cca82a4297\n (T, A, B, C)\n \n \n \n standardmerge.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n- a00089.html\n- dune/grid-glue/merging/intersectionlist.hh\n- dune/grid-glue/merging/merger.hh\n- dune/grid-glue/merging/computeintersection.hh\n+ a00077.html\n+ dune/grid-glue/merging/intersectionlist.hh\n+ dune/grid-glue/merging/merger.hh\n+ dune/grid-glue/merging/computeintersection.hh\n Dune::GridGlue::StandardMerge\n Dune\n Dune::GridGlue\n \n #define\n DECL\n- a00089.html\n+ a00077.html\n ad5c7ca0181fea7823b37d06d5f61e9cd\n \n \n \n #define\n STANDARD_MERGE_INSTANTIATE\n- a00089.html\n+ a00077.html\n a4a2b0f7fb92723749fc6d5cca82a4297\n (T, A, B, C)\n \n \n \n Dune::GridGlue::Codim0Extractor\n a01030.html\n"}]}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/files.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/files.html", "unified_diff": "@@ -73,50 +73,50 @@\n \n
    \n
    Here is a list of all files with brief descriptions:
    \n
    [detail level 1234]
    \n \n \n \n-\n+\n \n-\n-\n+\n+\n \n-\n-\n-\n-\n+\n+\n+\n+\n \n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n \n-\n-\n-\n+\n+\n+\n \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n-\n-\n+\n+\n \n
      dune
      grid-glue
      adapter
     gridglue.cc
     gridglue.cc
     gridglue.hh
     gridglueamirawriter.hhWrite all remote intersections to a AmiraMesh file
     gridgluecommunicate.hhDescribes the parallel communication interface class for Dune::GridGlue
     gridglueamirawriter.hhWrite all remote intersections to a AmiraMesh file
     gridgluecommunicate.hhDescribes the parallel communication interface class for Dune::GridGlue
     gridgluevtkwriter.hhWrite all remote intersections to a vtk file for debugging
     intersection.hhModel of the Intersection concept provided by GridGlue
     intersectionindexset.hh
     intersectioniterator.hhImplement iterators over GridGlue intersections
     rangegenerators.hh
     intersection.hhModel of the Intersection concept provided by GridGlue
     intersectionindexset.hh
     intersectioniterator.hhImplement iterators over GridGlue intersections
     rangegenerators.hh
      common
     areawriter.hh
     areawriter_impl.hh
     crossproduct.hh
     projection.hh
     projection_impl.hh
     projectionwriter.hh
     projectionwriter_impl.hh
     ringcomm.hh
     areawriter.hh
     areawriter_impl.hh
     crossproduct.hh
     projection.hh
     projection_impl.hh
     projectionwriter.hh
     projectionwriter_impl.hh
     ringcomm.hh
      extractors
     codim0extractor.hhMesh grid extractor base class
     codim1extractor.hhGrid extractor class for codim 1 subgrids
     extractor.hhExtractor base class
     codim0extractor.hhMesh grid extractor base class
     codim1extractor.hhGrid extractor class for codim 1 subgrids
     extractor.hhExtractor base class
     vtksurfacewriter.hhHelper class for graphical output of grids in generic representation
      merging
     computeintersection.cc
     computeintersection.hh
     conformingmerge.hhImplementation of the Merger concept for conforming interfaces
     contactmerge.cc
     contactmerge.hhMerge two grid boundary surfaces that may be a positive distance apart
     intersectionlist.hh
     merger.hh
     overlappingmerge.cc
     overlappingmerge.hh
     computeintersection.cc
     computeintersection.hh
     conformingmerge.hhImplementation of the Merger concept for conforming interfaces
     contactmerge.cc
     contactmerge.hhMerge two grid boundary surfaces that may be a positive distance apart
     intersectionlist.hh
     merger.hh
     overlappingmerge.cc
     overlappingmerge.hh
     simplexintersection.cc
     standardmerge.cc
     standardmerge.hhCommon base class for many merger implementations: produce pairs of entities that may intersect
     standardmerge.cc
     standardmerge.hhCommon base class for many merger implementations: produce pairs of entities that may intersect
     gridglue.hhCentral component of the module implementing the coupling of two grids
    \n
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/globals.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/globals.html", "unified_diff": "@@ -66,19 +66,19 @@\n \n \n \n \n \n
    \n
    Here is a list of all file members with links to the files they belong to:
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/globals_defs.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/globals_defs.html", "unified_diff": "@@ -66,19 +66,19 @@\n \n \n \n \n \n
    \n
    Here is a list of all macros with links to the files they belong to:
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00071_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00083_source.html", "comments": ["Files 23% similar despite different names"], "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: overlappingmerge.cc Source File\n+dune-grid-glue: contactmerge.cc Source File\n \n \n \n \n \n \n \n@@ -74,215 +74,389 @@\n \n \n \n
    \n-
    overlappingmerge.cc
    \n+
    contactmerge.cc
    \n
    \n
    \n-Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n
    5
    \n-
    6#ifndef DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n-
    7#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n-
    8//#include <algorithm>
    \n-
    9
    \n-
    10namespace Dune {
    \n-
    11namespace GridGlue {
    \n-
    12
    \n-
    13template<int dim1, int dim2, int dimworld, typename T>
    \n-
    14bool OverlappingMerge<dim1,dim2,dimworld, T>::inPlane(std::vector<FieldVector<T,dimworld> >& points) {
    \n-
    15
    \n-
    16 T eps = 1e-8;
    \n-
    17
    \n-
    18 assert(dim1 == 3 && dim2 == 3 && dimworld == 3);
    \n-
    19 assert(points.size() == 4);
    \n-
    20
    \n-
    21 FieldVector<T,dimworld> v1 = points[1]-points[0];
    \n-
    22 FieldVector<T,dimworld> v2 = points[2]-points[0];
    \n-
    23 FieldVector<T,dimworld> v3 = points[3]-points[0];
    \n+\n+\n+
    8
    \n+
    9namespace Dune {
    \n+
    10namespace GridGlue {
    \n+
    11
    \n+
    12template<int dimworld, typename T>
    \n+
    13void ContactMerge<dimworld, T>::computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n+
    14 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n+
    15 std::bitset<(1<<dim)>& neighborIntersects1,
    \n+
    16 unsigned int grid1Index,
    \n+
    17 const Dune::GeometryType& grid2ElementType,
    \n+
    18 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n+
    19 std::bitset<(1<<dim)>& neighborIntersects2,
    \n+
    20 unsigned int grid2Index,
    \n+
    21 std::vector<SimplicialIntersection>& intersections)
    \n+
    22{
    \n+
    23 using std::get;
    \n
    24
    \n-
    25 FieldVector<T,dimworld> v1xv2;
    \n-
    26 v1xv2[0] = v1[1]*v2[2] - v1[2]*v2[1];
    \n-
    27 v1xv2[1] = v1[2]*v2[0] - v1[0]*v2[2];
    \n-
    28 v1xv2[2] = v1[0]*v2[1] - v1[1]*v2[0];
    \n-
    29
    \n-
    30 return (std::abs(v3.dot(v1xv2)) < eps);
    \n-
    31}
    \n-
    32
    \n-
    33template<int dim1, int dim2, int dimworld, typename T>
    \n-
    \n-
    34void OverlappingMerge<dim1,dim2,dimworld, T>::computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n-
    35 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n-
    36 std::bitset<(1<<dim1)>& neighborIntersects1,
    \n-
    37 unsigned int grid1Index,
    \n-
    38 const Dune::GeometryType& grid2ElementType,
    \n-
    39 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n-
    40 std::bitset<(1<<dim2)>& neighborIntersects2,
    \n-
    41 unsigned int grid2Index,
    \n-
    42 std::vector<SimplicialIntersection>& intersections)
    \n-
    43{
    \n-
    44 using std::min;
    \n-
    45
    \n-
    46 this->counter++;
    \n-
    47 intersections.clear();
    \n+
    25 std::vector<std::array<LocalCoords,2> > polytopeCorners;
    \n+
    26
    \n+
    27 // Initialize
    \n+
    28 neighborIntersects1.reset();
    \n+
    29 neighborIntersects2.reset();
    \n+
    30
    \n+
    31 const int nCorners1 = grid1ElementCorners.size();
    \n+
    32 const int nCorners2 = grid2ElementCorners.size();
    \n+
    33
    \n+
    34 if (nCorners1 != dimworld)
    \n+
    35 DUNE_THROW(Dune::Exception, "element1 must have " << dimworld << " corners, but has " << nCorners1);
    \n+
    36 if (nCorners2 != dimworld)
    \n+
    37 DUNE_THROW(Dune::Exception, "element2 must have " << dimworld << " corners, but has " << nCorners2);
    \n+
    38
    \n+
    39 // The grid1 projection directions
    \n+
    40 std::vector<WorldCoords> directions1(nCorners1);
    \n+
    41 for (size_t i=0; i<directions1.size(); i++)
    \n+
    42 directions1[i] = nodalDomainDirections_[this->grid1ElementCorners_[grid1Index][i]];
    \n+
    43
    \n+
    44 // The grid2 projection directions
    \n+
    45 std::vector<WorldCoords> directions2(nCorners2);
    \n+
    46 for (size_t i=0; i<directions2.size(); i++)
    \n+
    47 directions2[i] = nodalTargetDirections_[this->grid2ElementCorners_[grid2Index][i]];
    \n
    48
    \n-\n-
    50
    \n-
    51#ifndef NDEBUG
    \n-
    52 const auto& refElement1 = Dune::ReferenceElements<T,dim1>::general(grid1ElementType);
    \n-
    53 const auto& refElement2 = Dune::ReferenceElements<T,dim2>::general(grid2ElementType);
    \n-
    54
    \n-
    55 // A few consistency checks
    \n-
    56 assert((unsigned int)(refElement1.size(dim1)) == grid1ElementCorners.size());
    \n-
    57 assert((unsigned int)(refElement2.size(dim2)) == grid2ElementCorners.size());
    \n-
    58#endif
    \n-
    59
    \n-
    60 // Make generic geometries representing the grid1- and grid2 element.
    \n-
    61 // this eases computation of local coordinates.
    \n-
    62 typedef MultiLinearGeometry<T,dim1,dimworld> Geometry1;
    \n-
    63 typedef MultiLinearGeometry<T,dim2,dimworld> Geometry2;
    \n+
    49 // The difference between the closest point projection and the normal projection is just the ordering
    \n+
    50 // of the involved surfaces. The closest point projection is done along the outer normal field of grid2
    \n+
    51 // (due to being a best approximation) and the outer normal projection is using the outer normal field
    \n+
    52 // of grid1 instead.
    \n+
    53 std::array<decltype(std::cref(grid1ElementCorners)),2> cornersRef ={std::cref(grid1ElementCorners), std::cref(grid2ElementCorners)};
    \n+
    54 std::array<decltype(std::cref(directions1)),2> directionsRef ={std::cref(directions1), std::cref(directions2)};
    \n+
    55 std::array<Dune::GeometryType,2> elementTypes = {grid1ElementType, grid2ElementType};
    \n+
    56
    \n+
    57 // Determine which is the grid we use for outer normal projection
    \n+
    58 const size_t domGrid = (type_==ProjectionType::OUTER_NORMAL) ? 0 : 1;
    \n+
    59 const size_t tarGrid = (type_==ProjectionType::OUTER_NORMAL) ? 1 : 0;
    \n+
    60
    \n+
    62 // Compute all corners of the intersection polytope
    \n
    64
    \n-
    65 Geometry1 grid1Geometry(grid1ElementType, grid1ElementCorners);
    \n-
    66 Geometry2 grid2Geometry(grid2ElementType, grid2ElementCorners);
    \n-
    67
    \n-
    68 // Dirty workaround for the intersection computation scaling problem (part 1/2)
    \n-
    69 std::vector<Dune::FieldVector<T,dimworld> > scaledGrid1ElementCorners(grid1ElementCorners.size());
    \n-
    70 std::vector<Dune::FieldVector<T,dimworld> > scaledGrid2ElementCorners(grid2ElementCorners.size());
    \n-
    71
    \n-
    72 // the scaling parameter is the length minimum of the lengths of the first edge in the grid1 geometry
    \n-
    73 // and the first edge in the grid2 geometry
    \n-
    74 T scaling = min((grid1ElementCorners[0] - grid1ElementCorners[1]).two_norm(),
    \n-
    75 (grid2ElementCorners[0] - grid2ElementCorners[1]).two_norm());
    \n-
    76
    \n-
    77 // scale the coordinates according to scaling parameter
    \n-
    78 for (unsigned int i = 0; i < grid1ElementCorners.size(); ++i) {
    \n-
    79 scaledGrid1ElementCorners[i] = grid1ElementCorners[i];
    \n-
    80 scaledGrid1ElementCorners[i] *= (1.0/scaling);
    \n-
    81 }
    \n-
    82 for (unsigned int i = 0; i < grid2ElementCorners.size(); ++i) {
    \n-
    83 scaledGrid2ElementCorners[i] = grid2ElementCorners[i];
    \n-
    84 scaledGrid2ElementCorners[i] *= (1.0/scaling);
    \n-
    85 }
    \n-
    86
    \n-
    87 // get size_type for all the vectors we are using
    \n-
    88 typedef typename std::vector<Empty>::size_type size_type;
    \n-
    89
    \n-
    90 const int dimis = dim1 < dim2 ? dim1 : dim2;
    \n-
    91 const size_type n_intersectionnodes = dimis+1;
    \n-
    92 size_type i;
    \n-
    93
    \n-
    94 std::vector<FieldVector<T,dimworld> > scaledP(0), P(0);
    \n-
    95 std::vector<std::vector<int> > H,SX(1<<dim1),SY(1<<dim2);
    \n-
    96 FieldVector<T,dimworld> centroid;
    \n-
    97 // local grid1 coordinates of the intersections
    \n-
    98 std::vector<FieldVector<T,dim1> > g1local(n_intersectionnodes);
    \n-
    99 // local grid2 coordinates of the intersections
    \n-
    100 std::vector<FieldVector<T,dim2> > g2local(n_intersectionnodes);
    \n-
    101
    \n-
    102 // compute the intersection nodes
    \n-
    103 IntersectionComputation<CM>::computeIntersection(scaledGrid1ElementCorners,
    \n-
    104 scaledGrid2ElementCorners,
    \n-
    105 SX,SY,scaledP);
    \n-
    106
    \n-
    107 // Dirty workaround - rescale the result (part 2/2)
    \n-
    108 P.resize(scaledP.size());
    \n-
    109 for (unsigned int i = 0; i < scaledP.size(); ++i) {
    \n-
    110 P[i] = scaledP[i];
    \n-
    111 P[i] *= scaling;
    \n-
    112 }
    \n-
    113
    \n-
    114 for (size_type i = 0; i < neighborIntersects1.size(); ++i) {
    \n-
    115 if (i < SX.size())
    \n-
    116 neighborIntersects1[i] = (SX[i].size() > 0);
    \n-
    117 else
    \n-
    118 neighborIntersects1[i] = false;
    \n-
    119 }
    \n-
    120 for (size_type i = 0; i < neighborIntersects2.size(); ++i) {
    \n-
    121 if (i < SY.size())
    \n-
    122 neighborIntersects2[i] = (SY[i].size() > 0);
    \n-
    123 else
    \n-
    124 neighborIntersects2[i] = false;
    \n-
    125 }
    \n-
    126
    \n-
    127 // P is an simplex of dimension dimis
    \n-
    128 if (P.size() == n_intersectionnodes) {
    \n-
    129
    \n-
    130 for (i = 0; i < n_intersectionnodes; ++i) {
    \n-
    131 g1local[i] = grid1Geometry.local(P[i]);
    \n-
    132 g2local[i] = grid2Geometry.local(P[i]);
    \n-
    133 }
    \n+
    65 const auto corners = std::tie(cornersRef[domGrid].get(),cornersRef[tarGrid].get());
    \n+
    66 const auto normals = std::tie(directionsRef[domGrid].get(), directionsRef[tarGrid].get());
    \n+
    67 Projection<WorldCoords> p(overlap_, maxNormalProduct_);
    \n+
    68 p.project(corners, normals);
    \n+
    69
    \n+
    70 /* projection */
    \n+
    71 {
    \n+
    72 const auto& success = get<0>(p.success());
    \n+
    73 const auto& images = get<0>(p.images());
    \n+
    74 for (unsigned i = 0; i < dimworld; ++i) {
    \n+
    75 if (success[i]) {
    \n+
    76 std::array<LocalCoords, 2> corner;
    \n+
    77 corner[domGrid] = localCornerCoords(i, elementTypes[domGrid]);
    \n+
    78 for (unsigned j = 0; j < dim; ++j)
    \n+
    79 corner[tarGrid][j] = images[i][j];
    \n+
    80 polytopeCorners.push_back(corner);
    \n+
    81 }
    \n+
    82 }
    \n+
    83 }
    \n+
    84
    \n+
    85 /* inverse projection */
    \n+
    86 {
    \n+
    87 const auto& success = get<1>(p.success());
    \n+
    88 const auto& preimages = get<1>(p.images());
    \n+
    89 for (unsigned i = 0; i < dimworld; ++i) {
    \n+
    90 if (success[i]) {
    \n+
    91 std::array<LocalCoords, 2> corner;
    \n+
    92 for (unsigned j = 0; j < dim; ++j)
    \n+
    93 corner[domGrid][j] = preimages[i][j];
    \n+
    94 corner[tarGrid] = localCornerCoords(i, elementTypes[tarGrid]);
    \n+
    95 polytopeCorners.push_back(corner);
    \n+
    96 }
    \n+
    97 }
    \n+
    98 }
    \n+
    99
    \n+
    100 /* edge intersections */
    \n+
    101 {
    \n+
    102 for (unsigned i = 0; i < p.numberOfEdgeIntersections(); ++i) {
    \n+
    103 std::array<LocalCoords, 2> corner;
    \n+
    104 const auto& local = p.edgeIntersections()[i].local;
    \n+
    105 for (unsigned j = 0; j < dim; ++j) {
    \n+
    106 corner[domGrid][j] = local[0][j];
    \n+
    107 corner[tarGrid][j] = local[1][j];
    \n+
    108 }
    \n+
    109 polytopeCorners.push_back(corner);
    \n+
    110 }
    \n+
    111 }
    \n+
    112
    \n+
    113 // check which neighbors might also intersect
    \n+
    114 std::array<decltype(std::ref(neighborIntersects1)),2> neighborIntersectsRef = {std::ref(neighborIntersects1), std::ref(neighborIntersects2)};
    \n+
    115 const auto& refTar = Dune::ReferenceElements<T,dim>::general(elementTypes[tarGrid]);
    \n+
    116 for (int i=0; i<refTar.size(1); i++) {
    \n+
    117
    \n+
    118 // if all face corners hit the other element then
    \n+
    119 // the neighbor might also intersect
    \n+
    120
    \n+
    121 bool intersects(true);
    \n+
    122 for (int k=0; k<refTar.size(i,1,dim); k++)
    \n+
    123 intersects &= get<1>(p.success())[refTar.subEntity(i,1,k,dim)];
    \n+
    124
    \n+
    125 if (intersects)
    \n+
    126 neighborIntersectsRef[tarGrid].get()[i] = true;
    \n+
    127 }
    \n+
    128
    \n+
    129 const auto& refDom = Dune::ReferenceElements<T,dim>::general(elementTypes[domGrid]);
    \n+
    130 for (int i=0; i<refDom.size(1); i++) {
    \n+
    131
    \n+
    132 // if all face corners hit the other element then
    \n+
    133 // the neighbor might also intersect
    \n
    134
    \n-
    135 intersections.emplace_back(grid1Index, grid2Index);
    \n-
    136 for (i = 0; i < n_intersectionnodes; ++i) {
    \n-
    137 intersections.back().corners0[0][i] = g1local[i];
    \n-
    138 intersections.back().corners1[0][i] = g2local[i];
    \n-
    139 }
    \n-
    140
    \n-
    141 } else if (P.size() > n_intersectionnodes) { // P is a union of simplices of dimension dimis
    \n+
    135 bool intersects(true);
    \n+
    136 for (int k=0; k<refDom.size(i,1,dim); k++)
    \n+
    137 intersects &= get<0>(p.success())[refDom.subEntity(i,1,k,dim)];
    \n+
    138
    \n+
    139 if (intersects)
    \n+
    140 neighborIntersectsRef[domGrid].get()[i] = true;
    \n+
    141 }
    \n
    142
    \n-
    143 assert(dimis != 1);
    \n-
    144 std::vector<FieldVector<T,dimworld> > global(n_intersectionnodes);
    \n-
    145
    \n-
    146 // Compute the centroid
    \n-
    147 centroid=0;
    \n-
    148 for (size_type i=0; i < P.size(); i++)
    \n-
    149 centroid += P[i] ;
    \n-
    150 centroid /= static_cast<T>(P.size()) ;
    \n-
    151
    \n-
    152 // order the points and get intersection face indices
    \n-
    153 H.clear() ;
    \n-
    154 IntersectionComputation<CM>::template orderPoints<dimis,dimworld>(centroid,SX,SY,P,H);
    \n+
    143 // Compute the edge intersections
    \n+
    144 for (unsigned i = 0; i < p.numberOfEdgeIntersections(); ++i) {
    \n+
    145 const auto& edge = p.edgeIntersections()[i].edge;
    \n+
    146 neighborIntersects1[edge[domGrid]] = true;
    \n+
    147 neighborIntersects2[edge[tarGrid]] = true;
    \n+
    148 }
    \n+
    149
    \n+
    150 // remove possible doubles
    \n+
    151 removeDoubles(polytopeCorners);
    \n+
    152
    \n+
    153 // Compute an interior point of the polytope
    \n+
    154 int nPolyCorners = polytopeCorners.size();
    \n
    155
    \n-
    156 // Loop over all intersection elements
    \n-
    157 for (size_type i=0; i < H.size(); i++) {
    \n-
    158 int hs = H[i].size(); // number of nodes of the intersection
    \n+
    156 // If the polytope is degenerated then there is no intersection
    \n+
    157 if (nPolyCorners<dimworld)
    \n+
    158 return;
    \n
    159
    \n-
    160 // if the intersection element is not degenerated
    \n-
    161 if (hs==dimis) {
    \n+
    160 // If the polytope is a simplex return it
    \n+
    161 if (nPolyCorners==dim+1) {
    \n
    162
    \n-
    163 // create the intersection geometry
    \n-
    164 for ( size_type j=0 ; j < dimis; ++j) {
    \n-
    165 global[j]= P[H[i][j]]; // get the intersection face
    \n-
    166 }
    \n-
    167
    \n-
    168 // intersection face + centroid = new element
    \n-
    169 global[dimis]=centroid;
    \n-
    170
    \n-
    171 // create local representation of the intersection
    \n-
    172 for (size_type j = 0; j < n_intersectionnodes; ++j) {
    \n-
    173 g1local[j] = grid1Geometry.local(global[j]);
    \n-
    174 g2local[j] = grid2Geometry.local(global[j]);
    \n-
    175 }
    \n+
    163 // std::cout<<"Add intersection: 1\\n";
    \n+
    164 typename Base::SimplicialIntersection intersect(grid1Index, grid2Index);
    \n+
    165
    \n+
    166 for (int j=0;j<dim+1; j++) {
    \n+
    167 intersect.corners0[0][j]=polytopeCorners[j][0];
    \n+
    168 intersect.corners1[0][j]=polytopeCorners[j][1];
    \n+
    169 }
    \n+
    170 intersections.push_back(intersect);
    \n+
    171
    \n+
    172 return;
    \n+
    173 }
    \n+
    174
    \n+
    175 // At this point we must have dimworld>=3
    \n
    176
    \n-
    177 intersections.emplace_back(grid1Index,grid2Index);
    \n-
    178 for (size_type j = 0; j < n_intersectionnodes; ++j) {
    \n-
    179 intersections.back().corners0[0][j] = g1local[j];
    \n-
    180 intersections.back().corners1[0][j] = g2local[j];
    \n-
    181 }
    \n-
    182 }
    \n-
    183 }
    \n-
    184 }
    \n-
    185}
    \n-
    \n-
    186
    \n-
    187} /* namespace Dune::GridGlue */
    \n-
    188} /* namespace Dune */
    \n-
    189
    \n-
    190#endif // DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n+
    178 // Compute a point in the middle of the polytope and order all corners cyclic
    \n+
    180
    \n+
    181 std::array<LocalCoords,2> center;
    \n+
    182 center[0] = 0; center[1] = 0;
    \n+
    183 for (int i=0; i<nPolyCorners; i++) {
    \n+
    184 center[0].axpy(1.0/nPolyCorners,polytopeCorners[i][0]);
    \n+
    185 center[1].axpy(1.0/nPolyCorners,polytopeCorners[i][1]);
    \n+
    186 }
    \n+
    187
    \n+
    188 // Order cyclic
    \n+
    189 std::vector<int> ordering;
    \n+
    190 computeCyclicOrder(polytopeCorners,center[0],ordering);
    \n+
    191
    \n+
    193 // Add intersections
    \n+
    195
    \n+
    196 for (size_t i=1; i<polytopeCorners.size()-1; i++) {
    \n+
    197
    \n+
    198 typename Base::SimplicialIntersection intersect(grid1Index, grid2Index);
    \n+
    199
    \n+
    200 for (int j=0;j<dim; j++) {
    \n+
    201 intersect.corners0[0][j]=polytopeCorners[ordering[i+j]][0];
    \n+
    202 intersect.corners1[0][j]=polytopeCorners[ordering[i+j]][1];
    \n+
    203 }
    \n+
    204
    \n+
    205 // last corner is the first for all intersections
    \n+
    206 intersect.corners0[0][dim]=polytopeCorners[ordering[0]][0];
    \n+
    207 intersect.corners1[0][dim]=polytopeCorners[ordering[0]][1];
    \n+
    208
    \n+
    209 intersections.push_back(intersect);
    \n+
    210 }
    \n+
    211}
    \n+
    212
    \n+
    213template<int dimworld, typename T>
    \n+
    \n+
    214void ContactMerge<dimworld, T>::computeCyclicOrder(const std::vector<std::array<LocalCoords,2> >& polytopeCorners,
    \n+
    215 const LocalCoords& center, std::vector<int>& ordering) const
    \n+
    216{
    \n+
    217 ordering.resize(polytopeCorners.size());
    \n+
    218
    \n+
    219 for (size_t k=0; k<ordering.size(); k++)
    \n+
    220 ordering[k] = k;
    \n+
    221
    \n+
    222 //TODO Do I have to order triangles to get some correct orientation?
    \n+
    223 if (polytopeCorners.size()<=3)
    \n+
    224 return;
    \n+
    225
    \n+
    226 // compute angles inside the polygon plane w.r.t to this axis
    \n+
    227 LocalCoords edge0 = polytopeCorners[1][0] - polytopeCorners[0][0];
    \n+
    228
    \n+
    229 // Compute a vector that is perpendicular to the edge but lies in the polytope plane
    \n+
    230 // So we have a unique ordering
    \n+
    231 LocalCoords edge1 = polytopeCorners[2][0] - polytopeCorners[0][0];
    \n+
    232 LocalCoords normal0 = edge1;
    \n+
    233 normal0.axpy(-(edge0*edge1),edge0);
    \n+
    234
    \n+
    235 std::vector<T> angles(polytopeCorners.size());
    \n+
    236
    \n+
    237 for (size_t i=0; i<polytopeCorners.size(); i++) {
    \n+
    238
    \n+
    239 LocalCoords edge = polytopeCorners[i][0] - center;
    \n+
    240
    \n+
    241 T x(edge*edge0);
    \n+
    242 T y(edge*normal0);
    \n+
    243
    \n+
    244 angles[i] = std::atan2(y, x);
    \n+
    245 if (angles[i]<0)
    \n+
    246 angles[i] += 2*M_PI;
    \n+
    247 }
    \n+
    248
    \n+
    249 // bubblesort
    \n+
    250
    \n+
    251 for (int i=polytopeCorners.size(); i>1; i--){
    \n+
    252 bool swapped = false;
    \n+
    253
    \n+
    254 for (int j=0; j<i-1; j++){
    \n+
    255
    \n+
    256 if (angles[j] > angles[j+1]){
    \n+
    257 swapped = true;
    \n+
    258 std::swap(angles[j], angles[j+1]);
    \n+
    259 std::swap(ordering[j], ordering[j+1]);
    \n+
    260 }
    \n+
    261 }
    \n+
    262
    \n+
    263 if (!swapped)
    \n+
    264 break;
    \n+
    265 }
    \n+
    266}
    \n+
    \n+
    267
    \n+
    268template<int dimworld, typename T>
    \n+
    \n+
    269void ContactMerge<dimworld, T>::setupNodalDirections(const std::vector<WorldCoords>& coords1,
    \n+
    270 const std::vector<unsigned int>& elements1,
    \n+
    271 const std::vector<Dune::GeometryType>& elementTypes1,
    \n+
    272 const std::vector<WorldCoords>& coords2,
    \n+
    273 const std::vector<unsigned int>& elements2,
    \n+
    274 const std::vector<Dune::GeometryType>& elementTypes2)
    \n+
    275{
    \n+
    276 if (domainDirections_) {
    \n+
    277
    \n+
    278 // Sample the provided analytical contact direction field
    \n+
    279 nodalDomainDirections_.resize(coords1.size());
    \n+
    280 for (size_t i=0; i<coords1.size(); i++)
    \n+
    281 nodalDomainDirections_[i] = domainDirections_(coords1[i]);
    \n+
    282 } else
    \n+
    283 computeOuterNormalField(coords1,elements1,elementTypes1, nodalDomainDirections_);
    \n+
    284
    \n+
    285 if (targetDirections_) {
    \n+
    286
    \n+
    287 // Sample the provided analytical target direction field
    \n+
    288 nodalTargetDirections_.resize(coords2.size());
    \n+
    289 for (size_t i=0; i<coords2.size(); i++)
    \n+
    290 nodalTargetDirections_[i] = targetDirections_(coords2[i]);
    \n+
    291 } else
    \n+
    292 computeOuterNormalField(coords2,elements2,elementTypes2, nodalTargetDirections_);
    \n+
    293}
    \n+
    \n+
    294
    \n+
    295template<int dimworld, typename T>
    \n+
    \n+
    296void ContactMerge<dimworld, T>::computeOuterNormalField(const std::vector<WorldCoords>& coords,
    \n+
    297 const std::vector<unsigned int>& elements,
    \n+
    298 const std::vector<Dune::GeometryType>& elementTypes,
    \n+
    299 std::vector<WorldCoords>& normals)
    \n+
    300{
    \n+
    301 normals.assign(coords.size(),WorldCoords(0));
    \n+
    302
    \n+
    303
    \n+
    304 int offset = 0;
    \n+
    305
    \n+
    306 for (size_t i=0; i<elementTypes.size(); i++) {
    \n+
    307
    \n+
    308 int nCorners = Dune::ReferenceElements<T,dim>::general(elementTypes[i]).size(dim);
    \n+
    309
    \n+
    310 // For segments 1, for triangles or quadrilaterals take the first 2
    \n+
    311 std::array<WorldCoords, dim> edges;
    \n+
    312 for (int j=1; j<=dim; j++)
    \n+
    313 edges[j-1] = coords[elements[offset + j]] - coords[elements[offset]];
    \n+
    314
    \n+
    315 WorldCoords elementNormal;
    \n+
    316
    \n+
    317 if (dim==1) {
    \n+
    318 elementNormal[0] = edges[0][1]; elementNormal[1] = -edges[0][0];
    \n+
    319 } else
    \n+
    320 elementNormal = crossProduct(edges[0], edges[1]);
    \n+
    321
    \n+
    322 elementNormal /= elementNormal.two_norm();
    \n+
    323
    \n+
    324 for (int j=0; j<nCorners;j++)
    \n+
    325 normals[elements[offset + j]] += elementNormal;
    \n+
    326
    \n+
    327 offset += nCorners;
    \n+
    328 }
    \n+
    329
    \n+
    330 for (size_t i=0; i<coords.size(); i++)
    \n+
    331 normals[i] /= normals[i].two_norm();
    \n+
    332}
    \n+
    \n+
    333
    \n+
    334template<int dimworld, typename T>
    \n+
    \n+
    335void ContactMerge<dimworld, T>::removeDoubles(std::vector<std::array<LocalCoords,2> >& polytopeCorners)
    \n+
    336{
    \n+
    337
    \n+
    338 size_t counter(1);
    \n+
    339 for (size_t i=1; i<polytopeCorners.size(); i++) {
    \n+
    340 bool contained = false;
    \n+
    341 for (size_t j=0; j<counter; j++)
    \n+
    342 if ( (polytopeCorners[j][0]-polytopeCorners[i][0]).two_norm()<1e-10) {
    \n+
    343 assert((polytopeCorners[j][1]-polytopeCorners[i][1]).two_norm()<1e-10);
    \n+
    344 contained = true;
    \n+
    345 break;
    \n+
    346 }
    \n+
    347
    \n+
    348 if (!contained) {
    \n+
    349 if (counter < i)
    \n+
    350 polytopeCorners[counter] = polytopeCorners[i];
    \n+
    351 counter++;
    \n+
    352 }
    \n+
    353 }
    \n+
    354 polytopeCorners.resize(counter);
    \n+
    355}
    \n+
    \n+
    356
    \n+
    357} /* namespace GridGlue */
    \n+
    358} /* namespace Dune */
    \n+\n+\n
    Definition gridglue.hh:37
    \n
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n-
    Intersection computation method for two elements of arbitrary dimension.
    Definition computeintersection.hh:39
    \n-
    static bool computeIntersection(const std::vector< V > &X, const std::vector< V > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< V > &P)
    Compute the intersection of two elements X and Y Compute the intersection of two elements X and Y,...
    Definition computeintersection.cc:14
    \n-
    void computeIntersections(const Dune::GeometryType &grid1ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)> &neighborIntersects2, unsigned int grid2Index, std::vector< SimplicialIntersection > &intersections)
    Compute the intersection between two overlapping elements.
    Definition overlappingmerge.cc:34
    \n-
    Definition simplexintersection.cc:30
    \n+
    static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim > &a, const Dune::FieldVector< T, dim > &b)
    compute cross product
    Definition crossproduct.hh:15
    \n+
    Coordinate corner(unsigned c)
    Definition projection_impl.hh:24
    \n+
    void computeCyclicOrder(const std::vector< std::array< LocalCoords, 2 > > &polytopeCorners, const LocalCoords &center, std::vector< int > &ordering) const
    Order the corners of the intersection polytope in cyclic order.
    Definition contactmerge.cc:214
    \n+
    void removeDoubles(std::vector< std::array< LocalCoords, 2 > > &polytopeCorners)
    Remove all multiples.
    Definition contactmerge.cc:335
    \n+
    Dune::FieldVector< T, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition contactmerge.hh:59
    \n+
    void setupNodalDirections(const std::vector< WorldCoords > &coords1, const std::vector< unsigned int > &elements1, const std::vector< Dune::GeometryType > &elementTypes1, const std::vector< WorldCoords > &coords2, const std::vector< unsigned int > &elements2, const std::vector< Dune::GeometryType > &elementTypes2)
    Setup the direction vectors containing the directions for each vertex.
    Definition contactmerge.cc:269
    \n+
    void computeOuterNormalField(const std::vector< WorldCoords > &coords, const std::vector< unsigned int > &elements, const std::vector< Dune::GeometryType > &elementTypes, std::vector< WorldCoords > &normals)
    If no direction field was specified compute the outer normal field.
    Definition contactmerge.cc:296
    \n+
    Dune::FieldVector< T, dim > LocalCoords
    the coordinate type used in this interface
    Definition contactmerge.hh:62
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,244 +1,439 @@\n dune-grid-glue\u00a02.9\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-overlappingmerge.cc\n+contactmerge.cc\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n 5\n-6#ifndef DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n-_\b7#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n-8//#include \n-9\n-10namespace _\bD_\bu_\bn_\be {\n-11namespace GridGlue {\n-12\n-13template\n-14bool OverlappingMerge::inPlane(std::\n-vector >& points) {\n-15\n-16 T eps = 1e-8;\n-17\n-18 assert(dim1 == 3 && dim2 == 3 && dimworld == 3);\n-19 assert(points.size() == 4);\n-20\n-21 FieldVector v1 = points[1]-points[0];\n-22 FieldVector v2 = points[2]-points[0];\n-23 FieldVector v3 = points[3]-points[0];\n+6#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bc_\br_\bo_\bs_\bs_\bp_\br_\bo_\bd_\bu_\bc_\bt_\b._\bh_\bh>\n+7#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+8\n+9namespace _\bD_\bu_\bn_\be {\n+10namespace GridGlue {\n+11\n+12template\n+13void ContactMerge::computeIntersections(const Dune::\n+GeometryType& grid1ElementType,\n+14 const std::vector >& grid1ElementCorners,\n+15 std::bitset<(1<& neighborIntersects1,\n+16 unsigned int grid1Index,\n+17 const Dune::GeometryType& grid2ElementType,\n+18 const std::vector >& grid2ElementCorners,\n+19 std::bitset<(1<& neighborIntersects2,\n+20 unsigned int grid2Index,\n+21 std::vector& _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs)\n+22{\n+23 using std::get;\n 24\n-25 FieldVector v1xv2;\n-26 v1xv2[0] = v1[1]*v2[2] - v1[2]*v2[1];\n-27 v1xv2[1] = v1[2]*v2[0] - v1[0]*v2[2];\n-28 v1xv2[2] = v1[0]*v2[1] - v1[1]*v2[0];\n-29\n-30 return (std::abs(v3.dot(v1xv2)) < eps);\n-31}\n-32\n-33template\n-_\b3_\b4void _\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\b1_\b,_\bd_\bi_\bm_\b2_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(const\n-Dune::GeometryType& grid1ElementType,\n-35 const std::vector >& grid1ElementCorners,\n-36 std::bitset<(1<& neighborIntersects1,\n-37 unsigned int grid1Index,\n-38 const Dune::GeometryType& grid2ElementType,\n-39 const std::vector >& grid2ElementCorners,\n-40 std::bitset<(1<& neighborIntersects2,\n-41 unsigned int grid2Index,\n-42 std::vector& _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs)\n-43{\n-44 using std::min;\n-45\n-46 this->counter++;\n-47 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.clear();\n+25 std::vector > polytopeCorners;\n+26\n+27 // Initialize\n+28 neighborIntersects1.reset();\n+29 neighborIntersects2.reset();\n+30\n+31 const int nCorners1 = grid1ElementCorners.size();\n+32 const int nCorners2 = grid2ElementCorners.size();\n+33\n+34 if (nCorners1 != dimworld)\n+35 DUNE_THROW(Dune::Exception, \"element1 must have \" << dimworld << \" corners,\n+but has \" << nCorners1);\n+36 if (nCorners2 != dimworld)\n+37 DUNE_THROW(Dune::Exception, \"element2 must have \" << dimworld << \" corners,\n+but has \" << nCorners2);\n+38\n+39 // The grid1 projection directions\n+40 std::vector directions1(nCorners1);\n+41 for (size_t i=0; igrid1ElementCorners_\n+[grid1Index][i]];\n+43\n+44 // The grid2 projection directions\n+45 std::vector directions2(nCorners2);\n+46 for (size_t i=0; igrid2ElementCorners_\n+[grid2Index][i]];\n 48\n-49 typedef _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\bd_\bi_\bm_\b1_\b,_\bd_\bi_\bm_\b2_\b,_\bT_\b> CM;\n-50\n-51#ifndef NDEBUG\n-52 const auto& refElement1 = Dune::ReferenceElements::general\n-(grid1ElementType);\n-53 const auto& refElement2 = Dune::ReferenceElements::general\n-(grid2ElementType);\n-54\n-55 // A few consistency checks\n-56 assert((unsigned int)(refElement1.size(dim1)) == grid1ElementCorners.size\n-());\n-57 assert((unsigned int)(refElement2.size(dim2)) == grid2ElementCorners.size\n-());\n-58#endif\n-59\n-60 // Make generic geometries representing the grid1- and grid2 element.\n-61 // this eases computation of local coordinates.\n-62 typedef MultiLinearGeometry Geometry1;\n-63 typedef MultiLinearGeometry Geometry2;\n+49 // The difference between the closest point projection and the normal\n+projection is just the ordering\n+50 // of the involved surfaces. The closest point projection is done along the\n+outer normal field of grid2\n+51 // (due to being a best approximation) and the outer normal projection is\n+using the outer normal field\n+52 // of grid1 instead.\n+53 std::array cornersRef ={std::\n+cref(grid1ElementCorners), std::cref(grid2ElementCorners)};\n+54 std::array directionsRef ={std::cref\n+(directions1), std::cref(directions2)};\n+55 std::array elementTypes = {grid1ElementType,\n+grid2ElementType};\n+56\n+57 // Determine which is the grid we use for outer normal projection\n+58 const size_t domGrid = (type_==ProjectionType::OUTER_NORMAL) ? 0 : 1;\n+59 const size_t tarGrid = (type_==ProjectionType::OUTER_NORMAL) ? 1 : 0;\n+60\n+62 // Compute all corners of the intersection polytope\n 64\n-65 Geometry1 grid1Geometry(grid1ElementType, grid1ElementCorners);\n-66 Geometry2 grid2Geometry(grid2ElementType, grid2ElementCorners);\n-67\n-68 // Dirty workaround for the intersection computation scaling problem (part\n-1/2)\n-69 std::vector > scaledGrid1ElementCorners\n-(grid1ElementCorners.size());\n-70 std::vector > scaledGrid2ElementCorners\n-(grid2ElementCorners.size());\n-71\n-72 // the scaling parameter is the length minimum of the lengths of the first\n-edge in the grid1 geometry\n-73 // and the first edge in the grid2 geometry\n-74 T scaling = min((grid1ElementCorners[0] - grid1ElementCorners[1]).two_norm\n-(),\n-75 (grid2ElementCorners[0] - grid2ElementCorners[1]).two_norm());\n-76\n-77 // scale the coordinates according to scaling parameter\n-78 for (unsigned int i = 0; i < grid1ElementCorners.size(); ++i) {\n-79 scaledGrid1ElementCorners[i] = grid1ElementCorners[i];\n-80 scaledGrid1ElementCorners[i] *= (1.0/scaling);\n+65 const auto corners = std::tie(cornersRef[domGrid].get(),cornersRef\n+[tarGrid].get());\n+66 const auto normals = std::tie(directionsRef[domGrid].get(), directionsRef\n+[tarGrid].get());\n+67 Projection p(overlap_, maxNormalProduct_);\n+68 p.project(corners, normals);\n+69\n+70 /* projection */\n+71 {\n+72 const auto& success = get<0>(p.success());\n+73 const auto& images = get<0>(p.images());\n+74 for (unsigned i = 0; i < dimworld; ++i) {\n+75 if (success[i]) {\n+76 std::array _\bc_\bo_\br_\bn_\be_\br;\n+77 _\bc_\bo_\br_\bn_\be_\br[domGrid] = localCornerCoords(i, elementTypes[domGrid]);\n+78 for (unsigned j = 0; j < dim; ++j)\n+79 corner[tarGrid][j] = images[i][j];\n+80 polytopeCorners.push_back(corner);\n 81 }\n-82 for (unsigned int i = 0; i < grid2ElementCorners.size(); ++i) {\n-83 scaledGrid2ElementCorners[i] = grid2ElementCorners[i];\n-84 scaledGrid2ElementCorners[i] *= (1.0/scaling);\n-85 }\n-86\n-87 // get size_type for all the vectors we are using\n-88 typedef typename std::vector::size_type size_type;\n-89\n-90 const int dimis = dim1 < dim2 ? dim1 : dim2;\n-91 const size_type n_intersectionnodes = dimis+1;\n-92 size_type i;\n-93\n-94 std::vector > scaledP(0), P(0);\n-95 std::vector > H,SX(1< centroid;\n-97 // local grid1 coordinates of the intersections\n-98 std::vector > g1local(n_intersectionnodes);\n-99 // local grid2 coordinates of the intersections\n-100 std::vector > g2local(n_intersectionnodes);\n-101\n-102 // compute the intersection nodes\n-103 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\bC_\bM_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(scaledGrid1ElementCorners,\n-104 scaledGrid2ElementCorners,\n-105 SX,SY,scaledP);\n-106\n-107 // Dirty workaround - rescale the result (part 2/2)\n-108 P.resize(scaledP.size());\n-109 for (unsigned int i = 0; i < scaledP.size(); ++i) {\n-110 P[i] = scaledP[i];\n-111 P[i] *= scaling;\n-112 }\n-113\n-114 for (size_type i = 0; i < neighborIntersects1.size(); ++i) {\n-115 if (i < SX.size())\n-116 neighborIntersects1[i] = (SX[i].size() > 0);\n-117 else\n-118 neighborIntersects1[i] = false;\n-119 }\n-120 for (size_type i = 0; i < neighborIntersects2.size(); ++i) {\n-121 if (i < SY.size())\n-122 neighborIntersects2[i] = (SY[i].size() > 0);\n-123 else\n-124 neighborIntersects2[i] = false;\n-125 }\n-126\n-127 // P is an simplex of dimension dimis\n-128 if (P.size() == n_intersectionnodes) {\n-129\n-130 for (i = 0; i < n_intersectionnodes; ++i) {\n-131 g1local[i] = grid1Geometry.local(P[i]);\n-132 g2local[i] = grid2Geometry.local(P[i]);\n-133 }\n+82 }\n+83 }\n+84\n+85 /* inverse projection */\n+86 {\n+87 const auto& success = get<1>(p.success());\n+88 const auto& preimages = get<1>(p.images());\n+89 for (unsigned i = 0; i < dimworld; ++i) {\n+90 if (success[i]) {\n+91 std::array _\bc_\bo_\br_\bn_\be_\br;\n+92 for (unsigned j = 0; j < dim; ++j)\n+93 corner[domGrid][j] = preimages[i][j];\n+94 _\bc_\bo_\br_\bn_\be_\br[tarGrid] = localCornerCoords(i, elementTypes[tarGrid]);\n+95 polytopeCorners.push_back(corner);\n+96 }\n+97 }\n+98 }\n+99\n+100 /* edge intersections */\n+101 {\n+102 for (unsigned i = 0; i < p.numberOfEdgeIntersections(); ++i) {\n+103 std::array _\bc_\bo_\br_\bn_\be_\br;\n+104 const auto& local = p.edgeIntersections()[i].local;\n+105 for (unsigned j = 0; j < dim; ++j) {\n+106 _\bc_\bo_\br_\bn_\be_\br[domGrid][j] = local[0][j];\n+107 _\bc_\bo_\br_\bn_\be_\br[tarGrid][j] = local[1][j];\n+108 }\n+109 polytopeCorners.push_back(corner);\n+110 }\n+111 }\n+112\n+113 // check which neighbors might also intersect\n+114 std::array neighborIntersectsRef\n+= {std::ref(neighborIntersects1), std::ref(neighborIntersects2)};\n+115 const auto& refTar = Dune::ReferenceElements::general(elementTypes\n+[tarGrid]);\n+116 for (int i=0; i(p.success())[refTar.subEntity(i,1,k,dim)];\n+124\n+125 if (intersects)\n+126 neighborIntersectsRef[tarGrid].get()[i] = true;\n+127 }\n+128\n+129 const auto& refDom = Dune::ReferenceElements::general(elementTypes\n+[domGrid]);\n+130 for (int i=0; i n_intersectionnodes) { // P is a union of simplices\n-of dimension dimis\n+135 bool intersects(true);\n+136 for (int k=0; k(p.success())[refDom.subEntity(i,1,k,dim)];\n+138\n+139 if (intersects)\n+140 neighborIntersectsRef[domGrid].get()[i] = true;\n+141 }\n 142\n-143 assert(dimis != 1);\n-144 std::vector > global(n_intersectionnodes);\n-145\n-146 // Compute the centroid\n-147 centroid=0;\n-148 for (size_type i=0; i < P.size(); i++)\n-149 centroid += P[i] ;\n-150 centroid /= static_cast(P.size()) ;\n-151\n-152 // order the points and get intersection face indices\n-153 H.clear() ;\n-154 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\bC_\bM_\b>_\b:_\b:_\bt_\be_\bm_\bp_\bl_\ba_\bt_\be orderPoints\n-(centroid,SX,SY,P,H);\n+143 // Compute the edge intersections\n+144 for (unsigned i = 0; i < p.numberOfEdgeIntersections(); ++i) {\n+145 const auto& edge = p.edgeIntersections()[i].edge;\n+146 neighborIntersects1[edge[domGrid]] = true;\n+147 neighborIntersects2[edge[tarGrid]] = true;\n+148 }\n+149\n+150 // remove possible doubles\n+151 removeDoubles(polytopeCorners);\n+152\n+153 // Compute an interior point of the polytope\n+154 int nPolyCorners = polytopeCorners.size();\n 155\n-156 // Loop over all intersection elements\n-157 for (size_type i=0; i < H.size(); i++) {\n-158 int hs = H[i].size(); // number of nodes of the intersection\n+156 // If the polytope is degenerated then there is no intersection\n+157 if (nPolyCorners=3\n 176\n-177 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.emplace_back(grid1Index,grid2Index);\n-178 for (size_type j = 0; j < n_intersectionnodes; ++j) {\n-179 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.back().corners0[0][j] = g1local[j];\n-180 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.back().corners1[0][j] = g2local[j];\n-181 }\n-182 }\n-183 }\n-184 }\n-185}\n-186\n-187} /* namespace Dune::GridGlue */\n-188} /* namespace Dune */\n-189\n-190#endif // DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n+178 // Compute a point in the middle of the polytope and order all corners\n+cyclic\n+180\n+181 std::array center;\n+182 center[0] = 0; center[1] = 0;\n+183 for (int i=0; i ordering;\n+190 computeCyclicOrder(polytopeCorners,center[0],ordering);\n+191\n+193 // Add intersections\n+195\n+196 for (size_t i=1; i\n+_\b2_\b1_\b4void _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bC_\by_\bc_\bl_\bi_\bc_\bO_\br_\bd_\be_\br(const std::vector >& polytopeCorners,\n+215 const _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs& center, std::vector& ordering) const\n+216{\n+217 ordering.resize(polytopeCorners.size());\n+218\n+219 for (size_t k=0; k angles(polytopeCorners.size());\n+236\n+237 for (size_t i=0; i1; i--){\n+252 bool swapped = false;\n+253\n+254 for (int j=0; j angles[j+1]){\n+257 swapped = true;\n+258 std::swap(angles[j], angles[j+1]);\n+259 std::swap(ordering[j], ordering[j+1]);\n+260 }\n+261 }\n+262\n+263 if (!swapped)\n+264 break;\n+265 }\n+266}\n+267\n+268template\n+_\b2_\b6_\b9void _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs(const std::\n+vector& coords1,\n+270 const std::vector& elements1,\n+271 const std::vector& elementTypes1,\n+272 const std::vector& coords2,\n+273 const std::vector& elements2,\n+274 const std::vector& elementTypes2)\n+275{\n+276 if (domainDirections_) {\n+277\n+278 // Sample the provided analytical contact direction field\n+279 nodalDomainDirections_.resize(coords1.size());\n+280 for (size_t i=0; i\n+_\b2_\b9_\b6void _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl_\bF_\bi_\be_\bl_\bd(const std::\n+vector& coords,\n+297 const std::vector& elements,\n+298 const std::vector& elementTypes,\n+299 std::vector& normals)\n+300{\n+301 normals.assign(coords.size(),_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(0));\n+302\n+303\n+304 int offset = 0;\n+305\n+306 for (size_t i=0; i::general(elementTypes\n+[i]).size(dim);\n+309\n+310 // For segments 1, for triangles or quadrilaterals take the first 2\n+311 std::array edges;\n+312 for (int j=1; j<=dim; j++)\n+313 edges[j-1] = coords[elements[offset + j]] - coords[elements[offset]];\n+314\n+315 _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs elementNormal;\n+316\n+317 if (dim==1) {\n+318 elementNormal[0] = edges[0][1]; elementNormal[1] = -edges[0][0];\n+319 } else\n+320 elementNormal = _\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt(edges[0], edges[1]);\n+321\n+322 elementNormal /= elementNormal.two_norm();\n+323\n+324 for (int j=0; j\n+_\b3_\b3_\b5void _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\br_\be_\bm_\bo_\bv_\be_\bD_\bo_\bu_\bb_\bl_\be_\bs(std::vector >& polytopeCorners)\n+336{\n+337\n+338 size_t counter(1);\n+339 for (size_t i=1; i intersections(const GridGlue<... > &glue, const Reverse<...\n > &reverse=!reversed)\n Iterate over all intersections of a GridGlue.\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn\n-Intersection computation method for two elements of arbitrary dimension.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:39\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-static bool computeIntersection(const std::vector< V > &X, const std::vector< V\n-> &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > >\n-&SY, std::vector< V > &P)\n-Compute the intersection of two elements X and Y Compute the intersection of\n-two elements X and Y,...\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.cc:14\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-void computeIntersections(const Dune::GeometryType &grid1ElementType, const\n-std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::\n-bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::\n-GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T,\n-dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)>\n-&neighborIntersects2, unsigned int grid2Index, std::vector<\n-SimplicialIntersection > &intersections)\n-Compute the intersection between two overlapping elements.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.cc:34\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:30\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt\n+static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim\n+> &a, const Dune::FieldVector< T, dim > &b)\n+compute cross product\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn crossproduct.hh:15\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\br_\bn_\be_\br\n+Coordinate corner(unsigned c)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:24\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bC_\by_\bc_\bl_\bi_\bc_\bO_\br_\bd_\be_\br\n+void computeCyclicOrder(const std::vector< std::array< LocalCoords, 2 > >\n+&polytopeCorners, const LocalCoords ¢er, std::vector< int > &ordering)\n+const\n+Order the corners of the intersection polytope in cyclic order.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:214\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\br_\be_\bm_\bo_\bv_\be_\bD_\bo_\bu_\bb_\bl_\be_\bs\n+void removeDoubles(std::vector< std::array< LocalCoords, 2 > >\n+&polytopeCorners)\n+Remove all multiples.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:335\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< T, dimworld > WorldCoords\n+the coordinate type used in this interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:59\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+void setupNodalDirections(const std::vector< WorldCoords > &coords1, const\n+std::vector< unsigned int > &elements1, const std::vector< Dune::GeometryType >\n+&elementTypes1, const std::vector< WorldCoords > &coords2, const std::vector<\n+unsigned int > &elements2, const std::vector< Dune::GeometryType >\n+&elementTypes2)\n+Setup the direction vectors containing the directions for each vertex.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:269\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl_\bF_\bi_\be_\bl_\bd\n+void computeOuterNormalField(const std::vector< WorldCoords > &coords, const\n+std::vector< unsigned int > &elements, const std::vector< Dune::GeometryType >\n+&elementTypes, std::vector< WorldCoords > &normals)\n+If no direction field was specified compute the outer normal field.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:296\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs\n+Dune::FieldVector< T, dim > LocalCoords\n+the coordinate type used in this interface\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:62\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}]}]}]}]}