{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.TZFg59Rw/b1/dune-grid-glue_2.9.0-3_i386.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.TZFg59Rw/b2/dune-grid-glue_2.9.0-3_i386.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,4 +1,4 @@\n \n 88a1a91fd0cfbc2d511f1783ece20b9e 901764 debug optional libdune-grid-glue-dev-dbgsym_2.9.0-3_i386.deb\n eb4cc6cb50a87902f95d68ac25b2e683 112928 libdevel optional libdune-grid-glue-dev_2.9.0-3_i386.deb\n- 52eb8f3e225723e80ba0c0e70917af53 959256 doc optional libdune-grid-glue-doc_2.9.0-3_all.deb\n+ c629bb415e5b5aff391c2f62b98d9975 959232 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 7388 2023-01-13 13:23:40.000000 control.tar.xz\n--rw-r--r-- 0 0 0 951676 2023-01-13 13:23:40.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 7396 2023-01-13 13:23:40.000000 control.tar.xz\n+-rw-r--r-- 0 0 0 951644 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": "@@ -40,20 +40,20 @@\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00056.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00056_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00059.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00059_source.html\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"}]}]}]}, {"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": "@@ -5,77 +5,77 @@\n drwxr-xr-x 0 root (0) root (0) 0 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/\n -rw-r--r-- 0 root (0) root (0) 768 2023-01-13 13:23:40.000000 ./usr/share/doc/libdune-grid-glue-doc/changelog.Debian.gz\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) 8112 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) 119797 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) 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) 5321 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) 16899 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) 5609 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) 84446 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) 5797 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) 52527 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) 5453 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) 27383 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) 5088 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) 16768 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) 5980 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) 27621 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) 8222 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) 30066 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) 5453 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) 27383 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) 8112 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) 119797 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) 6157 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) 14373 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) 5088 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) 16768 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) 10871 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) 70887 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) 5797 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) 52527 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) 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) 5980 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) 27621 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) 7675 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) 11025 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) 6619 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) 9138 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) 5360 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) 8500 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) 11613 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) 39771 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) 7370 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) 44830 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) 8222 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) 30066 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) 11613 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) 39771 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) 5388 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) 50226 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) 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) 5429 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) 44826 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) 10146 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) 6647 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) 36462 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) 11543 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) 239992 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) 11543 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) 239992 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) 5967 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) 37342 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) 4559 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) 63705 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) 10146 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) 5484 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) 36322 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) 6080 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) 59845 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) 6348 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) 45998 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) 5930 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) 19310 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) 4310 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) 55659 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) 4559 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) 63705 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) 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) 5357 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) 22694 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) 6080 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) 59845 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) 6647 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) 36462 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) 12399 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) 149554 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) 4310 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) 55659 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) 2178 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) 27052 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) 27055 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-
intersection.hh
Model of the Intersection concept provided by GridGlue.
\n-
rangegenerators.hh
\n-
intersectioniterator.hh
Implement iterators over GridGlue intersections.
\n-
gridglue.cc
\n-
gridgluecommunicate.hh
Describes the parallel communication interface class for Dune::GridGlue.
\n-
intersectionindexset.hh
\n-
merger.hh
\n+
intersection.hh
Model of the Intersection concept provided by GridGlue.
\n+
rangegenerators.hh
\n+
intersectionindexset.hh
\n+
gridgluecommunicate.hh
Describes the parallel communication interface class for Dune::GridGlue.
\n+
gridglue.cc
\n+
intersectioniterator.hh
Implement iterators over GridGlue intersections.
\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": "@@ -325,20 +325,20 @@\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 _\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 _\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_\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_\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_\bn_\bd_\be_\bx_\bs_\be_\bt_\b._\bh_\bh\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_\bi_\bt_\be_\br_\ba_\bt_\bo_\br_\b._\bh_\bh\n+Implement iterators over GridGlue intersections.\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/a00005.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00005.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: gridglueamirawriter.hh File Reference\n \n \n \n \n \n \n \n@@ -71,74 +71,42 @@\n \n \n \n
\n
\n Classes |\n-Namespaces |\n-Macros
\n-
intersection.hh File Reference
\n+Namespaces
\n+
gridglueamirawriter.hh File Reference
\n \n
\n \n-

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

Write all remote intersections to a AmiraMesh file. \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+
#include <fstream>
\n+#include <sstream>
\n+#include <type_traits>
\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-\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::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-Macros

#define ONLY_SIMPLEX_INTERSECTIONS
 
\n

Detailed Description

\n-

Model of the Intersection concept provided by GridGlue.

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

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,46 +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 | _\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+_\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 _\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:_\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-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- 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+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/a00005_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00005_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: gridglueamirawriter.hh Source File\n \n \n \n \n \n \n \n@@ -74,578 +74,166 @@\n \n \n \n
\n-
intersection.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-
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+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+
15namespace Dune {
\n+
16namespace GridGlue {
\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+
\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-
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+
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-
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 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+
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-
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+
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-
133 std::optional< GridGeometry<side> > gridgeom;
\n-
134 };
\n-
135
\n-
136 std::tuple< SideData<0>, SideData<1> > sideData_;
\n-
137 };
\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-
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+
147};
\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+
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-
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+
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,752 +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-intersection.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-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+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+15namespace _\bD_\bu_\bn_\be {\n+16namespace GridGlue {\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+_\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-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 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+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-_\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 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+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-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+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-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+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 // 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+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:_\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-::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+_\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/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: rangegenerators.hh File Reference\n+dune-grid-glue: intersection.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+Macros
    \n+
    intersection.hh File Reference
    \n
    \n
    \n-
    #include <dune/common/iteratorrange.hh>
    \n+\n+

    Model of the Intersection concept provided by GridGlue. \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

    struct  Dune::GridGlue::Reverse< reverse >
    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-\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.
     

    \n+Macros

    #define ONLY_SIMPLEX_INTERSECTIONS
     
    \n+

    Detailed Description

    \n+

    Model of the Intersection concept provided by GridGlue.

    \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 Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,27 +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 | _\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 | _\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-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+ 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-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+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+ 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/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: rangegenerators.hh Source File\n+dune-grid-glue: intersection.hh Source File\n \n \n \n \n \n \n \n@@ -74,78 +74,578 @@\n \n \n
    \n
    \n-
    rangegenerators.hh
    \n+
    intersection.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-
    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-
    20 constexpr
    \n-
    \n-\n-
    22 { return {}; }
    \n-
    \n-
    23};
    \n-
    \n-
    24
    \n-
    25#ifdef DOXYGEN
    \n-
    26
    \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-
    66template<...>
    \n-
    67IteratorRange<...>
    \n-
    68intersections(const GridGlue<...>& glue, const Reverse<...>& reverse = !reversed);
    \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+
    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 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#else
    \n-
    71
    \n-
    72namespace {
    \n-
    73const Reverse<true> reversed = {};
    \n-
    74} /* namespace */
    \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-
    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+
    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#endif // DOXYGEN
    \n-
    85
    \n-
    86} /* namespace GridGlue */
    \n-
    87} /* namespace Dune */
    \n-
    88
    \n-
    89#endif
    \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-
    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+
    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,88 +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-rangegenerators.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// 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-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-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+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-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+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 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_\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 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#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+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-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+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#endif // DOXYGEN\n-85\n-86} /* namespace GridGlue */\n-87} /* namespace Dune */\n-88\n-89#endif\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:_\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:_\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 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/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: intersectioniterator.hh File Reference\n+dune-grid-glue: rangegenerators.hh File Reference\n \n \n \n \n \n \n \n@@ -71,40 +71,42 @@\n \n
    \n \n
    \n \n-
    intersectioniterator.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    rangegenerators.hh File Reference
    \n \n
    \n-\n-

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

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

    Go to the source code of this file.

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

    \n Classes

    class  Dune::GridGlue::IntersectionIterator< P0, P1, inside, outside >
    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+Functions

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

    Detailed Description

    \n-

    Implement iterators over GridGlue intersections.

    \n-
    Author
    Christian Engwer
    \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,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-_\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+_\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-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+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-*\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- Author\n- Christian Engwer\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+\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/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: intersectioniterator.hh Source File\n+dune-grid-glue: rangegenerators.hh Source File\n \n \n \n \n \n \n \n@@ -74,95 +74,78 @@\n \n \n \n
    \n-
    intersectioniterator.hh
    \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-
    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+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-
    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-
    \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 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+
    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+
    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
    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+
    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,99 +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-intersectioniterator.hh\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-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+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-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 assert((\"never dereference the end iterator\" &&\n-40 index_ != glue_->index__sz));\n-41 return intersection_;\n-42 }\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-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-_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh\n-Central component of the module implementing the coupling of two grids.\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} /* 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:_\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-::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+_\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/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: gridglue.cc File Reference\n+dune-grid-glue: intersectionindexset.hh File Reference\n \n \n \n \n \n \n \n@@ -70,40 +70,35 @@\n \n
    \n
    \n \n-
    gridglue.cc File Reference
    \n+Classes |\n+Namespaces
    \n+
    intersectionindexset.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+\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,28 +1,22 @@\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\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:_\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/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: gridglue.cc Source File\n+dune-grid-glue: intersectionindexset.hh Source File\n \n \n \n \n \n \n \n@@ -74,502 +74,87 @@\n \n \n
    \n
    \n-
    gridglue.cc
    \n+
    intersectionindexset.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+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
    13#endif
    \n
    14
    \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+
    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
    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-
    \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+
    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-
    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+
    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,584 +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-gridglue.cc\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// -*- 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+_\b1// 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+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-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+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 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-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+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:_\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_\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/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: gridgluevtkwriter.hh File Reference\n+dune-grid-glue: gridgluecommunicate.hh File Reference\n \n \n \n \n \n \n \n@@ -71,47 +71,74 @@\n \n
    \n \n
    \n \n-
    gridgluevtkwriter.hh File Reference
    \n+Namespaces |\n+Typedefs |\n+Functions
    \n+
    gridgluecommunicate.hh File Reference
    \n \n
    \n \n-

    Write all remote intersections to a vtk file for debugging. \n+

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

    \n-
    #include <fstream>
    \n-#include <iomanip>
    \n-#include <type_traits>
    \n-#include <vector>
    \n-#include <dune/common/classname.hh>
    \n-#include <dune/geometry/type.hh>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/grid-glue/gridglue.hh>
    \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

    \n Classes

    class  Dune::GridGlue::GridGlueVtkWriter
     Write remote intersections to a vtk file for debugging purposes. More...
    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+Functions

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

    Detailed Description

    \n-

    Write all remote intersections to a vtk file for debugging.

    \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,33 +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\n-gridgluevtkwriter.hh File Reference\n-Write all remote intersections to a vtk file for debugging. _\bM_\bo_\br_\be_\b._\b._\b.\n-#include \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-#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 \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:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\bV_\bt_\bk_\bW_\br_\bi_\bt_\be_\br\n-\u00a0 Write remote intersections to a vtk file for debugging purposes.\n- _\bM_\bo_\br_\be_\b._\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+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-Write all remote intersections to a vtk file for debugging.\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/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: gridgluevtkwriter.hh Source File\n+dune-grid-glue: gridgluecommunicate.hh Source File\n \n \n \n \n \n \n \n@@ -74,318 +74,365 @@\n \n \n
    \n
    \n-
    gridgluevtkwriter.hh
    \n+
    gridgluecommunicate.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: GridGlueVtkWriter.hh
    \n-
    7 * Version: 1.0
    \n-
    8 * Created on: Mar 5, 2009
    \n-
    9 * Author: Gerrit Buse
    \n-
    10 * ---------------------------------
    \n-
    11 * Project: dune-grid-glue
    \n-
    12 * Description: Class thought to make graphical debugging of couplings easier.
    \n-
    13 *
    \n-
    14 */
    \n-
    20#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_HH
    \n-
    21#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_HH
    \n-
    22
    \n+
    5#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH
    \n+
    6#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH
    \n+
    7
    \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#include <fstream>
    \n-
    25#include <iomanip>
    \n-
    26#include <type_traits>
    \n-
    27#include <vector>
    \n-
    28
    \n-
    29#include <dune/common/classname.hh>
    \n-
    30#include <dune/geometry/type.hh>
    \n-
    31#include <dune/geometry/referenceelements.hh>
    \n-
    32
    \n-\n-
    34
    \n-
    35namespace Dune {
    \n-
    36namespace GridGlue {
    \n-
    37
    \n-
    \n-\n-
    41{
    \n-
    42
    \n-
    46 template <class Glue, int side>
    \n-
    47 static void writeExtractedPart(const Glue& glue, const std::string& filename)
    \n-
    48 {
    \n-
    49 static_assert((side==0 || side==1), "'side' can only be 0 or 1");
    \n-
    50
    \n-
    51 std::ofstream fgrid;
    \n-
    52
    \n-
    53 fgrid.open(filename.c_str());
    \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-
    55 using GridView = typename Glue::template GridView<side>;
    \n-
    56 using Extractor = typename Glue::template GridPatch<side>;
    \n-
    57
    \n-
    58 typedef typename GridView::ctype ctype;
    \n-
    59
    \n-
    60 const int domdimw = GridView::dimensionworld;
    \n-
    61 const int patchDim = Extractor::dim - Extractor::codim;
    \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-
    63 // coordinates have to be in R^3 in the VTK format
    \n-
    64 std::string coordinatePadding;
    \n-
    65 for (int i=domdimw; i<3; i++)
    \n-
    66 coordinatePadding += " 0";
    \n-
    67
    \n-
    68 fgrid << "# vtk DataFile Version 2.0\\nFilename: " << filename << "\\nASCII" << std::endl;
    \n-
    69
    \n-
    70 // WRITE POINTS
    \n-
    71 // ----------------
    \n-
    72 std::vector<typename Extractor::Coords> coords;
    \n-
    73 glue.template patch<side>().getCoords(coords);
    \n-
    74
    \n-
    75 fgrid << ((patchDim==3) ? "DATASET UNSTRUCTURED_GRID" : "DATASET POLYDATA") << std::endl;
    \n-
    76 fgrid << "POINTS " << coords.size() << " " << Dune::className<ctype>() << std::endl;
    \n-
    77
    \n-
    78 for (size_t i=0; i<coords.size(); i++)
    \n-
    79 fgrid << coords[i] << coordinatePadding << std::endl;
    \n-
    80
    \n-
    81 fgrid << std::endl;
    \n-
    82
    \n-
    83 // WRITE POLYGONS
    \n-
    84 // ----------------
    \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 std::vector<typename Extractor::VertexVector> faces;
    \n-
    87 std::vector<Dune::GeometryType> geometryTypes;
    \n-
    88 glue.template patch<side>().getFaces(faces);
    \n-
    89 glue.template patch<side>().getGeometryTypes(geometryTypes);
    \n-
    90
    \n-
    91 unsigned int faceCornerCount = 0;
    \n-
    92 for (size_t i=0; i<faces.size(); i++)
    \n-
    93 faceCornerCount += faces[i].size();
    \n-
    94
    \n-
    95 fgrid << ((patchDim==3) ? "CELLS " : "POLYGONS ")
    \n-
    96 << geometryTypes.size() << " " << geometryTypes.size() + faceCornerCount << std::endl;
    \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-
    98 for (size_t i=0; i<faces.size(); i++) {
    \n-
    99
    \n-
    100 fgrid << faces[i].size();
    \n-
    101
    \n-
    102 // vtk expects the vertices to by cyclically ordered
    \n-
    103 // therefore unfortunately we have to deal with several element types on a case-by-case basis
    \n-
    104 if (geometryTypes[i].isSimplex()) {
    \n-
    105 for (int j=0; j<patchDim+1; j++)
    \n-
    106 fgrid << " " << faces[i][j];
    \n-
    107
    \n-
    108 } else if (geometryTypes[i].isQuadrilateral()) {
    \n-
    109 fgrid << " " << faces[i][0] << " " << faces[i][1]
    \n-
    110 << " " << faces[i][3] << " " << faces[i][2];
    \n-
    111
    \n-
    112 } else if (geometryTypes[i].isPyramid()) {
    \n-
    113 fgrid << " " << faces[i][0] << " " << faces[i][1]
    \n-
    114 << " " << faces[i][3] << " " << faces[i][2] << " " << faces[i][4];
    \n-
    115
    \n-
    116 } else if (geometryTypes[i].isPrism()) {
    \n-
    117 fgrid << " " << faces[i][0] << " " << faces[i][2] << " " << faces[i][1]
    \n-
    118 << " " << faces[i][3] << " " << faces[i][5] << " " << faces[i][4];
    \n-
    119
    \n-
    120 } else if (geometryTypes[i].isHexahedron()) {
    \n-
    121 fgrid << " " << faces[i][0] << " " << faces[i][1]
    \n-
    122 << " " << faces[i][3] << " " << faces[i][2]
    \n-
    123 << " " << faces[i][4] << " " << faces[i][5]
    \n-
    124 << " " << faces[i][7] << " " << faces[i][6];
    \n-
    125
    \n-
    126 } else {
    \n-
    127 DUNE_THROW(Dune::NotImplemented, "Geometry type " << geometryTypes[i] << " not supported yet");
    \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-
    129
    \n-
    130 fgrid << std::endl;
    \n-
    131 }
    \n-
    132
    \n-
    133 fgrid << std::endl;
    \n-
    134
    \n-
    135 // 3d VTK files need an extra section specifying the CELL_TYPES aka GeometryTypes
    \n-
    136 if (patchDim==3) {
    \n-
    137
    \n-
    138 fgrid << "CELL_TYPES " << geometryTypes.size() << std::endl;
    \n-
    139
    \n-
    140 for (size_t i=0; i<geometryTypes.size(); i++) {
    \n-
    141 if (geometryTypes[i].isSimplex())
    \n-
    142 fgrid << "10" << std::endl;
    \n-
    143 else if (geometryTypes[i].isHexahedron())
    \n-
    144 fgrid << "12" << std::endl;
    \n-
    145 else if (geometryTypes[i].isPrism())
    \n-
    146 fgrid << "13" << std::endl;
    \n-
    147 else if (geometryTypes[i].isPyramid())
    \n-
    148 fgrid << "14" << std::endl;
    \n-
    149 else
    \n-
    150 DUNE_THROW(Dune::NotImplemented, "Geometry type " << geometryTypes[i] << " not supported yet");
    \n-
    151
    \n-
    152 }
    \n-
    153
    \n-
    154 }
    \n-
    155
    \n-
    156#if 0
    \n-
    157 // WRITE CELL DATA
    \n-
    158 // ---------------
    \n-
    159 ctype accum = 0.0, delta = 1.0 / (ctype) (gridSubEntityData.size()-1);
    \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 fgrid << "CELL_DATA " << gridSubEntityData.size() << std::endl;
    \n-
    162 fgrid << "SCALARS property_coding " << Dune::className<ctype>() << " 1" << std::endl;
    \n-
    163 fgrid << "LOOKUP_TABLE default" << std::endl;
    \n-
    164
    \n-
    165 for (typename GridSubEntityData::const_iterator sEIt = gridSubEntityData.begin();
    \n-
    166 sEIt != gridSubEntityData.end();
    \n-
    167 ++sEIt, accum += delta)
    \n-
    168 {
    \n-
    169 // "encode" the parent with one color...
    \n-
    170 fgrid << accum << std::endl;
    \n-
    171 }
    \n-
    172#endif
    \n-
    173 fgrid.close();
    \n-
    174 }
    \n-
    175
    \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-
    180 template <class Glue, int side>
    \n-
    181 static void writeIntersections(const Glue& glue, const std::string& filename)
    \n-
    182 {
    \n-
    183 static_assert((side==0 || side==1), "'side' can only be 0 or 1");
    \n-
    184
    \n-
    185 std::ofstream fmerged;
    \n-
    186
    \n-
    187 fmerged.open(filename.c_str());
    \n-
    188
    \n-
    189 using GridView = typename Glue::template GridView<side>;
    \n-
    190 typedef typename GridView::ctype ctype;
    \n-
    191
    \n-
    192 const int domdimw = GridView::dimensionworld;
    \n-
    193 const int intersectionDim = Glue::Intersection::mydim;
    \n-
    194
    \n-
    195 // coordinates have to be in R^3 in the VTK format
    \n-
    196 std::string coordinatePadding;
    \n-
    197 for (int i=domdimw; i<3; i++)
    \n-
    198 coordinatePadding += " 0";
    \n-
    199
    \n-
    200 int overlaps = glue.size();
    \n-
    201
    \n-
    202 // WRITE POINTS
    \n-
    203 // ----------------
    \n-
    204 using Extractor = typename Glue::template GridPatch<0>;
    \n-
    205 std::vector<typename Extractor::Coords> coords;
    \n-
    206 glue.template patch<side>().getCoords(coords);
    \n-
    207
    \n-
    208 // the merged grid (i.e. the set of remote intersections
    \n-
    209 fmerged << "# vtk DataFile Version 2.0\\nFilename: " << filename << "\\nASCII" << std::endl;
    \n-
    210 fmerged << ((intersectionDim==3) ? "DATASET UNSTRUCTURED_GRID" : "DATASET POLYDATA") << std::endl;
    \n-
    211 fmerged << "POINTS " << overlaps*(intersectionDim+1) << " " << Dune::className<ctype>() << std::endl;
    \n-
    212
    \n-
    213 for (const auto& intersection : intersections(glue, Reverse<side == 1>{}))
    \n-
    214 {
    \n-
    215 const auto& geometry = intersection.geometry();
    \n-
    216 for (int i = 0; i < geometry.corners(); ++i)
    \n-
    217 fmerged << geometry.corner(i) << coordinatePadding << std::endl;
    \n-
    218 }
    \n-
    219
    \n-
    220 // WRITE POLYGONS
    \n-
    221 // ----------------
    \n-
    222
    \n-
    223 std::vector<typename Extractor::VertexVector> faces;
    \n-
    224 std::vector<Dune::GeometryType> geometryTypes;
    \n-
    225 glue.template patch<side>().getFaces(faces);
    \n-
    226 glue.template patch<side>().getGeometryTypes(geometryTypes);
    \n-
    227
    \n-
    228 unsigned int faceCornerCount = 0;
    \n-
    229 for (size_t i=0; i<faces.size(); i++)
    \n-
    230 faceCornerCount += faces[i].size();
    \n-
    231
    \n-
    232 int grid0SimplexCorners = intersectionDim+1;
    \n-
    233 fmerged << ((intersectionDim==3) ? "CELLS " : "POLYGONS ")
    \n-
    234 << overlaps << " " << (grid0SimplexCorners+1)*overlaps << std::endl;
    \n-
    235
    \n-
    236 for (int i = 0; i < overlaps; ++i) {
    \n-
    237 fmerged << grid0SimplexCorners;
    \n-
    238 for (int j=0; j<grid0SimplexCorners; j++)
    \n-
    239 fmerged << " " << grid0SimplexCorners*i+j;
    \n-
    240 fmerged << std::endl;
    \n-
    241 }
    \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 // 3d VTK files need an extra section specifying the CELL_TYPES aka GeometryTypes
    \n-
    244 if (intersectionDim==3) {
    \n-
    245
    \n-
    246 fmerged << "CELL_TYPES " << overlaps << std::endl;
    \n-
    247
    \n-
    248 for (int i = 0; i < overlaps; i++)
    \n-
    249 fmerged << "10" << std::endl;
    \n-
    250
    \n-
    251 }
    \n-
    252
    \n-
    253#if 0
    \n-
    254 // WRITE CELL DATA
    \n-
    255 // ---------------
    \n-
    256 ctype accum = 0.0, delta = 1.0 / (ctype) (gridSubEntityData.size()-1);
    \n-
    257
    \n-
    258 fmerged << "CELL_DATA " << overlaps << std::endl;
    \n-
    259 fmerged << "SCALARS property_coding " << Dune::className<ctype>() << " 1" << std::endl;
    \n-
    260 fmerged << "LOOKUP_TABLE default" << std::endl;
    \n-
    261
    \n-
    262 for (typename GridSubEntityData::const_iterator sEIt = gridSubEntityData.begin();
    \n-
    263 sEIt != gridSubEntityData.end();
    \n-
    264 ++sEIt, accum += delta)
    \n-
    265 {
    \n-
    266 // ...and mark all of its merged grid parts with the same color
    \n-
    267 for (int j = 0; j < sEIt->first.second; ++j)
    \n-
    268 fmerged << accum << std::endl;
    \n-
    269 }
    \n-
    270#endif
    \n-
    271 fmerged.close();
    \n-
    272 }
    \n-
    273
    \n-
    274public:
    \n-
    275 template<typename Glue>
    \n-
    \n-
    276 static void write(const Glue& glue, const std::string& filenameTrunk)
    \n-
    277 {
    \n-
    278
    \n-
    279 // Write extracted grid and remote intersection on the grid0-side
    \n-
    280 writeExtractedPart<Glue,0>(glue,
    \n-
    281 filenameTrunk + "-grid0.vtk");
    \n-
    282
    \n-
    283 writeIntersections<Glue,0>(glue,
    \n-
    284 filenameTrunk + "-intersections-grid0.vtk");
    \n-
    285
    \n-
    286 // Write extracted grid and remote intersection on the grid1-side
    \n-
    287 writeExtractedPart<Glue,1>(glue,
    \n-
    288 filenameTrunk + "-grid1.vtk");
    \n-
    289
    \n-
    290 writeIntersections<Glue,1>(glue,
    \n-
    291 filenameTrunk + "-intersections-grid1.vtk");
    \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 }
    \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-
    294
    \n-
    295};
    \n+
    329 };
    \n
    \n-
    296
    \n-
    297} /* namespace GridGlue */
    \n-
    298} /* namespace Dune */
    \n-
    299
    \n-
    300#endif // DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_HH
    \n-
    Central component of the module implementing the coupling of two grids.
    \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-
    Write remote intersections to a vtk file for debugging purposes.
    Definition gridgluevtkwriter.hh:41
    \n-
    static void write(const Glue &glue, const std::string &filenameTrunk)
    Definition gridgluevtkwriter.hh:276
    \n-
    Definition rangegenerators.hh:17
    \n-
    Provides codimension-independent methods for grid extraction.
    Definition extractor.hh:46
    \n-
    static constexpr auto codim
    Definition extractor.hh:52
    \n-
    void getCoords(std::vector< Dune::FieldVector< ctype, dimworld > > &coords) const
    getter for the coordinates array
    Definition extractor.hh:275
    \n-
    static constexpr auto dim
    Definition extractor.hh:51
    \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,349 +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-gridgluevtkwriter.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// -*- 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: GridGlueVtkWriter.hh\n-7 * Version: 1.0\n-8 * Created on: Mar 5, 2009\n-9 * Author: Gerrit Buse\n-10 * ---------------------------------\n-11 * Project: dune-grid-glue\n-12 * Description: Class thought to make graphical debugging of couplings\n-easier.\n-13 *\n-14 */\n-20#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_HH\n-21#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_HH\n-22\n+5#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH\n+6#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH\n+7\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-24#include \n-25#include \n-26#include \n-27#include \n-28\n-29#include \n-30#include \n-31#include \n-32\n-33#include <_\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-34\n-35namespace _\bD_\bu_\bn_\be {\n-36namespace GridGlue {\n-37\n-_\b4_\b0class _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\bV_\bt_\bk_\bW_\br_\bi_\bt_\be_\br\n-41{\n-42\n-46 template \n-47 static void writeExtractedPart(const Glue& glue, const std::string&\n-filename)\n-48 {\n-49 static_assert((side==0 || side==1), \"'side' can only be 0 or 1\");\n-50\n-51 std::ofstream fgrid;\n-52\n-53 fgrid.open(filename.c_str());\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-55 using GridView = typename Glue::template GridView;\n-56 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br = typename Glue::template GridPatch;\n-57\n-58 typedef typename GridView::ctype ctype;\n-59\n-60 const int domdimw = GridView::dimensionworld;\n-61 const int patchDim = _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm - _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bo_\bd_\bi_\bm;\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-63 // coordinates have to be in R^3 in the VTK format\n-64 std::string coordinatePadding;\n-65 for (int i=domdimw; i<3; i++)\n-66 coordinatePadding += \" 0\";\n-67\n-68 fgrid << \"# vtk DataFile Version 2.0\\nFilename: \" << filename << \"\\nASCII\"\n-<< std::endl;\n-69\n-70 // WRITE POINTS\n-71 // ----------------\n-72 std::vector coords;\n-73 glue.template patch()._\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs(coords);\n-74\n-75 fgrid << ((patchDim==3) ? \"DATASET UNSTRUCTURED_GRID\" : \"DATASET POLYDATA\")\n-<< std::endl;\n-76 fgrid << \"POINTS \" << coords.size() << \" \" << Dune::className() <<\n-std::endl;\n-77\n-78 for (size_t i=0; i\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 std::vector faces;\n-87 std::vector geometryTypes;\n-88 glue.template patch().getFaces(faces);\n-89 glue.template patch().getGeometryTypes(geometryTypes);\n-90\n-91 unsigned int faceCornerCount = 0;\n-92 for (size_t i=0; i\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-98 for (size_t i=0; i\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-129\n-130 fgrid << std::endl;\n-131 }\n-132\n-133 fgrid << std::endl;\n-134\n-135 // 3d VTK files need an extra section specifying the CELL_TYPES aka\n-GeometryTypes\n-136 if (patchDim==3) {\n-137\n-138 fgrid << \"CELL_TYPES \" << geometryTypes.size() << std::endl;\n-139\n-140 for (size_t i=0; i(*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 fgrid << \"CELL_DATA \" << gridSubEntityData.size() << std::endl;\n-162 fgrid << \"SCALARS property_coding \" << Dune::className() << \" 1\" <<\n-std::endl;\n-163 fgrid << \"LOOKUP_TABLE default\" << std::endl;\n-164\n-165 for (typename GridSubEntityData::const_iterator sEIt =\n-gridSubEntityData.begin();\n-166 sEIt != gridSubEntityData.end();\n-167 ++sEIt, accum += delta)\n-168 {\n-169 // \"encode\" the parent with one color...\n-170 fgrid << accum << std::endl;\n-171 }\n-172#endif\n-173 fgrid.close();\n-174 }\n-175\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-180 template \n-181 static void writeIntersections(const Glue& glue, const std::string&\n-filename)\n-182 {\n-183 static_assert((side==0 || side==1), \"'side' can only be 0 or 1\");\n-184\n-185 std::ofstream fmerged;\n-186\n-187 fmerged.open(filename.c_str());\n-188\n-189 using GridView = typename Glue::template GridView;\n-190 typedef typename GridView::ctype ctype;\n-191\n-192 const int domdimw = GridView::dimensionworld;\n-193 const int intersectionDim = Glue::Intersection::mydim;\n-194\n-195 // coordinates have to be in R^3 in the VTK format\n-196 std::string coordinatePadding;\n-197 for (int i=domdimw; i<3; i++)\n-198 coordinatePadding += \" 0\";\n-199\n-200 int overlaps = glue.size();\n-201\n-202 // WRITE POINTS\n-203 // ----------------\n-204 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br = typename Glue::template GridPatch<0>;\n-205 std::vector coords;\n-206 glue.template patch()._\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs(coords);\n-207\n-208 // the merged grid (i.e. the set of remote intersections\n-209 fmerged << \"# vtk DataFile Version 2.0\\nFilename: \" << filename <<\n-\"\\nASCII\" << std::endl;\n-210 fmerged << ((intersectionDim==3) ? \"DATASET UNSTRUCTURED_GRID\" : \"DATASET\n-POLYDATA\") << std::endl;\n-211 fmerged << \"POINTS \" << overlaps*(intersectionDim+1) << \" \" << Dune::\n-className() << std::endl;\n-212\n-213 for (const auto& intersection : _\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+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 const auto& geometry = intersection.geometry();\n-216 for (int i = 0; i < geometry.corners(); ++i)\n-217 fmerged << geometry.corner(i) << coordinatePadding << std::endl;\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 // WRITE POLYGONS\n-221 // ----------------\n-222\n-223 std::vector faces;\n-224 std::vector geometryTypes;\n-225 glue.template patch().getFaces(faces);\n-226 glue.template patch().getGeometryTypes(geometryTypes);\n-227\n-228 unsigned int faceCornerCount = 0;\n-229 for (size_t i=0; i\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 // 3d VTK files need an extra section specifying the CELL_TYPES aka\n-GeometryTypes\n-244 if (intersectionDim==3) {\n-245\n-246 fmerged << \"CELL_TYPES \" << overlaps << std::endl;\n-247\n-248 for (int i = 0; i < overlaps; i++)\n-249 fmerged << \"10\" << std::endl;\n-250\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\n-253#if 0\n-254 // WRITE CELL DATA\n-255 // ---------------\n-256 ctype accum = 0.0, delta = 1.0 / (ctype) (gridSubEntityData.size()-1);\n-257\n-258 fmerged << \"CELL_DATA \" << overlaps << std::endl;\n-259 fmerged << \"SCALARS property_coding \" << Dune::className() << \" 1\"\n-<< std::endl;\n-260 fmerged << \"LOOKUP_TABLE default\" << std::endl;\n-261\n-262 for (typename GridSubEntityData::const_iterator sEIt =\n-gridSubEntityData.begin();\n-263 sEIt != gridSubEntityData.end();\n-264 ++sEIt, accum += delta)\n-265 {\n-266 // ...and mark all of its merged grid parts with the same color\n-267 for (int j = 0; j < sEIt->first.second; ++j)\n-268 fmerged << accum << std::endl;\n-269 }\n-270#endif\n-271 fmerged.close();\n-272 }\n-273\n-274public:\n-275 template\n-_\b2_\b7_\b6 static void _\bw_\br_\bi_\bt_\be(const Glue& glue, const std::string& filenameTrunk)\n-277 {\n-278\n-279 // Write extracted grid and remote intersection on the grid0-side\n-280 writeExtractedPart(glue,\n-281 filenameTrunk + \"-grid0.vtk\");\n-282\n-283 writeIntersections(glue,\n-284 filenameTrunk + \"-intersections-grid0.vtk\");\n-285\n-286 // Write extracted grid and remote intersection on the grid1-side\n-287 writeExtractedPart(glue,\n-288 filenameTrunk + \"-grid1.vtk\");\n-289\n-290 writeIntersections(glue,\n-291 filenameTrunk + \"-intersections-grid1.vtk\");\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 }\n-294\n-295};\n-296\n-297} /* namespace GridGlue */\n-298} /* namespace Dune */\n-299\n-300#endif // DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_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+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_\bV_\bt_\bk_\bW_\br_\bi_\bt_\be_\br\n-Write remote intersections to a vtk file for debugging purposes.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluevtkwriter.hh:41\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_\bV_\bt_\bk_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be\n-static void write(const Glue &glue, const std::string &filenameTrunk)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluevtkwriter.hh:276\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:_\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:_\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:_\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs\n-void getCoords(std::vector< Dune::FieldVector< ctype, dimworld > > &coords)\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-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:_\bd_\bi_\bm\n-static constexpr auto dim\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:51\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/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: gridglueamirawriter.hh File Reference\n+dune-grid-glue: gridglue.cc File Reference\n \n \n \n \n \n \n \n@@ -70,43 +70,41 @@\n \n
    \n
    \n \n-
    gridglueamirawriter.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    gridglue.cc 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+
    #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-

    \n-Classes

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

    template<typename T >
    void Dune::GridGlue::printVector (const std::vector< T > &v, std::string name, int rank)
     
    \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": "@@ -1,28 +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-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+_\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:_\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-*\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+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: gridglueamirawriter.hh Source File\n+dune-grid-glue: gridglue.cc Source File\n \n \n \n \n \n \n \n@@ -74,166 +74,502 @@\n \n \n
    \n
    \n-
    gridglueamirawriter.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-
    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+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-
    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+
    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-
    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+
    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 // ////////////////////////////////////////////
    \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+
    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-
    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+
    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
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,165 +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-gridglueamirawriter.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-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-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+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-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+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-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+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 // ////////////////////////////////////////////\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+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:_\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:_\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 ===============================================================================\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: gridgluevtkwriter.hh File Reference\n \n \n \n \n \n \n \n@@ -71,74 +71,47 @@\n \n
    \n \n
    \n \n-
    gridgluecommunicate.hh File Reference
    \n+Namespaces
    \n+
    gridgluevtkwriter.hh File Reference
    \n \n
    \n \n-

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

    Write all remote intersections to a vtk file for debugging. \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 <iomanip>
    \n+#include <type_traits>
    \n+#include <vector>
    \n+#include <dune/common/classname.hh>
    \n+#include <dune/geometry/type.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-\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::GridGlueVtkWriter
     Write remote intersections to a vtk 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 vtk file for debugging.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,61 +1,33 @@\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+gridgluevtkwriter.hh File Reference\n+Write all remote intersections to a vtk file for debugging. _\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 <_\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-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_\bV_\bt_\bk_\bW_\br_\bi_\bt_\be_\br\n+\u00a0 Write remote intersections to a vtk 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 vtk file for debugging.\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: gridgluevtkwriter.hh Source File\n \n \n \n \n \n \n \n@@ -74,365 +74,318 @@\n \n \n
    \n
    \n-
    gridgluecommunicate.hh
    \n+
    gridgluevtkwriter.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-
    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+
    5/*
    \n+
    6 * Filename: GridGlueVtkWriter.hh
    \n+
    7 * Version: 1.0
    \n+
    8 * Created on: Mar 5, 2009
    \n+
    9 * Author: Gerrit Buse
    \n+
    10 * ---------------------------------
    \n+
    11 * Project: dune-grid-glue
    \n+
    12 * Description: Class thought to make graphical debugging of couplings easier.
    \n+
    13 *
    \n+
    14 */
    \n+
    20#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_HH
    \n+
    21#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_HH
    \n+
    22
    \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+
    24#include <fstream>
    \n+
    25#include <iomanip>
    \n+
    26#include <type_traits>
    \n+
    27#include <vector>
    \n+
    28
    \n+
    29#include <dune/common/classname.hh>
    \n+
    30#include <dune/geometry/type.hh>
    \n+
    31#include <dune/geometry/referenceelements.hh>
    \n+
    32
    \n+\n+
    34
    \n+
    35namespace Dune {
    \n+
    36namespace GridGlue {
    \n+
    37
    \n+
    \n+\n+
    41{
    \n+
    42
    \n+
    46 template <class Glue, int side>
    \n+
    47 static void writeExtractedPart(const Glue& glue, const std::string& filename)
    \n+
    48 {
    \n+
    49 static_assert((side==0 || side==1), "'side' can only be 0 or 1");
    \n+
    50
    \n+
    51 std::ofstream fgrid;
    \n+
    52
    \n+
    53 fgrid.open(filename.c_str());
    \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+
    55 using GridView = typename Glue::template GridView<side>;
    \n+
    56 using Extractor = typename Glue::template GridPatch<side>;
    \n+
    57
    \n+
    58 typedef typename GridView::ctype ctype;
    \n+
    59
    \n+
    60 const int domdimw = GridView::dimensionworld;
    \n+
    61 const int patchDim = Extractor::dim - Extractor::codim;
    \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+
    63 // coordinates have to be in R^3 in the VTK format
    \n+
    64 std::string coordinatePadding;
    \n+
    65 for (int i=domdimw; i<3; i++)
    \n+
    66 coordinatePadding += " 0";
    \n+
    67
    \n+
    68 fgrid << "# vtk DataFile Version 2.0\\nFilename: " << filename << "\\nASCII" << std::endl;
    \n+
    69
    \n+
    70 // WRITE POINTS
    \n+
    71 // ----------------
    \n+
    72 std::vector<typename Extractor::Coords> coords;
    \n+
    73 glue.template patch<side>().getCoords(coords);
    \n+
    74
    \n+
    75 fgrid << ((patchDim==3) ? "DATASET UNSTRUCTURED_GRID" : "DATASET POLYDATA") << std::endl;
    \n+
    76 fgrid << "POINTS " << coords.size() << " " << Dune::className<ctype>() << std::endl;
    \n+
    77
    \n+
    78 for (size_t i=0; i<coords.size(); i++)
    \n+
    79 fgrid << coords[i] << coordinatePadding << std::endl;
    \n+
    80
    \n+
    81 fgrid << std::endl;
    \n+
    82
    \n+
    83 // WRITE POLYGONS
    \n+
    84 // ----------------
    \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+
    86 std::vector<typename Extractor::VertexVector> faces;
    \n+
    87 std::vector<Dune::GeometryType> geometryTypes;
    \n+
    88 glue.template patch<side>().getFaces(faces);
    \n+
    89 glue.template patch<side>().getGeometryTypes(geometryTypes);
    \n+
    90
    \n+
    91 unsigned int faceCornerCount = 0;
    \n+
    92 for (size_t i=0; i<faces.size(); i++)
    \n+
    93 faceCornerCount += faces[i].size();
    \n+
    94
    \n+
    95 fgrid << ((patchDim==3) ? "CELLS " : "POLYGONS ")
    \n+
    96 << geometryTypes.size() << " " << geometryTypes.size() + faceCornerCount << std::endl;
    \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+
    98 for (size_t i=0; i<faces.size(); i++) {
    \n+
    99
    \n+
    100 fgrid << faces[i].size();
    \n+
    101
    \n+
    102 // vtk expects the vertices to by cyclically ordered
    \n+
    103 // therefore unfortunately we have to deal with several element types on a case-by-case basis
    \n+
    104 if (geometryTypes[i].isSimplex()) {
    \n+
    105 for (int j=0; j<patchDim+1; j++)
    \n+
    106 fgrid << " " << faces[i][j];
    \n+
    107
    \n+
    108 } else if (geometryTypes[i].isQuadrilateral()) {
    \n+
    109 fgrid << " " << faces[i][0] << " " << faces[i][1]
    \n+
    110 << " " << faces[i][3] << " " << faces[i][2];
    \n+
    111
    \n+
    112 } else if (geometryTypes[i].isPyramid()) {
    \n+
    113 fgrid << " " << faces[i][0] << " " << faces[i][1]
    \n+
    114 << " " << faces[i][3] << " " << faces[i][2] << " " << faces[i][4];
    \n+
    115
    \n+
    116 } else if (geometryTypes[i].isPrism()) {
    \n+
    117 fgrid << " " << faces[i][0] << " " << faces[i][2] << " " << faces[i][1]
    \n+
    118 << " " << faces[i][3] << " " << faces[i][5] << " " << faces[i][4];
    \n+
    119
    \n+
    120 } else if (geometryTypes[i].isHexahedron()) {
    \n+
    121 fgrid << " " << faces[i][0] << " " << faces[i][1]
    \n+
    122 << " " << faces[i][3] << " " << faces[i][2]
    \n+
    123 << " " << faces[i][4] << " " << faces[i][5]
    \n+
    124 << " " << faces[i][7] << " " << faces[i][6];
    \n+
    125
    \n+
    126 } else {
    \n+
    127 DUNE_THROW(Dune::NotImplemented, "Geometry type " << geometryTypes[i] << " not supported yet");
    \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+
    129
    \n+
    130 fgrid << std::endl;
    \n+
    131 }
    \n+
    132
    \n+
    133 fgrid << std::endl;
    \n+
    134
    \n+
    135 // 3d VTK files need an extra section specifying the CELL_TYPES aka GeometryTypes
    \n+
    136 if (patchDim==3) {
    \n+
    137
    \n+
    138 fgrid << "CELL_TYPES " << geometryTypes.size() << std::endl;
    \n+
    139
    \n+
    140 for (size_t i=0; i<geometryTypes.size(); i++) {
    \n+
    141 if (geometryTypes[i].isSimplex())
    \n+
    142 fgrid << "10" << std::endl;
    \n+
    143 else if (geometryTypes[i].isHexahedron())
    \n+
    144 fgrid << "12" << std::endl;
    \n+
    145 else if (geometryTypes[i].isPrism())
    \n+
    146 fgrid << "13" << std::endl;
    \n+
    147 else if (geometryTypes[i].isPyramid())
    \n+
    148 fgrid << "14" << std::endl;
    \n+
    149 else
    \n+
    150 DUNE_THROW(Dune::NotImplemented, "Geometry type " << geometryTypes[i] << " not supported yet");
    \n+
    151
    \n+
    152 }
    \n+
    153
    \n+
    154 }
    \n+
    155
    \n+
    156#if 0
    \n+
    157 // WRITE CELL DATA
    \n+
    158 // ---------------
    \n+
    159 ctype accum = 0.0, delta = 1.0 / (ctype) (gridSubEntityData.size()-1);
    \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+
    161 fgrid << "CELL_DATA " << gridSubEntityData.size() << std::endl;
    \n+
    162 fgrid << "SCALARS property_coding " << Dune::className<ctype>() << " 1" << std::endl;
    \n+
    163 fgrid << "LOOKUP_TABLE default" << std::endl;
    \n+
    164
    \n+
    165 for (typename GridSubEntityData::const_iterator sEIt = gridSubEntityData.begin();
    \n+
    166 sEIt != gridSubEntityData.end();
    \n+
    167 ++sEIt, accum += delta)
    \n+
    168 {
    \n+
    169 // "encode" the parent with one color...
    \n+
    170 fgrid << accum << std::endl;
    \n+
    171 }
    \n+
    172#endif
    \n+
    173 fgrid.close();
    \n+
    174 }
    \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-
    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+
    180 template <class Glue, int side>
    \n+
    181 static void writeIntersections(const Glue& glue, const std::string& filename)
    \n+
    182 {
    \n+
    183 static_assert((side==0 || side==1), "'side' can only be 0 or 1");
    \n+
    184
    \n+
    185 std::ofstream fmerged;
    \n+
    186
    \n+
    187 fmerged.open(filename.c_str());
    \n+
    188
    \n+
    189 using GridView = typename Glue::template GridView<side>;
    \n+
    190 typedef typename GridView::ctype ctype;
    \n+
    191
    \n+
    192 const int domdimw = GridView::dimensionworld;
    \n+
    193 const int intersectionDim = Glue::Intersection::mydim;
    \n+
    194
    \n+
    195 // coordinates have to be in R^3 in the VTK format
    \n+
    196 std::string coordinatePadding;
    \n+
    197 for (int i=domdimw; i<3; i++)
    \n+
    198 coordinatePadding += " 0";
    \n+
    199
    \n+
    200 int overlaps = glue.size();
    \n+
    201
    \n+
    202 // WRITE POINTS
    \n+
    203 // ----------------
    \n+
    204 using Extractor = typename Glue::template GridPatch<0>;
    \n+
    205 std::vector<typename Extractor::Coords> coords;
    \n+
    206 glue.template patch<side>().getCoords(coords);
    \n+
    207
    \n+
    208 // the merged grid (i.e. the set of remote intersections
    \n+
    209 fmerged << "# vtk DataFile Version 2.0\\nFilename: " << filename << "\\nASCII" << std::endl;
    \n+
    210 fmerged << ((intersectionDim==3) ? "DATASET UNSTRUCTURED_GRID" : "DATASET POLYDATA") << std::endl;
    \n+
    211 fmerged << "POINTS " << overlaps*(intersectionDim+1) << " " << Dune::className<ctype>() << std::endl;
    \n+
    212
    \n+
    213 for (const auto& intersection : intersections(glue, Reverse<side == 1>{}))
    \n+
    214 {
    \n+
    215 const auto& geometry = intersection.geometry();
    \n+
    216 for (int i = 0; i < geometry.corners(); ++i)
    \n+
    217 fmerged << geometry.corner(i) << coordinatePadding << std::endl;
    \n+
    218 }
    \n+
    219
    \n+
    220 // WRITE POLYGONS
    \n+
    221 // ----------------
    \n+
    222
    \n+
    223 std::vector<typename Extractor::VertexVector> faces;
    \n+
    224 std::vector<Dune::GeometryType> geometryTypes;
    \n+
    225 glue.template patch<side>().getFaces(faces);
    \n+
    226 glue.template patch<side>().getGeometryTypes(geometryTypes);
    \n+
    227
    \n+
    228 unsigned int faceCornerCount = 0;
    \n+
    229 for (size_t i=0; i<faces.size(); i++)
    \n+
    230 faceCornerCount += faces[i].size();
    \n+
    231
    \n+
    232 int grid0SimplexCorners = intersectionDim+1;
    \n+
    233 fmerged << ((intersectionDim==3) ? "CELLS " : "POLYGONS ")
    \n+
    234 << overlaps << " " << (grid0SimplexCorners+1)*overlaps << std::endl;
    \n+
    235
    \n+
    236 for (int i = 0; i < overlaps; ++i) {
    \n+
    237 fmerged << grid0SimplexCorners;
    \n+
    238 for (int j=0; j<grid0SimplexCorners; j++)
    \n+
    239 fmerged << " " << grid0SimplexCorners*i+j;
    \n+
    240 fmerged << std::endl;
    \n+
    241 }
    \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+
    243 // 3d VTK files need an extra section specifying the CELL_TYPES aka GeometryTypes
    \n+
    244 if (intersectionDim==3) {
    \n+
    245
    \n+
    246 fmerged << "CELL_TYPES " << overlaps << std::endl;
    \n+
    247
    \n+
    248 for (int i = 0; i < overlaps; i++)
    \n+
    249 fmerged << "10" << std::endl;
    \n+
    250
    \n+
    251 }
    \n+
    252
    \n+
    253#if 0
    \n+
    254 // WRITE CELL DATA
    \n+
    255 // ---------------
    \n+
    256 ctype accum = 0.0, delta = 1.0 / (ctype) (gridSubEntityData.size()-1);
    \n+
    257
    \n+
    258 fmerged << "CELL_DATA " << overlaps << std::endl;
    \n+
    259 fmerged << "SCALARS property_coding " << Dune::className<ctype>() << " 1" << std::endl;
    \n+
    260 fmerged << "LOOKUP_TABLE default" << std::endl;
    \n+
    261
    \n+
    262 for (typename GridSubEntityData::const_iterator sEIt = gridSubEntityData.begin();
    \n+
    263 sEIt != gridSubEntityData.end();
    \n+
    264 ++sEIt, accum += delta)
    \n+
    265 {
    \n+
    266 // ...and mark all of its merged grid parts with the same color
    \n+
    267 for (int j = 0; j < sEIt->first.second; ++j)
    \n+
    268 fmerged << accum << std::endl;
    \n+
    269 }
    \n+
    270#endif
    \n+
    271 fmerged.close();
    \n+
    272 }
    \n+
    273
    \n+
    274public:
    \n+
    275 template<typename Glue>
    \n+
    \n+
    276 static void write(const Glue& glue, const std::string& filenameTrunk)
    \n+
    277 {
    \n+
    278
    \n+
    279 // Write extracted grid and remote intersection on the grid0-side
    \n+
    280 writeExtractedPart<Glue,0>(glue,
    \n+
    281 filenameTrunk + "-grid0.vtk");
    \n+
    282
    \n+
    283 writeIntersections<Glue,0>(glue,
    \n+
    284 filenameTrunk + "-intersections-grid0.vtk");
    \n+
    285
    \n+
    286 // Write extracted grid and remote intersection on the grid1-side
    \n+
    287 writeExtractedPart<Glue,1>(glue,
    \n+
    288 filenameTrunk + "-grid1.vtk");
    \n+
    289
    \n+
    290 writeIntersections<Glue,1>(glue,
    \n+
    291 filenameTrunk + "-intersections-grid1.vtk");
    \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+
    293 }
    \n
    \n-
    329 };
    \n+
    294
    \n+
    295};
    \n
    \n-
    330#endif
    \n-
    331
    \n-
    332} // end namespace Dune
    \n-
    333#endif
    \n+
    296
    \n+
    297} /* namespace GridGlue */
    \n+
    298} /* namespace Dune */
    \n+
    299
    \n+
    300#endif // DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_HH
    \n+
    Central component of the module implementing the coupling of two grids.
    \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+
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n+
    Write remote intersections to a vtk file for debugging purposes.
    Definition gridgluevtkwriter.hh:41
    \n+
    static void write(const Glue &glue, const std::string &filenameTrunk)
    Definition gridgluevtkwriter.hh:276
    \n+
    Definition rangegenerators.hh:17
    \n+
    Provides codimension-independent methods for grid extraction.
    Definition extractor.hh:46
    \n+
    static constexpr auto codim
    Definition extractor.hh:52
    \n+
    void getCoords(std::vector< Dune::FieldVector< ctype, dimworld > > &coords) const
    getter for the coordinates array
    Definition extractor.hh:275
    \n+
    static constexpr auto dim
    Definition extractor.hh:51
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,442 +1,349 @@\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+gridgluevtkwriter.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_ADAPTER_GRIDGLUECOMMUNICATE_HH\n-6#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUECOMMUNICATE_HH\n-7\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+5/*\n+6 * Filename: GridGlueVtkWriter.hh\n+7 * Version: 1.0\n+8 * Created on: Mar 5, 2009\n+9 * Author: Gerrit Buse\n+10 * ---------------------------------\n+11 * Project: dune-grid-glue\n+12 * Description: Class thought to make graphical debugging of couplings\n+easier.\n+13 *\n+14 */\n+20#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_HH\n+21#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_HH\n+22\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+24#include \n+25#include \n+26#include \n+27#include \n+28\n+29#include \n+30#include \n+31#include \n+32\n+33#include <_\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+34\n+35namespace _\bD_\bu_\bn_\be {\n+36namespace GridGlue {\n+37\n+_\b4_\b0class _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\bV_\bt_\bk_\bW_\br_\bi_\bt_\be_\br\n+41{\n+42\n+46 template \n+47 static void writeExtractedPart(const Glue& glue, const std::string&\n+filename)\n+48 {\n+49 static_assert((side==0 || side==1), \"'side' can only be 0 or 1\");\n+50\n+51 std::ofstream fgrid;\n+52\n+53 fgrid.open(filename.c_str());\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+55 using GridView = typename Glue::template GridView;\n+56 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br = typename Glue::template GridPatch;\n+57\n+58 typedef typename GridView::ctype ctype;\n+59\n+60 const int domdimw = GridView::dimensionworld;\n+61 const int patchDim = _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm - _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bo_\bd_\bi_\bm;\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+63 // coordinates have to be in R^3 in the VTK format\n+64 std::string coordinatePadding;\n+65 for (int i=domdimw; i<3; i++)\n+66 coordinatePadding += \" 0\";\n+67\n+68 fgrid << \"# vtk DataFile Version 2.0\\nFilename: \" << filename << \"\\nASCII\"\n+<< std::endl;\n+69\n+70 // WRITE POINTS\n+71 // ----------------\n+72 std::vector coords;\n+73 glue.template patch()._\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs(coords);\n+74\n+75 fgrid << ((patchDim==3) ? \"DATASET UNSTRUCTURED_GRID\" : \"DATASET POLYDATA\")\n+<< std::endl;\n+76 fgrid << \"POINTS \" << coords.size() << \" \" << Dune::className() <<\n+std::endl;\n+77\n+78 for (size_t i=0; i\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+86 std::vector faces;\n+87 std::vector geometryTypes;\n+88 glue.template patch().getFaces(faces);\n+89 glue.template patch().getGeometryTypes(geometryTypes);\n+90\n+91 unsigned int faceCornerCount = 0;\n+92 for (size_t i=0; i\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+98 for (size_t i=0; i(*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+129\n+130 fgrid << std::endl;\n+131 }\n+132\n+133 fgrid << std::endl;\n+134\n+135 // 3d VTK files need an extra section specifying the CELL_TYPES aka\n+GeometryTypes\n+136 if (patchDim==3) {\n+137\n+138 fgrid << \"CELL_TYPES \" << geometryTypes.size() << std::endl;\n+139\n+140 for (size_t i=0; i\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+161 fgrid << \"CELL_DATA \" << gridSubEntityData.size() << std::endl;\n+162 fgrid << \"SCALARS property_coding \" << Dune::className() << \" 1\" <<\n+std::endl;\n+163 fgrid << \"LOOKUP_TABLE default\" << std::endl;\n+164\n+165 for (typename GridSubEntityData::const_iterator sEIt =\n+gridSubEntityData.begin();\n+166 sEIt != gridSubEntityData.end();\n+167 ++sEIt, accum += delta)\n+168 {\n+169 // \"encode\" the parent with one color...\n+170 fgrid << accum << std::endl;\n+171 }\n+172#endif\n+173 fgrid.close();\n+174 }\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+180 template \n+181 static void writeIntersections(const Glue& glue, const std::string&\n+filename)\n+182 {\n+183 static_assert((side==0 || side==1), \"'side' can only be 0 or 1\");\n+184\n+185 std::ofstream fmerged;\n+186\n+187 fmerged.open(filename.c_str());\n+188\n+189 using GridView = typename Glue::template GridView;\n+190 typedef typename GridView::ctype ctype;\n+191\n+192 const int domdimw = GridView::dimensionworld;\n+193 const int intersectionDim = Glue::Intersection::mydim;\n+194\n+195 // coordinates have to be in R^3 in the VTK format\n+196 std::string coordinatePadding;\n+197 for (int i=domdimw; i<3; i++)\n+198 coordinatePadding += \" 0\";\n+199\n+200 int overlaps = glue.size();\n+201\n+202 // WRITE POINTS\n+203 // ----------------\n+204 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br = typename Glue::template GridPatch<0>;\n+205 std::vector coords;\n+206 glue.template patch()._\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs(coords);\n+207\n+208 // the merged grid (i.e. the set of remote intersections\n+209 fmerged << \"# vtk DataFile Version 2.0\\nFilename: \" << filename <<\n+\"\\nASCII\" << std::endl;\n+210 fmerged << ((intersectionDim==3) ? \"DATASET UNSTRUCTURED_GRID\" : \"DATASET\n+POLYDATA\") << std::endl;\n+211 fmerged << \"POINTS \" << overlaps*(intersectionDim+1) << \" \" << Dune::\n+className() << std::endl;\n+212\n+213 for (const auto& intersection : _\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 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+215 const auto& geometry = intersection.geometry();\n+216 for (int i = 0; i < geometry.corners(); ++i)\n+217 fmerged << geometry.corner(i) << coordinatePadding << std::endl;\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+219\n+220 // WRITE POLYGONS\n+221 // ----------------\n+222\n+223 std::vector faces;\n+224 std::vector geometryTypes;\n+225 glue.template patch().getFaces(faces);\n+226 glue.template patch().getGeometryTypes(geometryTypes);\n+227\n+228 unsigned int faceCornerCount = 0;\n+229 for (size_t i=0; iscatter(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+243 // 3d VTK files need an extra section specifying the CELL_TYPES aka\n+GeometryTypes\n+244 if (intersectionDim==3) {\n+245\n+246 fmerged << \"CELL_TYPES \" << overlaps << std::endl;\n+247\n+248 for (int i = 0; i < overlaps; i++)\n+249 fmerged << \"10\" << std::endl;\n+250\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+252\n+253#if 0\n+254 // WRITE CELL DATA\n+255 // ---------------\n+256 ctype accum = 0.0, delta = 1.0 / (ctype) (gridSubEntityData.size()-1);\n+257\n+258 fmerged << \"CELL_DATA \" << overlaps << std::endl;\n+259 fmerged << \"SCALARS property_coding \" << Dune::className() << \" 1\"\n+<< std::endl;\n+260 fmerged << \"LOOKUP_TABLE default\" << std::endl;\n+261\n+262 for (typename GridSubEntityData::const_iterator sEIt =\n+gridSubEntityData.begin();\n+263 sEIt != gridSubEntityData.end();\n+264 ++sEIt, accum += delta)\n+265 {\n+266 // ...and mark all of its merged grid parts with the same color\n+267 for (int j = 0; j < sEIt->first.second; ++j)\n+268 fmerged << accum << std::endl;\n+269 }\n+270#endif\n+271 fmerged.close();\n+272 }\n+273\n+274public:\n+275 template\n+_\b2_\b7_\b6 static void _\bw_\br_\bi_\bt_\be(const Glue& glue, const std::string& filenameTrunk)\n+277 {\n+278\n+279 // Write extracted grid and remote intersection on the grid0-side\n+280 writeExtractedPart(glue,\n+281 filenameTrunk + \"-grid0.vtk\");\n+282\n+283 writeIntersections(glue,\n+284 filenameTrunk + \"-intersections-grid0.vtk\");\n+285\n+286 // Write extracted grid and remote intersection on the grid1-side\n+287 writeExtractedPart(glue,\n+288 filenameTrunk + \"-grid1.vtk\");\n+289\n+290 writeIntersections(glue,\n+291 filenameTrunk + \"-intersections-grid1.vtk\");\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+293 }\n+294\n+295};\n+296\n+297} /* namespace GridGlue */\n+298} /* namespace Dune */\n+299\n+300#endif // DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_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:_\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+_\bD_\bu_\bn_\be_\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_\bV_\bt_\bk_\bW_\br_\bi_\bt_\be_\br\n+Write remote intersections to a vtk file for debugging purposes.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluevtkwriter.hh:41\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_\bV_\bt_\bk_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be\n+static void write(const Glue &glue, const std::string &filenameTrunk)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridgluevtkwriter.hh:276\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:_\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:_\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:_\bg_\be_\bt_\bC_\bo_\bo_\br_\bd_\bs\n+void getCoords(std::vector< Dune::FieldVector< ctype, dimworld > > &coords)\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+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:_\bd_\bi_\bm\n+static constexpr auto dim\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:51\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: intersectionindexset.hh File Reference\n+dune-grid-glue: intersectioniterator.hh File Reference\n \n \n \n \n \n \n \n@@ -72,34 +72,39 @@\n
  • dune
  • grid-glue
  • adapter
  • \n
    \n
    \n
    \n \n-
    intersectionindexset.hh File Reference
    \n+
    intersectioniterator.hh File Reference
    \n
    \n
    \n+\n+

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

    \n \n

    Go to the source code of this file.

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

    \n Classes

    class  Dune::GridGlue::IntersectionIndexSet< P0, P1 >
    class  Dune::GridGlue::IntersectionIterator< P0, P1, inside, outside >
     
    \n \n \n \n \n \n

    \n Namespaces

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

    Detailed Description

    \n+

    Implement iterators over GridGlue intersections.

    \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": "@@ -2,21 +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 * _\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+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-#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:_\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+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+*\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+ 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/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: intersectionindexset.hh Source File\n+dune-grid-glue: intersectioniterator.hh Source File\n \n \n \n \n \n \n \n@@ -74,87 +74,95 @@\n \n \n \n
    \n-
    intersectionindexset.hh
    \n+
    intersectioniterator.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_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+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-
    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+\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-
    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-
    57
    \n-
    58#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
    \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+
    \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 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-
    Model of the Intersection concept provided by GridGlue.
    \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-
    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+
    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,105 +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-intersectionindexset.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-_\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-13#endif\n+12#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH\n+13#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH\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+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-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-57\n-58#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH\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 assert((\"never dereference the end iterator\" &&\n+40 index_ != glue_->index__sz));\n+41 return intersection_;\n+42 }\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+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 _\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\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:_\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 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/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: projection.hh File Reference\n+dune-grid-glue: projection_impl.hh File Reference\n \n \n \n \n \n \n \n@@ -70,41 +70,49 @@\n \n
    \n
    \n \n-
    projection.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    projection_impl.hh File Reference
    \n \n
    \n-
    #include <array>
    \n-#include <bitset>
    \n-#include <tuple>
    \n-#include "projection_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-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+\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+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)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,28 +1,44 @@\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+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-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+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+ 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: projection.hh Source File\n+dune-grid-glue: projection_impl.hh Source File\n \n \n \n \n \n \n \n@@ -74,137 +74,464 @@\n \n \n
    \n
    \n-
    projection.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_PROJECTIONHELPER2_HH
    \n-
    4#define DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH
    \n-
    5
    \n-
    6#include <array>
    \n-
    7#include <bitset>
    \n-
    8#include <tuple>
    \n+
    3#include <dune/common/fmatrix.hh>
    \n+
    4
    \n+
    5#include <cmath>
    \n+
    6
    \n+
    7namespace Dune {
    \n+
    8namespace GridGlue {
    \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+
    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-
    275};
    \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} /* namespace GridGlue */
    \n-
    278} /* namespace Dune */
    \n-
    279
    \n-
    280#include "projection_impl.hh"
    \n-
    281
    \n-
    282#endif
    \n-\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+
    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-
    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,175 +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-projection.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_PROJECTIONHELPER2_HH\n-4#define DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH\n-5\n-6#include \n-7#include \n-8#include \n+3#include \n+4\n+5#include \n+6\n+7namespace _\bD_\bu_\bn_\be {\n+8namespace GridGlue {\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+_\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-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+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} /* 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+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:_\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-_\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/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: areawriter_impl.hh File Reference\n+dune-grid-glue: ringcomm.hh File Reference\n \n \n \n \n \n \n \n@@ -70,57 +70,78 @@\n \n
    \n
    \n \n-
    areawriter_impl.hh File Reference
    \n+
    ringcomm.hh File Reference
    \n
    \n
    \n-
    #include <fstream>
    \n-#include <vector>
    \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 <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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    namespace  Dune::GridGlue::AreaWriterImplementation
    namespace  Dune::Parallel
     
    \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 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)
     
    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,43 +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-_\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+_\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-#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+namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bP_\ba_\br_\ba_\bl_\bl_\be_\bl\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+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-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+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: areawriter_impl.hh Source File\n+dune-grid-glue: ringcomm.hh Source File\n \n \n \n \n \n \n \n@@ -74,183 +74,309 @@\n \n \n
    \n
    \n-
    areawriter_impl.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#include <fstream>
    \n-
    4#include <vector>
    \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+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-
    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+
    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-
    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+
    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-
    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+
    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-
    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+
    308
    \n+
    309} // end namespace Parallel
    \n
    \n-
    142
    \n-
    143} /* namespace GridGlue */
    \n-
    144} /* namespace Dune */
    \n+
    310} // end 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+
    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,184 +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-areawriter_impl.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#include \n-4#include \n-5\n-6#include \n-7#include \n-8#include \n+5/* IMPLEMENTATION OF CLASS G R I D G L U E */\n+6\n+_\b8#define CheckMPIStatus(A,B) {}\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+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-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+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 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+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-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+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-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+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:_\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:_\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: areawriter.hh File Reference\n+dune-grid-glue: projection.hh File Reference\n \n \n \n \n \n \n \n@@ -70,43 +70,41 @@\n \n
    \n
    \n \n-
    areawriter.hh File Reference
    \n+Classes |\n+Namespaces
    \n+
    projection.hh File Reference
    \n
    \n
    \n-
    #include <ostream>
    \n-#include <string>
    \n-#include "areawriter_impl.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+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-\n-\n-\n-\n

    \n-Functions

    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,32 +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-_\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\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+ 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-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/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: areawriter.hh Source File\n+dune-grid-glue: projection.hh Source File\n \n \n \n \n \n \n \n@@ -74,47 +74,137 @@\n \n \n
    \n
    \n-
    areawriter.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#ifndef DUNE_GRIDGLUE_COMMON_AREAWRITER_HH
    \n-
    4#define DUNE_GRIDGLUE_COMMON_AREAWRITER_HH
    \n+
    3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH
    \n+
    4#define DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_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+
    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
    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+
    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,48 +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.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#ifndef DUNE_GRIDGLUE_COMMON_AREAWRITER_HH\n-4#define DUNE_GRIDGLUE_COMMON_AREAWRITER_HH\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\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+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 _\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:_\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/a00038.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038.html", "unified_diff": "@@ -77,16 +77,16 @@\n Namespaces |\n Functions
    \n
    projectionwriter.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/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"}, {"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": "@@ -85,15 +85,15 @@\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+\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@@ -109,19 +109,19 @@\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+\n
    63
    \n
    64#endif
    \n-\n-\n+\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 \n \n
    \n Generated by \"doxygen\"/ 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: areawriter.hh File Reference\n \n \n \n \n \n \n \n@@ -72,47 +72,41 @@\n
  • dune
  • grid-glue
  • common
  • \n \n \n
    \n \n-
    projection_impl.hh File Reference
    \n+
    areawriter.hh File Reference
    \n
    \n
    \n-
    #include <dune/common/fmatrix.hh>
    \n-#include <cmath>
    \n+
    #include <ostream>
    \n+#include <string>
    \n+#include "areawriter_impl.hh"
    \n
    \n

    Go to the source code of this file.

    \n

    \n Namespaces

    namespace  Dune
     
    \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 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<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,43 +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-projection_impl.hh File Reference\n-#include \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_\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-\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+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- 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+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/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: areawriter.hh Source File\n \n \n \n \n \n \n \n@@ -74,464 +74,47 @@\n \n \n \n
    \n-
    projection_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 <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+
    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-
    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+
    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-
    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+
    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,480 +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-projection_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-5#include \n-6\n-7namespace _\bD_\bu_\bn_\be {\n-8namespace GridGlue {\n-9\n-_\b1_\b0namespace ProjectionImplementation {\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-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+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:_\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+_\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/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: projectionwriter_impl.hh File Reference\n+dune-grid-glue: areawriter_impl.hh File Reference\n \n \n \n \n \n \n \n@@ -70,61 +70,56 @@\n \n \n
    \n \n-
    projectionwriter_impl.hh File Reference
    \n+
    areawriter_impl.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
    \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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    namespace  Dune::GridGlue::ProjectionWriterImplementation
    namespace  Dune::GridGlue::AreaWriterImplementation
     
    \n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\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<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,60 +1,43 @@\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-projectionwriter_impl.hh File Reference\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:_\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+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:_\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-\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:_\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/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: projectionwriter_impl.hh Source File\n+dune-grid-glue: areawriter_impl.hh Source File\n \n \n \n \n \n \n \n@@ -74,211 +74,183 @@\n \n \n \n
    \n-
    projectionwriter_impl.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#include <fstream>
    \n-
    4
    \n-
    5namespace Dune {
    \n-
    6namespace GridGlue {
    \n-
    7
    \n-
    \n-
    8namespace ProjectionWriterImplementation {
    \n+
    4#include <vector>
    \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
    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+
    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+
    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-
    82
    \n-
    83} /* namespace ProjectionWriterImplementation */
    \n+
    80
    \n+
    81} /* namespace AreaWriterImplementation */
    \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+
    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(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+
    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,238 +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-projectionwriter_impl.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#include \n-4\n-5namespace _\bD_\bu_\bn_\be {\n-6namespace GridGlue {\n-7\n-_\b8namespace ProjectionWriterImplementation {\n+4#include \n+5\n+6#include \n+7#include \n+8#include \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+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+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-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+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\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+_\bD_\bu_\bn_\be_\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/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: ringcomm.hh File Reference\n+dune-grid-glue: projectionwriter_impl.hh File Reference\n \n \n \n \n \n \n \n@@ -71,77 +71,61 @@\n \n
    \n
    \n
    \n \n-
    ringcomm.hh File Reference
    \n+
    projectionwriter_impl.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 <fstream>
    \n
    \n

    Go to the source code of this file.

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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::Parallel
    namespace  Dune::GridGlue
     
    namespace  Dune::GridGlue::ProjectionWriterImplementation
     
    \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+\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<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-

    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,60 @@\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_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:_\bP_\ba_\br_\ba_\bl_\bl_\be_\bl\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 _\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_\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:_\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+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+\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/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: ringcomm.hh Source File\n+dune-grid-glue: projectionwriter_impl.hh Source File\n \n \n \n \n \n \n \n@@ -74,309 +74,211 @@\n \n \n
    \n
    \n-
    ringcomm.hh
    \n+
    projectionwriter_impl.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+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-
    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+
    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#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+
    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 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+
    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-
    308
    \n-
    309} // end namespace Parallel
    \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-
    310} // end namespace Dune
    \n+
    161
    \n+
    162} /* namespace GridGlue */
    \n+
    163} /* namespace Dune */
    \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+
    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
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,308 +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-ringcomm.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// -*- 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+3#include \n+4\n+5namespace _\bD_\bu_\bn_\be {\n+6namespace GridGlue {\n+7\n+_\b8namespace ProjectionWriterImplementation {\n 9\n-10#include \n-11#include \n-12#include \n-13\n-14#include \n-15#include \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#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+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 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+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 _\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+_\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 ===============================================================================\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.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062.html", "unified_diff": "@@ -82,15 +82,15 @@\n \n

    helper class for graphical output of grids in generic representation \n More...

    \n
    #include <fstream>
    \n #include <iomanip>
    \n #include <vector>
    \n #include <cstring>
    \n-#include "../adapter/gridgluevtkwriter.hh"
    \n+#include "../adapter/gridgluevtkwriter.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/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: standardmerge.cc File Reference\n+dune-grid-glue: simplexintersection.cc File Reference\n \n \n \n \n \n \n \n@@ -70,110 +70,70 @@\n \n \n
    \n \n-
    standardmerge.cc File Reference
    \n+
    simplexintersection.cc File Reference
    \n
    \n
    \n-
    #include "config.h"
    \n-#include "standardmerge.hh"
    \n-

    \n Classes

    class  Dune::GridGlue::VtkSurfaceWriter
     
    \n+\n+

    Go to the source code of this file.

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

    \n+Classes

    class  Dune::GridGlue::SimplexMethod< dimWorld, dim1, dim2, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 0, 0, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 0, 1, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 0, 2, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 0, 3, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 1, 1, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 1, 2, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 1, 3, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 2, 2, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 2, 3, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 3, 3, T >
     
    \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+\n+\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)
     
    template<int dimworld, typename T >
    void Dune::GridGlue::simplexSubdivision (std::integral_constant< int, 0 >, const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
     
    template<int dimworld, typename T >
    void Dune::GridGlue::simplexSubdivision (std::integral_constant< int, 1 >, const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
     
    template<int dimworld, typename T >
    void Dune::GridGlue::simplexSubdivision (std::integral_constant< int, 2 >, const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
     
    template<int dimworld, typename T >
    void Dune::GridGlue::simplexSubdivision (std::integral_constant< int, 3 >, const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
     
    \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,65 @@\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-N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n-namespace \u00a0 _\bD_\bu_\bn_\be\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+simplexintersection.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_\bi_\bm_\bp_\bl_\be_\bx_\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-namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n+class \u00a0 _\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b0_\b,_\b _\bT_\b _\b>\n \u00a0\n-M\bMa\bac\bcr\bro\bos\bs\n-#define\u00a0 _\bD_\bE_\bC_\bL\n+class \u00a0 _\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b1_\b,_\b _\bT_\b _\b>\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+class \u00a0 _\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b2_\b,_\b _\bT_\b _\b>\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+class \u00a0 _\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b3_\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b1_\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b3_\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b2_\b,_\b _\b2_\b,_\b _\bT_\b _\b>\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+class \u00a0 _\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b2_\b,_\b _\b3_\b,_\b _\bT_\b _\b>\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+class \u00a0 _\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b3_\b,_\b _\b3_\b,_\b _\bT_\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:_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn (std::integral_constant< int, 0 >,\n+ const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners,\n+ std::vector< std::vector< unsigned int > > &subElements, std::vector<\n+ std::vector< int > > &faceIds)\n+\u00a0\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn (std::integral_constant< int, 1 >,\n+ const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners,\n+ std::vector< std::vector< unsigned int > > &subElements, std::vector<\n+ std::vector< int > > &faceIds)\n+\u00a0\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn (std::integral_constant< int, 2 >,\n+ const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners,\n+ std::vector< std::vector< unsigned int > > &subElements, std::vector<\n+ std::vector< int > > &faceIds)\n+\u00a0\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn (std::integral_constant< int, 3 >,\n+ const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners,\n+ std::vector< std::vector< unsigned int > > &subElements, std::vector<\n+ std::vector< int > > &faceIds)\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/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: computeintersection.hh File Reference\n+dune-grid-glue: conformingmerge.hh File Reference\n \n \n \n \n \n \n \n@@ -71,47 +71,47 @@\n \n
    \n
    \n
    \n \n-
    computeintersection.hh File Reference
    \n+Namespaces
    \n+
    conformingmerge.hh File Reference
    \n \n
    \n-
    #include <dune/common/fvector.hh>
    \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 "simplexintersection.cc"
    \n-#include "computeintersection.cc"
    \n+#include <dune/common/fvector.hh>
    \n+#include <dune/geometry/referenceelements.hh>
    \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 \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::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-\n-\n-\n

    \n-Functions

    template<class V >
    int Dune::GridGlue::insertPoint (const V p, std::vector< V > &P)
     
    \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": "@@ -1,32 +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 | _\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+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 \"_\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 <_\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 _\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:_\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-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+*\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/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: computeintersection.hh Source File\n+dune-grid-glue: conformingmerge.hh Source File\n \n \n \n \n \n \n \n@@ -74,190 +74,220 @@\n \n \n \n
    \n-
    computeintersection.hh
    \n+
    conformingmerge.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+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+
    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+
    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+
    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-
    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+
    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-
    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+
    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 }
    \n-
    182 else
    \n-
    183 P.push_back(p);
    \n-
    184
    \n-
    185 return k ;
    \n-
    186}
    \n-
    \n-
    187
    \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} /* 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+
    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-
    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+
    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 \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,214 +1,253 @@\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+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// 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+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+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+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+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,\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+130 for (unsigned int j=0; j::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_\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+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 &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:_\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 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 ===============================================================================\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: simplexintersection.cc File Reference\n+dune-grid-glue: contactmerge.cc File Reference\n \n \n \n \n \n \n \n@@ -70,69 +70,29 @@\n \n
    \n
    \n \n-
    simplexintersection.cc File Reference
    \n+Namespaces
    \n+
    contactmerge.cc File Reference
    \n \n
    \n-\n+\n

    Go to the source code of this file.

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

    \n-Classes

    class  Dune::GridGlue::SimplexMethod< dimWorld, dim1, dim2, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 0, 0, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 0, 1, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 0, 2, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 0, 3, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 1, 1, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 1, 2, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 1, 3, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 2, 2, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 2, 3, T >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 3, 3, T >
     
    \n \n \n \n \n \n-

    \n Namespaces

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

    \n-Functions

    template<int dimworld, typename T >
    void Dune::GridGlue::simplexSubdivision (std::integral_constant< int, 0 >, const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
     
    template<int dimworld, typename T >
    void Dune::GridGlue::simplexSubdivision (std::integral_constant< int, 1 >, const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
     
    template<int dimworld, typename T >
    void Dune::GridGlue::simplexSubdivision (std::integral_constant< int, 2 >, const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
     
    template<int dimworld, typename T >
    void Dune::GridGlue::simplexSubdivision (std::integral_constant< int, 3 >, const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,65 +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-_\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-simplexintersection.cc File Reference\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-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_\bi_\bm_\bp_\bl_\be_\bx_\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b0_\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b1_\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b3_\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b1_\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b3_\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b2_\b,_\b _\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b2_\b,_\b _\b3_\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b3_\b,_\b _\b3_\b,_\b _\bT_\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:_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn (std::integral_constant< int, 0 >,\n- const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners,\n- std::vector< std::vector< unsigned int > > &subElements, std::vector<\n- std::vector< int > > &faceIds)\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn (std::integral_constant< int, 1 >,\n- const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners,\n- std::vector< std::vector< unsigned int > > &subElements, std::vector<\n- std::vector< int > > &faceIds)\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn (std::integral_constant< int, 2 >,\n- const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners,\n- std::vector< std::vector< unsigned int > > &subElements, std::vector<\n- std::vector< int > > &faceIds)\n-\u00a0\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn (std::integral_constant< int, 3 >,\n- const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners,\n- std::vector< std::vector< unsigned int > > &subElements, std::vector<\n- std::vector< int > > &faceIds)\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/a00071_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00071_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: simplexintersection.cc Source File\n+dune-grid-glue: contactmerge.cc Source File\n \n \n \n \n \n \n \n@@ -74,1430 +74,389 @@\n \n \n \n
    \n-
    simplexintersection.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
    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+\n+\n
    8
    \n-
    9template <int dimworld, typename T>
    \n-
    10inline void simplexSubdivision(std::integral_constant<int,0>,const std::vector<Dune::FieldVector<T, dimworld> >& elementCorners,
    \n-
    11 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    12 std::vector<std::vector<int> >& faceIds);
    \n-
    13template <int dimworld, typename T>
    \n-
    14inline void simplexSubdivision(std::integral_constant<int,1>,const std::vector<Dune::FieldVector<T, dimworld> >& elementCorners,
    \n-
    15 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    16 std::vector<std::vector<int> >& faceIds);
    \n-
    17template <int dimworld, typename T>
    \n-
    18inline void simplexSubdivision(std::integral_constant<int,2>,const std::vector<Dune::FieldVector<T, dimworld> >& elementCorners,
    \n-
    19 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    20 std::vector<std::vector<int> >& faceIds);
    \n-
    21template <int dimworld, typename T>
    \n-
    22inline void simplexSubdivision(std::integral_constant<int,3>,const std::vector<Dune::FieldVector<T, dimworld> >& elementCorners,
    \n-
    23 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    24 std::vector<std::vector<int> >& faceIds);
    \n-
    25
    \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 std::vector<std::array<LocalCoords,2> > polytopeCorners;
    \n
    26
    \n-
    27
    \n-
    28// *****************SIMPLEX INTERSECTION COMPUTATION METHODS ***************************
    \n-
    29template<int dimWorld,int dim1, int dim2, typename T>
    \n-
    \n-
    30class SimplexMethod : public ComputationMethod<dimWorld,dim1,dim2,T>{
    \n-
    31 static_assert(dim1 > dim2, "Specialization missing");
    \n-
    32 friend class ComputationMethod<dimWorld,dim1,dim2,T>;
    \n-
    33public:
    \n-
    34 typedef FieldVector<T, dimWorld> Vector;
    \n-
    35 static const int grid1Dimension = dim1;
    \n-
    36 static const int grid2Dimension = dim2;
    \n-
    37 static const int intersectionDimension = dim2;
    \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-
    \n-
    39 static bool computeIntersectionPoints(const std::vector<FieldVector<T,dimWorld> >& X,
    \n-
    40 const std::vector<FieldVector<T,dimWorld> >& Y,
    \n-
    41 std::vector<std::vector<int> > & SX,
    \n-
    42 std::vector<std::vector<int> > & SY,
    \n-
    43 std::vector<FieldVector<T,dimWorld> > & P)
    \n-
    44 {
    \n-\n-
    46 }
    \n-
    \n-
    47
    \n-
    \n-
    48 static void grid1_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    49 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    50 std::vector<std::vector<int> >& faceIds)
    \n-
    51 {
    \n-
    52 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid1Dimension>(),
    \n-
    53 elementCorners,subElements, faceIds);
    \n-
    54 }
    \n-
    \n-
    55
    \n-
    56 static void grid2_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    57 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    58 std::vector<std::vector<int> >& faceIds)
    \n-
    59 {
    \n-
    60 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid2Dimension>(),
    \n-
    61 elementCorners, subElements, faceIds);
    \n-
    62 }
    \n-
    63};
    \n-
    \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
    \n-
    66
    \n-
    67// POINTS ARE EQUAL
    \n-
    68template<int dimWorld,typename T>
    \n-
    \n-
    69class SimplexMethod<dimWorld,0,0,T> : public ComputationMethod<dimWorld,0,0,T>{
    \n-
    70 friend class ComputationMethod<dimWorld,0,0,T>;
    \n-
    71
    \n-
    72public:
    \n-
    73 typedef FieldVector<T, dimWorld> Vector;
    \n-
    74 static const int grid1Dimension = 0;
    \n-
    75 static const int grid2Dimension = 0;
    \n-
    76 static const int intersectionDimension = 0;
    \n-
    77
    \n-
    \n-\n-
    79 const std::vector<FieldVector<T,dimWorld> >& X,
    \n-
    80 const std::vector<FieldVector<T,dimWorld> >& Y,
    \n-
    81 std::vector<std::vector<int> > & SX,
    \n-
    82 std::vector<std::vector<int> > & SY,
    \n-
    83 std::vector<FieldVector<T,dimWorld> > & P)
    \n-
    84 {
    \n-
    85 assert(X.size() == 1 && Y.size() == 1);
    \n-
    86
    \n-
    87 P.clear(); SX.clear(); SY.clear();
    \n-
    88 int k;
    \n-
    89
    \n-
    90 T eps = 1e-8;
    \n-
    91 T a = X[0].infinity_norm();
    \n-
    92 T b = Y[0].infinity_norm();
    \n-
    93 T c = (X[0] - Y[0]).infinity_norm();
    \n-
    94
    \n-
    95 if (c <= eps*a || c <= eps*b ||
    \n-
    96 (a<eps && b< eps && c < 0.5*eps) ) {
    \n-
    97 k = insertPoint(X[0],P);
    \n-
    98
    \n-
    99 return true;
    \n-
    100 }
    \n-
    101 return false;
    \n-
    102 }
    \n-
    \n-
    103
    \n-
    \n-
    104 static void grid1_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    105 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    106 std::vector<std::vector<int> >& faceIds)
    \n-
    107 {
    \n-
    108 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid1Dimension>(),
    \n-
    109 elementCorners,subElements, faceIds);
    \n-
    110 }
    \n-
    \n-
    111
    \n-
    112 static void grid2_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    113 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    114 std::vector<std::vector<int> >& faceIds)
    \n-
    115 {
    \n-
    116 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid2Dimension>(),
    \n-
    117 elementCorners, subElements, faceIds);
    \n-
    118 }
    \n-
    119
    \n-
    120};
    \n-
    \n-
    121
    \n-
    122
    \n-
    123// POINT ON LINE SEGMENT - :)
    \n-
    124template<int dimWorld,typename T>
    \n-
    \n-
    125class SimplexMethod<dimWorld,0,1,T> : public ComputationMethod<dimWorld,0,1,T>{
    \n-
    126 friend class ComputationMethod<dimWorld,0,1,T>;
    \n-
    127
    \n-
    128public:
    \n-
    129 typedef FieldVector<T, dimWorld> Vector;
    \n-
    130 static const int grid1Dimension = 0;
    \n-
    131 static const int grid2Dimension = 1;
    \n-
    132 static const int intersectionDimension = 0;
    \n-
    133
    \n-
    \n-
    134 static bool computeIntersectionPoints(const std::vector<FieldVector<T,dimWorld> >& X,
    \n-
    135 const std::vector<FieldVector<T,dimWorld> >& Y,
    \n-
    136 std::vector<std::vector<int> > & SX,
    \n-
    137 std::vector<std::vector<int> > & SY,
    \n-
    138 std::vector<FieldVector<T,dimWorld> > & P)
    \n-
    139 {
    \n-
    140 assert(X.size() == 1 && Y.size() == 2);
    \n-
    141
    \n-
    142 P.clear(); SX.clear(); SY.clear();
    \n-
    143 SY.resize(2);
    \n-
    144
    \n-
    145 if (dimWorld == 1) {
    \n-
    146 T lowerBound = std::max(X[0][0], std::min(Y[0][0],Y[1][0]));
    \n-
    147 T upperBound = std::min(X[0][0], std::max(Y[0][0],Y[1][0]));
    \n-
    148
    \n-
    149 if (lowerBound <= upperBound) { // Intersection is non-empty
    \n-
    150 insertPoint(X[0],P);
    \n-
    151 return true;
    \n-
    152 }
    \n-
    153 } else {
    \n-
    154
    \n-
    155 T eps = 1e-8;
    \n-
    156
    \n-
    157 // check whether the point is on the segment
    \n-
    158 FieldVector<T,dimWorld> v0 = X[0] - Y[0];
    \n-
    159 FieldVector<T,dimWorld> v1 = X[0] - Y[1];
    \n-
    160 FieldVector<T,dimWorld> v2 = Y[1] - Y[0];
    \n-
    161
    \n-
    162 T s = v0.dot(v1);
    \n-
    163 T t = v0.two_norm()/v2.two_norm();
    \n-
    164 v2*=t;
    \n-
    165 v2+=Y[0];
    \n-
    166 v2-=X[0];
    \n-
    167
    \n-
    168 if (v2.infinity_norm() < eps && s<=eps && t<=1+eps) {
    \n-
    169
    \n-
    170 int k = insertPoint(X[0],P);
    \n-
    171 if (s < eps && t < eps)
    \n-
    172 SY[0].push_back(k);
    \n-
    173 else if (s < eps && t>1-eps)
    \n-
    174 SY[1].push_back(k);
    \n-
    175 return true;
    \n-
    176 }
    \n-
    177 }
    \n-
    178 return false;
    \n-
    179 }
    \n-
    \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 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 // 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+
    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-
    \n-
    181 static void grid1_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    182 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    183 std::vector<std::vector<int> >& faceIds)
    \n-
    184 {
    \n-
    185 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid1Dimension>(),
    \n-
    186 elementCorners,subElements, faceIds);
    \n-
    187 }
    \n-
    \n-
    188
    \n-
    189 static void grid2_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    190 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    191 std::vector<std::vector<int> >& faceIds)
    \n-
    192 {
    \n-
    193 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid2Dimension>(),
    \n-
    194 elementCorners, subElements, faceIds);
    \n-
    195 }
    \n-
    196
    \n-
    197};
    \n-
    \n-
    198
    \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// POINT IN TRIANGLE - :)
    \n-
    201template<int dimWorld,typename T>
    \n-
    \n-
    202class SimplexMethod<dimWorld,0,2,T> : public ComputationMethod<dimWorld,0,2,T>{
    \n-
    203 friend class ComputationMethod<dimWorld,0,2,T>;
    \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-
    205public:
    \n-
    206 typedef FieldVector<T, dimWorld> Vector;
    \n-
    207 static const int grid1Dimension = 0;
    \n-
    208 static const int grid2Dimension = 2;
    \n-
    209 static const int intersectionDimension = 0;
    \n-
    210
    \n-
    \n-
    211 static bool computeIntersectionPoints(const std::vector<FieldVector<T,dimWorld> >& X,
    \n-
    212 const std::vector<FieldVector<T,dimWorld> >& Y,
    \n-
    213 std::vector<std::vector<int> > & SX,
    \n-
    214 std::vector<std::vector<int> > & SY,
    \n-
    215 std::vector<FieldVector<T,dimWorld> > & P)
    \n-
    216 {
    \n-
    217 assert(X.size() == 1 && Y.size() == 3 && dimWorld > 1);
    \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 P.clear(); SX.clear(); SY.clear();
    \n-
    220 SY.resize(3);
    \n-
    221 int k;
    \n-
    222
    \n-
    223 // If not, check whether it is inside the triangle
    \n-
    224 double eps= 1e-8 ; // tolerance for relative error
    \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 FieldVector<T,dimWorld> v0,v1,v2,r;
    \n-
    227
    \n-
    228 v0 = Y[1] - Y[0];
    \n-
    229 v1 = Y[2] - Y[0];
    \n-
    230 v2 = X[0] - Y[0];
    \n-
    231
    \n-
    232 T s,t,d;
    \n-
    233
    \n-
    234 d = ((v0.dot(v0))*(v1.dot(v1)) - (v0.dot(v1))*(v0.dot(v1)));
    \n-
    235
    \n-
    236 s = ((v1.dot(v1))*(v0.dot(v2)) - (v0.dot(v1))*(v1.dot(v2))) / d;
    \n-
    237 t = ((v0.dot(v0))*(v1.dot(v2)) - (v0.dot(v1))*(v0.dot(v2))) / d;
    \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 v0*=s;
    \n-
    240 v1*=t;
    \n-
    241 r = Y[0] + v0 + v1;
    \n-
    242
    \n-
    243 if (s > -eps && t > -eps && (s+t)< 1+eps && (r-X[0]).infinity_norm() < eps) {
    \n-
    244 k = insertPoint(X[0],P);
    \n-
    245
    \n-
    246 if (t < eps) { // t ~ 0, s varies -> edge 0
    \n-
    247 SY[0].push_back(k);
    \n-
    248 }
    \n-
    249 if (s < eps) { // s ~ 0, t varies -> edge 1
    \n-
    250 SY[1].push_back(k);
    \n-
    251 }
    \n-
    252 if (s+t > 1-eps) { // s+t ~ 1 -> edge 2
    \n-
    253 SY[2].push_back(k);
    \n-
    254 }
    \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 return true;
    \n-
    257 }
    \n-
    258
    \n-
    259 return false;
    \n-
    260 }
    \n-
    \n-
    261
    \n-
    \n-
    262 static void grid1_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    263 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    264 std::vector<std::vector<int> >& faceIds)
    \n-
    265 {
    \n-
    266 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid1Dimension>(),
    \n-
    267 elementCorners,subElements, faceIds);
    \n-
    268 }
    \n-
    \n-
    269
    \n-
    270 static void grid2_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    271 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    272 std::vector<std::vector<int> >& faceIds)
    \n-
    273 {
    \n-
    274 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid2Dimension>(),
    \n-
    275 elementCorners, subElements, faceIds);
    \n-
    276 }
    \n-
    277};
    \n-
    \n-
    278
    \n-
    279
    \n-
    280// POINT IN TETRAHEDRON - : )
    \n-
    281template<int dimWorld,typename T>
    \n-
    \n-
    282class SimplexMethod<dimWorld,0,3,T> : public ComputationMethod<dimWorld,0,3,T>{
    \n-
    283 friend class ComputationMethod<dimWorld,0,3,T>;
    \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-
    285public:
    \n-
    286 typedef FieldVector<T, dimWorld> Vector;
    \n-
    287 static const int grid1Dimension = 0;
    \n-
    288 static const int grid2Dimension = 3;
    \n-
    289 static const int intersectionDimension = 0;
    \n-
    290
    \n-
    \n-
    291 static bool computeIntersectionPoints(const std::vector<FieldVector<T,dimWorld> >& X,
    \n-
    292 const std::vector<FieldVector<T,dimWorld> >& Y,
    \n-
    293 std::vector<std::vector<int> > & SX,
    \n-
    294 std::vector<std::vector<int> > & SY,
    \n-
    295 std::vector<FieldVector<T,dimWorld> > & P)
    \n-
    296 {
    \n-
    297 assert(X.size() == 1 && Y.size() == 4 && dimWorld == 3);
    \n-
    298
    \n-
    299 P.clear(); SX.clear(); SY.clear();
    \n-
    300 SY.resize(4);
    \n-
    301
    \n-
    302 T eps = 1e-8;
    \n-
    303 // if not, check whether its inside the tetrahedron
    \n-
    304 FieldMatrix<T,dimWorld+1,dimWorld+1> D,DD ;
    \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 D[0][0] = Y[0][0] ; D[0][1] = Y[1][0] ; D[0][2] = Y[2][0] ; D[0][3] = Y[3][0] ;
    \n-
    307 D[1][0] = Y[0][1] ; D[1][1] = Y[1][1] ; D[1][2] = Y[2][1] ; D[1][3] = Y[3][1] ;
    \n-
    308 D[2][0] = Y[0][2] ; D[2][1] = Y[1][2] ; D[2][2] = Y[2][2] ; D[2][3] = Y[3][2] ;
    \n-
    309 D[3][0] = 1 ; D[3][1] = 1 ; D[3][2] = 1 ; D[3][3] = 1 ;
    \n-
    310
    \n-
    311 std::array<T, 5> detD;
    \n-
    312 detD[0] = D.determinant();
    \n-
    313
    \n-
    314 for(unsigned i = 1; i < detD.size(); ++i) {
    \n-
    315 DD = D;
    \n-
    316 for (unsigned d = 0; d < dimWorld; ++d)
    \n-
    317 DD[d][i-1] = X[0][d];
    \n-
    318 detD[i] = DD.determinant();
    \n-
    319 if (std::abs(detD[i]) > eps && std::signbit(detD[0]) != std::signbit(detD[i]))
    \n-
    320 return false; // We are outside.
    \n-
    321 }
    \n-
    322
    \n-
    323 int k = insertPoint(X[0],P);
    \n-
    324 unsigned int faces[4] = {3,2,1,0};
    \n-
    325 for (unsigned i = 1; i < detD.size(); ++i)
    \n-
    326 if(std::abs(detD[i]) < eps)
    \n-
    327 SY[faces[i-1]].push_back(k); // on triangle not containing node i-1
    \n-
    328
    \n-
    329 return true;
    \n-
    330 }
    \n-
    \n-
    331
    \n-
    \n-
    332 static void grid1_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    333 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    334 std::vector<std::vector<int> >& faceIds)
    \n-
    335 {
    \n-
    336 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid1Dimension>(),
    \n-
    337 elementCorners,subElements, faceIds);
    \n-
    338 }
    \n-
    \n-
    339
    \n-
    340 static void grid2_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    341 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    342 std::vector<std::vector<int> >& faceIds)
    \n-
    343 {
    \n-
    344 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid2Dimension>(),
    \n-
    345 elementCorners, subElements, faceIds);
    \n-
    346 }
    \n-
    347};
    \n-
    \n-
    348
    \n-
    349// SEGEMENT-SEGMENT INTERSECTION - :)
    \n-
    350template<int dimWorld,typename T>
    \n-
    \n-
    351class SimplexMethod<dimWorld,1,1,T> : public ComputationMethod<dimWorld,1,1,T>{
    \n-
    352 friend class ComputationMethod<dimWorld,1,1,T>;
    \n-
    353
    \n-
    354public:
    \n-
    355 typedef FieldVector<T, dimWorld> Vector;
    \n-
    356 static const int grid1Dimension = 1;
    \n-
    357 static const int grid2Dimension = 1;
    \n-
    358 static const int intersectionDimension = 1;
    \n-
    359
    \n-
    \n-
    360 static bool computeIntersectionPoints(const std::vector<FieldVector<T,dimWorld> >& X,
    \n-
    361 const std::vector<FieldVector<T,dimWorld> >& Y,
    \n-
    362 std::vector<std::vector<int> > & SX,
    \n-
    363 std::vector<std::vector<int> > & SY,
    \n-
    364 std::vector<FieldVector<T,dimWorld> > & P)
    \n-
    365 {
    \n-
    366 assert(X.size() == 2 && Y.size() == 2);
    \n-
    367
    \n-
    368 P.clear(); SX.clear(); SY.clear();
    \n-
    369 SX.resize(2);
    \n-
    370 SY.resize(2);
    \n-
    371 T eps = 1e-8;
    \n-
    372 int k,idX_min=-1,idX_max=-1,idY_min=-1,idY_max=-1;
    \n-
    373
    \n-
    374 // compute intersections
    \n-
    375 switch (dimWorld) {
    \n-
    376 case 1: // d
    \n-
    377 {
    \n-
    378 FieldVector<T,dimWorld> lowerbound(std::max(std::min(X[0][0],X[1][0]), std::min(Y[0][0],X[1][0])));
    \n-
    379 FieldVector<T,dimWorld> upperbound(std::min(std::max(X[0][0],X[1][0]), std::max(Y[0][0],Y[1][0])));
    \n-
    380
    \n-
    381 if (lowerbound[0] < upperbound[0]) { // Intersection is non-empty
    \n-
    382
    \n-
    383 idX_min = (std::min(X[0][0],X[1][0]) < std::min(Y[0][0],Y[1][0]))?(-1):((X[0][0]<X[1][0])?(0):(1));
    \n-
    384 if (idX_min < 0)
    \n-
    385 idY_min = ((Y[0][0]<Y[1][0])?(0):(1));
    \n-
    386
    \n-
    387 idX_max = (std::max(X[0][0],X[1][0]) > std::max(Y[0][0],Y[1][0]))?(-1):((X[0][0]>X[1][0])?(0):(1));
    \n-
    388 if (idX_max < 0)
    \n-
    389 idY_max = ((Y[0][0]>Y[1][0])?(0):(1));
    \n-
    390
    \n-
    391 k = insertPoint(lowerbound,P);
    \n-
    392 if (idX_min >= 0)
    \n-
    393 SX[idX_min].push_back(k);
    \n-
    394 else
    \n-
    395 SY[idY_min].push_back(k);
    \n-
    396
    \n-
    397 k = insertPoint(upperbound,P);
    \n-
    398 if (idX_max >= 0)
    \n-
    399 SX[idX_max].push_back(k);
    \n-
    400 else
    \n-
    401 SY[idY_max].push_back(k);
    \n-
    402
    \n-
    403 return true;
    \n-
    404 }
    \n-
    405 return false;
    \n-
    406 }
    \n-
    407 case 2: // solve X0 + r_0 * (X1 - X0) = Y0 + r_1 * (Y1 - Y0)
    \n-
    408 { // get size_type for all the vectors we are using
    \n-
    409
    \n-
    410 FieldMatrix<T,dimWorld, dimWorld> A;
    \n-
    411 A[0][0] = X[1][0] - X[0][0]; A[0][1] = Y[0][0] - Y[1][0];
    \n-
    412 A[1][0] = X[1][1] - X[0][1]; A[1][1] = Y[0][1] - Y[1][1];
    \n-
    413
    \n-
    414 if (std::abs(A.determinant())>eps) {
    \n-
    415 // lines are non parallel and not degenerated
    \n-
    416 FieldVector<T,dimWorld> p,r,b = Y[0] - X[0];
    \n-
    417 A.solve(r,b) ;
    \n-
    418
    \n-
    419 if ((r[0]>-eps)&&(r[0]<=1+eps)&&(r[1]>-eps)&&(r[1]<1+eps)) {
    \n-
    420 p = X[1] - X[0];
    \n-
    421 p *= r[0] ;
    \n-
    422 p += X[0] ;
    \n-
    423 k = insertPoint(p,P);
    \n-
    424 if(r[0] < eps) { // X = X_0 + r_0 (X_1 - X_0) = X_0
    \n-
    425 SX[0].push_back(k);
    \n-
    426 P[k] = X[0];
    \n-
    427 }
    \n-
    428 else if(r[0] > 1-eps) { // X = X_0 + r_0 (X_1 - X_0) = X_1
    \n-
    429 SX[1].push_back(k);
    \n-
    430 P[k] = X[1];
    \n-
    431 }
    \n-
    432 if(r[1] < eps){ // Y = Y_0 + r_1 (Y_1 - Y_0) = Y_0
    \n-
    433 SY[0].push_back(k);
    \n-
    434 P[k] = Y[0];
    \n-
    435 }
    \n-
    436 else if(r[1] > 1-eps) { // Y = Y_0 + r_1 (Y_1 - Y_0) = Y_1
    \n-
    437 SY[1].push_back(k);
    \n-
    438 P[k] = Y[1];
    \n-
    439 }
    \n-
    440 return true;
    \n-
    441 }
    \n-
    442 } else if ((X[1]-X[0]).infinity_norm() > eps && (Y[1]-Y[0]).infinity_norm() > eps) {
    \n-
    443 // lines are paralles, but non degenerated
    \n-
    444 bool found = false;
    \n-
    445
    \n-
    446 // use triangle equality ||a - b||_2 = || a -c ||_2 + || c - b ||_2 for non perpendicular lines
    \n-
    447 for (unsigned i = 0; i < 2; ++i) {
    \n-
    448 if (std::abs((Y[i]-X[0]).two_norm() + std::abs((Y[i]-X[1]).two_norm())
    \n-
    449 - std::abs((X[1]-X[0]).two_norm())) < eps) {
    \n-
    450 k = insertPoint(Y[i],P);
    \n-
    451 SY[i].push_back(k);
    \n-
    452 found = true;
    \n-
    453 }
    \n-
    454 if (std::abs((X[i]-Y[0]).two_norm() + std::abs((X[i]-Y[1]).two_norm())
    \n-
    455 - std::abs((Y[1]-Y[0]).two_norm())) < eps) {
    \n-
    456 k = insertPoint(X[i],P);
    \n-
    457 SX[i].push_back(k);
    \n-
    458 found = true;
    \n-
    459 }
    \n-
    460 }
    \n-
    461 return found;
    \n-
    462 }
    \n-
    463 return false;
    \n-
    464 }
    \n-
    465 case 3: // solve X0 + r_0 * (X1 - X0) = Y0 + r_1 * (Y1 - Y0)
    \n-
    466 { FieldVector<T,dimWorld> dX, dY, dZ, cXY, cYZ;
    \n-
    467
    \n-
    468 dX = X[1]-X[0];
    \n-
    469 dY = Y[1]-Y[0];
    \n-
    470 dZ = Y[0]-X[0];
    \n-
    471
    \n-
    472 cXY[0] = dX[1]* dY[2] - dX[2]* dY[1];
    \n-
    473 cXY[1] = dX[2]* dY[0] - dX[0]* dY[2];
    \n-
    474 cXY[2] = dX[0]* dY[1] - dX[1]* dY[0];
    \n-
    475
    \n-
    476 if (fabs(dZ.dot(cXY)) < eps*1e+3 && cXY.infinity_norm()>eps) { // coplanar, but not aligned
    \n-
    477
    \n-
    478 cYZ[0] = dY[1]* dZ[2] - dY[2]* dZ[1];
    \n-
    479 cYZ[1] = dY[2]* dZ[0] - dY[0]* dZ[2];
    \n-
    480 cYZ[2] = dY[0]* dZ[1] - dY[1]* dZ[0];
    \n-
    481
    \n-
    482 T s = -cYZ.dot(cXY) / cXY.two_norm2();
    \n-
    483
    \n-
    484 if (s > -eps && s < 1+eps) {
    \n-
    485 dX*= s;
    \n-
    486 dX+= X[0];
    \n-
    487 T o = (dX - Y[0]).two_norm() + (dX- Y[1]).two_norm();
    \n-
    488
    \n-
    489 if (std::abs(o-dY.two_norm()) < eps) {
    \n-
    490 k = insertPoint(dX,P);
    \n-
    491 \\
    \n-
    492 if (s<eps) {
    \n-
    493 P[k] = X[0];
    \n-
    494 SX[0].push_back(k);
    \n-
    495 } else if(s > 1-eps) {
    \n-
    496 P[k] = X[1];
    \n-
    497 SX[1].push_back(k);
    \n-
    498 } else if ((dX - Y[0]).two_norm() < eps) {
    \n-
    499 P[k] = Y[0];
    \n-
    500 SY[0].push_back(k);
    \n-
    501 } else if((dX - Y[1]).two_norm() < eps) {
    \n-
    502 P[k] = Y[1];
    \n-
    503 SY[1].push_back(k);
    \n-
    504 }
    \n-
    505
    \n-
    506 return true;
    \n-
    507 }
    \n-
    508 }
    \n-
    509 } else if (cXY.infinity_norm() <= eps) {// lines are parallel
    \n-
    510
    \n-
    511 bool found = false;
    \n-
    512
    \n-
    513 // use triangle equality ||a - b||_2 = || a -c ||_2 + || c - b ||_2,
    \n-
    514 // under the assumption (a-c)*(c-b) > 0 or (a-c) = 0 or (c-b) = 0
    \n-
    515 for (unsigned i = 0; i < 2; ++i) {
    \n-
    516 if ((std::abs((Y[i]-X[0]).two_norm() + std::abs((Y[i]-X[1]).two_norm()) // triangle equality
    \n-
    517 - std::abs((X[1]-X[0]).two_norm())) < eps) &&
    \n-
    518 (std::abs((Y[i]-X[0]).dot((Y[i]-X[1]))) > eps // assumption
    \n-
    519 || (Y[i]-X[0]).infinity_norm() < eps || (Y[i]-X[1]).infinity_norm() < eps)) {
    \n-
    520 k = insertPoint(Y[i],P);
    \n-
    521 SY[i].push_back(k);
    \n-
    522 found = true;
    \n-
    523 }
    \n-
    524 if (std::abs((X[i]-Y[0]).two_norm() + std::abs((X[i]-Y[1]).two_norm()) // triangle equality
    \n-
    525 - std::abs((Y[1]-Y[0]).two_norm())) < eps &&
    \n-
    526 (std::abs((X[i]-Y[0]).dot((X[i]-Y[1]))) > eps // assumption
    \n-
    527 || (X[i]-Y[0]).infinity_norm() < eps || (X[i]-Y[1]).infinity_norm() < eps)){
    \n-
    528 k = insertPoint(X[i],P);
    \n-
    529 SX[i].push_back(k);
    \n-
    530 found = true;
    \n-
    531 }
    \n-
    532 }
    \n-
    533 return found;
    \n-
    534 }
    \n-
    535
    \n-
    536 return false;
    \n-
    537 }
    \n-
    538 }
    \n-
    539 return false;
    \n-
    540 }
    \n-
    \n-
    541
    \n-
    \n-
    542 static void grid1_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    543 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    544 std::vector<std::vector<int> >& faceIds)
    \n-
    545 {
    \n-
    546 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid1Dimension>(),
    \n-
    547 elementCorners,subElements, faceIds);
    \n-
    548 }
    \n-
    \n-
    549
    \n-
    550 static void grid2_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    551 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    552 std::vector<std::vector<int> >& faceIds)
    \n-
    553 {
    \n-
    554 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid2Dimension>(),
    \n-
    555 elementCorners, subElements, faceIds);
    \n-
    556 }
    \n-
    557};
    \n-
    \n-
    558
    \n-
    559// SEGEMENT-TRIANGLE INTERSECTION - : )
    \n-
    560template<int dimWorld,typename T>
    \n-
    \n-
    561class SimplexMethod<dimWorld,1,2,T> : public ComputationMethod<dimWorld,1,2,T>{
    \n-
    562 friend class ComputationMethod<dimWorld,1,2,T>;
    \n-
    563
    \n-
    564public:
    \n-
    565 typedef FieldVector<T, dimWorld> Vector;
    \n-
    566 static const int grid1Dimension = 1;
    \n-
    567 static const int grid2Dimension = 2;
    \n-
    568 static const int intersectionDimension = 1;
    \n-
    569
    \n-
    \n-
    570 static bool computeIntersectionPoints(const std::vector<FieldVector<T,dimWorld> >& X,
    \n-
    571 const std::vector<FieldVector<T,dimWorld> >& Y,
    \n-
    572 std::vector<std::vector<int> > & SX,
    \n-
    573 std::vector<std::vector<int> > & SY,
    \n-
    574 std::vector<FieldVector<T,dimWorld> > & P)
    \n-
    575 {
    \n-
    576
    \n-
    577 assert(X.size() == 2 && Y.size() == 3 && dimWorld > 1);
    \n-
    578 P.clear(); SX.clear(); SY.clear();
    \n-
    579 SX.resize(2);
    \n-
    580 SY.resize(3);
    \n-
    581
    \n-
    582 int k;
    \n-
    583 std::vector<FieldVector<T,dimWorld> > surfPts, edge(2), pni(1);
    \n-
    584 std::vector<std::vector<int> > hSX, hSY;
    \n-
    585
    \n-
    586 // is any segment point inside the triangle?
    \n-
    587 for (unsigned ni = 0; ni < 2; ++ni) {
    \n-
    588 pni[0] = X[ni];
    \n-
    589
    \n-\n-
    591 k = insertPoint(X[ni],P);
    \n-
    592 SX[ni].push_back(k);
    \n-
    593 for (unsigned e=0; e < 3; ++e)
    \n-
    594 if (hSY[e].size() > 0)
    \n-
    595 SY[e].push_back(k);
    \n-
    596
    \n-
    597 }
    \n-
    598 surfPts.clear(); hSX.clear(); hSY.clear();
    \n-
    599 }
    \n-
    600
    \n-
    601 if (P.size() >= 2) // we cannot have more than two intersection points
    \n-
    602 return true;
    \n-
    603
    \n-
    604 unsigned int faces[3] = {0,2,1};
    \n-
    605 // do triangle faces intersect with the segment?
    \n-
    606 for (unsigned ni = 0; ni < 3; ++ni) {
    \n-
    607 edge[0] = Y[ni];
    \n-
    608 edge[1] = Y[(ni+1)%3];
    \n-
    609
    \n-\n-
    611 for (unsigned ne = 0; ne < surfPts.size(); ++ne) {
    \n-
    612 k = insertPoint(surfPts[ne],P);
    \n-
    613 SY[faces[ni]].push_back(k);
    \n-
    614 if (hSX[0].size() > 0)
    \n-
    615 SX[0].push_back(k);
    \n-
    616 if (hSX[1].size() > 0)
    \n-
    617 SX[1].push_back(k);
    \n-
    618 }
    \n-
    619
    \n-
    620 if (P.size() >= 2) // we cannot have more than two intersection points
    \n-
    621 return true;
    \n-
    622
    \n-
    623 surfPts.clear(); hSX.clear(); hSY.clear();
    \n-
    624 }
    \n-
    625 }
    \n-
    626
    \n-
    627 if (P.size() >= 2) // we cannot have more than two intersection points
    \n-
    628 return true;
    \n-
    629
    \n-
    630 // if line and triangle are not coplanar in 3d and do not intersect at boundaries
    \n-
    631 if (dimWorld == 3) {
    \n-
    632 T eps = 1e-8;
    \n-
    633
    \n-
    634 Dune::FieldVector<T,dimWorld> B,r,p ;
    \n-
    635 Dune::FieldMatrix<T,dimWorld,dimWorld> A ;
    \n-
    636
    \n-
    637 B = Y[0] - X[0] ;
    \n-
    638
    \n-
    639 for (unsigned i = 0; i < dimWorld; ++i) {
    \n-
    640 A[i][0] = (X[1][i] - X[0][i]);
    \n-
    641 A[i][1] = (Y[0][i] - Y[1][i]);
    \n-
    642 A[i][dimWorld-1] = (Y[0][i] - Y[dimWorld-1][i]);
    \n-
    643 }
    \n-
    644
    \n-
    645 if (std::abs(A.determinant())>eps) {
    \n-
    646
    \n-
    647 A.solve(r,B) ;
    \n-
    648
    \n-
    649 if ((r[0]>=-eps)&&(r[0]<=1+eps)
    \n-
    650 &&(r[1]>=-eps)&&(r[1]<=1+eps)
    \n-
    651 &&(r[2]>=-eps)&&(r[2]<=1+eps)
    \n-
    652 &&(r[1]+r[2]>=-eps) &&(r[1]+r[2]<=1+eps)) {
    \n-
    653 p = X[1] - X[0] ;
    \n-
    654 p *= r[0] ;
    \n-
    655 p += X[0] ;
    \n-
    656 k = insertPoint(p,P);
    \n-
    657
    \n-
    658 if (std::abs(r[0]) < eps) // we prefer exact locations
    \n-
    659 P[k] = X[0];
    \n-
    660 else if (std::abs(r[0]) > 1-eps)
    \n-
    661 P[k] = X[1];
    \n-
    662 else if (std::abs(r[1]) < eps && std::abs(r[2]) < eps)
    \n-
    663 P[k] = Y[0];
    \n-
    664 else if (std::abs(r[1]) < eps && std::abs(r[2]) > 1-eps)
    \n-
    665 P[k] = Y[2];
    \n-
    666 else if (std::abs(r[1]) > 1-eps && std::abs(r[2]) < eps)
    \n-
    667 P[k] = Y[1];
    \n-
    668
    \n-
    669 if (std::abs(r[1]) < eps)
    \n-
    670 SY[1].push_back(k);
    \n-
    671 if (std::fabs(r[dimWorld-1]) < eps)
    \n-
    672 SY[0].push_back(k);
    \n-
    673 if (std::fabs(r[1]+r[dimWorld-1] - 1) < eps)
    \n-
    674 SY[2].push_back(k);
    \n-
    675
    \n-
    676
    \n-
    677 return true ;
    \n-
    678 }
    \n-
    679 }
    \n-
    680 }
    \n-
    681 return false ;
    \n-
    682 }
    \n-
    \n-
    683
    \n-
    \n-
    684 static void grid1_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    685 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    686 std::vector<std::vector<int> >& faceIds)
    \n-
    687 {
    \n-
    688 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid1Dimension>(),
    \n-
    689 elementCorners,subElements, faceIds);
    \n-
    690 }
    \n-
    \n-
    691
    \n-
    692 static void grid2_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    693 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    694 std::vector<std::vector<int> >& faceIds)
    \n-
    695 {
    \n-
    696 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid2Dimension>(),
    \n-
    697 elementCorners, subElements, faceIds);
    \n-
    698 }
    \n-
    699};
    \n-
    \n-
    700
    \n-
    701// SEGEMENT-TETRAHEDRON INTERSECTION - : )
    \n-
    702template<int dimWorld,typename T>
    \n-
    \n-
    703class SimplexMethod<dimWorld,1,3,T> : public ComputationMethod<dimWorld,1,3,T>{
    \n-
    704 friend class ComputationMethod<dimWorld,1,3,T>;
    \n-
    705
    \n-
    706public:
    \n-
    707 typedef FieldVector<T, dimWorld> Vector;
    \n-
    708 static const int grid1Dimension = 1;
    \n-
    709 static const int grid2Dimension = 3;
    \n-
    710 static const int intersectionDimension = 1;
    \n-
    711
    \n-
    \n-
    712 static bool computeIntersectionPoints(const std::vector<FieldVector<T,dimWorld> >& X,
    \n-
    713 const std::vector<FieldVector<T,dimWorld> >& Y,
    \n-
    714 std::vector<std::vector<int> > & SX,
    \n-
    715 std::vector<std::vector<int> > & SY,
    \n-
    716 std::vector<FieldVector<T,dimWorld> > & P)
    \n-
    717 {
    \n-
    718 assert(X.size() == 2 && Y.size() == 4 && dimWorld > 2);
    \n-
    719
    \n-
    720 std::vector<int> indices;
    \n-
    721 std::vector<FieldVector<T,dimWorld> > surfPts;
    \n-
    722 std::vector<std::vector<int> > hSX, hSY;
    \n-
    723
    \n-
    724 P.clear(); SX.clear(); SY.clear();
    \n-
    725 SX.resize(2);
    \n-
    726 SY.resize(4);
    \n-
    727
    \n-
    728 std::vector<FieldVector<T,dimWorld> > pni(1);
    \n-
    729
    \n-
    730 bool b = false;
    \n-
    731
    \n-
    732 // check whether the corners of the segment are contained in the tetrahedron
    \n-
    733 for (unsigned int ci = 0; ci < 2; ++ ci) {
    \n-
    734
    \n-
    735 pni[0] = X[ci];
    \n-\n-
    737 int k = insertPoint(X[ci],P);
    \n-
    738 SX[ci].push_back(k);
    \n-
    739 b=true;
    \n-
    740 }
    \n-
    741 surfPts.clear();
    \n-
    742 hSX.clear(); hSY.clear();
    \n-
    743 }
    \n-
    744
    \n-
    745 if (P.size() == 2)
    \n-
    746 return true;
    \n-
    747
    \n-
    748 unsigned int faces[4] = {0,3,2,1};
    \n-
    749 // check whether tetrahedron faces intersect with segment
    \n-
    750 std::vector<FieldVector<T,dimWorld> > triangle(3);
    \n-
    751 for (unsigned int ci = 0; ci < 4; ++ci) { // iterate over all faces
    \n-
    752 triangle[0] = Y[ci];
    \n-
    753 triangle[1] = Y[(ci+1)%4];
    \n-
    754 triangle[2] = Y[(ci+2)%4];
    \n-
    755
    \n-
    756 if (SimplexMethod<dimWorld,1,2,T>::computeIntersectionPoints(X,triangle,hSX,hSY,surfPts)) { // seg - triangle intersection
    \n-
    757 std::vector<int> indices(surfPts.size());
    \n-
    758 for (unsigned int np = 0; np < surfPts.size(); ++np) {
    \n-
    759 int k = insertPoint(surfPts[np],P);
    \n-
    760 indices[np]=k;
    \n-
    761 SY[faces[ci]].push_back(k);
    \n-
    762 }
    \n-
    763
    \n-
    764 // hSX[*] is nonempty if the intersection point is on an edge of the current face of Y
    \n-
    765 for (unsigned int np = 0; np < hSX[0].size(); ++np)
    \n-
    766 SX[0].push_back(indices[hSX[0][np]]);
    \n-
    767 for (unsigned int np = 0; np < hSX[1].size(); ++np)
    \n-
    768 SX[0].push_back(indices[hSX[1][np]]);
    \n-
    769
    \n-
    770 b = true;
    \n-
    771 }
    \n-
    772 surfPts.clear();
    \n-
    773 hSX.clear(); hSY.clear();
    \n-
    774 }
    \n-
    775
    \n-
    776 return b;
    \n-
    777 }
    \n-
    \n-
    778
    \n-
    \n-
    779 static void grid1_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    780 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    781 std::vector<std::vector<int> >& faceIds)
    \n-
    782 {
    \n-
    783 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid1Dimension>(),
    \n-
    784 elementCorners,subElements, faceIds);
    \n-
    785 }
    \n-
    \n-
    786
    \n-
    787 static void grid2_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    788 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    789 std::vector<std::vector<int> >& faceIds)
    \n-
    790 {
    \n-
    791 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid2Dimension>(),
    \n-
    792 elementCorners, subElements, faceIds);
    \n-
    793 }
    \n-
    794};
    \n-
    \n-
    795
    \n-
    796// TRIANGLE -TRIANGLE INTERSECTION
    \n-
    797template<int dimWorld,typename T>
    \n-
    \n-
    798class SimplexMethod<dimWorld,2,2,T> : public ComputationMethod<dimWorld,2,2,T>{
    \n-
    799 friend class ComputationMethod<dimWorld,2,2,T>;
    \n-
    800
    \n-
    801public:
    \n-
    802 typedef FieldVector<T, dimWorld> Vector;
    \n-
    803 static const int grid1Dimension = 2;
    \n-
    804 static const int grid2Dimension = 2;
    \n-
    805 static const int intersectionDimension = 2;
    \n-
    806
    \n-
    \n-
    807 static bool computeIntersectionPoints(const std::vector<FieldVector<T,dimWorld> >& X,
    \n-
    808 const std::vector<FieldVector<T,dimWorld> >& Y,
    \n-
    809 std::vector<std::vector<int> > & SX,
    \n-
    810 std::vector<std::vector<int> > & SY,
    \n-
    811 std::vector<FieldVector<T,dimWorld> > & P)
    \n-
    812 {
    \n-
    813 assert(X.size() == 3 && Y.size() == 3 && dimWorld > 1);
    \n-
    814
    \n-
    815 P.clear(); SX.clear(); SY.clear();
    \n-
    816
    \n-
    817 SX.resize(3);
    \n-
    818 SY.resize(3);
    \n-
    819
    \n-
    820 bool b = false;
    \n-
    821
    \n-
    822 std::vector<FieldVector<T,dimWorld> > edge(2);
    \n-
    823 std::vector<FieldVector<T,dimWorld> > surfPts;
    \n-
    824 std::vector<std::vector<int> > hSX, hSY;
    \n-
    825 std::vector<int> indices;
    \n-
    826
    \n-
    827 unsigned int faces[3] = {0,2,1};
    \n-
    828
    \n-
    829 for (unsigned int ni = 0; ni < 3; ++ni) {
    \n-
    830 // check whether the faces of triangle Y intersect the triangle X
    \n-
    831 edge[0] = Y[ni];
    \n-
    832 edge[1] = Y[(ni+1)%3];
    \n-
    833
    \n-\n-
    835
    \n-
    836 indices.resize(surfPts.size());
    \n-
    837 // add intersections of edges of Y with triangle X
    \n-
    838 for (unsigned int np = 0; np < surfPts.size(); ++np) {
    \n-
    839 int k = insertPoint(surfPts[np],P);
    \n-
    840 indices[np] = k;
    \n-
    841 SY[faces[ni]].push_back(k); // add edge data
    \n-
    842 }
    \n-
    843
    \n-
    844 b=true;
    \n-
    845 }
    \n-
    846 if (P.size() >= 6)
    \n-
    847 return true;
    \n-
    848
    \n-
    849 surfPts.clear(); hSX.clear(); hSY.clear();
    \n-
    850 // check whether the faces of triangle X intersect the triangle Y
    \n-
    851 edge[0] = X[ni];
    \n-
    852 edge[1] = X[(ni+1)%3];
    \n-
    853
    \n-\n-
    855
    \n-
    856 indices.resize(surfPts.size());
    \n-
    857 // add intersections of edges of X with triangle Y
    \n-
    858 for (unsigned int np = 0; np < surfPts.size(); ++np) {
    \n-
    859 int k = insertPoint(surfPts[np],P);
    \n-
    860 indices[np] = k;
    \n-
    861 SX[faces[ni]].push_back(k); // add edge data
    \n-
    862 }
    \n-
    863
    \n-
    864 b=true;
    \n-
    865 }
    \n-
    866 if (P.size() >= 6)
    \n-
    867 return true;
    \n-
    868
    \n-
    869 surfPts.clear(); hSX.clear(); hSY.clear();
    \n-
    870 }
    \n-
    871
    \n-
    872 return b;
    \n-
    873 }
    \n-
    \n-
    874
    \n-
    \n-
    875 static void grid1_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    876 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    877 std::vector<std::vector<int> >& faceIds)
    \n-
    878 {
    \n-
    879 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid1Dimension>(),
    \n-
    880 elementCorners,subElements, faceIds);
    \n-
    881 }
    \n-
    \n-
    882
    \n-
    883 static void grid2_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    884 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    885 std::vector<std::vector<int> >& faceIds)
    \n-
    886 {
    \n-
    887 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid2Dimension>(),
    \n-
    888 elementCorners, subElements, faceIds);
    \n-
    889 }
    \n-
    890};
    \n-
    \n-
    891
    \n-
    892// TRIANGLE -TETRAHEDRON INTERSECTION -: )
    \n-
    893template<int dimWorld,typename T>
    \n-
    \n-
    894class SimplexMethod<dimWorld,2,3,T> : public ComputationMethod<dimWorld,2,3,T>{
    \n-
    895 friend class ComputationMethod<dimWorld,2,3,T>;
    \n-
    896
    \n-
    897public:
    \n-
    898 typedef FieldVector<T, dimWorld> Vector;
    \n-
    899 static const int grid1Dimension = 2;
    \n-
    900 static const int grid2Dimension = 3;
    \n-
    901 static const int intersectionDimension = 2;
    \n-
    902
    \n-
    \n-
    903 static bool computeIntersectionPoints(const std::vector<FieldVector<T,dimWorld> >& X,
    \n-
    904 const std::vector<FieldVector<T,dimWorld> >& Y,
    \n-
    905 std::vector<std::vector<int> > & SX,
    \n-
    906 std::vector<std::vector<int> > & SY,
    \n-
    907 std::vector<FieldVector<T,dimWorld> > & P)
    \n-
    908 {
    \n-
    909 assert(X.size() == 3 && Y.size() == 4 && dimWorld > 2);
    \n-
    910 P.clear(); SX.clear(); SY.clear();
    \n-
    911 SX.resize(3);
    \n-
    912 SY.resize(4);
    \n-
    913
    \n-
    914 bool b = false;
    \n-
    915 int k,ni,np, ep;
    \n-
    916 std::vector<FieldVector<T,dimWorld> > surfPts, xni(1);
    \n-
    917 std::vector<std::vector<int> > hSX, hSY;
    \n-
    918
    \n-
    919 unsigned int fiX[3][2];
    \n-
    920
    \n-
    921 fiX[0][0] = 0; fiX[1][0] = 0; fiX[2][0] = 1; // faces to node
    \n-
    922 fiX[0][1] = 1; fiX[1][1] = 2; fiX[2][1] = 2;
    \n-
    923 // 1st step: check whether the points of the triangle are contained in the tetrahedron
    \n-
    924 for (ni = 0; ni < 3; ++ni) {
    \n-
    925
    \n-
    926 xni[0] = X[ni];
    \n-\n-
    928 std::vector<int> indices(surfPts.size());
    \n-
    929 for (np = 0; np < surfPts.size(); ++np) {
    \n-
    930 k = insertPoint(X[ni],P);
    \n-
    931 indices[np] = k;
    \n-
    932 SX[fiX[ni][0]].push_back(k); // the corresponding edges to the node are ni and (ni+2)%3
    \n-
    933 SX[fiX[ni][1]].push_back(k);
    \n-
    934 }
    \n-
    935
    \n-
    936 for (ep = 0; ep < 4; ++ep) {
    \n-
    937 for (np = 0; np < hSY[ep].size();++np) {
    \n-
    938 SY[ep].push_back(indices[hSY[ep][np]]);
    \n-
    939 }
    \n-
    940 }
    \n-
    941 b = true;
    \n-
    942 }
    \n-
    943 hSX.clear(); hSY.clear(); surfPts.clear();
    \n-
    944 }
    \n-
    945
    \n-
    946 if (P.size() == 3) // intersection is given by all three corners of the triangle
    \n-
    947 return true;
    \n-
    948
    \n-
    949 // note: points of Y in X is called indirectly via triangle-triangle intesection
    \n-
    950
    \n-
    951 // check whether the triangles of the one tetrahedron intersect the triangle
    \n-
    952 unsigned int facesY[4] = {0,3,2,1}; // face ordering
    \n-
    953
    \n-
    954 std::vector<FieldVector<T,dimWorld> > triangle(3);
    \n-
    955 for (ni = 0; ni < 4; ++ni) {
    \n-
    956
    \n-
    957 triangle[0] = Y[ni];
    \n-
    958 triangle[1] = Y[(ni+1)%4];
    \n-
    959 triangle[2] = Y[(ni+2)%4];
    \n-
    960
    \n-
    961 if (SimplexMethod<dimWorld,2,2,T>::computeIntersectionPoints(X,triangle,hSX,hSY,surfPts)) {
    \n-
    962 std::vector<int> indices(surfPts.size());
    \n-
    963 for (np = 0; np < surfPts.size(); ++np) {
    \n-
    964 k = insertPoint(surfPts[np],P);
    \n-
    965 indices[np]=k;
    \n-
    966 SY[facesY[ni]].push_back(k);
    \n-
    967 }
    \n-
    968
    \n-
    969 // SX[*] is nonempty if the face * of X is intersected
    \n-
    970 for (np = 0; np < 3; ++np) {
    \n-
    971 for (ep = 0; ep < hSX[np].size(); ++ep) {
    \n-
    972 SX[np].push_back(indices[hSX[np][ep]]);
    \n-
    973 }
    \n-
    974 }
    \n-
    975
    \n-
    976 b = true;
    \n-
    977 }
    \n-
    978 hSX.clear(); hSY.clear(); surfPts.clear();
    \n-
    979 }
    \n-
    980 return b;
    \n-
    981 }
    \n-
    \n-
    982
    \n-
    \n-
    983 static void grid1_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    984 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    985 std::vector<std::vector<int> >& faceIds)
    \n-
    986 {
    \n-
    987 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid1Dimension>(),
    \n-
    988 elementCorners,subElements, faceIds);
    \n-
    989 }
    \n-
    \n-
    990
    \n-
    991 static void grid2_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    992 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    993 std::vector<std::vector<int> >& faceIds)
    \n-
    994 {
    \n-
    995 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid2Dimension>(),
    \n-
    996 elementCorners, subElements, faceIds);
    \n-
    997 }
    \n-
    998};
    \n-
    \n-
    999
    \n-
    1000template<int dimWorld,typename T>
    \n-
    \n-
    1001class SimplexMethod<dimWorld,3,3,T> : public ComputationMethod<dimWorld,3,3,T>{
    \n-
    1002 friend class ComputationMethod<dimWorld,3,3,T>;
    \n-
    1003
    \n-
    1004public:
    \n-
    1005 typedef FieldVector<T, dimWorld> Vector;
    \n-
    1006 static const int grid1Dimension = 3;
    \n-
    1007 static const int grid2Dimension = 3;
    \n-
    1008 static const int intersectionDimension = 3;
    \n-
    1009
    \n-
    \n-
    1010 static bool computeIntersectionPoints(const std::vector<FieldVector<T,dimWorld> >& X,
    \n-
    1011 const std::vector<FieldVector<T,dimWorld> >& Y,
    \n-
    1012 std::vector<std::vector<int> > & SX,
    \n-
    1013 std::vector<std::vector<int> > & SY,
    \n-
    1014 std::vector<FieldVector<T,dimWorld> > & P)
    \n-
    1015 {
    \n-
    1016 assert(X.size() == 4 && Y.size() == 4 && dimWorld > 2);
    \n-
    1017 P.clear(); SX.clear(); SY.clear();
    \n-
    1018
    \n-
    1019 SX.resize(4);
    \n-
    1020 SY.resize(4);
    \n-
    1021
    \n-
    1022 bool b = false;
    \n-
    1023 int ci,np,ne,k,ni[4][3];
    \n-
    1024
    \n-
    1025 ni[0][0]= 0 ; ni[0][1]= 1 ; ni[0][2]= 2 ; // faces touching each node
    \n-
    1026 ni[1][0]= 0 ; ni[1][1]= 1 ; ni[1][2]= 3 ;
    \n-
    1027 ni[2][0]= 0 ; ni[2][1]= 2 ; ni[2][2]= 3 ;
    \n-
    1028 ni[3][0]= 1 ; ni[3][1]= 2 ; ni[3][2]= 3 ;
    \n-
    1029
    \n-
    1030 // temporal data container
    \n-
    1031 std::vector<FieldVector<T,dimWorld> > surfPts, pci(1);
    \n-
    1032 std::vector<std::vector<int> > hSX, hSY;
    \n-
    1033
    \n-
    1034 // check whether the points of the one tetrahedron are contained in the other tetrahedron
    \n-
    1035 for (ci = 0; ci < 3; ++ci) {
    \n-
    1036 pci[0] = X[ci];
    \n-
    1037 // point of X is inside Y
    \n-\n-
    1039 std::vector<int> indices(surfPts.size());
    \n-
    1040
    \n-
    1041 for (np = 0; np < surfPts.size(); ++np) {
    \n-
    1042
    \n-
    1043 k = insertPoint(X[ci],P);
    \n-
    1044 indices[np]=k;
    \n-
    1045 SX[ni[ci][0]].push_back(k); // add face data
    \n-
    1046 SX[ni[ci][1]].push_back(k);
    \n-
    1047 SX[ni[ci][2]].push_back(k);
    \n-
    1048 }
    \n-
    1049
    \n-
    1050 // hSY[*] is nonempty if X[ci] is on the face * of Y
    \n-
    1051 for (ne = 0; ne < 4; ++ne) {
    \n-
    1052 for (np = 0; np < hSY[ne].size(); ++np) {
    \n-
    1053 SY[ne].push_back(indices[hSY[ne][np]]);
    \n-
    1054 }
    \n-
    1055 }
    \n-
    1056
    \n-
    1057 b = true;
    \n-
    1058 }
    \n-
    1059 hSX.clear(); hSY.clear(); surfPts.clear();
    \n-
    1060
    \n-
    1061 // probably one point of Y is inside X
    \n-
    1062 surfPts.resize(0);
    \n-
    1063 pci[0]=Y[ci];
    \n-\n-
    1065 std::vector<int> indices(surfPts.size());
    \n-
    1066
    \n-
    1067 for (np = 0; np < surfPts.size(); ++np) {
    \n-
    1068 k = insertPoint(Y[ci],P);
    \n-
    1069 indices[np]=k;
    \n-
    1070 SY[ni[ci][0]].push_back(k); // add face data
    \n-
    1071 SY[ni[ci][1]].push_back(k);
    \n-
    1072 SY[ni[ci][2]].push_back(k);
    \n-
    1073 }
    \n-
    1074
    \n-
    1075 // hSX[*] is nonempty if the point Y[ci] is on the face * of X
    \n-
    1076 for (ne = 0; ne < 4; ++ne) {
    \n-
    1077 for (np = 0; np < hSX[ne].size(); ++np) {
    \n-
    1078 SX[ne].push_back(indices[hSX[ne][np]]);
    \n-
    1079 }
    \n-
    1080 }
    \n-
    1081 b = true;
    \n-
    1082 }
    \n-
    1083 hSX.clear(); hSY.clear(); surfPts.clear();
    \n-
    1084 }
    \n-
    1085
    \n-
    1086 // check whether the triangles of the one tetrahedron intersect the triangles
    \n-
    1087 // of the other tetrahedron
    \n-
    1088 unsigned int faces[4] = {0,3,2,1}; // face ordering
    \n-
    1089
    \n-
    1090 std::vector<FieldVector<T,dimWorld> > triangle(3);
    \n-
    1091 for (ci = 0; ci < 4; ++ci) { // iterate over faces of Y
    \n-
    1092
    \n-
    1093 triangle[0] = Y[ci];
    \n-
    1094 triangle[1] = Y[(ci+1)%4];
    \n-
    1095 triangle[2] = Y[(ci+2)%4];
    \n-
    1096
    \n-
    1097 if(SimplexMethod<dimWorld,3,2,T>::computeIntersectionPoints(X, triangle,hSX,hSY,surfPts)) {
    \n-
    1098
    \n-
    1099 // add Triangle of Y intersects tetrahedron Y data
    \n-
    1100 for (np = 0; np < surfPts.size(); ++np) {
    \n-
    1101 k = insertPoint(surfPts[np],P);
    \n-
    1102 SY[faces[ci]].push_back(k); // add face data
    \n-
    1103 }
    \n-
    1104 b = true;
    \n-
    1105 }
    \n-
    1106 hSX.clear(); hSY.clear(); surfPts.clear();
    \n-
    1107
    \n-
    1108 triangle[0] = X[ci];
    \n-
    1109 triangle[1] = X[(ci+1)%4];
    \n-
    1110 triangle[2] = X[(ci+2)%4];
    \n-
    1111
    \n-
    1112 if(SimplexMethod<dimWorld,3,2,T>::computeIntersectionPoints(Y, triangle,hSY,hSX,surfPts)) {
    \n-
    1113
    \n-
    1114 // add Triangle of Y intersects tetrahedron Y data
    \n-
    1115 for (np = 0; np < surfPts.size(); ++np) {
    \n-
    1116 k = insertPoint(surfPts[np],P);
    \n-
    1117 SX[faces[ci]].push_back(k); // add face data
    \n-
    1118 }
    \n-
    1119 b = true;
    \n-
    1120 }
    \n-
    1121 hSX.clear(); hSY.clear(); surfPts.clear();
    \n-
    1122 }
    \n-
    1123
    \n-
    1124 return b;
    \n-
    1125 }
    \n-
    \n-
    1126
    \n-
    \n-
    1127 static void grid1_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    1128 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    1129 std::vector<std::vector<int> >& faceIds)
    \n-
    1130 {
    \n-
    1131 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid1Dimension>(),
    \n-
    1132 elementCorners,subElements, faceIds);
    \n-
    1133 }
    \n-
    \n-
    1134
    \n-
    \n-
    1135 static void grid2_subdivisions(const std::vector<Vector>& elementCorners,
    \n-
    1136 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    1137 std::vector<std::vector<int> >& faceIds)
    \n-
    1138 {
    \n-
    1139 simplexSubdivision<dimWorld,T>(std::integral_constant<int,grid2Dimension>(),
    \n-
    1140 elementCorners, subElements, faceIds);
    \n-
    1141 }
    \n-
    \n-
    1142};
    \n-
    \n-
    1143
    \n-
    1144template <int dimworld, typename T>
    \n-
    \n-
    1145inline void simplexSubdivision(std::integral_constant<int,0>,
    \n-
    1146 const std::vector<Dune::FieldVector<T, dimworld> >& elementCorners,
    \n-
    1147 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    1148 std::vector<std::vector<int> >& faceIds)
    \n-
    1149{
    \n-
    1150 subElements.resize(1);
    \n-
    1151 faceIds.resize(0);
    \n-
    1152
    \n-
    1153 subElements[0].push_back(0);
    \n-
    1154}
    \n-
    \n-
    1155
    \n-
    1156template <int dimworld, typename T>
    \n-
    \n-
    1157inline void simplexSubdivision(std::integral_constant<int,1>,
    \n-
    1158 const std::vector<Dune::FieldVector<T, dimworld> >& elementCorners,
    \n-
    1159 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    1160 std::vector<std::vector<int> >& faceIds)
    \n-
    1161{
    \n-
    1162 subElements.resize(1);
    \n-
    1163 faceIds.resize(1);
    \n-
    1164
    \n-
    1165 subElements[0].push_back(0);
    \n-
    1166 subElements[0].push_back(1);
    \n-
    1167
    \n-
    1168 faceIds[0].push_back(0);
    \n-
    1169 faceIds[0].push_back(1);
    \n-
    1170}
    \n-
    \n-
    1171
    \n-
    1172template <int dimworld, typename T>
    \n-
    \n-
    1173inline void simplexSubdivision(std::integral_constant<int,2>,
    \n-
    1174 const std::vector<Dune::FieldVector<T, dimworld> >& elementCorners,
    \n-
    1175 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    1176 std::vector<std::vector<int> >& faceIds)
    \n-
    1177{
    \n-
    1178 subElements.clear();
    \n-
    1179 faceIds.clear();
    \n-
    1180
    \n-
    1181 if (elementCorners.size() == 3) { // triangle
    \n-
    1182 subElements.resize(1);
    \n-
    1183 faceIds.resize(1);
    \n-
    1184
    \n-
    1185 subElements[0].push_back(0);
    \n-
    1186 subElements[0].push_back(1);
    \n-
    1187 subElements[0].push_back(2);
    \n-
    1188
    \n-
    1189 faceIds[0].push_back(0);
    \n-
    1190 faceIds[0].push_back(1);
    \n-
    1191 faceIds[0].push_back(2);
    \n-
    1192 } else if (elementCorners.size() == 4) { // quadrilateral => 2 triangles
    \n-
    1193 subElements.resize(2);
    \n-
    1194 faceIds.resize(2);
    \n-
    1195
    \n-
    1196 subElements[0].push_back(0);
    \n-
    1197 subElements[0].push_back(1);
    \n-
    1198 subElements[0].push_back(2);
    \n-
    1199
    \n-
    1200 subElements[1].push_back(1);
    \n-
    1201 subElements[1].push_back(2);
    \n-
    1202 subElements[1].push_back(3);
    \n-
    1203
    \n-
    1204 faceIds[0].push_back(2);
    \n-
    1205 faceIds[0].push_back(0);
    \n-
    1206 faceIds[0].push_back(-1);
    \n-
    1207
    \n-
    1208 faceIds[1].push_back(-1);
    \n-
    1209 faceIds[1].push_back(1);
    \n-
    1210 faceIds[1].push_back(3);
    \n-
    1211 }
    \n-
    1212}
    \n-
    \n-
    1213
    \n-
    1214template <int dimworld, typename T>
    \n-
    \n-
    1215inline void simplexSubdivision(std::integral_constant<int,3>,
    \n-
    1216 const std::vector<Dune::FieldVector<T, dimworld> >& elementCorners,
    \n-
    1217 std::vector<std::vector<unsigned int> >& subElements,
    \n-
    1218 std::vector<std::vector<int> >& faceIds)
    \n-
    1219{
    \n-
    1220 subElements.clear();
    \n-
    1221 faceIds.clear();
    \n-
    1222
    \n-
    1223 if (elementCorners.size() == 4) { // tetrahedron
    \n-
    1224 subElements.resize(1);
    \n-
    1225 faceIds.resize(1);
    \n-
    1226
    \n-
    1227 subElements[0].push_back(0);
    \n-
    1228 subElements[0].push_back(1);
    \n-
    1229 subElements[0].push_back(2);
    \n-
    1230 subElements[0].push_back(3);
    \n-
    1231
    \n-
    1232 faceIds[0].push_back(0);
    \n-
    1233 faceIds[0].push_back(1);
    \n-
    1234 faceIds[0].push_back(2);
    \n-
    1235 faceIds[0].push_back(3);
    \n-
    1236
    \n-
    1237 } else if (elementCorners.size() == 8) { // cube => 5 tetrahedra
    \n-
    1238 subElements.resize(5);
    \n-
    1239 faceIds.resize(5);
    \n-
    1240
    \n-
    1241 subElements[0].push_back(0);
    \n-
    1242 subElements[0].push_back(2);
    \n-
    1243 subElements[0].push_back(3);
    \n-
    1244 subElements[0].push_back(6);
    \n-
    1245
    \n-
    1246 subElements[1].push_back(0);
    \n-
    1247 subElements[1].push_back(1);
    \n-
    1248 subElements[1].push_back(3);
    \n-
    1249 subElements[1].push_back(5);
    \n-
    1250
    \n-
    1251 subElements[2].push_back(0);
    \n-
    1252 subElements[2].push_back(3);
    \n-
    1253 subElements[2].push_back(5);
    \n-
    1254 subElements[2].push_back(6);
    \n-
    1255
    \n-
    1256 subElements[3].push_back(0);
    \n-
    1257 subElements[3].push_back(4);
    \n-
    1258 subElements[3].push_back(5);
    \n-
    1259 subElements[3].push_back(6);
    \n-
    1260
    \n-
    1261 subElements[4].push_back(3);
    \n-
    1262 subElements[4].push_back(5);
    \n-
    1263 subElements[4].push_back(6);
    \n-
    1264 subElements[4].push_back(7);
    \n-
    1265
    \n-
    1266 faceIds[0].push_back(4);
    \n-
    1267 faceIds[0].push_back(0);
    \n-
    1268 faceIds[0].push_back(-1);
    \n-
    1269 faceIds[0].push_back(3);
    \n-
    1270
    \n-
    1271 faceIds[1].push_back(4);
    \n-
    1272 faceIds[1].push_back(2);
    \n-
    1273 faceIds[1].push_back(-1);
    \n-
    1274 faceIds[1].push_back(1);
    \n-
    1275
    \n-
    1276 faceIds[2].push_back(-1);
    \n-
    1277 faceIds[2].push_back(-1);
    \n-
    1278 faceIds[2].push_back(-1);
    \n-
    1279 faceIds[2].push_back(-1);
    \n-
    1280
    \n-
    1281 faceIds[3].push_back(2);
    \n-
    1282 faceIds[3].push_back(0);
    \n-
    1283 faceIds[3].push_back(-1);
    \n-
    1284 faceIds[3].push_back(5);
    \n-
    1285
    \n-
    1286 faceIds[4].push_back(-1);
    \n-
    1287 faceIds[4].push_back(1);
    \n-
    1288 faceIds[4].push_back(3);
    \n-
    1289 faceIds[4].push_back(5);
    \n-
    1290 }
    \n-
    1291}
    \n-
    \n-
    1292
    \n-
    1293} /* namespace Dune::GridGlue */
    \n-
    1294} /* namespace Dune */
    \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-
    int insertPoint(const V p, std::vector< V > &P)
    Definition computeintersection.hh:164
    \n-
    void simplexSubdivision(std::integral_constant< int, 0 >, const std::vector< Dune::FieldVector< T, dimworld > > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:1145
    \n-
    Definition computeintersection.hh:13
    \n-
    Definition simplexintersection.cc:30
    \n-
    static const int grid1Dimension
    Definition simplexintersection.cc:35
    \n-
    static const int grid2Dimension
    Definition simplexintersection.cc:36
    \n-
    FieldVector< T, dimWorld > Vector
    Definition simplexintersection.cc:34
    \n-
    static const int intersectionDimension
    Definition simplexintersection.cc:37
    \n-
    static bool computeIntersectionPoints(const std::vector< FieldVector< T, dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< FieldVector< T, dimWorld > > &P)
    Definition simplexintersection.cc:39
    \n-
    static void grid1_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:48
    \n-
    static void grid2_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:56
    \n-
    static void grid1_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:104
    \n-
    static bool computeIntersectionPoints(const std::vector< FieldVector< T, dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< FieldVector< T, dimWorld > > &P)
    Definition simplexintersection.cc:78
    \n-
    FieldVector< T, dimWorld > Vector
    Definition simplexintersection.cc:73
    \n-
    static void grid1_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:181
    \n-
    FieldVector< T, dimWorld > Vector
    Definition simplexintersection.cc:129
    \n-
    static bool computeIntersectionPoints(const std::vector< FieldVector< T, dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< FieldVector< T, dimWorld > > &P)
    Definition simplexintersection.cc:134
    \n-
    FieldVector< T, dimWorld > Vector
    Definition simplexintersection.cc:206
    \n-
    static bool computeIntersectionPoints(const std::vector< FieldVector< T, dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< FieldVector< T, dimWorld > > &P)
    Definition simplexintersection.cc:211
    \n-
    static void grid1_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:262
    \n-
    static bool computeIntersectionPoints(const std::vector< FieldVector< T, dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< FieldVector< T, dimWorld > > &P)
    Definition simplexintersection.cc:291
    \n-
    FieldVector< T, dimWorld > Vector
    Definition simplexintersection.cc:286
    \n-
    static void grid1_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:332
    \n-
    static bool computeIntersectionPoints(const std::vector< FieldVector< T, dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< FieldVector< T, dimWorld > > &P)
    Definition simplexintersection.cc:360
    \n-
    static void grid1_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:542
    \n-
    FieldVector< T, dimWorld > Vector
    Definition simplexintersection.cc:355
    \n-
    static bool computeIntersectionPoints(const std::vector< FieldVector< T, dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< FieldVector< T, dimWorld > > &P)
    Definition simplexintersection.cc:570
    \n-
    static void grid1_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:684
    \n-
    FieldVector< T, dimWorld > Vector
    Definition simplexintersection.cc:565
    \n-
    static void grid1_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:779
    \n-
    static bool computeIntersectionPoints(const std::vector< FieldVector< T, dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< FieldVector< T, dimWorld > > &P)
    Definition simplexintersection.cc:712
    \n-
    FieldVector< T, dimWorld > Vector
    Definition simplexintersection.cc:707
    \n-
    FieldVector< T, dimWorld > Vector
    Definition simplexintersection.cc:802
    \n-
    static void grid1_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:875
    \n-
    static bool computeIntersectionPoints(const std::vector< FieldVector< T, dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< FieldVector< T, dimWorld > > &P)
    Definition simplexintersection.cc:807
    \n-
    static bool computeIntersectionPoints(const std::vector< FieldVector< T, dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< FieldVector< T, dimWorld > > &P)
    Definition simplexintersection.cc:903
    \n-
    static void grid1_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:983
    \n-
    FieldVector< T, dimWorld > Vector
    Definition simplexintersection.cc:898
    \n-
    static void grid1_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:1127
    \n-
    static bool computeIntersectionPoints(const std::vector< FieldVector< T, dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< FieldVector< T, dimWorld > > &P)
    Definition simplexintersection.cc:1010
    \n-
    FieldVector< T, dimWorld > Vector
    Definition simplexintersection.cc:1005
    \n-
    static void grid2_subdivisions(const std::vector< Vector > &elementCorners, std::vector< std::vector< unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)
    Definition simplexintersection.cc:1135
    \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
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,1578 +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-simplexintersection.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-6namespace _\bD_\bu_\bn_\be {\n-7namespace GridGlue {\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-9template \n-10inline void _\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn(std::integral_constant,const std::\n-vector >& elementCorners,\n-11 std::vector >& subElements,\n-12 std::vector >& faceIds);\n-13template \n-14inline void _\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn(std::integral_constant,const std::\n-vector >& elementCorners,\n-15 std::vector >& subElements,\n-16 std::vector >& faceIds);\n-17template \n-18inline void _\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn(std::integral_constant,const std::\n-vector >& elementCorners,\n-19 std::vector >& subElements,\n-20 std::vector >& faceIds);\n-21template \n-22inline void _\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn(std::integral_constant,const std::\n-vector >& elementCorners,\n-23 std::vector >& subElements,\n-24 std::vector >& faceIds);\n-25\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 std::vector > polytopeCorners;\n 26\n-27\n-28// *****************SIMPLEX INTERSECTION COMPUTATION METHODS\n-***************************\n-29template\n-_\b3_\b0class _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd : public _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd{\n-_\b3_\b1 static_assert(dim1 > dim2, \"Specialization missing\");\n-32 friend class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd;\n-33public:\n-_\b3_\b4 typedef FieldVector _\bV_\be_\bc_\bt_\bo_\br;\n-_\b3_\b5 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = dim1;\n-_\b3_\b6 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = dim2;\n-_\b3_\b7 static const int _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = dim2;\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-_\b3_\b9 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::\n-vector >& X,\n-40 const std::vector >& Y,\n-41 std::vector > & SX,\n-42 std::vector > & SY,\n-43 std::vector > & P)\n-44 {\n-45 return _\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_\b2_\b,_\bd_\bi_\bm_\b1_\b,_\bT_\b>_\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(Y, X,\n-SY, SX, P);\n-46 }\n-47\n-_\b4_\b8 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-49 std::vector >& subElements,\n-50 std::vector >& faceIds)\n-51 {\n-52 simplexSubdivision(std::integral_constant(),\n-53 elementCorners,subElements, faceIds);\n-54 }\n-55\n-_\b5_\b6 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-57 std::vector >& subElements,\n-58 std::vector >& faceIds)\n-59 {\n-60 simplexSubdivision(std::integral_constant(),\n-61 elementCorners, subElements, faceIds);\n-62 }\n-63};\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\n-66\n-67// POINTS ARE EQUAL\n-68template\n-_\b6_\b9class _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd : public\n-_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd{\n-70 friend class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd;\n-71\n-72public:\n-_\b7_\b3 typedef FieldVector _\bV_\be_\bc_\bt_\bo_\br;\n-_\b7_\b4 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 0;\n-_\b7_\b5 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 0;\n-_\b7_\b6 static const int _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 0;\n-77\n-_\b7_\b8 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(\n-79 const std::vector >& X,\n-80 const std::vector >& Y,\n-81 std::vector > & SX,\n-82 std::vector > & SY,\n-83 std::vector > & P)\n-84 {\n-85 assert(X.size() == 1 && Y.size() == 1);\n-86\n-87 P.clear(); SX.clear(); SY.clear();\n-88 int k;\n-89\n-90 T eps = 1e-8;\n-91 T a = X[0].infinity_norm();\n-92 T b = Y[0].infinity_norm();\n-93 T c = (X[0] - Y[0]).infinity_norm();\n-94\n-95 if (c <= eps*a || c <= eps*b ||\n-96 (a& elementCorners,\n-105 std::vector >& subElements,\n-106 std::vector >& faceIds)\n-107 {\n-108 simplexSubdivision(std::integral_constant\n-(),\n-109 elementCorners,subElements, faceIds);\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+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-_\b1_\b1_\b2 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-113 std::vector >& subElements,\n-114 std::vector >& faceIds)\n-115 {\n-116 simplexSubdivision(std::integral_constant\n-(),\n-117 elementCorners, subElements, faceIds);\n-118 }\n-119\n-120};\n-121\n-122\n-123// POINT ON LINE SEGMENT - :)\n-124template\n-_\b1_\b2_\b5class _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd : public\n-_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd{\n-126 friend class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd;\n-127\n-128public:\n-_\b1_\b2_\b9 typedef FieldVector _\bV_\be_\bc_\bt_\bo_\br;\n-_\b1_\b3_\b0 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 0;\n-_\b1_\b3_\b1 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 1;\n-_\b1_\b3_\b2 static const int _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 0;\n-133\n-_\b1_\b3_\b4 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::\n-vector >& X,\n-135 const std::vector >& Y,\n-136 std::vector > & SX,\n-137 std::vector > & SY,\n-138 std::vector > & P)\n-139 {\n-140 assert(X.size() == 1 && Y.size() == 2);\n-141\n-142 P.clear(); SX.clear(); SY.clear();\n-143 SY.resize(2);\n-144\n-145 if (dimWorld == 1) {\n-146 T lowerBound = std::max(X[0][0], std::min(Y[0][0],Y[1][0]));\n-147 T upperBound = std::min(X[0][0], std::max(Y[0][0],Y[1][0]));\n-148\n-149 if (lowerBound <= upperBound) { // Intersection is non-empty\n-150 _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(X[0],P);\n-151 return true;\n-152 }\n-153 } else {\n-154\n-155 T eps = 1e-8;\n-156\n-157 // check whether the point is on the segment\n-158 FieldVector v0 = X[0] - Y[0];\n-159 FieldVector v1 = X[0] - Y[1];\n-160 FieldVector v2 = Y[1] - Y[0];\n-161\n-162 T s = v0.dot(v1);\n-163 T t = v0.two_norm()/v2.two_norm();\n-164 v2*=t;\n-165 v2+=Y[0];\n-166 v2-=X[0];\n-167\n-168 if (v2.infinity_norm() < eps && s<=eps && t<=1+eps) {\n-169\n-170 int k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(X[0],P);\n-171 if (s < eps && t < eps)\n-172 SY[0].push_back(k);\n-173 else if (s < eps && t>1-eps)\n-174 SY[1].push_back(k);\n-175 return true;\n-176 }\n-177 }\n-178 return false;\n-179 }\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+138\n+139 if (intersects)\n+140 neighborIntersectsRef[domGrid].get()[i] = true;\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 (nPolyCorners=3\n+176\n+178 // Compute a point in the middle of the polytope and order all corners\n+cyclic\n 180\n-_\b1_\b8_\b1 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-182 std::vector >& subElements,\n-183 std::vector >& faceIds)\n-184 {\n-185 simplexSubdivision(std::integral_constant\n-(),\n-186 elementCorners,subElements, faceIds);\n-187 }\n-188\n-_\b1_\b8_\b9 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-190 std::vector >& subElements,\n-191 std::vector >& faceIds)\n-192 {\n-193 simplexSubdivision(std::integral_constant\n-(),\n-194 elementCorners, subElements, faceIds);\n-195 }\n-196\n-197};\n-198\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_\b0_\b2class _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd : public\n-_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd{\n-203 friend class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd;\n+200 for (int j=0;j _\bV_\be_\bc_\bt_\bo_\br;\n-_\b2_\b0_\b7 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 0;\n-_\b2_\b0_\b8 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 2;\n-_\b2_\b0_\b9 static const int _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 0;\n-210\n-_\b2_\b1_\b1 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::\n-vector >& X,\n-212 const std::vector >& Y,\n-213 std::vector > & SX,\n-214 std::vector > & SY,\n-215 std::vector > & P)\n-216 {\n-217 assert(X.size() == 1 && Y.size() == 3 && dimWorld > 1);\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 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.push_back(intersect);\n+210 }\n+211}\n+212\n+213template\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 P.clear(); SX.clear(); SY.clear();\n-220 SY.resize(3);\n-221 int k;\n-222\n-223 // If not, check whether it is inside the triangle\n-224 double eps= 1e-8 ; // tolerance for relative error\n+219 for (size_t k=0; k v0,v1,v2,r;\n-227\n-228 v0 = Y[1] - Y[0];\n-229 v1 = Y[2] - Y[0];\n-230 v2 = X[0] - Y[0];\n-231\n-232 T s,t,d;\n-233\n-234 d = ((v0.dot(v0))*(v1.dot(v1)) - (v0.dot(v1))*(v0.dot(v1)));\n-235\n-236 s = ((v1.dot(v1))*(v0.dot(v2)) - (v0.dot(v1))*(v1.dot(v2))) / d;\n-237 t = ((v0.dot(v0))*(v1.dot(v2)) - (v0.dot(v1))*(v0.dot(v2))) / d;\n+226 // compute angles inside the polygon plane w.r.t to this axis\n+227 _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs edge0 = polytopeCorners[1][0] - polytopeCorners[0][0];\n+228\n+229 // Compute a vector that is perpendicular to the edge but lies in the\n+polytope plane\n+230 // So we have a unique ordering\n+231 _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs edge1 = polytopeCorners[2][0] - polytopeCorners[0][0];\n+232 _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs normal0 = edge1;\n+233 normal0.axpy(-(edge0*edge1),edge0);\n+234\n+235 std::vector angles(polytopeCorners.size());\n+236\n+237 for (size_t i=0; i -eps && t > -eps && (s+t)< 1+eps && (r-X[0]).infinity_norm() < eps)\n-{\n-244 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(X[0],P);\n-245\n-246 if (t < eps) { // t ~ 0, s varies -> edge 0\n-247 SY[0].push_back(k);\n-248 }\n-249 if (s < eps) { // s ~ 0, t varies -> edge 1\n-250 SY[1].push_back(k);\n-251 }\n-252 if (s+t > 1-eps) { // s+t ~ 1 -> edge 2\n-253 SY[2].push_back(k);\n-254 }\n+239 _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs 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 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-_\b2_\b6_\b2 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-263 std::vector >& subElements,\n-264 std::vector >& faceIds)\n-265 {\n-266 simplexSubdivision(std::integral_constant\n-(),\n-267 elementCorners,subElements, faceIds);\n-268 }\n-269\n-_\b2_\b7_\b0 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-271 std::vector >& subElements,\n-272 std::vector >& faceIds)\n-273 {\n-274 simplexSubdivision(std::integral_constant\n-(),\n-275 elementCorners, subElements, faceIds);\n-276 }\n-277};\n-278\n-279\n-280// POINT IN TETRAHEDRON - : )\n-281template\n-_\b2_\b8_\b2class _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd : public\n-_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd{\n-283 friend class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd;\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 _\bV_\be_\bc_\bt_\bo_\br;\n-_\b2_\b8_\b7 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 0;\n-_\b2_\b8_\b8 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 3;\n-_\b2_\b8_\b9 static const int _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 0;\n-290\n-_\b2_\b9_\b1 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::\n-vector >& X,\n-292 const std::vector >& Y,\n-293 std::vector > & SX,\n-294 std::vector > & SY,\n-295 std::vector > & P)\n-296 {\n-297 assert(X.size() == 1 && Y.size() == 4 && dimWorld == 3);\n-298\n-299 P.clear(); SX.clear(); SY.clear();\n-300 SY.resize(4);\n-301\n-302 T eps = 1e-8;\n-303 // if not, check whether its inside the tetrahedron\n-304 FieldMatrix D,DD ;\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\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 D[0][0] = Y[0][0] ; D[0][1] = Y[1][0] ; D[0][2] = Y[2][0] ; D[0][3] = Y[3]\n-[0] ;\n-307 D[1][0] = Y[0][1] ; D[1][1] = Y[1][1] ; D[1][2] = Y[2][1] ; D[1][3] = Y[3]\n-[1] ;\n-308 D[2][0] = Y[0][2] ; D[2][1] = Y[1][2] ; D[2][2] = Y[2][2] ; D[2][3] = Y[3]\n-[2] ;\n-309 D[3][0] = 1 ; D[3][1] = 1 ; D[3][2] = 1 ; D[3][3] = 1 ;\n-310\n-311 std::array detD;\n-312 detD[0] = D.determinant();\n-313\n-314 for(unsigned i = 1; i < detD.size(); ++i) {\n-315 DD = D;\n-316 for (unsigned d = 0; d < dimWorld; ++d)\n-317 DD[d][i-1] = X[0][d];\n-318 detD[i] = DD.determinant();\n-319 if (std::abs(detD[i]) > eps && std::signbit(detD[0]) != std::signbit(detD\n-[i]))\n-320 return false; // We are outside.\n-321 }\n-322\n-323 int k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(X[0],P);\n-324 unsigned int faces[4] = {3,2,1,0};\n-325 for (unsigned i = 1; i < detD.size(); ++i)\n-326 if(std::abs(detD[i]) < eps)\n-327 SY[faces[i-1]].push_back(k); // on triangle not containing node i-1\n-328\n-329 return true;\n-330 }\n-331\n-_\b3_\b3_\b2 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-333 std::vector >& subElements,\n-334 std::vector >& faceIds)\n-335 {\n-336 simplexSubdivision(std::integral_constant\n-(),\n-337 elementCorners,subElements, faceIds);\n-338 }\n-339\n-_\b3_\b4_\b0 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-341 std::vector >& subElements,\n-342 std::vector >& faceIds)\n-343 {\n-344 simplexSubdivision(std::integral_constant\n-(),\n-345 elementCorners, subElements, faceIds);\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\n-_\b3_\b5_\b1class _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd : public\n-_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd{\n-352 friend class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd;\n-353\n-354public:\n-_\b3_\b5_\b5 typedef FieldVector _\bV_\be_\bc_\bt_\bo_\br;\n-_\b3_\b5_\b6 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 1;\n-_\b3_\b5_\b7 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 1;\n-_\b3_\b5_\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 = 1;\n-359\n-_\b3_\b6_\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::\n-vector >& X,\n-361 const std::vector >& Y,\n-362 std::vector > & SX,\n-363 std::vector > & SY,\n-364 std::vector > & P)\n-365 {\n-366 assert(X.size() == 2 && Y.size() == 2);\n-367\n-368 P.clear(); SX.clear(); SY.clear();\n-369 SX.resize(2);\n-370 SY.resize(2);\n-371 T eps = 1e-8;\n-372 int k,idX_min=-1,idX_max=-1,idY_min=-1,idY_max=-1;\n-373\n-374 // compute intersections\n-375 switch (dimWorld) {\n-376 case 1: // d\n-377 {\n-378 FieldVector lowerbound(std::max(std::min(X[0][0],X[1][0]),\n-std::min(Y[0][0],X[1][0])));\n-379 FieldVector upperbound(std::min(std::max(X[0][0],X[1][0]),\n-std::max(Y[0][0],Y[1][0])));\n-380\n-381 if (lowerbound[0] < upperbound[0]) { // Intersection is non-empty\n-382\n-383 idX_min = (std::min(X[0][0],X[1][0]) < std::min(Y[0][0],Y[1][0]))?(-1):((X\n-[0][0] std::max(Y[0][0],Y[1][0]))?(-1):((X\n-[0][0]>X[1][0])?(0):(1));\n-388 if (idX_max < 0)\n-389 idY_max = ((Y[0][0]>Y[1][0])?(0):(1));\n-390\n-391 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(lowerbound,P);\n-392 if (idX_min >= 0)\n-393 SX[idX_min].push_back(k);\n-394 else\n-395 SY[idY_min].push_back(k);\n-396\n-397 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(upperbound,P);\n-398 if (idX_max >= 0)\n-399 SX[idX_max].push_back(k);\n-400 else\n-401 SY[idY_max].push_back(k);\n-402\n-403 return true;\n-404 }\n-405 return false;\n-406 }\n-407 case 2: // solve X0 + r_0 * (X1 - X0) = Y0 + r_1 * (Y1 - Y0)\n-408 { // get size_type for all the vectors we are using\n-409\n-410 FieldMatrix A;\n-411 A[0][0] = X[1][0] - X[0][0]; A[0][1] = Y[0][0] - Y[1][0];\n-412 A[1][0] = X[1][1] - X[0][1]; A[1][1] = Y[0][1] - Y[1][1];\n-413\n-414 if (std::abs(A.determinant())>eps) {\n-415 // lines are non parallel and not degenerated\n-416 FieldVector p,r,b = Y[0] - X[0];\n-417 A.solve(r,b) ;\n-418\n-419 if ((r[0]>-eps)&&(r[0]<=1+eps)&&(r[1]>-eps)&&(r[1]<1+eps)) {\n-420 p = X[1] - X[0];\n-421 p *= r[0] ;\n-422 p += X[0] ;\n-423 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(p,P);\n-424 if(r[0] < eps) { // X = X_0 + r_0 (X_1 - X_0) = X_0\n-425 SX[0].push_back(k);\n-426 P[k] = X[0];\n-427 }\n-428 else if(r[0] > 1-eps) { // X = X_0 + r_0 (X_1 - X_0) = X_1\n-429 SX[1].push_back(k);\n-430 P[k] = X[1];\n-431 }\n-432 if(r[1] < eps){ // Y = Y_0 + r_1 (Y_1 - Y_0) = Y_0\n-433 SY[0].push_back(k);\n-434 P[k] = Y[0];\n-435 }\n-436 else if(r[1] > 1-eps) { // Y = Y_0 + r_1 (Y_1 - Y_0) = Y_1\n-437 SY[1].push_back(k);\n-438 P[k] = Y[1];\n-439 }\n-440 return true;\n-441 }\n-442 } else if ((X[1]-X[0]).infinity_norm() > eps && (Y[1]-Y[0]).infinity_norm()\n-> eps) {\n-443 // lines are paralles, but non degenerated\n-444 bool found = false;\n-445\n-446 // use triangle equality ||a - b||_2 = || a -c ||_2 + || c - b ||_2 for non\n-perpendicular lines\n-447 for (unsigned i = 0; i < 2; ++i) {\n-448 if (std::abs((Y[i]-X[0]).two_norm() + std::abs((Y[i]-X[1]).two_norm())\n-449 - std::abs((X[1]-X[0]).two_norm())) < eps) {\n-450 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(Y[i],P);\n-451 SY[i].push_back(k);\n-452 found = true;\n-453 }\n-454 if (std::abs((X[i]-Y[0]).two_norm() + std::abs((X[i]-Y[1]).two_norm())\n-455 - std::abs((Y[1]-Y[0]).two_norm())) < eps) {\n-456 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(X[i],P);\n-457 SX[i].push_back(k);\n-458 found = true;\n-459 }\n-460 }\n-461 return found;\n-462 }\n-463 return false;\n-464 }\n-465 case 3: // solve X0 + r_0 * (X1 - X0) = Y0 + r_1 * (Y1 - Y0)\n-466 { FieldVector dX, dY, dZ, cXY, cYZ;\n-467\n-468 dX = X[1]-X[0];\n-469 dY = Y[1]-Y[0];\n-470 dZ = Y[0]-X[0];\n-471\n-472 cXY[0] = dX[1]* dY[2] - dX[2]* dY[1];\n-473 cXY[1] = dX[2]* dY[0] - dX[0]* dY[2];\n-474 cXY[2] = dX[0]* dY[1] - dX[1]* dY[0];\n-475\n-476 if (fabs(dZ.dot(cXY)) < eps*1e+3 && cXY.infinity_norm()>eps) { // coplanar,\n-but not aligned\n-477\n-478 cYZ[0] = dY[1]* dZ[2] - dY[2]* dZ[1];\n-479 cYZ[1] = dY[2]* dZ[0] - dY[0]* dZ[2];\n-480 cYZ[2] = dY[0]* dZ[1] - dY[1]* dZ[0];\n-481\n-482 T s = -cYZ.dot(cXY) / cXY.two_norm2();\n-483\n-484 if (s > -eps && s < 1+eps) {\n-485 dX*= s;\n-486 dX+= X[0];\n-487 T o = (dX - Y[0]).two_norm() + (dX- Y[1]).two_norm();\n-488\n-489 if (std::abs(o-dY.two_norm()) < eps) {\n-490 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(dX,P);\n-491 \\\n-492 if (s 1-eps) {\n-496 P[k] = X[1];\n-497 SX[1].push_back(k);\n-498 } else if ((dX - Y[0]).two_norm() < eps) {\n-499 P[k] = Y[0];\n-500 SY[0].push_back(k);\n-501 } else if((dX - Y[1]).two_norm() < eps) {\n-502 P[k] = Y[1];\n-503 SY[1].push_back(k);\n-504 }\n-505\n-506 return true;\n-507 }\n-508 }\n-509 } else if (cXY.infinity_norm() <= eps) {// lines are parallel\n-510\n-511 bool found = false;\n-512\n-513 // use triangle equality ||a - b||_2 = || a -c ||_2 + || c - b ||_2,\n-514 // under the assumption (a-c)*(c-b) > 0 or (a-c) = 0 or (c-b) = 0\n-515 for (unsigned i = 0; i < 2; ++i) {\n-516 if ((std::abs((Y[i]-X[0]).two_norm() + std::abs((Y[i]-X[1]).two_norm()) /\n-/ triangle equality\n-517 - std::abs((X[1]-X[0]).two_norm())) < eps) &&\n-518 (std::abs((Y[i]-X[0]).dot((Y[i]-X[1]))) > eps // assumption\n-519 || (Y[i]-X[0]).infinity_norm() < eps || (Y[i]-X[1]).infinity_norm() < eps))\n-{\n-520 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(Y[i],P);\n-521 SY[i].push_back(k);\n-522 found = true;\n-523 }\n-524 if (std::abs((X[i]-Y[0]).two_norm() + std::abs((X[i]-Y[1]).two_norm()) /\n-/ triangle equality\n-525 - std::abs((Y[1]-Y[0]).two_norm())) < eps &&\n-526 (std::abs((X[i]-Y[0]).dot((X[i]-Y[1]))) > eps // assumption\n-527 || (X[i]-Y[0]).infinity_norm() < eps || (X[i]-Y[1]).infinity_norm() < eps))\n-{\n-528 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(X[i],P);\n-529 SX[i].push_back(k);\n-530 found = true;\n-531 }\n-532 }\n-533 return found;\n-534 }\n-535\n-536 return false;\n-537 }\n-538 }\n-539 return false;\n-540 }\n-541\n-_\b5_\b4_\b2 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-543 std::vector >& subElements,\n-544 std::vector >& faceIds)\n-545 {\n-546 simplexSubdivision(std::integral_constant\n-(),\n-547 elementCorners,subElements, faceIds);\n-548 }\n-549\n-_\b5_\b5_\b0 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-551 std::vector >& subElements,\n-552 std::vector >& faceIds)\n-553 {\n-554 simplexSubdivision(std::integral_constant\n-(),\n-555 elementCorners, subElements, faceIds);\n-556 }\n-557};\n-558\n-559// SEGEMENT-TRIANGLE INTERSECTION - : )\n-560template\n-_\b5_\b6_\b1class _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd : public\n-_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd{\n-562 friend class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd;\n-563\n-564public:\n-_\b5_\b6_\b5 typedef FieldVector _\bV_\be_\bc_\bt_\bo_\br;\n-_\b5_\b6_\b6 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 1;\n-_\b5_\b6_\b7 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 2;\n-_\b5_\b6_\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 = 1;\n-569\n-_\b5_\b7_\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::\n-vector >& X,\n-571 const std::vector >& Y,\n-572 std::vector > & SX,\n-573 std::vector > & SY,\n-574 std::vector > & P)\n-575 {\n-576\n-577 assert(X.size() == 2 && Y.size() == 3 && dimWorld > 1);\n-578 P.clear(); SX.clear(); SY.clear();\n-579 SX.resize(2);\n-580 SY.resize(3);\n-581\n-582 int k;\n-583 std::vector > surfPts, edge(2), pni(1);\n-584 std::vector > hSX, hSY;\n-585\n-586 // is any segment point inside the triangle?\n-587 for (unsigned ni = 0; ni < 2; ++ni) {\n-588 pni[0] = X[ni];\n-589\n-590 if (_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b0_\b,_\b2_\b,_\bT_\b>_\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-(pni,Y,hSX,hSY,surfPts)) {\n-591 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(X[ni],P);\n-592 SX[ni].push_back(k);\n-593 for (unsigned e=0; e < 3; ++e)\n-594 if (hSY[e].size() > 0)\n-595 SY[e].push_back(k);\n-596\n-597 }\n-598 surfPts.clear(); hSX.clear(); hSY.clear();\n-599 }\n-600\n-601 if (P.size() >= 2) // we cannot have more than two intersection points\n-602 return true;\n-603\n-604 unsigned int faces[3] = {0,2,1};\n-605 // do triangle faces intersect with the segment?\n-606 for (unsigned ni = 0; ni < 3; ++ni) {\n-607 edge[0] = Y[ni];\n-608 edge[1] = Y[(ni+1)%3];\n-609\n-610 if (_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b1_\b,_\b1_\b,_\bT_\b>_\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-(X,edge,hSX,hSY,surfPts)) {\n-611 for (unsigned ne = 0; ne < surfPts.size(); ++ne) {\n-612 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(surfPts[ne],P);\n-613 SY[faces[ni]].push_back(k);\n-614 if (hSX[0].size() > 0)\n-615 SX[0].push_back(k);\n-616 if (hSX[1].size() > 0)\n-617 SX[1].push_back(k);\n-618 }\n-619\n-620 if (P.size() >= 2) // we cannot have more than two intersection points\n-621 return true;\n-622\n-623 surfPts.clear(); hSX.clear(); hSY.clear();\n-624 }\n-625 }\n-626\n-627 if (P.size() >= 2) // we cannot have more than two intersection points\n-628 return true;\n-629\n-630 // if line and triangle are not coplanar in 3d and do not intersect at\n-boundaries\n-631 if (dimWorld == 3) {\n-632 T eps = 1e-8;\n-633\n-634 Dune::FieldVector B,r,p ;\n-635 Dune::FieldMatrix A ;\n-636\n-637 B = Y[0] - X[0] ;\n-638\n-639 for (unsigned i = 0; i < dimWorld; ++i) {\n-640 A[i][0] = (X[1][i] - X[0][i]);\n-641 A[i][1] = (Y[0][i] - Y[1][i]);\n-642 A[i][dimWorld-1] = (Y[0][i] - Y[dimWorld-1][i]);\n-643 }\n-644\n-645 if (std::abs(A.determinant())>eps) {\n-646\n-647 A.solve(r,B) ;\n-648\n-649 if ((r[0]>=-eps)&&(r[0]<=1+eps)\n-650 &&(r[1]>=-eps)&&(r[1]<=1+eps)\n-651 &&(r[2]>=-eps)&&(r[2]<=1+eps)\n-652 &&(r[1]+r[2]>=-eps) &&(r[1]+r[2]<=1+eps)) {\n-653 p = X[1] - X[0] ;\n-654 p *= r[0] ;\n-655 p += X[0] ;\n-656 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(p,P);\n-657\n-658 if (std::abs(r[0]) < eps) // we prefer exact locations\n-659 P[k] = X[0];\n-660 else if (std::abs(r[0]) > 1-eps)\n-661 P[k] = X[1];\n-662 else if (std::abs(r[1]) < eps && std::abs(r[2]) < eps)\n-663 P[k] = Y[0];\n-664 else if (std::abs(r[1]) < eps && std::abs(r[2]) > 1-eps)\n-665 P[k] = Y[2];\n-666 else if (std::abs(r[1]) > 1-eps && std::abs(r[2]) < eps)\n-667 P[k] = Y[1];\n-668\n-669 if (std::abs(r[1]) < eps)\n-670 SY[1].push_back(k);\n-671 if (std::fabs(r[dimWorld-1]) < eps)\n-672 SY[0].push_back(k);\n-673 if (std::fabs(r[1]+r[dimWorld-1] - 1) < eps)\n-674 SY[2].push_back(k);\n-675\n-676\n-677 return true ;\n-678 }\n-679 }\n-680 }\n-681 return false ;\n-682 }\n-683\n-_\b6_\b8_\b4 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-685 std::vector >& subElements,\n-686 std::vector >& faceIds)\n-687 {\n-688 simplexSubdivision(std::integral_constant\n-(),\n-689 elementCorners,subElements, faceIds);\n-690 }\n-691\n-_\b6_\b9_\b2 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-693 std::vector >& subElements,\n-694 std::vector >& faceIds)\n-695 {\n-696 simplexSubdivision(std::integral_constant\n-(),\n-697 elementCorners, subElements, faceIds);\n-698 }\n-699};\n-700\n-701// SEGEMENT-TETRAHEDRON INTERSECTION - : )\n-702template\n-_\b7_\b0_\b3class _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd : public\n-_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd{\n-704 friend class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd;\n-705\n-706public:\n-_\b7_\b0_\b7 typedef FieldVector _\bV_\be_\bc_\bt_\bo_\br;\n-_\b7_\b0_\b8 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 1;\n-_\b7_\b0_\b9 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 3;\n-_\b7_\b1_\b0 static const int _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 1;\n-711\n-_\b7_\b1_\b2 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::\n-vector >& X,\n-713 const std::vector >& Y,\n-714 std::vector > & SX,\n-715 std::vector > & SY,\n-716 std::vector > & P)\n-717 {\n-718 assert(X.size() == 2 && Y.size() == 4 && dimWorld > 2);\n-719\n-720 std::vector indices;\n-721 std::vector > surfPts;\n-722 std::vector > hSX, hSY;\n-723\n-724 P.clear(); SX.clear(); SY.clear();\n-725 SX.resize(2);\n-726 SY.resize(4);\n-727\n-728 std::vector > pni(1);\n-729\n-730 bool b = false;\n-731\n-732 // check whether the corners of the segment are contained in the\n-tetrahedron\n-733 for (unsigned int ci = 0; ci < 2; ++ ci) {\n-734\n-735 pni[0] = X[ci];\n-736 if(_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b0_\b,_\b3_\b,_\bT_\b>_\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-(pni,Y,hSX,hSY,surfPts)) {\n-737 int k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(X[ci],P);\n-738 SX[ci].push_back(k);\n-739 b=true;\n-740 }\n-741 surfPts.clear();\n-742 hSX.clear(); hSY.clear();\n-743 }\n-744\n-745 if (P.size() == 2)\n-746 return true;\n-747\n-748 unsigned int faces[4] = {0,3,2,1};\n-749 // check whether tetrahedron faces intersect with segment\n-750 std::vector > triangle(3);\n-751 for (unsigned int ci = 0; ci < 4; ++ci) { // iterate over all faces\n-752 triangle[0] = Y[ci];\n-753 triangle[1] = Y[(ci+1)%4];\n-754 triangle[2] = Y[(ci+2)%4];\n-755\n-756 if (_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b1_\b,_\b2_\b,_\bT_\b>_\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-(X,triangle,hSX,hSY,surfPts)) { // seg - triangle intersection\n-757 std::vector indices(surfPts.size());\n-758 for (unsigned int np = 0; np < surfPts.size(); ++np) {\n-759 int k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(surfPts[np],P);\n-760 indices[np]=k;\n-761 SY[faces[ci]].push_back(k);\n-762 }\n-763\n-764 // hSX[*] is nonempty if the intersection point is on an edge of the\n-current face of Y\n-765 for (unsigned int np = 0; np < hSX[0].size(); ++np)\n-766 SX[0].push_back(indices[hSX[0][np]]);\n-767 for (unsigned int np = 0; np < hSX[1].size(); ++np)\n-768 SX[0].push_back(indices[hSX[1][np]]);\n-769\n-770 b = true;\n-771 }\n-772 surfPts.clear();\n-773 hSX.clear(); hSY.clear();\n-774 }\n-775\n-776 return b;\n-777 }\n-778\n-_\b7_\b7_\b9 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-780 std::vector >& subElements,\n-781 std::vector >& faceIds)\n-782 {\n-783 simplexSubdivision(std::integral_constant\n-(),\n-784 elementCorners,subElements, faceIds);\n-785 }\n-786\n-_\b7_\b8_\b7 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-788 std::vector >& subElements,\n-789 std::vector >& faceIds)\n-790 {\n-791 simplexSubdivision(std::integral_constant\n-(),\n-792 elementCorners, subElements, faceIds);\n-793 }\n-794};\n-795\n-796// TRIANGLE -TRIANGLE INTERSECTION\n-797template\n-_\b7_\b9_\b8class _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd : public\n-_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd{\n-799 friend class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd;\n-800\n-801public:\n-_\b8_\b0_\b2 typedef FieldVector _\bV_\be_\bc_\bt_\bo_\br;\n-_\b8_\b0_\b3 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 2;\n-_\b8_\b0_\b4 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 2;\n-_\b8_\b0_\b5 static const int _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 2;\n-806\n-_\b8_\b0_\b7 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::\n-vector >& X,\n-808 const std::vector >& Y,\n-809 std::vector > & SX,\n-810 std::vector > & SY,\n-811 std::vector > & P)\n-812 {\n-813 assert(X.size() == 3 && Y.size() == 3 && dimWorld > 1);\n-814\n-815 P.clear(); SX.clear(); SY.clear();\n-816\n-817 SX.resize(3);\n-818 SY.resize(3);\n-819\n-820 bool b = false;\n-821\n-822 std::vector > edge(2);\n-823 std::vector > surfPts;\n-824 std::vector > hSX, hSY;\n-825 std::vector indices;\n-826\n-827 unsigned int faces[3] = {0,2,1};\n-828\n-829 for (unsigned int ni = 0; ni < 3; ++ni) {\n-830 // check whether the faces of triangle Y intersect the triangle X\n-831 edge[0] = Y[ni];\n-832 edge[1] = Y[(ni+1)%3];\n-833\n-834 if(_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b2_\b,_\b1_\b,_\bT_\b>_\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-(X,edge,hSX,hSY,surfPts)) {\n-835\n-836 indices.resize(surfPts.size());\n-837 // add intersections of edges of Y with triangle X\n-838 for (unsigned int np = 0; np < surfPts.size(); ++np) {\n-839 int k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(surfPts[np],P);\n-840 indices[np] = k;\n-841 SY[faces[ni]].push_back(k); // add edge data\n-842 }\n-843\n-844 b=true;\n-845 }\n-846 if (P.size() >= 6)\n-847 return true;\n-848\n-849 surfPts.clear(); hSX.clear(); hSY.clear();\n-850 // check whether the faces of triangle X intersect the triangle Y\n-851 edge[0] = X[ni];\n-852 edge[1] = X[(ni+1)%3];\n-853\n-854 if(_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b1_\b,_\b2_\b,_\bT_\b>_\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-(edge,Y,hSX,hSY,surfPts)) {\n-855\n-856 indices.resize(surfPts.size());\n-857 // add intersections of edges of X with triangle Y\n-858 for (unsigned int np = 0; np < surfPts.size(); ++np) {\n-859 int k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(surfPts[np],P);\n-860 indices[np] = k;\n-861 SX[faces[ni]].push_back(k); // add edge data\n-862 }\n-863\n-864 b=true;\n-865 }\n-866 if (P.size() >= 6)\n-867 return true;\n-868\n-869 surfPts.clear(); hSX.clear(); hSY.clear();\n-870 }\n-871\n-872 return b;\n-873 }\n-874\n-_\b8_\b7_\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-876 std::vector >& subElements,\n-877 std::vector >& faceIds)\n-878 {\n-879 simplexSubdivision(std::integral_constant\n-(),\n-880 elementCorners,subElements, faceIds);\n-881 }\n-882\n-_\b8_\b8_\b3 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-884 std::vector >& subElements,\n-885 std::vector >& faceIds)\n-886 {\n-887 simplexSubdivision(std::integral_constant\n-(),\n-888 elementCorners, subElements, faceIds);\n-889 }\n-890};\n-891\n-892// TRIANGLE -TETRAHEDRON INTERSECTION -: )\n-893template\n-_\b8_\b9_\b4class _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd : public\n-_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd{\n-895 friend class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd;\n-896\n-897public:\n-_\b8_\b9_\b8 typedef FieldVector _\bV_\be_\bc_\bt_\bo_\br;\n-_\b8_\b9_\b9 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 2;\n-_\b9_\b0_\b0 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 3;\n-_\b9_\b0_\b1 static const int _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 2;\n-902\n-_\b9_\b0_\b3 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::\n-vector >& X,\n-904 const std::vector >& Y,\n-905 std::vector > & SX,\n-906 std::vector > & SY,\n-907 std::vector > & P)\n-908 {\n-909 assert(X.size() == 3 && Y.size() == 4 && dimWorld > 2);\n-910 P.clear(); SX.clear(); SY.clear();\n-911 SX.resize(3);\n-912 SY.resize(4);\n-913\n-914 bool b = false;\n-915 int k,ni,np, ep;\n-916 std::vector > surfPts, xni(1);\n-917 std::vector > hSX, hSY;\n-918\n-919 unsigned int fiX[3][2];\n-920\n-921 fiX[0][0] = 0; fiX[1][0] = 0; fiX[2][0] = 1; // faces to node\n-922 fiX[0][1] = 1; fiX[1][1] = 2; fiX[2][1] = 2;\n-923 // 1st step: check whether the points of the triangle are contained in the\n-tetrahedron\n-924 for (ni = 0; ni < 3; ++ni) {\n-925\n-926 xni[0] = X[ni];\n-927 if (_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b0_\b,_\b3_\b,_\bT_\b>_\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-(xni,Y,hSX,hSY,surfPts)) {\n-928 std::vector indices(surfPts.size());\n-929 for (np = 0; np < surfPts.size(); ++np) {\n-930 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(X[ni],P);\n-931 indices[np] = k;\n-932 SX[fiX[ni][0]].push_back(k); // the corresponding edges to the node are ni\n-and (ni+2)%3\n-933 SX[fiX[ni][1]].push_back(k);\n-934 }\n-935\n-936 for (ep = 0; ep < 4; ++ep) {\n-937 for (np = 0; np < hSY[ep].size();++np) {\n-938 SY[ep].push_back(indices[hSY[ep][np]]);\n-939 }\n-940 }\n-941 b = true;\n-942 }\n-943 hSX.clear(); hSY.clear(); surfPts.clear();\n-944 }\n-945\n-946 if (P.size() == 3) // intersection is given by all three corners of the\n-triangle\n-947 return true;\n-948\n-949 // note: points of Y in X is called indirectly via triangle-triangle\n-intesection\n-950\n-951 // check whether the triangles of the one tetrahedron intersect the\n-triangle\n-952 unsigned int facesY[4] = {0,3,2,1}; // face ordering\n-953\n-954 std::vector > triangle(3);\n-955 for (ni = 0; ni < 4; ++ni) {\n-956\n-957 triangle[0] = Y[ni];\n-958 triangle[1] = Y[(ni+1)%4];\n-959 triangle[2] = Y[(ni+2)%4];\n-960\n-961 if (_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b2_\b,_\b2_\b,_\bT_\b>_\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-(X,triangle,hSX,hSY,surfPts)) {\n-962 std::vector indices(surfPts.size());\n-963 for (np = 0; np < surfPts.size(); ++np) {\n-964 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(surfPts[np],P);\n-965 indices[np]=k;\n-966 SY[facesY[ni]].push_back(k);\n-967 }\n-968\n-969 // SX[*] is nonempty if the face * of X is intersected\n-970 for (np = 0; np < 3; ++np) {\n-971 for (ep = 0; ep < hSX[np].size(); ++ep) {\n-972 SX[np].push_back(indices[hSX[np][ep]]);\n-973 }\n-974 }\n-975\n-976 b = true;\n-977 }\n-978 hSX.clear(); hSY.clear(); surfPts.clear();\n-979 }\n-980 return b;\n-981 }\n-982\n-_\b9_\b8_\b3 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-984 std::vector >& subElements,\n-985 std::vector >& faceIds)\n-986 {\n-987 simplexSubdivision(std::integral_constant\n-(),\n-988 elementCorners,subElements, faceIds);\n-989 }\n-990\n-_\b9_\b9_\b1 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-992 std::vector >& subElements,\n-993 std::vector >& faceIds)\n-994 {\n-995 simplexSubdivision(std::integral_constant\n-(),\n-996 elementCorners, subElements, faceIds);\n-997 }\n-998};\n-999\n-1000template\n-_\b1_\b0_\b0_\b1class _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd : public\n-_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd{\n-1002 friend class _\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\bM_\be_\bt_\bh_\bo_\bd;\n-1003\n-1004public:\n-_\b1_\b0_\b0_\b5 typedef FieldVector _\bV_\be_\bc_\bt_\bo_\br;\n-_\b1_\b0_\b0_\b6 static const int _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 3;\n-_\b1_\b0_\b0_\b7 static const int _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\be_\bn_\bs_\bi_\bo_\bn = 3;\n-_\b1_\b0_\b0_\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 = 3;\n-1009\n-_\b1_\b0_\b1_\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::\n-vector >& X,\n-1011 const std::vector >& Y,\n-1012 std::vector > & SX,\n-1013 std::vector > & SY,\n-1014 std::vector > & P)\n-1015 {\n-1016 assert(X.size() == 4 && Y.size() == 4 && dimWorld > 2);\n-1017 P.clear(); SX.clear(); SY.clear();\n-1018\n-1019 SX.resize(4);\n-1020 SY.resize(4);\n-1021\n-1022 bool b = false;\n-1023 int ci,np,ne,k,ni[4][3];\n-1024\n-1025 ni[0][0]= 0 ; ni[0][1]= 1 ; ni[0][2]= 2 ; // faces touching each node\n-1026 ni[1][0]= 0 ; ni[1][1]= 1 ; ni[1][2]= 3 ;\n-1027 ni[2][0]= 0 ; ni[2][1]= 2 ; ni[2][2]= 3 ;\n-1028 ni[3][0]= 1 ; ni[3][1]= 2 ; ni[3][2]= 3 ;\n-1029\n-1030 // temporal data container\n-1031 std::vector > surfPts, pci(1);\n-1032 std::vector > hSX, hSY;\n-1033\n-1034 // check whether the points of the one tetrahedron are contained in the\n-other tetrahedron\n-1035 for (ci = 0; ci < 3; ++ci) {\n-1036 pci[0] = X[ci];\n-1037 // point of X is inside Y\n-1038 if (_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b0_\b,_\b3_\b,_\bT_\b>_\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-(pci,Y,hSX,hSY,surfPts)) {\n-1039 std::vector indices(surfPts.size());\n-1040\n-1041 for (np = 0; np < surfPts.size(); ++np) {\n-1042\n-1043 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(X[ci],P);\n-1044 indices[np]=k;\n-1045 SX[ni[ci][0]].push_back(k); // add face data\n-1046 SX[ni[ci][1]].push_back(k);\n-1047 SX[ni[ci][2]].push_back(k);\n-1048 }\n-1049\n-1050 // hSY[*] is nonempty if X[ci] is on the face * of Y\n-1051 for (ne = 0; ne < 4; ++ne) {\n-1052 for (np = 0; np < hSY[ne].size(); ++np) {\n-1053 SY[ne].push_back(indices[hSY[ne][np]]);\n-1054 }\n-1055 }\n-1056\n-1057 b = true;\n-1058 }\n-1059 hSX.clear(); hSY.clear(); surfPts.clear();\n-1060\n-1061 // probably one point of Y is inside X\n-1062 surfPts.resize(0);\n-1063 pci[0]=Y[ci];\n-1064 if (_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b0_\b,_\b3_\b,_\bT_\b>_\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-(pci,X,hSY,hSX,surfPts)) {\n-1065 std::vector indices(surfPts.size());\n-1066\n-1067 for (np = 0; np < surfPts.size(); ++np) {\n-1068 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(Y[ci],P);\n-1069 indices[np]=k;\n-1070 SY[ni[ci][0]].push_back(k); // add face data\n-1071 SY[ni[ci][1]].push_back(k);\n-1072 SY[ni[ci][2]].push_back(k);\n-1073 }\n-1074\n-1075 // hSX[*] is nonempty if the point Y[ci] is on the face * of X\n-1076 for (ne = 0; ne < 4; ++ne) {\n-1077 for (np = 0; np < hSX[ne].size(); ++np) {\n-1078 SX[ne].push_back(indices[hSX[ne][np]]);\n-1079 }\n-1080 }\n-1081 b = true;\n-1082 }\n-1083 hSX.clear(); hSY.clear(); surfPts.clear();\n-1084 }\n-1085\n-1086 // check whether the triangles of the one tetrahedron intersect the\n-triangles\n-1087 // of the other tetrahedron\n-1088 unsigned int faces[4] = {0,3,2,1}; // face ordering\n-1089\n-1090 std::vector > triangle(3);\n-1091 for (ci = 0; ci < 4; ++ci) { // iterate over faces of Y\n-1092\n-1093 triangle[0] = Y[ci];\n-1094 triangle[1] = Y[(ci+1)%4];\n-1095 triangle[2] = Y[(ci+2)%4];\n-1096\n-1097 if(_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b3_\b,_\b2_\b,_\bT_\b>_\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(X,\n-triangle,hSX,hSY,surfPts)) {\n-1098\n-1099 // add Triangle of Y intersects tetrahedron Y data\n-1100 for (np = 0; np < surfPts.size(); ++np) {\n-1101 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(surfPts[np],P);\n-1102 SY[faces[ci]].push_back(k); // add face data\n-1103 }\n-1104 b = true;\n-1105 }\n-1106 hSX.clear(); hSY.clear(); surfPts.clear();\n-1107\n-1108 triangle[0] = X[ci];\n-1109 triangle[1] = X[(ci+1)%4];\n-1110 triangle[2] = X[(ci+2)%4];\n-1111\n-1112 if(_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b3_\b,_\b2_\b,_\bT_\b>_\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(Y,\n-triangle,hSY,hSX,surfPts)) {\n-1113\n-1114 // add Triangle of Y intersects tetrahedron Y data\n-1115 for (np = 0; np < surfPts.size(); ++np) {\n-1116 k = _\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt(surfPts[np],P);\n-1117 SX[faces[ci]].push_back(k); // add face data\n-1118 }\n-1119 b = true;\n-1120 }\n-1121 hSX.clear(); hSY.clear(); surfPts.clear();\n-1122 }\n-1123\n-1124 return b;\n-1125 }\n-1126\n-_\b1_\b1_\b2_\b7 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-1128 std::vector >& subElements,\n-1129 std::vector >& faceIds)\n-1130 {\n-1131 simplexSubdivision(std::integral_constant\n-(),\n-1132 elementCorners,subElements, faceIds);\n-1133 }\n-1134\n-_\b1_\b1_\b3_\b5 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-1136 std::vector >& subElements,\n-1137 std::vector >& faceIds)\n-1138 {\n-1139 simplexSubdivision(std::integral_constant\n-(),\n-1140 elementCorners, subElements, faceIds);\n-1141 }\n-1142};\n-1143\n-1144template \n-_\b1_\b1_\b4_\b5inline void _\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn(std::integral_constant,\n-1146 const std::vector >& elementCorners,\n-1147 std::vector >& subElements,\n-1148 std::vector >& faceIds)\n-1149{\n-1150 subElements.resize(1);\n-1151 faceIds.resize(0);\n-1152\n-1153 subElements[0].push_back(0);\n-1154}\n-1155\n-1156template \n-_\b1_\b1_\b5_\b7inline void _\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn(std::integral_constant,\n-1158 const std::vector >& elementCorners,\n-1159 std::vector >& subElements,\n-1160 std::vector >& faceIds)\n-1161{\n-1162 subElements.resize(1);\n-1163 faceIds.resize(1);\n-1164\n-1165 subElements[0].push_back(0);\n-1166 subElements[0].push_back(1);\n-1167\n-1168 faceIds[0].push_back(0);\n-1169 faceIds[0].push_back(1);\n-1170}\n-1171\n-1172template \n-_\b1_\b1_\b7_\b3inline void _\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn(std::integral_constant,\n-1174 const std::vector >& elementCorners,\n-1175 std::vector >& subElements,\n-1176 std::vector >& faceIds)\n-1177{\n-1178 subElements.clear();\n-1179 faceIds.clear();\n-1180\n-1181 if (elementCorners.size() == 3) { // triangle\n-1182 subElements.resize(1);\n-1183 faceIds.resize(1);\n-1184\n-1185 subElements[0].push_back(0);\n-1186 subElements[0].push_back(1);\n-1187 subElements[0].push_back(2);\n-1188\n-1189 faceIds[0].push_back(0);\n-1190 faceIds[0].push_back(1);\n-1191 faceIds[0].push_back(2);\n-1192 } else if (elementCorners.size() == 4) { // quadrilateral => 2 triangles\n-1193 subElements.resize(2);\n-1194 faceIds.resize(2);\n-1195\n-1196 subElements[0].push_back(0);\n-1197 subElements[0].push_back(1);\n-1198 subElements[0].push_back(2);\n-1199\n-1200 subElements[1].push_back(1);\n-1201 subElements[1].push_back(2);\n-1202 subElements[1].push_back(3);\n-1203\n-1204 faceIds[0].push_back(2);\n-1205 faceIds[0].push_back(0);\n-1206 faceIds[0].push_back(-1);\n-1207\n-1208 faceIds[1].push_back(-1);\n-1209 faceIds[1].push_back(1);\n-1210 faceIds[1].push_back(3);\n-1211 }\n-1212}\n-1213\n-1214template \n-_\b1_\b2_\b1_\b5inline void _\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn(std::integral_constant,\n-1216 const std::vector >& elementCorners,\n-1217 std::vector >& subElements,\n-1218 std::vector >& faceIds)\n-1219{\n-1220 subElements.clear();\n-1221 faceIds.clear();\n-1222\n-1223 if (elementCorners.size() == 4) { // tetrahedron\n-1224 subElements.resize(1);\n-1225 faceIds.resize(1);\n-1226\n-1227 subElements[0].push_back(0);\n-1228 subElements[0].push_back(1);\n-1229 subElements[0].push_back(2);\n-1230 subElements[0].push_back(3);\n-1231\n-1232 faceIds[0].push_back(0);\n-1233 faceIds[0].push_back(1);\n-1234 faceIds[0].push_back(2);\n-1235 faceIds[0].push_back(3);\n-1236\n-1237 } else if (elementCorners.size() == 8) { // cube => 5 tetrahedra\n-1238 subElements.resize(5);\n-1239 faceIds.resize(5);\n-1240\n-1241 subElements[0].push_back(0);\n-1242 subElements[0].push_back(2);\n-1243 subElements[0].push_back(3);\n-1244 subElements[0].push_back(6);\n-1245\n-1246 subElements[1].push_back(0);\n-1247 subElements[1].push_back(1);\n-1248 subElements[1].push_back(3);\n-1249 subElements[1].push_back(5);\n-1250\n-1251 subElements[2].push_back(0);\n-1252 subElements[2].push_back(3);\n-1253 subElements[2].push_back(5);\n-1254 subElements[2].push_back(6);\n-1255\n-1256 subElements[3].push_back(0);\n-1257 subElements[3].push_back(4);\n-1258 subElements[3].push_back(5);\n-1259 subElements[3].push_back(6);\n-1260\n-1261 subElements[4].push_back(3);\n-1262 subElements[4].push_back(5);\n-1263 subElements[4].push_back(6);\n-1264 subElements[4].push_back(7);\n-1265\n-1266 faceIds[0].push_back(4);\n-1267 faceIds[0].push_back(0);\n-1268 faceIds[0].push_back(-1);\n-1269 faceIds[0].push_back(3);\n-1270\n-1271 faceIds[1].push_back(4);\n-1272 faceIds[1].push_back(2);\n-1273 faceIds[1].push_back(-1);\n-1274 faceIds[1].push_back(1);\n-1275\n-1276 faceIds[2].push_back(-1);\n-1277 faceIds[2].push_back(-1);\n-1278 faceIds[2].push_back(-1);\n-1279 faceIds[2].push_back(-1);\n-1280\n-1281 faceIds[3].push_back(2);\n-1282 faceIds[3].push_back(0);\n-1283 faceIds[3].push_back(-1);\n-1284 faceIds[3].push_back(5);\n-1285\n-1286 faceIds[4].push_back(-1);\n-1287 faceIds[4].push_back(1);\n-1288 faceIds[4].push_back(3);\n-1289 faceIds[4].push_back(5);\n-1290 }\n-1291}\n-1292\n-1293} /* namespace Dune::GridGlue */\n-1294} /* namespace Dune */\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+356\n+357} /* namespace GridGlue */\n+358} /* namespace Dune */\n+_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n+_\bc_\br_\bo_\bs_\bs_\bp_\br_\bo_\bd_\bu_\bc_\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_\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:_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bS_\bu_\bb_\bd_\bi_\bv_\bi_\bs_\bi_\bo_\bn\n-void simplexSubdivision(std::integral_constant< int, 0 >, const std::vector<\n-Dune::FieldVector< T, dimworld > > &elementCorners, std::vector< std::vector<\n-unsigned int > > &subElements, std::vector< std::vector< int > > &faceIds)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:1145\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:_\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:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\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 simplexintersection.cc:35\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_\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 simplexintersection.cc:36\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_\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 simplexintersection.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_\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 simplexintersection.cc:37\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_\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< FieldVector< T,\n-dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::\n-vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::\n-vector< FieldVector< T, dimWorld > > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:39\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_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:48\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_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:56\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b0_\b,_\b _\bT_\b _\b>_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:104\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b0_\b,_\b _\bT_\b _\b>_\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< FieldVector< T,\n-dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::\n-vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::\n-vector< FieldVector< T, dimWorld > > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:78\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b0_\b,_\b _\bT_\b _\b>_\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 simplexintersection.cc:73\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b1_\b,_\b _\bT_\b _\b>_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:181\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b1_\b,_\b _\bT_\b _\b>_\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 simplexintersection.cc:129\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b1_\b,_\b _\bT_\b _\b>_\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< FieldVector< T,\n-dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::\n-vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::\n-vector< FieldVector< T, dimWorld > > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:134\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b2_\b,_\b _\bT_\b _\b>_\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 simplexintersection.cc:206\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b2_\b,_\b _\bT_\b _\b>_\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< FieldVector< T,\n-dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::\n-vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::\n-vector< FieldVector< T, dimWorld > > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:211\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b2_\b,_\b _\bT_\b _\b>_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:262\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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< FieldVector< T,\n-dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::\n-vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::\n-vector< FieldVector< T, dimWorld > > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:291\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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 simplexintersection.cc:286\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b0_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:332\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b1_\b,_\b _\bT_\b _\b>_\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< FieldVector< T,\n-dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::\n-vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::\n-vector< FieldVector< T, dimWorld > > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:360\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b1_\b,_\b _\bT_\b _\b>_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:542\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b1_\b,_\b _\bT_\b _\b>_\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 simplexintersection.cc:355\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b2_\b,_\b _\bT_\b _\b>_\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< FieldVector< T,\n-dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::\n-vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::\n-vector< FieldVector< T, dimWorld > > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:570\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b2_\b,_\b _\bT_\b _\b>_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:684\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b2_\b,_\b _\bT_\b _\b>_\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 simplexintersection.cc:565\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:779\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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< FieldVector< T,\n-dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::\n-vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::\n-vector< FieldVector< T, dimWorld > > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:712\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b1_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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 simplexintersection.cc:707\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b2_\b,_\b _\b2_\b,_\b _\bT_\b _\b>_\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 simplexintersection.cc:802\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b2_\b,_\b _\b2_\b,_\b _\bT_\b _\b>_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:875\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b2_\b,_\b _\b2_\b,_\b _\bT_\b _\b>_\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< FieldVector< T,\n-dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::\n-vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::\n-vector< FieldVector< T, dimWorld > > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:807\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b2_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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< FieldVector< T,\n-dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::\n-vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::\n-vector< FieldVector< T, dimWorld > > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:903\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b2_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:983\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b2_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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 simplexintersection.cc:898\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b3_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:1127\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b3_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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< FieldVector< T,\n-dimWorld > > &X, const std::vector< FieldVector< T, dimWorld > > &Y, std::\n-vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::\n-vector< FieldVector< T, dimWorld > > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:1010\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b3_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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 simplexintersection.cc:1005\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_\b<_\b _\bd_\bi_\bm_\bW_\bo_\br_\bl_\bd_\b,_\b _\b3_\b,_\b _\b3_\b,_\b _\bT_\b _\b>_\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-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:1135\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 ===============================================================================\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: standardmerge.cc File Reference\n \n \n \n \n \n \n \n@@ -70,48 +70,110 @@\n \n \n
    \n \n-
    conformingmerge.hh File Reference
    \n+Namespaces |\n+Macros |\n+Functions
    \n+
    standardmerge.cc 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 <dune/common/fvector.hh>
    \n-#include <dune/geometry/referenceelements.hh>
    \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-Classes

    class  Dune::GridGlue::ConformingMerge< dim, dimworld, T >
     Implementation of the Merger concept for conforming interfaces. More...
     
    \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+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-

    Detailed Description

    \n-

    Implementation of the Merger concept for conforming interfaces.

    \n-
    \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,32 +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-_\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-#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-_\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-\u00a0\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-*\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+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/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: intersectionlist.hh File Reference\n+dune-grid-glue: contactmerge.hh File Reference\n \n \n \n \n \n \n \n@@ -72,43 +72,54 @@\n
  • dune
  • grid-glue
  • merging
  • \n \n \n
    \n \n-
    intersectionlist.hh File Reference
    \n+
    contactmerge.hh File Reference
    \n
    \n
    \n-
    #include <array>
    \n-#include <type_traits>
    \n-#include <utility>
    \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-\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::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": "@@ -2,31 +2,40 @@\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+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:_\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:_\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: intersectionlist.hh Source File\n+dune-grid-glue: contactmerge.hh Source File\n \n \n \n \n \n \n \n@@ -74,299 +74,235 @@\n \n \n \n
    \n-
    intersectionlist.hh
    \n+
    contactmerge.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_CONTACTMERGE_HH
    \n+
    11#define DUNE_GRIDGLUE_MERGING_CONTACTMERGE_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+
    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#include <dune/grid/common/grid.hh>
    \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-
    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-
    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-
    \n-
    162
    \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-
    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+\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+
    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+
    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-
    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-
    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-
    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-
    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-
    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+
    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+
    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
    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-
    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+
    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,357 +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-intersectionlist.hh\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// 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_CONTACTMERGE_HH\n+11#define DUNE_GRIDGLUE_MERGING_CONTACTMERGE_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+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#include \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-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-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-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+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+118 }\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+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+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-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-_\b2_\b7_\b8 _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b0(_\bI_\bn_\bd_\be_\bx intersection, unsigned index) const override\n-279 { return intersections_[intersection].parents0[index]; }\n-280\n-_\b2_\b8_\b1 _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b1(_\bI_\bn_\bd_\be_\bx intersection, unsigned index) const override\n-282 { return intersections_[intersection].parents1[index]; }\n-283\n-_\b2_\b8_\b4 _\bL_\bo_\bc_\ba_\bl_\b0 _\bc_\bo_\br_\bn_\be_\br_\b0(_\bI_\bn_\bd_\be_\bx intersection, unsigned corner, unsigned index) const\n-override\n-285 { return intersections_[intersection].corners0[index][corner]; }\n-286\n-_\b2_\b8_\b7 _\bL_\bo_\bc_\ba_\bl_\b1 _\bc_\bo_\br_\bn_\be_\br_\b1(_\bI_\bn_\bd_\be_\bx intersection, unsigned corner, unsigned index) const\n-override\n-288 { return intersections_[intersection].corners1[index][corner]; }\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+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+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 _\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:_\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:_\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: contactmerge.hh File Reference\n+dune-grid-glue: merger.hh File Reference\n \n \n \n \n \n \n \n@@ -72,54 +72,37 @@\n
  • dune
  • grid-glue
  • merging
  • \n
    \n \n
    \n \n-
    contactmerge.hh File Reference
    \n+
    merger.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 <vector>
    \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+#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::ContactMerge< dimworld, T >
     Merge two codimension-1 surfaces that may be a positive distance apart. 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-

    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": "@@ -2,40 +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-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+merger.hh File Reference\n #include \n-#include \n-#include \n-#include \n-#include \n #include \n-#include \n-#include \n-#include \n-#include \n-#include <_\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+#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_\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+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-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/a00083_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00083_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: merger.hh Source File\n \n \n \n \n \n \n \n@@ -74,235 +74,110 @@\n \n \n \n
    \n-
    contactmerge.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-
    10#ifndef DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH
    \n-
    11#define DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH
    \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-
    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#include <dune/grid/common/grid.hh>
    \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-\n-\n+
    31 typedef Dune::FieldVector<ctype, grid1Dim> Grid1Coords;
    \n
    32
    \n-
    33namespace Dune {
    \n-
    34namespace GridGlue {
    \n+
    34 typedef Dune::FieldVector<ctype, grid2Dim> Grid2Coords;
    \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+
    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-\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+
    \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-
    \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-
    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-
    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-
    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+
    120#endif
    \n+\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+
    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,304 +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-contactmerge.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-10#ifndef DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH\n-11#define DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH\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\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#include \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-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+_\b3_\b1 typedef Dune::FieldVector _\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs;\n 32\n-33namespace _\bD_\bu_\bn_\be {\n-34namespace GridGlue {\n+_\b3_\b4 typedef Dune::FieldVector _\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs;\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+_\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-_\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+_\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-_\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-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-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-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+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:_\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+_\bD_\bu_\bn_\be_\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 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+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/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: overlappingmerge.hh File Reference\n+dune-grid-glue: intersectionlist.hh File Reference\n \n \n \n \n \n \n \n@@ -72,36 +72,34 @@\n
  • dune
  • grid-glue
  • merging
  • \n \n \n
    \n \n-
    overlappingmerge.hh File Reference
    \n+
    intersectionlist.hh File Reference
    \n
    \n
    \n-
    #include <iostream>
    \n-#include <iomanip>
    \n+
    #include <array>
    \n+#include <type_traits>
    \n+#include <utility>
    \n #include <vector>
    \n-#include <algorithm>
    \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
    \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::OverlappingMerge< dim1, dim2, dimworld, T >
     Computing overlapping grid intersections for grids of different dimensions. More...
    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", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,32 +2,30 @@\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-#include \n+intersectionlist.hh File Reference\n+#include \n+#include \n+#include \n #include \n-#include \n-#include \n #include \n-#include \n-#include \n-#include \n-#include <_\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:_\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"}]}, {"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: overlappingmerge.hh Source File\n+dune-grid-glue: intersectionlist.hh Source File\n \n \n \n \n \n \n \n@@ -74,102 +74,299 @@\n \n \n \n
    \n-
    overlappingmerge.hh
    \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-
    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+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
    12
    \n-
    13#include <dune/common/fmatrix.hh>
    \n-
    14#include <dune/common/fvector.hh>
    \n+
    13namespace Dune {
    \n+
    14namespace GridGlue {
    \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+
    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-
    \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+
    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-
    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-\n-\n-
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    \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+
    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+
    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+
    \n+
    162
    \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+
    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+
    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+
    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+
    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+
    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
    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-
    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+
    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+
    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,127 +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-overlappingmerge.hh\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-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+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 12\n-13#include \n-14#include \n+13namespace _\bD_\bu_\bn_\be {\n+14namespace GridGlue {\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+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_\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+_\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-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-_\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-_\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+_\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+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+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+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+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+_\b2_\b7_\b8 _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b0(_\bI_\bn_\bd_\be_\bx intersection, unsigned index) const override\n+279 { return intersections_[intersection].parents0[index]; }\n+280\n+_\b2_\b8_\b1 _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b1(_\bI_\bn_\bd_\be_\bx intersection, unsigned index) const override\n+282 { return intersections_[intersection].parents1[index]; }\n+283\n+_\b2_\b8_\b4 _\bL_\bo_\bc_\ba_\bl_\b0 _\bc_\bo_\br_\bn_\be_\br_\b0(_\bI_\bn_\bd_\be_\bx intersection, unsigned corner, unsigned index) const\n+override\n+285 { return intersections_[intersection].corners0[index][corner]; }\n+286\n+_\b2_\b8_\b7 _\bL_\bo_\bc_\ba_\bl_\b1 _\bc_\bo_\br_\bn_\be_\br_\b1(_\bI_\bn_\bd_\be_\bx intersection, unsigned corner, unsigned index) const\n+override\n+288 { return intersections_[intersection].corners1[index][corner]; }\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 _\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:_\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+_\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:_\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/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: computeintersection.cc File Reference\n+dune-grid-glue: computeintersection.hh File Reference\n \n \n \n \n \n \n \n@@ -70,27 +70,47 @@\n \n
    \n
    \n \n-
    computeintersection.cc File Reference
    \n+Classes |\n+Namespaces |\n+Functions
    \n+
    computeintersection.hh File Reference
    \n \n
    \n-\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 Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
    \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...
     
    \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,17 +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-computeintersection.cc File Reference\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 \"_\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:_\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/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: computeintersection.cc Source File\n+dune-grid-glue: computeintersection.hh Source File\n \n \n \n \n \n \n \n@@ -74,355 +74,189 @@\n \n \n
    \n
    \n-
    computeintersection.cc
    \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+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-
    6namespace Dune {
    \n-
    7namespace GridGlue {
    \n+
    6#include <dune/common/fvector.hh>
    \n+
    7#include <dune/common/fmatrix.hh>
    \n
    8
    \n-
    9//****************************************************************************************
    \n-
    10// PUBLIC
    \n-
    11//****************************************************************************************
    \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+
    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 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 bool intersectionFound = false;
    \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-
    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-
    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-
    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+
    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
    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
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,380 +1,212 @@\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+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+3#ifndef DUNE_GRIDGLUE_MERGING_COMPUTEINTERSECTION_HH\n+4#define DUNE_GRIDGLUE_MERGING_COMPUTEINTERSECTION_HH\n 5\n-6namespace _\bD_\bu_\bn_\be {\n-7namespace GridGlue {\n+6#include \n+7#include \n 8\n-9//\n-****************************************************************************************\n-10// PUBLIC\n-11//\n-****************************************************************************************\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+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-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 bool intersectionFound = false;\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 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-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-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-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+_\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+_\bs_\bi_\bm_\bp_\bl_\be_\bx_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bc_\bc\n+_\bc_\bo_\bm_\bp_\bu_\bt_\be_\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_\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"}]}, {"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: contactmerge.cc File Reference\n+dune-grid-glue: overlappingmerge.hh File Reference\n \n \n \n \n \n \n \n@@ -70,23 +70,40 @@\n \n
    \n
    \n \n-
    contactmerge.cc File Reference
    \n+
    overlappingmerge.hh File Reference
    \n
    \n
    \n-
    #include <dune/grid-glue/common/crossproduct.hh>
    \n-#include <dune/grid-glue/common/projection.hh>
    \n+
    #include <iostream>
    \n+#include <iomanip>
    \n+#include <vector>
    \n+#include <algorithm>
    \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
    \n

    Go to the source code of this file.

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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,19 +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-_\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+overlappingmerge.hh File Reference\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+\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/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: contactmerge.cc Source File\n+dune-grid-glue: overlappingmerge.hh Source File\n \n \n \n \n \n \n \n@@ -74,389 +74,102 @@\n \n \n
    \n
    \n-
    contactmerge.cc
    \n+
    overlappingmerge.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-\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 std::vector<std::array<LocalCoords,2> > polytopeCorners;
    \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-
    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+
    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-
    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+
    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-
    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-
    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 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 // 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-
    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-
    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+
    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+\n+\n+
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    \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+
    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,439 +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-contactmerge.cc\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// -*- 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#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 std::vector > polytopeCorners;\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-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+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-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+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-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-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(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 // 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=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-_\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 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+_\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+_\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 _\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+_\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 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+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 contactmerge.hh:62\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/a00095.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00095.html", "unified_diff": "@@ -95,17 +95,17 @@\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+#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"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00095_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00095_source.html", "unified_diff": "@@ -103,17 +103,17 @@\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+\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@@ -868,30 +868,30 @@\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+
    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-
    #define STANDARD_MERGE_INSTANTIATE(T, A, B, C)
    Definition standardmerge.cc:13
    \n-\n-\n-\n+
    #define STANDARD_MERGE_INSTANTIATE(T, A, B, C)
    Definition standardmerge.cc:13
    \n+\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
    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", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -855,17 +855,17 @@\n 844} /* namespace GridGlue */\n 845} /* namespace Dune */\n 846\n 847#endif // DUNE_GRIDGLUE_MERGING_STANDARDMERGE_HH\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-_\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 _\bm_\be_\br_\bg_\be_\br_\b._\bh_\bh\n+_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\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:_\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"}]}, {"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.cc File Reference\n \n \n \n \n \n \n \n@@ -70,32 +70,21 @@\n \n \n
    \n \n-
    merger.hh File Reference
    \n+
    computeintersection.cc 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-
    \n+\n

    Go to the source code of this file.

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

    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", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,26 +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-merger.hh File Reference\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+_\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:_\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 ===============================================================================\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.cc Source File\n \n \n \n \n \n \n \n@@ -74,110 +74,356 @@\n \n \n \n
    \n-
    merger.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-
    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+
    5
    \n+
    6namespace Dune {
    \n+
    7namespace GridGlue {
    \n+
    8
    \n+
    9//****************************************************************************************
    \n+
    10// PUBLIC
    \n+
    11//****************************************************************************************
    \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+
    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 bool intersectionFound = false;
    \n
    29
    \n-
    31 typedef Dune::FieldVector<ctype, grid1Dim> Grid1Coords;
    \n-
    32
    \n-
    34 typedef Dune::FieldVector<ctype, grid2Dim> Grid2Coords;
    \n-
    35
    \n-
    37 typedef Dune::FieldVector<ctype, dimworld> WorldCoords;
    \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-\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+
    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+
    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+
    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+
    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-
    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+
    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,139 +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-merger.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-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+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#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+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 bool intersectionFound = false;\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-_\b3_\b7 typedef Dune::FieldVector _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\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-_\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+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\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+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 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+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+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+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:_\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:_\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/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/a00974.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00974.html", "unified_diff": "@@ -79,15 +79,15 @@\n
    Dune::GridGlue::GridGlueVtkWriter Class Reference
    \n \n
    \n \n

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

    \n \n-

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

    \n+

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

    \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 Static Public Member Functions

    template<typename Glue >
    static void write (const Glue &glue, const std::string &filenameTrunk)
     
    \n@@ -129,15 +129,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/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 \n-

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

    \n+

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

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

    std::array< unsigned, 2 > edge
     Edge numbers in image and preimage triangle.
     
    std::array< Coordinate, 2 > local
    \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
    \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,15 +1220,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01118.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01118.html", "unified_diff": "@@ -493,15 +493,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/a01122.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01122.html", "unified_diff": "@@ -493,15 +493,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/a01126.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01126.html", "unified_diff": "@@ -493,15 +493,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/a01130.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01130.html", "unified_diff": "@@ -493,15 +493,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/a01134.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01134.html", "unified_diff": "@@ -493,15 +493,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/a01138.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01138.html", "unified_diff": "@@ -493,15 +493,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/a01142.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01142.html", "unified_diff": "@@ -493,15 +493,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/a01146.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01146.html", "unified_diff": "@@ -493,15 +493,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/a01150.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01150.html", "unified_diff": "@@ -493,15 +493,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/a01154.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01154.html", "unified_diff": "@@ -493,15 +493,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/a01158.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01158.html", "unified_diff": "@@ -493,15 +493,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_000000.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000003_000000.html", "unified_diff": "@@ -69,14 +69,14 @@\n \n \n \n
    \n-

    extractors → adapter Relation

    File in dune/grid-glue/extractorsIncludes file in dune/grid-glue/adapter
    vtksurfacewriter.hhgridgluevtkwriter.hh
    \n+

    extractors → adapter Relation

    File in dune/grid-glue/extractorsIncludes file in dune/grid-glue/adapter
    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_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,37 +87,37 @@\n \"\"\n \"\"\n \n \n \n \n-\n+\n \n-\n+\n \n-\n-\n+\n+\n \n-\n+\n \n-\n-\n+\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.hh
     overlappingmerge.hh
     
     simplexintersection.cc
     simplexintersection.cc
     
     standardmerge.cc
     standardmerge.cc
     
     standardmerge.hh
     Common base class for many merger implementations: produce pairs of entities that may intersect.
     
    \n \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 \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.
     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 Files

     areawriter.hh
     areawriter.hh
     
     areawriter_impl.hh
     areawriter_impl.hh
     
     crossproduct.hh
     
     projection.hh
     projection.hh
     
     projection_impl.hh
     projection_impl.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/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,106 +1,106 @@\n \n \n \n gridglue.cc\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/adapter/\n- a00014.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- a00020.html\n+ a00005.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+ a00017.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 Dune::GridGlue\n \n \n gridgluevtkwriter.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/adapter/\n- a00017.html\n+ a00023.html\n dune/grid-glue/gridglue.hh\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- a00005.html\n+ a00008.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- a00005.html\n+ a00008.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- a00026.html\n+ a00014.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- a00011.html\n+ a00026.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- a00008.html\n+ a00011.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- a00035.html\n- areawriter_impl.hh\n+ a00041.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- a00032.html\n+ a00047.html\n Dune::GridGlue::AreaWriterImplementation::FacetLayout\n Dune\n Dune::GridGlue\n Dune::GridGlue::AreaWriterImplementation\n \n \n crossproduct.hh\n@@ -108,56 +108,56 @@\n a00044.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- a00029.html\n- projection_impl.hh\n+ a00035.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 a00038.html\n- dune/grid-glue/common/projection.hh\n- projectionwriter_impl.hh\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- a00047.html\n+ a00050.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- a00050.html\n+ a00032.html\n Dune\n Dune::Parallel\n \n #define\n CheckMPIStatus\n- a00050.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@@ -190,103 +190,103 @@\n Dune\n Dune::GridGlue\n \n \n vtksurfacewriter.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/extractors/\n a00062.html\n- ../adapter/gridgluevtkwriter.hh\n+ ../adapter/gridgluevtkwriter.hh\n Dune::GridGlue::VtkSurfaceWriter\n Dune\n Dune::GridGlue\n \n \n adapter/gridglue.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/adapter/\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- a00089.html\n+ a00098.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- a00068.html\n- simplexintersection.cc\n- computeintersection.cc\n+ a00089.html\n+ simplexintersection.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+ a00068.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- a00092.html\n+ a00071.html\n dune/grid-glue/common/crossproduct.hh\n- dune/grid-glue/common/projection.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- a00083.html\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- a00080.html\n+ a00086.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+ a00083.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@@ -300,26 +300,26 @@\n ad63267c6d27a8f09d98506419b206db8\n \n \n \n \n overlappingmerge.hh\n /build/reproducible-path/dune-grid-glue-2.9.0/dune/grid-glue/merging/\n- a00086.html\n+ a00092.html\n dune/grid-glue/merging/standardmerge.hh\n- dune/grid-glue/merging/computeintersection.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- a00071.html\n+ a00065.html\n Dune::GridGlue::SimplexMethod\n Dune::GridGlue::SimplexMethod< dimWorld, 0, 0, T >\n Dune::GridGlue::SimplexMethod< dimWorld, 0, 1, T >\n Dune::GridGlue::SimplexMethod< dimWorld, 0, 2, T >\n Dune::GridGlue::SimplexMethod< dimWorld, 0, 3, T >\n Dune::GridGlue::SimplexMethod< dimWorld, 1, 1, T >\n Dune::GridGlue::SimplexMethod< dimWorld, 1, 2, T >\n@@ -329,40 +329,40 @@\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- a00065.html\n+ a00074.html\n standardmerge.hh\n Dune\n Dune::GridGlue\n \n #define\n DECL\n- a00065.html\n+ a00074.html\n ad5c7ca0181fea7823b37d06d5f61e9cd\n \n \n \n #define\n STANDARD_MERGE_INSTANTIATE\n- a00065.html\n+ a00074.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 a00095.html\n- dune/grid-glue/merging/intersectionlist.hh\n- dune/grid-glue/merging/merger.hh\n- dune/grid-glue/merging/computeintersection.hh\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 a00095.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,49 +73,49 @@\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
      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
     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
     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
      common
     areawriter.hh
     areawriter_impl.hh
     areawriter.hh
     areawriter_impl.hh
     crossproduct.hh
     projection.hh
     projection_impl.hh
     projection.hh
     projection_impl.hh
     projectionwriter.hh
     projectionwriter_impl.hh
     ringcomm.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
     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
     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
     overlappingmerge.hh
     simplexintersection.cc
     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"}, {"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"}]}]}]}]}