{"diffoscope-json-version": 1, "source1": "/srv/reproducible-results/rbuild-debian/r-b-build.MCLQUK9n/b1/dune-grid-glue_2.10.0-1_amd64.changes", "source2": "/srv/reproducible-results/rbuild-debian/r-b-build.MCLQUK9n/b2/dune-grid-glue_2.10.0-1_amd64.changes", "unified_diff": null, "details": [{"source1": "Files", "source2": "Files", "unified_diff": "@@ -1,4 +1,4 @@\n \n 0da42d24c7e9a8f18ffebfd134888d09 924960 debug optional libdune-grid-glue-dev-dbgsym_2.10.0-1_amd64.deb\n 64cc04cf22724059081e76bce2840971 109216 libdevel optional libdune-grid-glue-dev_2.10.0-1_amd64.deb\n- 614fb391e236d339030591688dfd8527 958980 doc optional libdune-grid-glue-doc_2.10.0-1_all.deb\n+ 41b42654a44444b72b8d41018d4c1898 958560 doc optional libdune-grid-glue-doc_2.10.0-1_all.deb\n"}, {"source1": "libdune-grid-glue-doc_2.10.0-1_all.deb", "source2": "libdune-grid-glue-doc_2.10.0-1_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 2024-11-14 21:31:44.000000 debian-binary\n--rw-r--r-- 0 0 0 7388 2024-11-14 21:31:44.000000 control.tar.xz\n--rw-r--r-- 0 0 0 951400 2024-11-14 21:31:44.000000 data.tar.xz\n+-rw-r--r-- 0 0 0 7400 2024-11-14 21:31:44.000000 control.tar.xz\n+-rw-r--r-- 0 0 0 950968 2024-11-14 21:31:44.000000 data.tar.xz\n"}, {"source1": "control.tar.xz", "source2": "control.tar.xz", "unified_diff": null, "details": [{"source1": "control.tar", "source2": "control.tar", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "unified_diff": null, "details": [{"source1": "./md5sums", "source2": "./md5sums", "comments": ["Files differ"], "unified_diff": null}, {"source1": "line order", "source2": "line order", "unified_diff": "@@ -44,18 +44,18 @@\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00062.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00062_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00065.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00065_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00068.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00068_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00071.html\n+usr/share/doc/libdune-grid-glue-doc/doxygen/a00071_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00074.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00074_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00077.html\n-usr/share/doc/libdune-grid-glue-doc/doxygen/a00077_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00080.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00080_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00083.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00083_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00086.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00086_source.html\n usr/share/doc/libdune-grid-glue-doc/doxygen/a00089.html\n"}]}]}]}, {"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 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/\n -rw-r--r-- 0 root (0) root (0) 945 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/changelog.Debian.gz\n -rw-r--r-- 0 root (0) root (0) 1193 2024-09-04 15:07:05.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 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/\n -rw-r--r-- 0 root (0) root (0) 7139 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00002.html\n -rw-r--r-- 0 root (0) root (0) 81666 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00002_source.html\n--rw-r--r-- 0 root (0) root (0) 5798 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00005.html\n--rw-r--r-- 0 root (0) root (0) 52528 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00005_source.html\n--rw-r--r-- 0 root (0) root (0) 5089 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00008.html\n--rw-r--r-- 0 root (0) root (0) 16769 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00008_source.html\n+-rw-r--r-- 0 root (0) root (0) 8113 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00005.html\n+-rw-r--r-- 0 root (0) root (0) 118079 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00005_source.html\n+-rw-r--r-- 0 root (0) root (0) 5798 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00008.html\n+-rw-r--r-- 0 root (0) root (0) 52528 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00008_source.html\n -rw-r--r-- 0 root (0) root (0) 5610 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00011.html\n -rw-r--r-- 0 root (0) root (0) 84448 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00011_source.html\n -rw-r--r-- 0 root (0) root (0) 10872 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00014.html\n -rw-r--r-- 0 root (0) root (0) 70889 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00014_source.html\n--rw-r--r-- 0 root (0) root (0) 5454 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00017.html\n--rw-r--r-- 0 root (0) root (0) 27384 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00017_source.html\n--rw-r--r-- 0 root (0) root (0) 5322 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00020.html\n--rw-r--r-- 0 root (0) root (0) 16900 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00020_source.html\n--rw-r--r-- 0 root (0) root (0) 6158 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00023.html\n--rw-r--r-- 0 root (0) root (0) 14374 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00023_source.html\n--rw-r--r-- 0 root (0) root (0) 8113 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00026.html\n--rw-r--r-- 0 root (0) root (0) 118079 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00026_source.html\n--rw-r--r-- 0 root (0) root (0) 8137 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00029.html\n--rw-r--r-- 0 root (0) root (0) 72682 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00029_source.html\n--rw-r--r-- 0 root (0) root (0) 7676 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00032.html\n--rw-r--r-- 0 root (0) root (0) 11026 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00032_source.html\n--rw-r--r-- 0 root (0) root (0) 6620 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00035.html\n--rw-r--r-- 0 root (0) root (0) 9139 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00035_source.html\n--rw-r--r-- 0 root (0) root (0) 11614 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038.html\n--rw-r--r-- 0 root (0) root (0) 39772 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038_source.html\n--rw-r--r-- 0 root (0) root (0) 5361 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00041.html\n--rw-r--r-- 0 root (0) root (0) 8501 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00041_source.html\n--rw-r--r-- 0 root (0) root (0) 7371 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044.html\n--rw-r--r-- 0 root (0) root (0) 44831 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044_source.html\n--rw-r--r-- 0 root (0) root (0) 5981 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047.html\n--rw-r--r-- 0 root (0) root (0) 27622 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047_source.html\n--rw-r--r-- 0 root (0) root (0) 8223 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050.html\n--rw-r--r-- 0 root (0) root (0) 30067 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050_source.html\n--rw-r--r-- 0 root (0) root (0) 5430 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00053.html\n--rw-r--r-- 0 root (0) root (0) 44827 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00053_source.html\n+-rw-r--r-- 0 root (0) root (0) 5089 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00017.html\n+-rw-r--r-- 0 root (0) root (0) 16769 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00017_source.html\n+-rw-r--r-- 0 root (0) root (0) 5454 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00020.html\n+-rw-r--r-- 0 root (0) root (0) 27384 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00020_source.html\n+-rw-r--r-- 0 root (0) root (0) 5322 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00023.html\n+-rw-r--r-- 0 root (0) root (0) 16900 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00023_source.html\n+-rw-r--r-- 0 root (0) root (0) 6158 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00026.html\n+-rw-r--r-- 0 root (0) root (0) 14374 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00026_source.html\n+-rw-r--r-- 0 root (0) root (0) 11614 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00029.html\n+-rw-r--r-- 0 root (0) root (0) 39772 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00029_source.html\n+-rw-r--r-- 0 root (0) root (0) 6620 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00032.html\n+-rw-r--r-- 0 root (0) root (0) 9139 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00032_source.html\n+-rw-r--r-- 0 root (0) root (0) 7371 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00035.html\n+-rw-r--r-- 0 root (0) root (0) 44831 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00035_source.html\n+-rw-r--r-- 0 root (0) root (0) 8137 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038.html\n+-rw-r--r-- 0 root (0) root (0) 72682 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00038_source.html\n+-rw-r--r-- 0 root (0) root (0) 5981 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00041.html\n+-rw-r--r-- 0 root (0) root (0) 27622 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00041_source.html\n+-rw-r--r-- 0 root (0) root (0) 8223 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044.html\n+-rw-r--r-- 0 root (0) root (0) 30067 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044_source.html\n+-rw-r--r-- 0 root (0) root (0) 7676 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047.html\n+-rw-r--r-- 0 root (0) root (0) 11026 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047_source.html\n+-rw-r--r-- 0 root (0) root (0) 5361 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050.html\n+-rw-r--r-- 0 root (0) root (0) 8501 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050_source.html\n+-rw-r--r-- 0 root (0) root (0) 5389 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00053.html\n+-rw-r--r-- 0 root (0) root (0) 50227 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00053_source.html\n -rw-r--r-- 0 root (0) root (0) 8207 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00056.html\n -rw-r--r-- 0 root (0) root (0) 94036 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00056_source.html\n -rw-r--r-- 0 root (0) root (0) 5563 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059.html\n -rw-r--r-- 0 root (0) root (0) 70754 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059_source.html\n--rw-r--r-- 0 root (0) root (0) 5389 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062.html\n--rw-r--r-- 0 root (0) root (0) 50227 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062_source.html\n--rw-r--r-- 0 root (0) root (0) 4311 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065.html\n--rw-r--r-- 0 root (0) root (0) 55660 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065_source.html\n--rw-r--r-- 0 root (0) root (0) 5931 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00068.html\n--rw-r--r-- 0 root (0) root (0) 19311 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00068_source.html\n--rw-r--r-- 0 root (0) root (0) 10147 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00071.html\n--rw-r--r-- 0 root (0) root (0) 6648 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00074.html\n--rw-r--r-- 0 root (0) root (0) 36463 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00074_source.html\n--rw-r--r-- 0 root (0) root (0) 12400 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00077.html\n--rw-r--r-- 0 root (0) root (0) 149555 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00077_source.html\n--rw-r--r-- 0 root (0) root (0) 5358 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00080.html\n--rw-r--r-- 0 root (0) root (0) 22695 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00080_source.html\n--rw-r--r-- 0 root (0) root (0) 6349 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00083.html\n--rw-r--r-- 0 root (0) root (0) 45999 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00083_source.html\n--rw-r--r-- 0 root (0) root (0) 6081 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00086.html\n--rw-r--r-- 0 root (0) root (0) 59846 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00086_source.html\n--rw-r--r-- 0 root (0) root (0) 11544 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00089.html\n--rw-r--r-- 0 root (0) root (0) 239994 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00089_source.html\n--rw-r--r-- 0 root (0) root (0) 5485 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092.html\n--rw-r--r-- 0 root (0) root (0) 36323 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092_source.html\n--rw-r--r-- 0 root (0) root (0) 4560 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00095.html\n--rw-r--r-- 0 root (0) root (0) 63706 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00095_source.html\n--rw-r--r-- 0 root (0) root (0) 5968 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00098.html\n--rw-r--r-- 0 root (0) root (0) 37343 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00098_source.html\n+-rw-r--r-- 0 root (0) root (0) 5430 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062.html\n+-rw-r--r-- 0 root (0) root (0) 44827 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062_source.html\n+-rw-r--r-- 0 root (0) root (0) 5968 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065.html\n+-rw-r--r-- 0 root (0) root (0) 37343 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065_source.html\n+-rw-r--r-- 0 root (0) root (0) 6648 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00068.html\n+-rw-r--r-- 0 root (0) root (0) 36463 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00068_source.html\n+-rw-r--r-- 0 root (0) root (0) 6349 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00071.html\n+-rw-r--r-- 0 root (0) root (0) 45999 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00071_source.html\n+-rw-r--r-- 0 root (0) root (0) 5931 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00074.html\n+-rw-r--r-- 0 root (0) root (0) 19311 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00074_source.html\n+-rw-r--r-- 0 root (0) root (0) 10147 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00077.html\n+-rw-r--r-- 0 root (0) root (0) 4311 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00080.html\n+-rw-r--r-- 0 root (0) root (0) 55660 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00080_source.html\n+-rw-r--r-- 0 root (0) root (0) 11544 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00083.html\n+-rw-r--r-- 0 root (0) root (0) 239994 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00083_source.html\n+-rw-r--r-- 0 root (0) root (0) 4560 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00086.html\n+-rw-r--r-- 0 root (0) root (0) 63706 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00086_source.html\n+-rw-r--r-- 0 root (0) root (0) 6081 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00089.html\n+-rw-r--r-- 0 root (0) root (0) 59846 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00089_source.html\n+-rw-r--r-- 0 root (0) root (0) 5358 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092.html\n+-rw-r--r-- 0 root (0) root (0) 22695 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092_source.html\n+-rw-r--r-- 0 root (0) root (0) 5485 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00095.html\n+-rw-r--r-- 0 root (0) root (0) 36323 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00095_source.html\n+-rw-r--r-- 0 root (0) root (0) 12400 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00098.html\n+-rw-r--r-- 0 root (0) root (0) 149555 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00098_source.html\n -rw-r--r-- 0 root (0) root (0) 5860 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00101.html\n -rw-r--r-- 0 root (0) root (0) 4620 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00103.html\n -rw-r--r-- 0 root (0) root (0) 67073 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00104.html\n -rw-r--r-- 0 root (0) root (0) 5775 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00105.html\n -rw-r--r-- 0 root (0) root (0) 15143 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00106.html\n -rw-r--r-- 0 root (0) root (0) 13627 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/a00107.html\n -rw-r--r-- 0 root (0) root (0) 6281 2024-11-14 21:31:44.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) 6781 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_65f347cff0208f20f00d27c542208238.html\n -rw-r--r-- 0 root (0) root (0) 2198 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_65f347cff0208f20f00d27c542208238_dep.png\n -rw-r--r-- 0 root (0) root (0) 7641 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_68eff8a27dcb1cd0ff0ecf490070d3de.html\n -rw-r--r-- 0 root (0) root (0) 13471 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_68eff8a27dcb1cd0ff0ecf490070d3de_dep.png\n -rw-r--r-- 0 root (0) root (0) 6671 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_eaad0bdad6fc03850e65b1fdad9faad4.html\n -rw-r--r-- 0 root (0) root (0) 7018 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_eaad0bdad6fc03850e65b1fdad9faad4_dep.png\n -rw-r--r-- 0 root (0) root (0) 45631 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/doxygen.css\n--rw-r--r-- 0 root (0) root (0) 27031 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dune-grid-glue.tag.gz\n+-rw-r--r-- 0 root (0) root (0) 27030 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dune-grid-glue.tag.gz\n -rw-r--r-- 0 root (0) root (0) 7704 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/dynsections.js\n -rw-r--r-- 0 root (0) root (0) 15974 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/files.html\n -rw-r--r-- 0 root (0) root (0) 3222 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/functions.html\n -rw-r--r-- 0 root (0) root (0) 3787 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/functions_b.html\n -rw-r--r-- 0 root (0) root (0) 13457 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/functions_c.html\n -rw-r--r-- 0 root (0) root (0) 4847 2024-11-14 21:31:44.000000 ./usr/share/doc/libdune-grid-glue-doc/doxygen/functions_d.html\n -rw-r--r-- 0 root (0) root (0) 6113 2024-11-14 21:31:44.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": "@@ -88,27 +88,27 @@\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 <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/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/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": "@@ -96,15 +96,15 @@\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+
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
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-
intersectionindexset.hh
\n+
intersection.hh
Model of the Intersection concept provided by GridGlue.
\n
gridglue.cc
\n
gridgluecommunicate.hh
Describes the parallel communication interface class for Dune::GridGlue.
\n-
intersectioniterator.hh
Implement iterators over GridGlue intersections.
\n-
rangegenerators.hh
\n-
intersection.hh
Model of the Intersection concept provided by GridGlue.
\n-
merger.hh
\n+
intersectionindexset.hh
\n+
intersectioniterator.hh
Implement iterators over GridGlue intersections.
\n+
rangegenerators.hh
\n+
merger.hh
\n
Dune
Definition gridglue.hh:37
\n
Dune::GridGlue::GridGlue
sequential adapter to couple two grids at specified close together boundaries
Definition gridglue.hh:67
\n
Dune::GridGlue::GridGlue::Coords
Dune::FieldVector< ctype, dimworld > Coords
The type used for coordinate vectors.
Definition gridglue.hh:174
\n
Dune::GridGlue::GridGlue::getIntersection
Intersection getIntersection(int i) const
Definition gridglue.hh:388
\n
Dune::GridGlue::GridGlue::Grid1Vertex
GridVertex< 1 > Grid1Vertex
The type of the Grid1 vertices.
Definition gridglue.hh:194
\n
Dune::GridGlue::GridGlue::IndexSet
Dune::GridGlue::IntersectionIndexSet< P0, P1 > IndexSet
Type of remote intersection indexSet.
Definition gridglue.hh:206
\n
Dune::GridGlue::GridGlue::IndexType
unsigned int IndexType
Definition gridglue.hh:147
\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -322,23 +322,23 @@\n 405#include \"_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bc_\bc\"\n 406\n 407#include \"_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\"\n 408#include \"_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bi_\bt_\be_\br_\ba_\bt_\bo_\br_\b._\bh_\bh\"\n 409#include \"_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bi_\bn_\bd_\be_\bx_\bs_\be_\bt_\b._\bh_\bh\"\n 410\n 411#endif // DUNE_GRIDGLUE_GRIDGLUE_HH\n-_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bi_\bn_\bd_\be_\bx_\bs_\be_\bt_\b._\bh_\bh\n+_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n+Model of the Intersection concept provided by GridGlue.\n _\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bc_\bc\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 _\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 _\br_\ba_\bn_\bg_\be_\bg_\be_\bn_\be_\br_\ba_\bt_\bo_\br_\bs_\b._\bh_\bh\n-_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n-Model of the Intersection concept provided by GridGlue.\n _\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: gridgluevtkwriter.hh File Reference\n+dune-grid-glue: intersection.hh File Reference\n \n \n \n \n \n \n \n@@ -71,47 +71,74 @@\n \n \n \n
\n
\n Classes |\n-Namespaces
\n-
gridgluevtkwriter.hh File Reference
\n+Namespaces |\n+Macros
\n+
intersection.hh File Reference
\n \n
\n \n-

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

Model of the Intersection concept provided by 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 <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 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::GridGlueVtkWriter
 Write remote intersections to a vtk file for debugging purposes. More...
class  Dune::GridGlue::IntersectionData< P0, P1 >
 storage class for Dune::GridGlue::Intersection related data More...
 
struct  Dune::GridGlue::IntersectionTraits< P0, P1, inside, outside >
 
class  Dune::GridGlue::Intersection< P0, P1, I, O >
 The intersection of two entities of the two patches of a GridGlue. More...
 
\n \n \n \n \n \n+

\n Namespaces

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

\n+Macros

#define ONLY_SIMPLEX_INTERSECTIONS
 
\n

Detailed Description

\n-

Write all remote intersections to a vtk file for debugging.

\n-
\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,33 +1,46 @@\n dune-grid-glue\u00a02.10\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-#include \n-#include \n-#include \n-#include \n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs\n+intersection.hh File Reference\n+Model of the Intersection concept provided by GridGlue. _\bM_\bo_\br_\be_\b._\b._\b.\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n #include \n #include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\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+ class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b _\b>\n+\u00a0 storage class for _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn related data _\bM_\bo_\br_\be_\b._\b._\b.\n+\u00a0\n+struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b,_\b _\bi_\bn_\bs_\bi_\bd_\be_\b,_\b _\bo_\bu_\bt_\bs_\bi_\bd_\be_\b _\b>\n+\u00a0\n+ class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b,_\b _\bI_\b,_\b _\bO_\b _\b>\n+\u00a0 The intersection of two entities of the two patches of a _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be.\n+ _\bM_\bo_\br_\be_\b._\b._\b.\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+M\bMa\bac\bcr\bro\bos\bs\n+#define\u00a0 _\bO_\bN_\bL_\bY_\b__\bS_\bI_\bM_\bP_\bL_\bE_\bX_\b__\bI_\bN_\bT_\bE_\bR_\bS_\bE_\bC_\bT_\bI_\bO_\bN_\bS\n+\u00a0\n *\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-Write all remote intersections to a vtk file for debugging.\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/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: gridgluevtkwriter.hh Source File\n+dune-grid-glue: intersection.hh Source File\n \n \n \n \n \n \n \n@@ -74,318 +74,569 @@\n \n \n \n
\n-
gridgluevtkwriter.hh
\n+
intersection.hh
\n
\n
\n Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
\n
2// vi: set et ts=4 sw=2 sts=2:
\n
3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
\n
4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
\n-
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+
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#include <fstream>
\n-
25#include <iomanip>
\n-
26#include <type_traits>
\n-
27#include <vector>
\n+
24#define ONLY_SIMPLEX_INTERSECTIONS
\n+
25
\n+
26namespace Dune {
\n+
27 namespace GridGlue {
\n
28
\n-
29#include <dune/common/classname.hh>
\n-
30#include <dune/geometry/type.hh>
\n-
31#include <dune/geometry/referenceelements.hh>
\n+
29 // forward declaration
\n+
30 template<typename P0, typename P1>
\n+
31 class IntersectionIndexSet;
\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-
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+
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 const int domdimw = GridView::dimensionworld;
\n-
61 const int patchDim = Extractor::dim - Extractor::codim;
\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 // 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+
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 // 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 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-
98 for (size_t i=0; i<faces.size(); i++) {
\n+
70 template<int side>
\n+
71 using GridIndexType = typename GridGlue::template GridView<side>::IndexSet::IndexType;
\n+
72
\n+
73 using Grid0IndexType [[deprecated("please use GridIndexType<0> instead")]] = GridIndexType<0>;
\n+
74 using Grid1IndexType [[deprecated("please use GridIndexType<1> instead")]] = GridIndexType<1>;
\n+
75
\n+
77 IntersectionData(const GridGlue& glue, unsigned int mergeindex, unsigned int offset, bool grid0local, bool grid1local);
\n+
78
\n+
80 IntersectionData() = default;
\n+
81
\n+
82 /* Accessor Functions */
\n+
83
\n+
84 template<int side>
\n+
\n+
85 const GridLocalGeometry<side>& localGeometry(unsigned int parentId = 0) const
\n+
86 { return *std::get<side>(sideData_).gridlocalgeom[parentId]; }
\n+
\n+
87
\n+
88 template<int side>
\n+
\n+\n+
90 { return *std::get<side>(sideData_).gridgeom; }
\n+
\n+
91
\n+
92 template<int side>
\n+
\n+
93 bool local() const
\n+
94 { return std::get<side>(sideData_).gridlocal; }
\n+
\n+
95
\n+
96 template<int side>
\n+
\n+
97 IndexType index(unsigned int parentId = 0) const
\n+
98 { return std::get<side>(sideData_).gridindices[parentId]; }
\n+
\n
99
\n-
100 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+
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 } 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+
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-
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+
121 std::vector< GridIndexType<side> > gridindices;
\n+
122
\n+
124 std::vector< std::optional< GridLocalGeometry<side> > > gridlocalgeom;
\n
125
\n-
126 } else {
\n-
127 DUNE_THROW(Dune::NotImplemented, "Geometry type " << geometryTypes[i] << " not supported yet");
\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+
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 }
\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 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+
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 (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-
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+
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 const Dune::GeometryType type = Dune::GeometryTypes::simplex(mydim);
\n+
184#else
\n+
185#error Not Implemented
\n+
186#endif
\n+
187 data.gridlocalgeom[par].emplace(type, corners_element_local);
\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+
189 // Add world geometry only for 0th parent
\n+
190 if (par == 0) {
\n+
191 typename GridGlue::template GridPatch<side>::Geometry
\n+
192 gridWorldGeometry = glue.template patch<side>().geometry(data.gridindices[par]);
\n+
193
\n+
194 // world coordinates of the remote intersection corners
\n+
195 std::array<Dune::FieldVector<ctype, GridGlue::template GridView<side>::dimensionworld>, nSimplexCorners> corners_global;
\n+
196
\n+
197 for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
\n+
198 corners_global[i] = gridWorldGeometry.global(corners_subEntity_local[i]);
\n+
199 }
\n+
200
\n+
201 data.gridgeom.emplace(type, corners_global);
\n+
202 }
\n+
203 }
\n+
204 }
\n+
205 }
\n+
206
\n+
208 template<typename P0, typename P1>
\n+
\n+
209 IntersectionData<P0, P1>::IntersectionData(const GridGlue& glue, unsigned int mergeindex, unsigned int offset,
\n+
210 bool grid0local, bool grid1local)
\n+
211 : index_(mergeindex+offset)
\n+
212 {
\n+
213 // if an invalid index is given do not proceed!
\n+
214 // (happens when the parent GridGlue initializes the "end"-Intersection)
\n+
215 assert (0 <= mergeindex || mergeindex < glue.index__sz);
\n+
216
\n+
217 std::get<0>(sideData_).gridlocal = grid0local;
\n+
218 std::get<1>(sideData_).gridlocal = grid1local;
\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+
220 initializeGeometry<0>(glue, mergeindex);
\n+
221 initializeGeometry<1>(glue, mergeindex);
\n+
222 }
\n+
\n+
223
\n+
228 template<typename P0, typename P1, int inside, int outside>
\n+
\n+\n+
230 {
\n+\n+\n+
233
\n+
234 using InsideGridView = typename GridGlue::template GridView<inside>;
\n+
235 using OutsideGridView = typename GridGlue::template GridView<outside>;
\n+
236
\n+
237 using InsideLocalGeometry = typename IntersectionData::template GridLocalGeometry<inside>;
\n+
238 using OutsideLocalGeometry = typename IntersectionData::template GridLocalGeometry<outside>;
\n+
239
\n+
240 using Geometry = typename IntersectionData::template GridGeometry<inside>;
\n+
241 using OutsideGeometry = typename IntersectionData::template GridGeometry<outside>;
\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+
243 static constexpr auto coorddim = IntersectionData::coorddim;
\n+
244 static constexpr auto mydim = IntersectionData::mydim;
\n+
245 static constexpr int insidePatch = inside;
\n+
246 static constexpr int outsidePatch = outside;
\n
247
\n-
248 for (int i = 0; i < overlaps; i++)
\n-
249 fmerged << "10" << std::endl;
\n-
250
\n-
251 }
\n+
248 using ctype = typename GridGlue::ctype;
\n+
249 using LocalCoordinate = Dune::FieldVector<ctype, mydim>;
\n+
250 using GlobalCoordinate = Dune::FieldVector<ctype, coorddim>;
\n+
251 };
\n+
\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+
255 template<typename P0, typename P1, int I, int O>
\n+
\n+\n+
257 {
\n+
258
\n+
259 public:
\n+
260
\n+\n+
262
\n+
263 typedef typename Traits::GridGlue GridGlue;
\n+\n+
265
\n+
266
\n+\n+\n+
269
\n+\n+\n+\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+
274 typedef typename Traits::Geometry Geometry;
\n+
275 typedef typename Traits::ctype ctype;
\n+
276
\n+
277 typedef typename InsideGridView::Traits::template Codim<0>::Entity InsideEntity;
\n+
278 typedef typename OutsideGridView::Traits::template Codim<0>::Entity OutsideEntity;
\n+
279
\n+\n+\n
282
\n-
283 writeIntersections<Glue,0>(glue,
\n-
284 filenameTrunk + "-intersections-grid0.vtk");
\n+
284 static constexpr auto coorddim = Traits::coorddim;
\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 }
\n-
\n+
287 static constexpr auto mydim = Traits::mydim;
\n+
288
\n+
290 static constexpr int insidePatch = Traits::insidePatch;
\n+
291
\n+
293 static constexpr int outsidePatch = Traits::outsidePatch;
\n
294
\n-
295};
\n-
\n+
295 // typedef unsigned int IndexType;
\n
296
\n-
297} /* namespace GridGlue */
\n-
298} /* namespace Dune */
\n-
299
\n-
300#endif // DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_HH
\n+
297 private:
\n+
301 static constexpr int codimensionWorld = coorddim - mydim;
\n+
302
\n+
303 public:
\n+
304 /* C O N S T R U C T O R S */
\n+
305
\n+
\n+
307 Intersection(const GridGlue* glue, const IntersectionData* i) :
\n+
308 glue_(glue), i_(i) {}
\n+
\n+
309
\n+
310 /* F U N C T I O N A L I T Y */
\n+
311
\n+\n+
\n+
315 inside(unsigned int parentId = 0) const
\n+
316 {
\n+
317 assert(self());
\n+
318 return glue_->template patch<I>().element(i_->template index<I>(parentId));
\n+
319 }
\n+
\n+
320
\n+\n+
\n+
324 outside(unsigned int parentId = 0) const
\n+
325 {
\n+
326 assert(neighbor());
\n+
327 return glue_->template patch<O>().element(i_->template index<O>(parentId));
\n+
328 }
\n+
\n+
329
\n+
\n+
331 bool conforming() const
\n+
332 {
\n+
333 throw Dune::NotImplemented();
\n+
334 }
\n+
\n+
335
\n+
\n+
338 const InsideLocalGeometry& geometryInInside(unsigned int parentId = 0) const
\n+
339 {
\n+
340 return i_->template localGeometry<I>(parentId);
\n+
341 }
\n+
\n+
342
\n+
\n+
345 const OutsideLocalGeometry& geometryInOutside(unsigned int parentId = 0) const
\n+
346 {
\n+
347 return i_->template localGeometry<O>(parentId);
\n+
348 }
\n+
\n+
349
\n+
\n+
356 const Geometry& geometry() const
\n+
357 {
\n+
358 return i_->template geometry<I>();
\n+
359 }
\n+
\n+
360
\n+
\n+
367 const OutsideGeometry& geometryOutside() const // DUNE_DEPRECATED
\n+
368 {
\n+
369 return i_->template geometry<O>();
\n+
370 }
\n+
\n+
371
\n+
\n+
373 Dune::GeometryType type() const
\n+
374 {
\n+
375 #ifdef ONLY_SIMPLEX_INTERSECTIONS
\n+
376 return Dune::GeometryTypes::simplex(mydim);
\n+
377 #else
\n+
378 #error Not Implemented
\n+
379 #endif
\n+
380 }
\n+
\n+
381
\n+
382
\n+
\n+
384 bool self() const
\n+
385 {
\n+
386 return i_->template local<I>();
\n+
387 }
\n+
\n+
388
\n+
\n+
390 size_t neighbor(unsigned int g = 0) const
\n+
391 {
\n+
392 if (g == 0 && i_->template local<O>()) {
\n+
393 return i_->template parents<O>();
\n+
394 } else if (g == 1 && i_->template local<I>()) {
\n+
395 return i_->template parents<I>();
\n+
396 }
\n+
397 return 0;
\n+
398 }
\n+
\n+
399
\n+
\n+
401 int indexInInside(unsigned int parentId = 0) const
\n+
402 {
\n+
403 assert(self());
\n+
404 return glue_->template patch<I>().indexInInside(i_->template index<I>(parentId));
\n+
405 }
\n+
\n+
406
\n+
\n+
408 int indexInOutside(unsigned int parentId = 0) const
\n+
409 {
\n+
410 assert(neighbor());
\n+
411 return glue_->template patch<O>().indexInInside(i_->template index<O>(parentId));
\n+
412 }
\n+
\n+
413
\n+
\n+\n+
419 {
\n+
420 GlobalCoordinate normal;
\n+
421
\n+
422 if (codimensionWorld == 0)
\n+
423 DUNE_THROW(Dune::Exception, "There is no normal vector to a full-dimensional intersection");
\n+
424 else if (codimensionWorld == 1) {
\n+
425 /* TODO: Implement the general n-ary cross product here */
\n+
426 const auto jacobianTransposed = geometry().jacobianTransposed(local);
\n+
427 if (mydim==1) {
\n+
428 normal[0] = - jacobianTransposed[0][1];
\n+
429 normal[1] = jacobianTransposed[0][0];
\n+
430 } else if (mydim==2) {
\n+
431 normal[0] = (jacobianTransposed[0][1] * jacobianTransposed[1][2] - jacobianTransposed[0][2] * jacobianTransposed[1][1]);
\n+
432 normal[1] = - (jacobianTransposed[0][0] * jacobianTransposed[1][2] - jacobianTransposed[0][2] * jacobianTransposed[1][0]);
\n+
433 normal[2] = (jacobianTransposed[0][0] * jacobianTransposed[1][1] - jacobianTransposed[0][1] * jacobianTransposed[1][0]);
\n+
434 } else
\n+
435 DUNE_THROW(Dune::NotImplemented, "Remote intersections don't implement the 'outerNormal' method for " << mydim << "-dimensional intersections yet");
\n+
436 } else
\n+
437 DUNE_THROW(Dune::NotImplemented, "Remote intersections don't implement the 'outerNormal' method for intersections with codim >= 2 yet");
\n+
438
\n+
439 return normal;
\n+
440 }
\n+
\n+
441
\n+
\n+\n+
447 {
\n+
448 GlobalCoordinate normal = outerNormal(local);
\n+
449 normal /= normal.two_norm();
\n+
450 return normal;
\n+
451 }
\n+
\n+
452
\n+
\n+\n+
458 {
\n+
459 return (unitOuterNormal(local) *= geometry().integrationElement(local));
\n+
460 }
\n+
\n+
461
\n+
\n+\n+
467 {
\n+
468 return unitOuterNormal(ReferenceElements<ctype,mydim>::general(type()).position(0,0));
\n+
469 }
\n+
\n+
470
\n+
\n+\n+
475 {
\n+
476 return Intersection<P0,P1,O,I>(glue_,i_);
\n+
477 }
\n+
\n+
478
\n+
479#ifdef QUICKHACK_INDEX
\n+
480 typedef typename GridGlue::IndexType IndexType;
\n+
481
\n+
482 IndexType index() const
\n+
483 {
\n+
484 return i_->index_;
\n+
485 }
\n+
486
\n+
487#endif
\n+
488
\n+
489 private:
\n+
490
\n+
491 friend class IntersectionIndexSet<P0,P1>;
\n+
492
\n+
493 /* M E M B E R V A R I A B L E S */
\n+
494
\n+
496 const GridGlue* glue_;
\n+
497
\n+
499 const IntersectionData* i_;
\n+
500 };
\n+
\n+
501
\n+
502
\n+
503 } // end namespace GridGlue
\n+
504} // end namespace Dune
\n+
505
\n+
506#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-
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:256
\n-
static constexpr auto dim
Definition extractor.hh:51
\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:257
\n+
Traits::OutsideLocalGeometry OutsideLocalGeometry
Definition intersection.hh:271
\n+
Intersection< P0, P1, O, I > flip() const
Return a copy of the intersection with inside and outside switched.
Definition intersection.hh:474
\n+
bool conforming() const
Return true if intersection is conforming.
Definition intersection.hh:331
\n+
InsideGridView::Traits::template Codim< 0 >::Entity InsideEntity
Definition intersection.hh:277
\n+
Traits::GridGlue GridGlue
Definition intersection.hh:263
\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:408
\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:401
\n+
bool self() const
For parallel computations: Return true if inside() entity exists locally.
Definition intersection.hh:384
\n+
static constexpr auto mydim
dimension of the intersection
Definition intersection.hh:287
\n+
static constexpr int outsidePatch
outside patch
Definition intersection.hh:293
\n+
Dune::GeometryType type() const
Type of reference element for this intersection.
Definition intersection.hh:373
\n+
InsideEntity inside(unsigned int parentId=0) const
Return element on the inside of this intersection.
Definition intersection.hh:315
\n+
Traits::LocalCoordinate LocalCoordinate
Definition intersection.hh:280
\n+
const OutsideLocalGeometry & geometryInOutside(unsigned int parentId=0) const
Geometric information about this intersection in local coordinates of the outside() element.
Definition intersection.hh:345
\n+
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return a unit outer normal.
Definition intersection.hh:446
\n+
Traits::ctype ctype
Definition intersection.hh:275
\n+
IntersectionTraits< P0, P1, I, O > Traits
Definition intersection.hh:261
\n+
Traits::IntersectionData IntersectionData
Definition intersection.hh:264
\n+
Traits::GlobalCoordinate GlobalCoordinate
Definition intersection.hh:281
\n+
Traits::OutsideGeometry OutsideGeometry
Definition intersection.hh:272
\n+
size_t neighbor(unsigned int g=0) const
Return number of embeddings into local grid0 (grid1) entities.
Definition intersection.hh:390
\n+
Intersection(const GridGlue *glue, const IntersectionData *i)
Constructor for a given Dataset.
Definition intersection.hh:307
\n+
static constexpr int insidePatch
inside patch
Definition intersection.hh:290
\n+
Traits::Geometry Geometry
Definition intersection.hh:274
\n+
OutsideGridView::Traits::template Codim< 0 >::Entity OutsideEntity
Definition intersection.hh:278
\n+
OutsideEntity outside(unsigned int parentId=0) const
Return element on the outside of this intersection.
Definition intersection.hh:324
\n+
const Geometry & geometry() const
Geometric information about this intersection as part of the inside grid.
Definition intersection.hh:356
\n+
Traits::InsideLocalGeometry InsideLocalGeometry
Definition intersection.hh:268
\n+
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition intersection.hh:418
\n+
const OutsideGeometry & geometryOutside() const
Geometric information about this intersection as part of the outside grid.
Definition intersection.hh:367
\n+
Traits::OutsideGridView OutsideGridView
Definition intersection.hh:270
\n+
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
Return an outer normal with the length of the integration element.
Definition intersection.hh:457
\n+
Traits::InsideGridView InsideGridView
Definition intersection.hh:267
\n+
const InsideLocalGeometry & geometryInInside(unsigned int parentId=0) const
Geometric information about this intersection in local coordinates of the inside() element.
Definition intersection.hh:338
\n+
GlobalCoordinate centerUnitOuterNormal() const
Unit outer normal at the center of the intersection.
Definition intersection.hh:466
\n+
static constexpr auto coorddim
dimension of the world space of the intersection
Definition intersection.hh:284
\n+
Definition intersection.hh:230
\n+
static constexpr int insidePatch
Definition intersection.hh:245
\n+
Dune::FieldVector< ctype, mydim > LocalCoordinate
Definition intersection.hh:249
\n+
static constexpr auto coorddim
Definition intersection.hh:243
\n+
typename IntersectionData::template GridGeometry< outside > OutsideGeometry
Definition intersection.hh:241
\n+
typename GridGlue::ctype ctype
Definition intersection.hh:248
\n+
typename GridGlue::template GridView< outside > OutsideGridView
Definition intersection.hh:235
\n+
Dune::FieldVector< ctype, coorddim > GlobalCoordinate
Definition intersection.hh:250
\n+
typename IntersectionData::template GridLocalGeometry< outside > OutsideLocalGeometry
Definition intersection.hh:238
\n+
typename GridGlue::template GridView< inside > InsideGridView
Definition intersection.hh:234
\n+
typename IntersectionData::template GridGeometry< inside > Geometry
Definition intersection.hh:240
\n+
typename IntersectionData::template GridLocalGeometry< inside > InsideLocalGeometry
Definition intersection.hh:237
\n+
static constexpr int outsidePatch
Definition intersection.hh:246
\n+
static constexpr auto mydim
Definition intersection.hh:244
\n
\n \n
\n Generated by \"doxygen\"/ 1.9.8\n
\n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,349 +1,743 @@\n dune-grid-glue\u00a02.10\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+intersection.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-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+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-24#include \n-25#include \n-26#include \n-27#include \n+_\b2_\b4#define ONLY_SIMPLEX_INTERSECTIONS\n+25\n+26namespace _\bD_\bu_\bn_\be {\n+27 namespace GridGlue {\n 28\n-29#include \n-30#include \n-31#include \n+29 // forward declaration\n+30 template\n+31 class IntersectionIndexSet;\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-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+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-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+_\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 // 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+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 // 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 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+_\b7_\b1 using _\bG_\br_\bi_\bd_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be = typename GridGlue::template GridView::IndexSet::\n+IndexType;\n+72\n+_\b7_\b3 using _\bG_\br_\bi_\bd_\b0_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be [[deprecated(\"please use GridIndexType<0> instead\")]] =\n+_\bG_\br_\bi_\bd_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be_\b<_\b0_\b>;\n+_\b7_\b4 using _\bG_\br_\bi_\bd_\b1_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be [[deprecated(\"please use GridIndexType<1> instead\")]] =\n+_\bG_\br_\bi_\bd_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be_\b<_\b1_\b>;\n+75\n+77 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba(const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be& glue, unsigned int mergeindex, unsigned int\n+offset, bool grid0local, bool grid1local);\n+78\n+_\b8_\b0 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba() = default;\n+81\n+82 /* Accessor Functions */\n+83\n+84 template\n+_\b8_\b5 const _\bG_\br_\bi_\bd_\bL_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\bs_\bi_\bd_\be_\b>& _\bl_\bo_\bc_\ba_\bl_\bG_\be_\bo_\bm_\be_\bt_\br_\by(unsigned int parentId = 0)\n+const\n+86 { return *std::get(sideData_).gridlocalgeom[parentId]; }\n+87\n+88 template\n+_\b8_\b9 const _\bG_\br_\bi_\bd_\bG_\be_\bo_\bm_\be_\bt_\br_\by_\b<_\bs_\bi_\bd_\be_\b>& _\bg_\be_\bo_\bm_\be_\bt_\br_\by() const\n+90 { return *std::get(sideData_).gridgeom; }\n+91\n+92 template\n+_\b9_\b3 bool _\bl_\bo_\bc_\ba_\bl() const\n+94 { return std::get(sideData_).gridlocal; }\n+95\n+96 template\n+_\b9_\b7 _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bi_\bn_\bd_\be_\bx(unsigned int parentId = 0) const\n+98 { return std::get(sideData_).gridindices[parentId]; }\n 99\n-100 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\n-case-by-case basis\n-104 if (geometryTypes[i].isSimplex()) {\n-105 for (int j=0; j\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 } 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+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-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+121 std::vector< GridIndexType > gridindices;\n+122\n+124 std::vector< std::optional< GridLocalGeometry > > gridlocalgeom;\n 125\n-126 } else {\n-127 DUNE_THROW(Dune::NotImplemented, \"Geometry type \" << geometryTypes[i] << \"\n-not supported yet\");\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 > 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 }\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 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+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 (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-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+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;\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 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+189 // Add world geometry only for 0th parent\n+190 if (par == 0) {\n+191 typename GridGlue::template GridPatch::Geometry\n+192 gridWorldGeometry = glue.template patch().geometry(data.gridindices\n+[par]);\n+193\n+194 // world coordinates of the remote intersection corners\n+195 std::array::\n+dimensionworld>, nSimplexCorners> corners_global;\n+196\n+197 for (std::size_t i=0; i\n+_\b2_\b0_\b9 _\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+210 bool grid0local, bool grid1local)\n+211 : index_(mergeindex+offset)\n+212 {\n+213 // if an invalid index is given do not proceed!\n+214 // (happens when the parent GridGlue initializes the \"end\"-Intersection)\n+215 assert (0 <= mergeindex || mergeindex < glue.index__sz);\n+216\n+217 std::get<0>(sideData_).gridlocal = grid0local;\n+218 std::get<1>(sideData_).gridlocal = grid1local;\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(glue, mergeindex);\n+221 initializeGeometry<1>(glue, mergeindex);\n+222 }\n+223\n+228 template\n+_\b2_\b2_\b9 struct _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs\n+230 {\n+_\b2_\b3_\b1 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_\b2 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+233\n+_\b2_\b3_\b4 using _\bI_\bn_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw = typename GridGlue::template GridView;\n+_\b2_\b3_\b5 using _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw = typename GridGlue::template GridView;\n+236\n+_\b2_\b3_\b7 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_\b3_\b8 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+239\n+_\b2_\b4_\b0 using _\bG_\be_\bo_\bm_\be_\bt_\br_\by = typename IntersectionData::template GridGeometry;\n+_\b2_\b4_\b1 using _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by = typename IntersectionData::template\n+GridGeometry;\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+_\b2_\b4_\b3 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_\b4 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_\b5 static constexpr int _\bi_\bn_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh = inside;\n+_\b2_\b4_\b6 static constexpr int _\bo_\bu_\bt_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh = outside;\n 247\n-248 for (int i = 0; i < overlaps; i++)\n-249 fmerged << \"10\" << std::endl;\n-250\n-251 }\n+_\b2_\b4_\b8 using _\bc_\bt_\by_\bp_\be = typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\bt_\by_\bp_\be;\n+_\b2_\b4_\b9 using _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be = Dune::FieldVector;\n+_\b2_\b5_\b0 using _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be = Dune::FieldVector;\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+255 template\n+_\b2_\b5_\b6 class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+257 {\n+258\n+259 public:\n+260\n+_\b2_\b6_\b1 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+262\n+_\b2_\b6_\b3 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_\b4 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+265\n+266\n+_\b2_\b6_\b7 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_\b6_\b8 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+269\n+_\b2_\b7_\b0 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_\b1 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_\b2 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 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+_\b2_\b7_\b4 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_\b5 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bc_\bt_\by_\bp_\be _\bc_\bt_\by_\bp_\be;\n+276\n+_\b2_\b7_\b7 typedef typename InsideGridView::Traits::template Codim<0>::Entity\n+_\bI_\bn_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by;\n+_\b2_\b7_\b8 typedef typename OutsideGridView::Traits::template Codim<0>::Entity\n+_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by;\n+279\n+_\b2_\b8_\b0 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_\b1 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 282\n-283 writeIntersections(glue,\n-284 filenameTrunk + \"-intersections-grid0.vtk\");\n+_\b2_\b8_\b4 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 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 }\n+_\b2_\b8_\b7 static constexpr auto _\bm_\by_\bd_\bi_\bm = _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bm_\by_\bd_\bi_\bm;\n+288\n+_\b2_\b9_\b0 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+291\n+_\b2_\b9_\b3 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 294\n-295};\n+295 // typedef unsigned int IndexType;\n 296\n-297} /* namespace GridGlue */\n-298} /* namespace Dune */\n-299\n-300#endif // DUNE_GRIDGLUE_ADAPTER_GRIDGLUEVTKWRITER_HH\n+297 private:\n+301 static constexpr int codimensionWorld = _\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm - _\bm_\by_\bd_\bi_\bm;\n+302\n+303 public:\n+304 /* C O N S T R U C T O R S */\n+305\n+_\b3_\b0_\b7 _\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+308 glue_(glue), i_(i) {}\n+309\n+310 /* F U N C T I O N A L I T Y */\n+311\n+314 _\bI_\bn_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by\n+_\b3_\b1_\b5 _\bi_\bn_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n+316 {\n+317 assert(_\bs_\be_\bl_\bf());\n+318 return glue_->template patch().element(i_->template index(parentId));\n+319 }\n+320\n+323 _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by\n+_\b3_\b2_\b4 _\bo_\bu_\bt_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n+325 {\n+326 assert(_\bn_\be_\bi_\bg_\bh_\bb_\bo_\br());\n+327 return glue_->template patch().element(i_->template index(parentId));\n+328 }\n+329\n+_\b3_\b3_\b1 bool _\bc_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg() const\n+332 {\n+333 throw Dune::NotImplemented();\n+334 }\n+335\n+_\b3_\b3_\b8 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+339 {\n+340 return i_->template localGeometry(parentId);\n+341 }\n+342\n+_\b3_\b4_\b5 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+346 {\n+347 return i_->template localGeometry(parentId);\n+348 }\n+349\n+_\b3_\b5_\b6 const _\bG_\be_\bo_\bm_\be_\bt_\br_\by& _\bg_\be_\bo_\bm_\be_\bt_\br_\by() const\n+357 {\n+358 return i_->template geometry();\n+359 }\n+360\n+_\b3_\b6_\b7 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+368 {\n+369 return i_->template geometry();\n+370 }\n+371\n+_\b3_\b7_\b3 Dune::GeometryType _\bt_\by_\bp_\be() const\n+374 {\n+375 #ifdef ONLY_SIMPLEX_INTERSECTIONS\n+376 return Dune::GeometryTypes::simplex(_\bm_\by_\bd_\bi_\bm);\n+377 #else\n+378 #error Not Implemented\n+379 #endif\n+380 }\n+381\n+382\n+_\b3_\b8_\b4 bool _\bs_\be_\bl_\bf() const\n+385 {\n+386 return i_->template local();\n+387 }\n+388\n+_\b3_\b9_\b0 size_t _\bn_\be_\bi_\bg_\bh_\bb_\bo_\br(unsigned int g = 0) const\n+391 {\n+392 if (g == 0 && i_->template local()) {\n+393 return i_->template parents();\n+394 } else if (g == 1 && i_->template local()) {\n+395 return i_->template parents();\n+396 }\n+397 return 0;\n+398 }\n+399\n+_\b4_\b0_\b1 int _\bi_\bn_\bd_\be_\bx_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n+402 {\n+403 assert(_\bs_\be_\bl_\bf());\n+404 return glue_->template patch().indexInInside(i_->template index\n+(parentId));\n+405 }\n+406\n+_\b4_\b0_\b8 int _\bi_\bn_\bd_\be_\bx_\bI_\bn_\bO_\bu_\bt_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n+409 {\n+410 assert(_\bn_\be_\bi_\bg_\bh_\bb_\bo_\br());\n+411 return glue_->template patch().indexInInside(i_->template index\n+(parentId));\n+412 }\n+413\n+_\b4_\b1_\b8 _\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+419 {\n+420 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be normal;\n+421\n+422 if (codimensionWorld == 0)\n+423 DUNE_THROW(Dune::Exception, \"There is no normal vector to a full-\n+dimensional intersection\");\n+424 else if (codimensionWorld == 1) {\n+425 /* TODO: Implement the general n-ary cross product here */\n+426 const auto jacobianTransposed = _\bg_\be_\bo_\bm_\be_\bt_\br_\by().jacobianTransposed(local);\n+427 if (_\bm_\by_\bd_\bi_\bm==1) {\n+428 normal[0] = - jacobianTransposed[0][1];\n+429 normal[1] = jacobianTransposed[0][0];\n+430 } else if (_\bm_\by_\bd_\bi_\bm==2) {\n+431 normal[0] = (jacobianTransposed[0][1] * jacobianTransposed[1][2] -\n+jacobianTransposed[0][2] * jacobianTransposed[1][1]);\n+432 normal[1] = - (jacobianTransposed[0][0] * jacobianTransposed[1][2] -\n+jacobianTransposed[0][2] * jacobianTransposed[1][0]);\n+433 normal[2] = (jacobianTransposed[0][0] * jacobianTransposed[1][1] -\n+jacobianTransposed[0][1] * jacobianTransposed[1][0]);\n+434 } else\n+435 DUNE_THROW(Dune::NotImplemented, \"Remote intersections don't implement the\n+'outerNormal' method for \" << _\bm_\by_\bd_\bi_\bm << \"-dimensional intersections yet\");\n+436 } else\n+437 DUNE_THROW(Dune::NotImplemented, \"Remote intersections don't implement the\n+'outerNormal' method for intersections with codim >= 2 yet\");\n+438\n+439 return normal;\n+440 }\n+441\n+_\b4_\b4_\b6 _\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+447 {\n+448 _\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+449 normal /= normal.two_norm();\n+450 return normal;\n+451 }\n+452\n+_\b4_\b5_\b7 _\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+458 {\n+459 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+460 }\n+461\n+_\b4_\b6_\b6 _\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+467 {\n+468 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+469 }\n+470\n+_\b4_\b7_\b4 _\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+475 {\n+476 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+477 }\n+478\n+479#ifdef QUICKHACK_INDEX\n+480 typedef typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be IndexType;\n+481\n+482 IndexType index() const\n+483 {\n+484 return i_->_\bi_\bn_\bd_\be_\bx_\b_;\n+485 }\n+486\n+487#endif\n+488\n+489 private:\n+490\n+491 friend class IntersectionIndexSet;\n+492\n+493 /* M E M B E R V A R I A B L E S */\n+494\n+496 const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be* glue_;\n+497\n+499 const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba* i_;\n+500 };\n+501\n+502\n+503 } // end namespace GridGlue\n+504} // end namespace Dune\n+505\n+506#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_\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-getter for the coordinates array\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:256\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm\n-static constexpr auto dim\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:51\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\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:257\n+_\bD_\bu_\bn_\be_\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: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:_\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:474\n+_\bD_\bu_\bn_\be_\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:331\n+_\bD_\bu_\bn_\be_\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:277\n+_\bD_\bu_\bn_\be_\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:263\n+_\bD_\bu_\bn_\be_\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:408\n+_\bD_\bu_\bn_\be_\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:401\n+_\bD_\bu_\bn_\be_\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:384\n+_\bD_\bu_\bn_\be_\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:287\n+_\bD_\bu_\bn_\be_\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:293\n+_\bD_\bu_\bn_\be_\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:373\n+_\bD_\bu_\bn_\be_\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:315\n+_\bD_\bu_\bn_\be_\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:280\n+_\bD_\bu_\bn_\be_\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:345\n+_\bD_\bu_\bn_\be_\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:446\n+_\bD_\bu_\bn_\be_\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: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:_\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: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:_\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:264\n+_\bD_\bu_\bn_\be_\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: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:_\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: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:_\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:390\n+_\bD_\bu_\bn_\be_\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:307\n+_\bD_\bu_\bn_\be_\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:290\n+_\bD_\bu_\bn_\be_\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: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:_\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: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\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:324\n+_\bD_\bu_\bn_\be_\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:356\n+_\bD_\bu_\bn_\be_\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: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:_\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:418\n+_\bD_\bu_\bn_\be_\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:367\n+_\bD_\bu_\bn_\be_\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:270\n+_\bD_\bu_\bn_\be_\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:457\n+_\bD_\bu_\bn_\be_\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: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:_\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:338\n+_\bD_\bu_\bn_\be_\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: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:_\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: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_\bT_\br_\ba_\bi_\bt_\bs\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:230\n+_\bD_\bu_\bn_\be_\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: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:_\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: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:_\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:243\n+_\bD_\bu_\bn_\be_\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: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:_\bc_\bt_\by_\bp_\be\n+typename GridGlue::ctype ctype\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:_\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:235\n+_\bD_\bu_\bn_\be_\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: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:_\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: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:_\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: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:_\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:240\n+_\bD_\bu_\bn_\be_\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:237\n+_\bD_\bu_\bn_\be_\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:246\n+_\bD_\bu_\bn_\be_\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:244\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: intersectionindexset.hh File Reference\n+dune-grid-glue: gridgluevtkwriter.hh File Reference\n \n \n \n \n \n \n \n@@ -72,34 +72,46 @@\n
  • dune
  • grid-glue
  • adapter
  • \n \n \n
    \n \n-
    intersectionindexset.hh File Reference
    \n+
    gridgluevtkwriter.hh File Reference
    \n
    \n
    \n-
    #include <dune/grid-glue/gridglue.hh>
    \n-#include <dune/grid-glue/adapter/intersection.hh>
    \n+\n+

    Write all remote intersections to a vtk file for debugging. \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
    \n

    Go to the source code of this file.

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

    \n Classes

    class  Dune::GridGlue::IntersectionIndexSet< P0, P1 >
    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+

    Detailed Description

    \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": "@@ -2,21 +2,32 @@\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+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 <_\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:_\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+*\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 ===============================================================================\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: intersectionindexset.hh Source File\n+dune-grid-glue: gridgluevtkwriter.hh Source File\n \n \n \n \n \n \n \n@@ -74,87 +74,318 @@\n \n \n \n
    \n-
    intersectionindexset.hh
    \n+
    gridgluevtkwriter.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-
    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+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
    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+
    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-
    55 } // end namespace GridGlue
    \n-
    56} // end namespace Dune
    \n+
    55 using GridView = typename Glue::template GridView<side>;
    \n+
    56 using Extractor = typename Glue::template GridPatch<side>;
    \n
    57
    \n-
    58#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH
    \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+
    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 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+
    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+
    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 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+
    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 // 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 }
    \n+
    \n+
    294
    \n+
    295};
    \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-
    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:257
    \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+
    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:256
    \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,105 +1,349 @@\n dune-grid-glue\u00a02.10\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+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-_\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-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+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-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+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-55 } // end namespace GridGlue\n-56} // end namespace Dune\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#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTIONINDEXSET_HH\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+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 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() << \" 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+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 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 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() << \" 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 }\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-_\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:257\n-_\bD_\bu_\bn_\be_\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_\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+getter for the coordinates array\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:256\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/a00011.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00011.html", "unified_diff": "@@ -75,19 +75,19 @@\n
    \n \n
    gridglue.cc File Reference
    \n
    \n
    \n-
    #include "intersection.hh"
    \n+
    #include "intersection.hh"
    \n #include <vector>
    \n #include <iterator>
    \n #include "../gridglue.hh"
    \n-#include "../common/ringcomm.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"}, {"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": "@@ -83,15 +83,15 @@\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+
    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@@ -534,15 +534,15 @@\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+
    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"}, {"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: gridglueamirawriter.hh File Reference\n+dune-grid-glue: intersectionindexset.hh File Reference\n \n \n \n \n \n \n \n@@ -72,41 +72,34 @@\n
  • dune
  • grid-glue
  • adapter
  • \n
    \n \n
    \n \n-
    gridglueamirawriter.hh File Reference
    \n+
    intersectionindexset.hh File Reference
    \n
    \n
    \n-\n-

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

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

    Go to the source code of this file.

    \n

    \n Namespaces

    namespace  Dune
    \n \n-\n-\n+\n \n

    \n Classes

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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n-

    Detailed Description

    \n-

    Write all remote intersections to a AmiraMesh file.

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

    Implement iterators over GridGlue intersections. \n+

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

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

    \n Classes

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

    Detailed Description

    \n-

    Implement iterators over GridGlue intersections.

    \n-
    Author
    Christian Engwer
    \n+

    Write all remote intersections to a AmiraMesh file.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,25 +2,27 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\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+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_\bI_\bt_\be_\br_\ba_\bt_\bo_\br_\b<_\b _\bP_\b0_\b,_\b _\bP_\b1_\b,_\b _\bi_\bn_\bs_\bi_\bd_\be_\b,_\b _\bo_\bu_\bt_\bs_\bi_\bd_\be_\b _\b>\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\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-Implement iterators over GridGlue intersections.\n- Author\n- Christian Engwer\n+Write all remote intersections to a AmiraMesh file.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/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: intersectioniterator.hh Source File\n+dune-grid-glue: gridglueamirawriter.hh Source File\n \n \n \n \n \n \n \n@@ -74,95 +74,166 @@\n \n \n
    \n
    \n-
    intersectioniterator.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-
    12#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH
    \n-
    13#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_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+
    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-\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+
    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-
    \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+
    31 std::ofstream fgrid;
    \n+
    32
    \n+
    33 fgrid.open(filename.c_str());
    \n+
    34
    \n+
    35 using GridView = typename Glue::template GridView<side>;
    \n+
    36 const int dim = GridView::dimension;
    \n+
    37 const int domdimw = GridView::dimensionworld;
    \n+
    38
    \n+
    39 // coordinates have to be in R^3 in the VTK format
    \n+
    40 std::string coordinatePadding;
    \n+
    41 for (int i=domdimw; i<3; i++)
    \n+
    42 coordinatePadding += " 0";
    \n
    43
    \n-
    \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+
    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 } // 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+
    62 // ////////////////////////////////////////////
    \n+
    63 // Write vertices
    \n+
    64 // ////////////////////////////////////////////
    \n+
    65
    \n+
    66 //use dim and not dim+1
    \n+
    67 fgrid<<"\\nVertices "<< overlaps*(dim)<<"\\n";
    \n+
    68 auto isEnd = glue.template iend<side>();
    \n+
    69 for (auto isIt = glue.template ibegin<side>(); isIt != isEnd; ++isIt)
    \n+
    70 {
    \n+
    71 const auto& geometry = isIt->geometry();
    \n+
    72 for (int i = 0; i < geometry.corners(); ++i)
    \n+
    73 fgrid << geometry.corner(i) << coordinatePadding << std::endl;
    \n+
    74 }
    \n+
    75
    \n+
    76 // ////////////////////////////////////////////
    \n+
    77 // Write triangles
    \n+
    78 // ////////////////////////////////////////////
    \n+
    79
    \n+
    80 fgrid<<"NBranchingPoints 0\\n";
    \n+
    81 fgrid<<"NVerticesOnCurves 0\\n";
    \n+
    82 fgrid<<"BoundaryCurves 0\\n";
    \n+
    83 fgrid<<"Patches 1\\n";
    \n+
    84 fgrid<<"{\\n";
    \n+
    85 fgrid<<"InnerRegion inside\\n";
    \n+
    86 fgrid<<"OuterRegion outside\\n";
    \n+
    87 fgrid<<"BoundaryID 0\\n";
    \n+
    88 fgrid<<"BranchingPoints 0";
    \n+
    89 fgrid<<"\\n";
    \n+
    90
    \n+
    91 fgrid<<"Triangles "<<overlaps<<std::endl;
    \n+
    92
    \n+
    93 for (int i=0;i<overlaps; i++)
    \n+
    94 fgrid<<i*dim+1<<" "<<i*dim+2<<" "<<i*dim+3<<std::endl;
    \n+
    95 fgrid<<"}\\n";
    \n+
    96
    \n+
    97 } else if (dim==2) {
    \n+
    98
    \n+
    99 fgrid << "# AmiraMesh 3D ASCII 2.0 \\n";
    \n+
    100 fgrid<<"\\n";
    \n+
    101 fgrid<<"define Lines "<<3*overlaps<<"\\n";
    \n+
    102 fgrid<<"nVertices "<<2*overlaps<<"\\n";
    \n+
    103 fgrid<<"\\n";
    \n+
    104 fgrid<<"Parameters {\\n";
    \n+
    105 fgrid<<" ContentType \\"HxLineSet\\" \\n";
    \n+
    106 fgrid<<"}\\n";
    \n+
    107 fgrid<<"\\n";
    \n+
    108 fgrid<<"Lines { int LineIdx } @1\\n";
    \n+
    109 fgrid<<"Vertices { float[3] Coordinates } @2\\n";
    \n+
    110 fgrid<<"\\n";
    \n+
    111 fgrid<<"# Data section follows\\n";
    \n+
    112 fgrid<<"@1 \\n";
    \n+
    113 for (int i=0; i<overlaps;i++)
    \n+
    114 fgrid<<2*i<<"\\n"<<2*i+1<<"\\n"<<-1<<"\\n";
    \n+
    115 fgrid<<"\\n";
    \n+
    116 fgrid<<"@2 \\n";
    \n+
    117
    \n+
    118 auto isEnd = glue.template iend<side>();
    \n+
    119 for (auto isIt = glue.template ibegin<side>(); isIt != isEnd; ++isIt) {
    \n+
    120 const auto& geometry = isIt->geometry();
    \n+
    121 for (int i = 0; i <2; ++i)
    \n+
    122 fgrid << geometry.corner(i) <<" "<<0<<"\\n";
    \n+
    123 }
    \n+
    124 }
    \n+
    125
    \n+
    126 fgrid.close();
    \n+
    127 }
    \n+
    128
    \n+
    129public:
    \n+
    130 template<typename Glue>
    \n+
    \n+
    131 static void write(const Glue& glue, const std::string& path, int appendix=1)
    \n+
    132 {
    \n+
    133 std::ostringstream name0;
    \n+
    134 name0 << path;
    \n+
    135 name0 << "/domain.surf" << std::setw(3) << std::setfill('0') << appendix;
    \n+
    136
    \n+
    137 // Write extracted grid and remote intersection on the grid1-side
    \n+
    138 writeIntersections<Glue,0>(glue,name0.str());
    \n+
    139
    \n+
    140 std::ostringstream name1;
    \n+
    141 name1 << path;
    \n+
    142 name1 << "/target.surf" << std::setw(3) << std::setfill('0') << appendix;
    \n+
    143
    \n+
    144 writeIntersections<Glue,1>(glue, name1.str());
    \n+
    145 }
    \n+
    \n+
    146
    \n+
    147};
    \n+
    \n+
    148
    \n+
    149} // namespace GridGlue
    \n+
    150} // namespace Dune
    \n+
    151
    \n+
    152#endif // DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH
    \n
    Definition gridglue.hh:37
    \n-
    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+
    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,99 +1,165 @@\n dune-grid-glue\u00a02.10\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+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-12#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH\n-13#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH\n+8#ifndef DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH\n+9#define DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH\n+10\n+11#include \n+12#include \n+13#include \n 14\n-15#include <_\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+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-_\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+31 std::ofstream fgrid;\n+32\n+33 fgrid.open(filename.c_str());\n+34\n+35 using GridView = typename Glue::template GridView;\n+36 const int dim = GridView::dimension;\n+37 const int domdimw = GridView::dimensionworld;\n+38\n+39 // coordinates have to be in R^3 in the VTK format\n+40 std::string coordinatePadding;\n+41 for (int i=domdimw; i<3; i++)\n+42 coordinatePadding += \" 0\";\n 43\n-_\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+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 } // 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+62 // ////////////////////////////////////////////\n+63 // Write vertices\n+64 // ////////////////////////////////////////////\n+65\n+66 //use dim and not dim+1\n+67 fgrid<<\"\\nVertices \"<< overlaps*(dim)<<\"\\n\";\n+68 auto isEnd = glue.template iend();\n+69 for (auto isIt = glue.template ibegin(); isIt != isEnd; ++isIt)\n+70 {\n+71 const auto& geometry = isIt->geometry();\n+72 for (int i = 0; i < geometry.corners(); ++i)\n+73 fgrid << geometry.corner(i) << coordinatePadding << std::endl;\n+74 }\n+75\n+76 // ////////////////////////////////////////////\n+77 // Write triangles\n+78 // ////////////////////////////////////////////\n+79\n+80 fgrid<<\"NBranchingPoints 0\\n\";\n+81 fgrid<<\"NVerticesOnCurves 0\\n\";\n+82 fgrid<<\"BoundaryCurves 0\\n\";\n+83 fgrid<<\"Patches 1\\n\";\n+84 fgrid<<\"{\\n\";\n+85 fgrid<<\"InnerRegion inside\\n\";\n+86 fgrid<<\"OuterRegion outside\\n\";\n+87 fgrid<<\"BoundaryID 0\\n\";\n+88 fgrid<<\"BranchingPoints 0\";\n+89 fgrid<<\"\\n\";\n+90\n+91 fgrid<<\"Triangles \"<();\n+119 for (auto isIt = glue.template ibegin(); isIt != isEnd; ++isIt) {\n+120 const auto& geometry = isIt->geometry();\n+121 for (int i = 0; i <2; ++i)\n+122 fgrid << geometry.corner(i) <<\" \"<<0<<\"\\n\";\n+123 }\n+124 }\n+125\n+126 fgrid.close();\n+127 }\n+128\n+129public:\n+130 template\n+_\b1_\b3_\b1 static void _\bw_\br_\bi_\bt_\be(const Glue& glue, const std::string& path, int\n+appendix=1)\n+132 {\n+133 std::ostringstream name0;\n+134 name0 << path;\n+135 name0 << \"/domain.surf\" << std::setw(3) << std::setfill('0') << appendix;\n+136\n+137 // Write extracted grid and remote intersection on the grid1-side\n+138 writeIntersections(glue,name0.str());\n+139\n+140 std::ostringstream name1;\n+141 name1 << path;\n+142 name1 << \"/target.surf\" << std::setw(3) << std::setfill('0') << appendix;\n+143\n+144 writeIntersections(glue, name1.str());\n+145 }\n+146\n+147};\n+148\n+149} // namespace GridGlue\n+150} // namespace Dune\n+151\n+152#endif // DUNE_GRIDGLUE_ADAPTER_GRIDGLUEAMIRAWRITER_HH\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\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_\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/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: rangegenerators.hh File Reference\n+dune-grid-glue: intersectioniterator.hh File Reference\n \n \n \n \n \n \n \n@@ -71,42 +71,40 @@\n \n
    \n
    \n
    \n \n-
    rangegenerators.hh File Reference
    \n+Namespaces
    \n+
    intersectioniterator.hh File Reference
    \n \n
    \n-
    #include <dune/common/iteratorrange.hh>
    \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

    struct  Dune::GridGlue::Reverse< reverse >
    class  Dune::GridGlue::IntersectionIterator< P0, P1, inside, outside >
     
    \n \n \n \n \n \n-

    \n Namespaces

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

    \n-Functions

    template<... >
    IteratorRange<... > Dune::GridGlue::intersections (const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
     Iterate over all intersections of a 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": "@@ -1,27 +1,26 @@\n dune-grid-glue\u00a02.10\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\n+intersectioniterator.hh File Reference\n+Implement iterators over GridGlue intersections. _\bM_\bo_\br_\be_\b._\b._\b.\n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-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_\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-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+*\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/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: rangegenerators.hh Source File\n+dune-grid-glue: intersectioniterator.hh Source File\n \n \n \n \n \n \n \n@@ -74,78 +74,95 @@\n \n \n \n
    \n-
    rangegenerators.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_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+Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n+
    2// vi: set et ts=4 sw=2 sts=2:
    \n+
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n+
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+
    12#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH
    \n+
    13#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH
    \n+
    14
    \n+\n+
    16
    \n+
    17namespace Dune {
    \n+
    18 namespace GridGlue {
    \n
    19
    \n-
    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+
    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
    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+\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,88 +1,99 @@\n dune-grid-glue\u00a02.10\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+intersectioniterator.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-1// 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+12#ifndef DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH\n+13#define DUNE_GRIDGLUE_ADAPTER_INTERSECTIONITERATOR_HH\n+14\n+15#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n+16\n+17namespace _\bD_\bu_\bn_\be {\n+18 namespace GridGlue {\n 19\n-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+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 _\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:_\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/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: intersection.hh File Reference\n+dune-grid-glue: rangegenerators.hh File Reference\n \n \n \n \n \n \n \n@@ -72,73 +72,41 @@\n
  • dune
  • grid-glue
  • adapter
  • \n
    \n \n
    \n \n-
    intersection.hh File Reference
    \n+Functions
    \n+
    rangegenerators.hh File Reference
    \n \n
    \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+
    #include <dune/common/iteratorrange.hh>
    \n
    \n

    Go to the source code of this file.

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

    \n Classes

    class  Dune::GridGlue::IntersectionData< P0, P1 >
     storage class for Dune::GridGlue::Intersection related data More...
     
    struct  Dune::GridGlue::IntersectionTraits< P0, P1, inside, outside >
     
    class  Dune::GridGlue::Intersection< P0, P1, I, O >
     The intersection of two entities of the two patches of a GridGlue. More...
    struct  Dune::GridGlue::Reverse< reverse >
     
    \n \n \n \n \n \n

    \n Namespaces

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

    \n-Macros

    #define ONLY_SIMPLEX_INTERSECTIONS
     

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

    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,46 +1,27 @@\n dune-grid-glue\u00a02.10\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 | _\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_\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+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-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+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-*\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/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: intersection.hh Source File\n+dune-grid-glue: rangegenerators.hh Source File\n \n \n \n \n \n \n \n@@ -74,569 +74,78 @@\n \n \n
    \n
    \n-
    intersection.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-
    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+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
    32
    \n-
    36 template<typename P0, typename P1>
    \n-
    \n-\n-
    38 {
    \n-
    39 public:
    \n-
    40 typedef ::Dune::GridGlue::GridGlue<P0, P1> GridGlue;
    \n-
    41
    \n-\n-
    43
    \n-
    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+
    66template<...>
    \n+
    67IteratorRange<...>
    \n+
    68intersections(const GridGlue<...>& glue, const Reverse<...>& reverse = !reversed);
    \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+
    70#else
    \n+
    71
    \n+
    72namespace {
    \n+
    73const Reverse<true> reversed = {};
    \n+
    74} /* namespace */
    \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+
    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 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 const Dune::GeometryType type = Dune::GeometryTypes::simplex(mydim);
    \n-
    184#else
    \n-
    185#error Not Implemented
    \n-
    186#endif
    \n-
    187 data.gridlocalgeom[par].emplace(type, corners_element_local);
    \n-
    188
    \n-
    189 // Add world geometry only for 0th parent
    \n-
    190 if (par == 0) {
    \n-
    191 typename GridGlue::template GridPatch<side>::Geometry
    \n-
    192 gridWorldGeometry = glue.template patch<side>().geometry(data.gridindices[par]);
    \n-
    193
    \n-
    194 // world coordinates of the remote intersection corners
    \n-
    195 std::array<Dune::FieldVector<ctype, GridGlue::template GridView<side>::dimensionworld>, nSimplexCorners> corners_global;
    \n-
    196
    \n-
    197 for (std::size_t i=0; i<corners_subEntity_local.size(); i++) {
    \n-
    198 corners_global[i] = gridWorldGeometry.global(corners_subEntity_local[i]);
    \n-
    199 }
    \n-
    200
    \n-
    201 data.gridgeom.emplace(type, corners_global);
    \n-
    202 }
    \n-
    203 }
    \n-
    204 }
    \n-
    205 }
    \n-
    206
    \n-
    208 template<typename P0, typename P1>
    \n-
    \n-
    209 IntersectionData<P0, P1>::IntersectionData(const GridGlue& glue, unsigned int mergeindex, unsigned int offset,
    \n-
    210 bool grid0local, bool grid1local)
    \n-
    211 : index_(mergeindex+offset)
    \n-
    212 {
    \n-
    213 // if an invalid index is given do not proceed!
    \n-
    214 // (happens when the parent GridGlue initializes the "end"-Intersection)
    \n-
    215 assert (0 <= mergeindex || mergeindex < glue.index__sz);
    \n-
    216
    \n-
    217 std::get<0>(sideData_).gridlocal = grid0local;
    \n-
    218 std::get<1>(sideData_).gridlocal = grid1local;
    \n-
    219
    \n-
    220 initializeGeometry<0>(glue, mergeindex);
    \n-
    221 initializeGeometry<1>(glue, mergeindex);
    \n-
    222 }
    \n-
    \n-
    223
    \n-
    228 template<typename P0, typename P1, int inside, int outside>
    \n-
    \n-\n-
    230 {
    \n-\n-\n-
    233
    \n-
    234 using InsideGridView = typename GridGlue::template GridView<inside>;
    \n-
    235 using OutsideGridView = typename GridGlue::template GridView<outside>;
    \n-
    236
    \n-
    237 using InsideLocalGeometry = typename IntersectionData::template GridLocalGeometry<inside>;
    \n-
    238 using OutsideLocalGeometry = typename IntersectionData::template GridLocalGeometry<outside>;
    \n-
    239
    \n-
    240 using Geometry = typename IntersectionData::template GridGeometry<inside>;
    \n-
    241 using OutsideGeometry = typename IntersectionData::template GridGeometry<outside>;
    \n-
    242
    \n-
    243 static constexpr auto coorddim = IntersectionData::coorddim;
    \n-
    244 static constexpr auto mydim = IntersectionData::mydim;
    \n-
    245 static constexpr int insidePatch = inside;
    \n-
    246 static constexpr int outsidePatch = outside;
    \n-
    247
    \n-
    248 using ctype = typename GridGlue::ctype;
    \n-
    249 using LocalCoordinate = Dune::FieldVector<ctype, mydim>;
    \n-
    250 using GlobalCoordinate = Dune::FieldVector<ctype, coorddim>;
    \n-
    251 };
    \n-
    \n-
    252
    \n-
    255 template<typename P0, typename P1, int I, int O>
    \n-
    \n-\n-
    257 {
    \n-
    258
    \n-
    259 public:
    \n-
    260
    \n-\n-
    262
    \n-
    263 typedef typename Traits::GridGlue GridGlue;
    \n-\n-
    265
    \n-
    266
    \n-\n-\n-
    269
    \n-\n-\n-\n-
    273
    \n-
    274 typedef typename Traits::Geometry Geometry;
    \n-
    275 typedef typename Traits::ctype ctype;
    \n-
    276
    \n-
    277 typedef typename InsideGridView::Traits::template Codim<0>::Entity InsideEntity;
    \n-
    278 typedef typename OutsideGridView::Traits::template Codim<0>::Entity OutsideEntity;
    \n-
    279
    \n-\n-\n-
    282
    \n-
    284 static constexpr auto coorddim = Traits::coorddim;
    \n-
    285
    \n-
    287 static constexpr auto mydim = Traits::mydim;
    \n-
    288
    \n-
    290 static constexpr int insidePatch = Traits::insidePatch;
    \n-
    291
    \n-
    293 static constexpr int outsidePatch = Traits::outsidePatch;
    \n-
    294
    \n-
    295 // typedef unsigned int IndexType;
    \n-
    296
    \n-
    297 private:
    \n-
    301 static constexpr int codimensionWorld = coorddim - mydim;
    \n-
    302
    \n-
    303 public:
    \n-
    304 /* C O N S T R U C T O R S */
    \n-
    305
    \n-
    \n-
    307 Intersection(const GridGlue* glue, const IntersectionData* i) :
    \n-
    308 glue_(glue), i_(i) {}
    \n-
    \n-
    309
    \n-
    310 /* F U N C T I O N A L I T Y */
    \n-
    311
    \n-\n-
    \n-
    315 inside(unsigned int parentId = 0) const
    \n-
    316 {
    \n-
    317 assert(self());
    \n-
    318 return glue_->template patch<I>().element(i_->template index<I>(parentId));
    \n-
    319 }
    \n-
    \n-
    320
    \n-\n-
    \n-
    324 outside(unsigned int parentId = 0) const
    \n-
    325 {
    \n-
    326 assert(neighbor());
    \n-
    327 return glue_->template patch<O>().element(i_->template index<O>(parentId));
    \n-
    328 }
    \n-
    \n-
    329
    \n-
    \n-
    331 bool conforming() const
    \n-
    332 {
    \n-
    333 throw Dune::NotImplemented();
    \n-
    334 }
    \n-
    \n-
    335
    \n-
    \n-
    338 const InsideLocalGeometry& geometryInInside(unsigned int parentId = 0) const
    \n-
    339 {
    \n-
    340 return i_->template localGeometry<I>(parentId);
    \n-
    341 }
    \n-
    \n-
    342
    \n-
    \n-
    345 const OutsideLocalGeometry& geometryInOutside(unsigned int parentId = 0) const
    \n-
    346 {
    \n-
    347 return i_->template localGeometry<O>(parentId);
    \n-
    348 }
    \n-
    \n-
    349
    \n-
    \n-
    356 const Geometry& geometry() const
    \n-
    357 {
    \n-
    358 return i_->template geometry<I>();
    \n-
    359 }
    \n-
    \n-
    360
    \n-
    \n-
    367 const OutsideGeometry& geometryOutside() const // DUNE_DEPRECATED
    \n-
    368 {
    \n-
    369 return i_->template geometry<O>();
    \n-
    370 }
    \n-
    \n-
    371
    \n-
    \n-
    373 Dune::GeometryType type() const
    \n-
    374 {
    \n-
    375 #ifdef ONLY_SIMPLEX_INTERSECTIONS
    \n-
    376 return Dune::GeometryTypes::simplex(mydim);
    \n-
    377 #else
    \n-
    378 #error Not Implemented
    \n-
    379 #endif
    \n-
    380 }
    \n-
    \n-
    381
    \n-
    382
    \n-
    \n-
    384 bool self() const
    \n-
    385 {
    \n-
    386 return i_->template local<I>();
    \n-
    387 }
    \n-
    \n-
    388
    \n-
    \n-
    390 size_t neighbor(unsigned int g = 0) const
    \n-
    391 {
    \n-
    392 if (g == 0 && i_->template local<O>()) {
    \n-
    393 return i_->template parents<O>();
    \n-
    394 } else if (g == 1 && i_->template local<I>()) {
    \n-
    395 return i_->template parents<I>();
    \n-
    396 }
    \n-
    397 return 0;
    \n-
    398 }
    \n-
    \n-
    399
    \n-
    \n-
    401 int indexInInside(unsigned int parentId = 0) const
    \n-
    402 {
    \n-
    403 assert(self());
    \n-
    404 return glue_->template patch<I>().indexInInside(i_->template index<I>(parentId));
    \n-
    405 }
    \n-
    \n-
    406
    \n-
    \n-
    408 int indexInOutside(unsigned int parentId = 0) const
    \n-
    409 {
    \n-
    410 assert(neighbor());
    \n-
    411 return glue_->template patch<O>().indexInInside(i_->template index<O>(parentId));
    \n-
    412 }
    \n-
    \n-
    413
    \n-
    \n-\n-
    419 {
    \n-
    420 GlobalCoordinate normal;
    \n-
    421
    \n-
    422 if (codimensionWorld == 0)
    \n-
    423 DUNE_THROW(Dune::Exception, "There is no normal vector to a full-dimensional intersection");
    \n-
    424 else if (codimensionWorld == 1) {
    \n-
    425 /* TODO: Implement the general n-ary cross product here */
    \n-
    426 const auto jacobianTransposed = geometry().jacobianTransposed(local);
    \n-
    427 if (mydim==1) {
    \n-
    428 normal[0] = - jacobianTransposed[0][1];
    \n-
    429 normal[1] = jacobianTransposed[0][0];
    \n-
    430 } else if (mydim==2) {
    \n-
    431 normal[0] = (jacobianTransposed[0][1] * jacobianTransposed[1][2] - jacobianTransposed[0][2] * jacobianTransposed[1][1]);
    \n-
    432 normal[1] = - (jacobianTransposed[0][0] * jacobianTransposed[1][2] - jacobianTransposed[0][2] * jacobianTransposed[1][0]);
    \n-
    433 normal[2] = (jacobianTransposed[0][0] * jacobianTransposed[1][1] - jacobianTransposed[0][1] * jacobianTransposed[1][0]);
    \n-
    434 } else
    \n-
    435 DUNE_THROW(Dune::NotImplemented, "Remote intersections don't implement the 'outerNormal' method for " << mydim << "-dimensional intersections yet");
    \n-
    436 } else
    \n-
    437 DUNE_THROW(Dune::NotImplemented, "Remote intersections don't implement the 'outerNormal' method for intersections with codim >= 2 yet");
    \n-
    438
    \n-
    439 return normal;
    \n-
    440 }
    \n-
    \n-
    441
    \n-
    \n-\n-
    447 {
    \n-
    448 GlobalCoordinate normal = outerNormal(local);
    \n-
    449 normal /= normal.two_norm();
    \n-
    450 return normal;
    \n-
    451 }
    \n-
    \n-
    452
    \n-
    \n-\n-
    458 {
    \n-
    459 return (unitOuterNormal(local) *= geometry().integrationElement(local));
    \n-
    460 }
    \n-
    \n-
    461
    \n-
    \n-\n-
    467 {
    \n-
    468 return unitOuterNormal(ReferenceElements<ctype,mydim>::general(type()).position(0,0));
    \n-
    469 }
    \n-
    \n-
    470
    \n-
    \n-\n-
    475 {
    \n-
    476 return Intersection<P0,P1,O,I>(glue_,i_);
    \n-
    477 }
    \n-
    \n-
    478
    \n-
    479#ifdef QUICKHACK_INDEX
    \n-
    480 typedef typename GridGlue::IndexType IndexType;
    \n-
    481
    \n-
    482 IndexType index() const
    \n-
    483 {
    \n-
    484 return i_->index_;
    \n-
    485 }
    \n-
    486
    \n-
    487#endif
    \n-
    488
    \n-
    489 private:
    \n-
    490
    \n-
    491 friend class IntersectionIndexSet<P0,P1>;
    \n-
    492
    \n-
    493 /* M E M B E R V A R I A B L E S */
    \n-
    494
    \n-
    496 const GridGlue* glue_;
    \n-
    497
    \n-
    499 const IntersectionData* i_;
    \n-
    500 };
    \n-
    \n-
    501
    \n-
    502
    \n-
    503 } // end namespace GridGlue
    \n-
    504} // end namespace Dune
    \n-
    505
    \n-
    506#endif // DUNE_GRIDGLUE_ADAPTER_INTERSECTION_HH
    \n-
    Central component of the module implementing the coupling of two grids.
    \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-
    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:257
    \n-
    Traits::OutsideLocalGeometry OutsideLocalGeometry
    Definition intersection.hh:271
    \n-
    Intersection< P0, P1, O, I > flip() const
    Return a copy of the intersection with inside and outside switched.
    Definition intersection.hh:474
    \n-
    bool conforming() const
    Return true if intersection is conforming.
    Definition intersection.hh:331
    \n-
    InsideGridView::Traits::template Codim< 0 >::Entity InsideEntity
    Definition intersection.hh:277
    \n-
    Traits::GridGlue GridGlue
    Definition intersection.hh:263
    \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:408
    \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:401
    \n-
    bool self() const
    For parallel computations: Return true if inside() entity exists locally.
    Definition intersection.hh:384
    \n-
    static constexpr auto mydim
    dimension of the intersection
    Definition intersection.hh:287
    \n-
    static constexpr int outsidePatch
    outside patch
    Definition intersection.hh:293
    \n-
    Dune::GeometryType type() const
    Type of reference element for this intersection.
    Definition intersection.hh:373
    \n-
    InsideEntity inside(unsigned int parentId=0) const
    Return element on the inside of this intersection.
    Definition intersection.hh:315
    \n-
    Traits::LocalCoordinate LocalCoordinate
    Definition intersection.hh:280
    \n-
    const OutsideLocalGeometry & geometryInOutside(unsigned int parentId=0) const
    Geometric information about this intersection in local coordinates of the outside() element.
    Definition intersection.hh:345
    \n-
    GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
    Return a unit outer normal.
    Definition intersection.hh:446
    \n-
    Traits::ctype ctype
    Definition intersection.hh:275
    \n-
    IntersectionTraits< P0, P1, I, O > Traits
    Definition intersection.hh:261
    \n-
    Traits::IntersectionData IntersectionData
    Definition intersection.hh:264
    \n-
    Traits::GlobalCoordinate GlobalCoordinate
    Definition intersection.hh:281
    \n-
    Traits::OutsideGeometry OutsideGeometry
    Definition intersection.hh:272
    \n-
    size_t neighbor(unsigned int g=0) const
    Return number of embeddings into local grid0 (grid1) entities.
    Definition intersection.hh:390
    \n-
    Intersection(const GridGlue *glue, const IntersectionData *i)
    Constructor for a given Dataset.
    Definition intersection.hh:307
    \n-
    static constexpr int insidePatch
    inside patch
    Definition intersection.hh:290
    \n-
    Traits::Geometry Geometry
    Definition intersection.hh:274
    \n-
    OutsideGridView::Traits::template Codim< 0 >::Entity OutsideEntity
    Definition intersection.hh:278
    \n-
    OutsideEntity outside(unsigned int parentId=0) const
    Return element on the outside of this intersection.
    Definition intersection.hh:324
    \n-
    const Geometry & geometry() const
    Geometric information about this intersection as part of the inside grid.
    Definition intersection.hh:356
    \n-
    Traits::InsideLocalGeometry InsideLocalGeometry
    Definition intersection.hh:268
    \n-
    GlobalCoordinate outerNormal(const LocalCoordinate &local) const
    Return an outer normal (length not necessarily 1)
    Definition intersection.hh:418
    \n-
    const OutsideGeometry & geometryOutside() const
    Geometric information about this intersection as part of the outside grid.
    Definition intersection.hh:367
    \n-
    Traits::OutsideGridView OutsideGridView
    Definition intersection.hh:270
    \n-
    GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
    Return an outer normal with the length of the integration element.
    Definition intersection.hh:457
    \n-
    Traits::InsideGridView InsideGridView
    Definition intersection.hh:267
    \n-
    const InsideLocalGeometry & geometryInInside(unsigned int parentId=0) const
    Geometric information about this intersection in local coordinates of the inside() element.
    Definition intersection.hh:338
    \n-
    GlobalCoordinate centerUnitOuterNormal() const
    Unit outer normal at the center of the intersection.
    Definition intersection.hh:466
    \n-
    static constexpr auto coorddim
    dimension of the world space of the intersection
    Definition intersection.hh:284
    \n-
    Definition intersection.hh:230
    \n-
    static constexpr int insidePatch
    Definition intersection.hh:245
    \n-
    Dune::FieldVector< ctype, mydim > LocalCoordinate
    Definition intersection.hh:249
    \n-
    static constexpr auto coorddim
    Definition intersection.hh:243
    \n-
    typename IntersectionData::template GridGeometry< outside > OutsideGeometry
    Definition intersection.hh:241
    \n-
    typename GridGlue::ctype ctype
    Definition intersection.hh:248
    \n-
    typename GridGlue::template GridView< outside > OutsideGridView
    Definition intersection.hh:235
    \n-
    Dune::FieldVector< ctype, coorddim > GlobalCoordinate
    Definition intersection.hh:250
    \n-
    typename IntersectionData::template GridLocalGeometry< outside > OutsideLocalGeometry
    Definition intersection.hh:238
    \n-
    typename GridGlue::template GridView< inside > InsideGridView
    Definition intersection.hh:234
    \n-
    typename IntersectionData::template GridGeometry< inside > Geometry
    Definition intersection.hh:240
    \n-
    typename IntersectionData::template GridLocalGeometry< inside > InsideLocalGeometry
    Definition intersection.hh:237
    \n-
    static constexpr int outsidePatch
    Definition intersection.hh:246
    \n-
    static constexpr auto mydim
    Definition intersection.hh:244
    \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,743 +1,88 @@\n dune-grid-glue\u00a02.10\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+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-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+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 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-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+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 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+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-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+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 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-192 gridWorldGeometry = glue.template patch().geometry(data.gridindices\n-[par]);\n-193\n-194 // world coordinates of the remote intersection corners\n-195 std::array::\n-dimensionworld>, nSimplexCorners> corners_global;\n-196\n-197 for (std::size_t i=0; i\n-_\b2_\b0_\b9 _\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-210 bool grid0local, bool grid1local)\n-211 : index_(mergeindex+offset)\n-212 {\n-213 // if an invalid index is given do not proceed!\n-214 // (happens when the parent GridGlue initializes the \"end\"-Intersection)\n-215 assert (0 <= mergeindex || mergeindex < glue.index__sz);\n-216\n-217 std::get<0>(sideData_).gridlocal = grid0local;\n-218 std::get<1>(sideData_).gridlocal = grid1local;\n-219\n-220 initializeGeometry<0>(glue, mergeindex);\n-221 initializeGeometry<1>(glue, mergeindex);\n-222 }\n-223\n-228 template\n-_\b2_\b2_\b9 struct _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bT_\br_\ba_\bi_\bt_\bs\n-230 {\n-_\b2_\b3_\b1 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_\b2 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-233\n-_\b2_\b3_\b4 using _\bI_\bn_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw = typename GridGlue::template GridView;\n-_\b2_\b3_\b5 using _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\br_\bi_\bd_\bV_\bi_\be_\bw = typename GridGlue::template GridView;\n-236\n-_\b2_\b3_\b7 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_\b3_\b8 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-239\n-_\b2_\b4_\b0 using _\bG_\be_\bo_\bm_\be_\bt_\br_\by = typename IntersectionData::template GridGeometry;\n-_\b2_\b4_\b1 using _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bG_\be_\bo_\bm_\be_\bt_\br_\by = typename IntersectionData::template\n-GridGeometry;\n-242\n-_\b2_\b4_\b3 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_\b4 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_\b5 static constexpr int _\bi_\bn_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh = inside;\n-_\b2_\b4_\b6 static constexpr int _\bo_\bu_\bt_\bs_\bi_\bd_\be_\bP_\ba_\bt_\bc_\bh = outside;\n-247\n-_\b2_\b4_\b8 using _\bc_\bt_\by_\bp_\be = typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\bt_\by_\bp_\be;\n-_\b2_\b4_\b9 using _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be = Dune::FieldVector;\n-_\b2_\b5_\b0 using _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be = Dune::FieldVector;\n-251 };\n-252\n-255 template\n-_\b2_\b5_\b6 class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-257 {\n-258\n-259 public:\n-260\n-_\b2_\b6_\b1 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-262\n-_\b2_\b6_\b3 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_\b4 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-265\n-266\n-_\b2_\b6_\b7 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_\b6_\b8 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-269\n-_\b2_\b7_\b0 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_\b1 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_\b2 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-273\n-_\b2_\b7_\b4 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_\b5 typedef typename _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bc_\bt_\by_\bp_\be _\bc_\bt_\by_\bp_\be;\n-276\n-_\b2_\b7_\b7 typedef typename InsideGridView::Traits::template Codim<0>::Entity\n-_\bI_\bn_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by;\n-_\b2_\b7_\b8 typedef typename OutsideGridView::Traits::template Codim<0>::Entity\n-_\bO_\bu_\bt_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by;\n-279\n-_\b2_\b8_\b0 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_\b1 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-282\n-_\b2_\b8_\b4 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-285\n-_\b2_\b8_\b7 static constexpr auto _\bm_\by_\bd_\bi_\bm = _\bT_\br_\ba_\bi_\bt_\bs_\b:_\b:_\bm_\by_\bd_\bi_\bm;\n-288\n-_\b2_\b9_\b0 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-291\n-_\b2_\b9_\b3 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-294\n-295 // typedef unsigned int IndexType;\n-296\n-297 private:\n-301 static constexpr int codimensionWorld = _\bc_\bo_\bo_\br_\bd_\bd_\bi_\bm - _\bm_\by_\bd_\bi_\bm;\n-302\n-303 public:\n-304 /* C O N S T R U C T O R S */\n-305\n-_\b3_\b0_\b7 _\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-308 glue_(glue), i_(i) {}\n-309\n-310 /* F U N C T I O N A L I T Y */\n-311\n-314 _\bI_\bn_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by\n-_\b3_\b1_\b5 _\bi_\bn_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n-316 {\n-317 assert(_\bs_\be_\bl_\bf());\n-318 return glue_->template patch().element(i_->template index(parentId));\n-319 }\n-320\n-323 _\bO_\bu_\bt_\bs_\bi_\bd_\be_\bE_\bn_\bt_\bi_\bt_\by\n-_\b3_\b2_\b4 _\bo_\bu_\bt_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n-325 {\n-326 assert(_\bn_\be_\bi_\bg_\bh_\bb_\bo_\br());\n-327 return glue_->template patch().element(i_->template index(parentId));\n-328 }\n-329\n-_\b3_\b3_\b1 bool _\bc_\bo_\bn_\bf_\bo_\br_\bm_\bi_\bn_\bg() const\n-332 {\n-333 throw Dune::NotImplemented();\n-334 }\n-335\n-_\b3_\b3_\b8 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-339 {\n-340 return i_->template localGeometry(parentId);\n-341 }\n-342\n-_\b3_\b4_\b5 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-346 {\n-347 return i_->template localGeometry(parentId);\n-348 }\n-349\n-_\b3_\b5_\b6 const _\bG_\be_\bo_\bm_\be_\bt_\br_\by& _\bg_\be_\bo_\bm_\be_\bt_\br_\by() const\n-357 {\n-358 return i_->template geometry();\n-359 }\n-360\n-_\b3_\b6_\b7 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-368 {\n-369 return i_->template geometry();\n-370 }\n-371\n-_\b3_\b7_\b3 Dune::GeometryType _\bt_\by_\bp_\be() const\n-374 {\n-375 #ifdef ONLY_SIMPLEX_INTERSECTIONS\n-376 return Dune::GeometryTypes::simplex(_\bm_\by_\bd_\bi_\bm);\n-377 #else\n-378 #error Not Implemented\n-379 #endif\n-380 }\n-381\n-382\n-_\b3_\b8_\b4 bool _\bs_\be_\bl_\bf() const\n-385 {\n-386 return i_->template local();\n-387 }\n-388\n-_\b3_\b9_\b0 size_t _\bn_\be_\bi_\bg_\bh_\bb_\bo_\br(unsigned int g = 0) const\n-391 {\n-392 if (g == 0 && i_->template local()) {\n-393 return i_->template parents();\n-394 } else if (g == 1 && i_->template local()) {\n-395 return i_->template parents();\n-396 }\n-397 return 0;\n-398 }\n-399\n-_\b4_\b0_\b1 int _\bi_\bn_\bd_\be_\bx_\bI_\bn_\bI_\bn_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n-402 {\n-403 assert(_\bs_\be_\bl_\bf());\n-404 return glue_->template patch().indexInInside(i_->template index\n-(parentId));\n-405 }\n-406\n-_\b4_\b0_\b8 int _\bi_\bn_\bd_\be_\bx_\bI_\bn_\bO_\bu_\bt_\bs_\bi_\bd_\be(unsigned int parentId = 0) const\n-409 {\n-410 assert(_\bn_\be_\bi_\bg_\bh_\bb_\bo_\br());\n-411 return glue_->template patch().indexInInside(i_->template index\n-(parentId));\n-412 }\n-413\n-_\b4_\b1_\b8 _\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-419 {\n-420 _\bG_\bl_\bo_\bb_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be normal;\n-421\n-422 if (codimensionWorld == 0)\n-423 DUNE_THROW(Dune::Exception, \"There is no normal vector to a full-\n-dimensional intersection\");\n-424 else if (codimensionWorld == 1) {\n-425 /* TODO: Implement the general n-ary cross product here */\n-426 const auto jacobianTransposed = _\bg_\be_\bo_\bm_\be_\bt_\br_\by().jacobianTransposed(local);\n-427 if (_\bm_\by_\bd_\bi_\bm==1) {\n-428 normal[0] = - jacobianTransposed[0][1];\n-429 normal[1] = jacobianTransposed[0][0];\n-430 } else if (_\bm_\by_\bd_\bi_\bm==2) {\n-431 normal[0] = (jacobianTransposed[0][1] * jacobianTransposed[1][2] -\n-jacobianTransposed[0][2] * jacobianTransposed[1][1]);\n-432 normal[1] = - (jacobianTransposed[0][0] * jacobianTransposed[1][2] -\n-jacobianTransposed[0][2] * jacobianTransposed[1][0]);\n-433 normal[2] = (jacobianTransposed[0][0] * jacobianTransposed[1][1] -\n-jacobianTransposed[0][1] * jacobianTransposed[1][0]);\n-434 } else\n-435 DUNE_THROW(Dune::NotImplemented, \"Remote intersections don't implement the\n-'outerNormal' method for \" << _\bm_\by_\bd_\bi_\bm << \"-dimensional intersections yet\");\n-436 } else\n-437 DUNE_THROW(Dune::NotImplemented, \"Remote intersections don't implement the\n-'outerNormal' method for intersections with codim >= 2 yet\");\n-438\n-439 return normal;\n-440 }\n-441\n-_\b4_\b4_\b6 _\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-447 {\n-448 _\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-449 normal /= normal.two_norm();\n-450 return normal;\n-451 }\n-452\n-_\b4_\b5_\b7 _\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-458 {\n-459 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-460 }\n-461\n-_\b4_\b6_\b6 _\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-467 {\n-468 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-469 }\n-470\n-_\b4_\b7_\b4 _\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-475 {\n-476 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-477 }\n-478\n-479#ifdef QUICKHACK_INDEX\n-480 typedef typename _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be IndexType;\n-481\n-482 IndexType index() const\n-483 {\n-484 return i_->_\bi_\bn_\bd_\be_\bx_\b_;\n-485 }\n-486\n-487#endif\n-488\n-489 private:\n-490\n-491 friend class IntersectionIndexSet;\n-492\n-493 /* M E M B E R V A R I A B L E S */\n-494\n-496 const _\bG_\br_\bi_\bd_\bG_\bl_\bu_\be* glue_;\n-497\n-499 const _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bD_\ba_\bt_\ba* i_;\n-500 };\n-501\n-502\n-503 } // end namespace GridGlue\n-504} // end namespace Dune\n-505\n-506#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+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:_\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:257\n-_\bD_\bu_\bn_\be_\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: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:_\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:474\n-_\bD_\bu_\bn_\be_\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:331\n-_\bD_\bu_\bn_\be_\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:277\n-_\bD_\bu_\bn_\be_\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:263\n-_\bD_\bu_\bn_\be_\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:408\n-_\bD_\bu_\bn_\be_\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:401\n-_\bD_\bu_\bn_\be_\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:384\n-_\bD_\bu_\bn_\be_\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:287\n-_\bD_\bu_\bn_\be_\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:293\n-_\bD_\bu_\bn_\be_\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:373\n-_\bD_\bu_\bn_\be_\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:315\n-_\bD_\bu_\bn_\be_\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:280\n-_\bD_\bu_\bn_\be_\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:345\n-_\bD_\bu_\bn_\be_\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:446\n-_\bD_\bu_\bn_\be_\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: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:_\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: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:_\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:264\n-_\bD_\bu_\bn_\be_\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: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:_\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: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:_\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:390\n-_\bD_\bu_\bn_\be_\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:307\n-_\bD_\bu_\bn_\be_\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:290\n-_\bD_\bu_\bn_\be_\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: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:_\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: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\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:324\n-_\bD_\bu_\bn_\be_\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:356\n-_\bD_\bu_\bn_\be_\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: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:_\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:418\n-_\bD_\bu_\bn_\be_\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:367\n-_\bD_\bu_\bn_\be_\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:270\n-_\bD_\bu_\bn_\be_\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:457\n-_\bD_\bu_\bn_\be_\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: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:_\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:338\n-_\bD_\bu_\bn_\be_\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: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:_\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: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_\bT_\br_\ba_\bi_\bt_\bs\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn intersection.hh:230\n-_\bD_\bu_\bn_\be_\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: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:_\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: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:_\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:243\n-_\bD_\bu_\bn_\be_\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: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:_\bc_\bt_\by_\bp_\be\n-typename GridGlue::ctype ctype\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:_\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:235\n-_\bD_\bu_\bn_\be_\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: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:_\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: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:_\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: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:_\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:240\n-_\bD_\bu_\bn_\be_\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:237\n-_\bD_\bu_\bn_\be_\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:246\n-_\bD_\bu_\bn_\be_\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:244\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/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_impl.hh File Reference\n+dune-grid-glue: projectionwriter_impl.hh File Reference\n \n \n \n \n \n \n \n@@ -72,47 +72,59 @@\n
  • dune
  • grid-glue
  • common
  • \n
    \n \n
    \n \n-
    projection_impl.hh File Reference
    \n+
    projectionwriter_impl.hh File Reference
    \n
    \n
    \n-
    #include <dune/common/fmatrix.hh>
    \n-#include <cmath>
    \n+
    #include <fstream>
    \n
    \n

    Go to the source code of this file.

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

    \n Namespaces

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

    \n Functions

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

    Go to the source code of this file.

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

    \n Namespaces

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

    \n Functions

    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::write (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, std::ostream &out)
     write projection in VTK format
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::write (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, const std::string &filename)
     write projection in VTK format
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::print (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals)
     Print information about the projection to std::cout stream.
     
    template<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,36 +2,31 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-projectionwriter.hh File Reference\n-#include \n+areawriter.hh File Reference\n+#include \n #include \n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n-#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n+#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 F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs\n-template\n-void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n- Corners &corners, const Normals &normals, std::ostream &out)\n-\u00a0 write projection in VTK format\n+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 (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n- Corners &corners, const Normals &normals, const std::string &filename)\n-\u00a0 write projection in VTK format\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk (const Glue &glue, 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:_\bp_\br_\bi_\bn_\bt (const _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn< Coordinate > &projection, const\n- Corners &corners, const Normals &normals)\n-\u00a0 Print information about the projection to std::cout stream.\n+template\n+void\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\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/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: projectionwriter.hh Source File\n+dune-grid-glue: areawriter.hh Source File\n \n \n \n \n \n \n \n@@ -74,57 +74,47 @@\n \n \n
    \n
    \n-
    projectionwriter.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#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH
    \n-
    4#define DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH
    \n+
    3#ifndef DUNE_GRIDGLUE_COMMON_AREAWRITER_HH
    \n+
    4#define DUNE_GRIDGLUE_COMMON_AREAWRITER_HH
    \n
    5
    \n-
    6#include <iostream>
    \n+
    6#include <ostream>
    \n
    7#include <string>
    \n
    8
    \n-\n-
    10
    \n-
    11namespace Dune {
    \n-
    12namespace GridGlue {
    \n-
    13
    \n-
    28template<typename Coordinate, typename Corners, typename Normals>
    \n-
    29void write(const Projection<Coordinate>& projection,
    \n-
    30 const Corners& corners,
    \n-
    31 const Normals& normals,
    \n-
    32 std::ostream& out);
    \n-
    33
    \n-
    40template<typename Coordinate, typename Corners, typename Normals>
    \n-
    41void write(const Projection<Coordinate>& projection,
    \n-
    42 const Corners& corners,
    \n-
    43 const Normals& normals,
    \n-
    44 const std::string& filename);
    \n-
    54template<typename Coordinate, typename Corners, typename Normals>
    \n-
    55void print(const Projection<Coordinate>& projection,
    \n-
    56 const Corners& corners,
    \n-
    57 const Normals& normals);
    \n-
    58
    \n-
    59} /* namespace GridGlue */
    \n-
    60} /* namespace Dune */
    \n-
    61
    \n-\n-
    63
    \n-
    64#endif
    \n-\n-\n+
    9namespace Dune {
    \n+
    10namespace GridGlue {
    \n+
    11
    \n+
    12template<int side, typename Glue>
    \n+
    13void write_glue_area_vtk(const Glue& glue, std::ostream& out);
    \n+
    14
    \n+
    15template<int side, typename Glue>
    \n+
    16void write_glue_area_vtk(const Glue& glue, const std::string& filename);
    \n+
    17
    \n+
    37template<typename Glue>
    \n+
    38void write_glue_areas_vtk(const Glue& glue, const std::string& base);
    \n+
    39
    \n+
    40} /* namespace GridGlue */
    \n+
    41} /* namespace Dune */
    \n+
    42
    \n+
    43#include "areawriter_impl.hh"
    \n+
    44
    \n+
    45#endif
    \n+\n
    Definition gridglue.hh:37
    \n-
    void write(const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, std::ostream &out)
    write projection in VTK format
    Definition projectionwriter_impl.hh:86
    \n-
    void print(const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals)
    Print information about the projection to std::cout stream.
    Definition projectionwriter_impl.hh:140
    \n+
    void write_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,62 +1,48 @@\n dune-grid-glue\u00a02.10\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-projectionwriter.hh\n+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#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH\n-4#define DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH\n+3#ifndef DUNE_GRIDGLUE_COMMON_AREAWRITER_HH\n+4#define DUNE_GRIDGLUE_COMMON_AREAWRITER_HH\n 5\n-6#include \n+6#include \n 7#include \n 8\n-9#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n-10\n-11namespace _\bD_\bu_\bn_\be {\n-12namespace GridGlue {\n-13\n-28template\n-29void _\bw_\br_\bi_\bt_\be(const Projection& projection,\n-30 const Corners& corners,\n-31 const Normals& normals,\n-32 std::ostream& out);\n-33\n-40template\n-41void _\bw_\br_\bi_\bt_\be(const Projection& projection,\n-42 const Corners& corners,\n-43 const Normals& normals,\n-44 const std::string& filename);\n-54template\n-55void _\bp_\br_\bi_\bn_\bt(const Projection& projection,\n-56 const Corners& corners,\n-57 const Normals& normals);\n-58\n-59} /* namespace GridGlue */\n-60} /* namespace Dune */\n-61\n-62#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n-63\n-64#endif\n-_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\n-_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n+9namespace _\bD_\bu_\bn_\be {\n+10namespace GridGlue {\n+11\n+12template\n+13void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk(const Glue& glue, std::ostream& out);\n+14\n+15template\n+16void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk(const Glue& glue, const std::string& filename);\n+17\n+37template\n+38void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\bs_\b__\bv_\bt_\bk(const Glue& glue, const std::string& base);\n+39\n+40} /* namespace GridGlue */\n+41} /* namespace Dune */\n+42\n+43#include \"_\ba_\br_\be_\ba_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n+44\n+45#endif\n+_\ba_\br_\be_\ba_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be\n-void write(const Projection< Coordinate > &projection, const Corners &corners,\n-const Normals &normals, std::ostream &out)\n-write projection in VTK format\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:86\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt\n-void print(const Projection< Coordinate > &projection, const Corners &corners,\n-const Normals &normals)\n-Print information about the projection to std::cout stream.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:140\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\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/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: ringcomm.hh File Reference\n \n \n \n \n \n \n \n@@ -71,43 +71,77 @@\n \n \n \n
    \n \n-
    areawriter.hh File Reference
    \n+
    ringcomm.hh File Reference
    \n
    \n
    \n-
    #include <ostream>
    \n-#include <string>
    \n-#include "areawriter_impl.hh"
    \n+
    #include <mpi.h>
    \n+#include <functional>
    \n+#include <utility>
    \n+#include <dune/common/fvector.hh>
    \n+#include <dune/common/hybridutilities.hh>
    \n+#include <dune/geometry/type.hh>
    \n
    \n

    Go to the source code of this file.

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

    \n Namespaces

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

    \n+Macros

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

    \n Namespaces

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

    template<class T , int dim>
    static Dune::FieldVector< T, dim > Dune::GridGlue::crossProduct (const Dune::FieldVector< T, dim > &a, const Dune::FieldVector< T, dim > &b)
     compute cross product
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,24 +1,28 @@\n dune-grid-glue\u00a02.10\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-crossproduct.hh File Reference\n+_\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-static Dune::FieldVector< T, dim >\u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt (const Dune::\n- FieldVector< T, dim > &a, const Dune::\n- FieldVector< T, dim > &b)\n-\u00a0 compute cross product\n-\u00a0\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/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: crossproduct.hh Source File\n+dune-grid-glue: projection.hh Source File\n \n \n \n \n \n \n \n@@ -74,48 +74,137 @@\n \n \n \n
    \n-
    crossproduct.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_CROSSPRODUCT_HH
    \n-
    4#define DUNE_GRIDGLUE_COMMON_CROSSPRODUCT_HH 1
    \n+
    3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH
    \n+
    4#define DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH
    \n
    5
    \n-
    6namespace Dune {
    \n-
    7namespace GridGlue {
    \n-
    8
    \n-
    14template <class T, int dim>
    \n-
    \n-
    15static Dune::FieldVector<T,dim> crossProduct(const Dune::FieldVector<T,dim>& a,
    \n-
    16 const Dune::FieldVector<T,dim>& b)
    \n-
    17{
    \n-
    18 if (dim!=3)
    \n-
    19 DUNE_THROW(Dune::NotImplemented, "crossProduct does not work for dimension " << dim);
    \n-
    20
    \n-
    21 Dune::FieldVector<T,dim> c;
    \n-
    22 c[0] = a[1]*b[2] - a[2]*b[1];
    \n-
    23 c[1] = a[2]*b[0] - a[0]*b[2];
    \n-
    24 c[2] = a[0]*b[1] - a[1]*b[0];
    \n-
    25
    \n-
    26 return c;
    \n-
    27}
    \n-
    \n-
    28
    \n-
    29} /* namespace GridGlue */
    \n-
    30} /* namespace Dune */
    \n-
    31
    \n-
    32#endif
    \n+
    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-
    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+
    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,49 +1,175 @@\n dune-grid-glue\u00a02.10\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bc_\bo_\bm_\bm_\bo_\bn\n-crossproduct.hh\n+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_CROSSPRODUCT_HH\n-4#define DUNE_GRIDGLUE_COMMON_CROSSPRODUCT_HH 1\n+3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH\n+4#define DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH\n 5\n-6namespace _\bD_\bu_\bn_\be {\n-7namespace GridGlue {\n-8\n-14template \n-_\b1_\b5static Dune::FieldVector _\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt(const Dune::FieldVector&\n-a,\n-16 const Dune::FieldVector& b)\n-17{\n-18 if (dim!=3)\n-19 DUNE_THROW(Dune::NotImplemented, \"crossProduct does not work for dimension \"\n-<< dim);\n-20\n-21 Dune::FieldVector c;\n-22 c[0] = a[1]*b[2] - a[2]*b[1];\n-23 c[1] = a[2]*b[0] - a[0]*b[2];\n-24 c[2] = a[0]*b[1] - a[1]*b[0];\n-25\n-26 return c;\n-27}\n-28\n-29} /* namespace GridGlue */\n-30} /* namespace Dune */\n-31\n-32#endif\n+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:_\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\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/a00044.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: ringcomm.hh File Reference\n+dune-grid-glue: areawriter_impl.hh File Reference\n \n \n \n \n \n \n \n@@ -70,78 +70,57 @@\n \n \n
    \n \n-
    ringcomm.hh File Reference
    \n+
    areawriter_impl.hh File Reference
    \n
    \n
    \n-
    #include <mpi.h>
    \n-#include <functional>
    \n-#include <utility>
    \n+
    #include <fstream>
    \n+#include <vector>
    \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::Parallel
    namespace  Dune::GridGlue
     
    namespace  Dune::GridGlue::AreaWriterImplementation
     
    \n-\n-\n-\n

    \n-Macros

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

    \n Functions

    template<typename OP , typename... Args>
    void Dune::Parallel::MPI_AllApply (MPI_Comm mpicomm, OP &&op, const Args &... data)
     apply an operator locally to a difstributed data set
     
    template<typename 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-

    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,43 @@\n dune-grid-glue\u00a02.10\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+_\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+#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:_\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:_\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:_\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:_\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/a00044_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00044_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: ringcomm.hh Source File\n+dune-grid-glue: areawriter_impl.hh Source File\n \n \n \n \n \n \n \n@@ -74,309 +74,183 @@\n \n \n
    \n
    \n-
    ringcomm.hh
    \n+
    areawriter_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#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-
    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+
    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-
    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 actual 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+
    24template<typename GridView>
    \n+
    \n+
    25void write_facet_geometry(const GridView& gv, std::ostream& out)
    \n+
    26{
    \n+
    27 using Coordinate = Dune::FieldVector<double, 3>;
    \n+
    28
    \n+
    29 std::vector<Coordinate> corners;
    \n+
    30 for (const auto& facet : facets(gv)) {
    \n+
    31 const auto geometry = facet.geometry();
    \n+
    32 for (int i = 0; i < geometry.corners(); ++i) {
    \n+
    33 /* VTK always needs 3-dim coordinates... */
    \n+
    34 const auto c0 = geometry.corner(i);
    \n+
    35 Coordinate c1;
    \n+
    36 for (int d = 0; d < GridView::dimensionworld; ++d)
    \n+
    37 c1[d] = c0[d];
    \n+
    38 for (int d = GridView::dimensionworld; d < Coordinate::dimension; ++d)
    \n+
    39 c1[d] = double(0);
    \n+
    40 corners.push_back(c1);
    \n+
    41 }
    \n+
    42 }
    \n+
    43
    \n+
    44 {
    \n+
    45 out << "DATASET UNSTRUCTURED_GRID\\n"
    \n+
    46 << "POINTS " << corners.size() << " double\\n";
    \n+
    47 for (const auto& c : corners)
    \n+
    48 out << c << "\\n";
    \n+
    49 }
    \n+
    50 {
    \n+
    51 out << "CELLS " << gv.size(1) << " " << (gv.size(1) + corners.size()) << "\\n";
    \n+
    52 std::size_t c = 0;
    \n+
    53 for (const auto& facet : facets(gv)) {
    \n+
    54 const auto geometry = facet.geometry();
    \n+
    55 out << geometry.corners();
    \n+
    56 for (int i = 0; i < geometry.corners(); ++i, ++c)
    \n+
    57 out << " " << c;
    \n+
    58 out << "\\n";
    \n+
    59 }
    \n+
    60 }
    \n+
    61 {
    \n+
    62 out << "CELL_TYPES " << gv.size(1) << "\\n";
    \n+
    63 for (const auto& facet : facets(gv)) {
    \n+
    64 const auto type = facet.type();
    \n+
    65 if (type.isVertex())
    \n+
    66 out << "1\\n";
    \n+
    67 else if (type.isLine())
    \n+
    68 out << "2\\n";
    \n+
    69 else if (type.isTriangle())
    \n+
    70 out << "5\\n";
    \n+
    71 else if (type.isQuadrilateral())
    \n+
    72 out << "9\\n";
    \n+
    73 else if (type.isTetrahedron())
    \n+
    74 out << "10\\n";
    \n+
    75 else
    \n+
    76 DUNE_THROW(Dune::Exception, "Unhandled geometry type");
    \n+
    77 }
    \n+
    78 }
    \n+
    79}
    \n+
    \n+
    80
    \n+
    81} /* namespace AreaWriterImplementation */
    \n+
    \n+
    82
    \n+
    83template<int side, typename Glue>
    \n+
    \n+
    84void write_glue_area_vtk(const Glue& glue, std::ostream& out)
    \n+
    85{
    \n+
    86 using GridView = typename std::decay< decltype(glue.template gridView<side>()) >::type;
    \n+
    87 using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, AreaWriterImplementation::FacetLayout>;
    \n+
    88 using ctype = typename GridView::ctype;
    \n+
    89
    \n+
    90 const GridView gv = glue.template gridView<side>();
    \n+
    91 Mapper mapper(gv);
    \n+
    92 std::vector<ctype> coveredArea(mapper.size(), ctype(0));
    \n+
    93 std::vector<ctype> totalArea(mapper.size(), ctype(1));
    \n+
    94
    \n+
    95 for (const auto& in : intersections(glue, Reverse<side == 1>())) {
    \n+
    96 const auto element = in.inside();
    \n+
    97 const auto index = mapper.subIndex(element, in.indexInInside(), 1);
    \n+
    98 coveredArea[index] += in.geometryInInside().volume();
    \n+
    99
    \n+
    100 const auto& refElement = Dune::ReferenceElements<ctype, GridView::dimension>::general(element.type());
    \n+
    101 const auto& subGeometry = refElement.template geometry<1>(in.indexInInside());
    \n+
    102 totalArea[index] = subGeometry.volume();
    \n+
    103 }
    \n+
    104
    \n+
    105 for (std::size_t i = 0; i < coveredArea.size(); ++i)
    \n+
    106 coveredArea[i] /= totalArea[i];
    \n+
    107
    \n+
    108 out << "# vtk DataFile Version 2.0\\n"
    \n+
    109 << "Filename: Glue Area\\n"
    \n+
    110 << "ASCII\\n";
    \n+
    111
    \n+\n+
    113
    \n+
    114 out << "CELL_DATA " << coveredArea.size() << "\\n"
    \n+
    115 << "SCALARS CoveredArea double 1\\n"
    \n+
    116 << "LOOKUP_TABLE default\\n";
    \n+
    117 for (const auto& value : coveredArea)
    \n+
    118 out << value << "\\n";
    \n+
    119}
    \n+
    \n
    120
    \n-
    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+
    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-
    308
    \n-
    309} // end namespace Parallel
    \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-
    310} // end namespace Dune
    \n+
    142
    \n+
    143} /* namespace GridGlue */
    \n+
    144} /* 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_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,308 +1,184 @@\n dune-grid-glue\u00a02.10\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+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// -*- 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#include \n+5\n+6#include \n+7#include \n+8#include \n 9\n-10#include \n-11#include \n-12#include \n-13\n-14#include \n-15#include \n-16\n-17#include \n-18\n-19namespace _\bD_\bu_\bn_\be {\n-_\b2_\b0namespace Parallel {\n-21\n-22 namespace Impl {\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-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+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 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+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-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 actual 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+79}\n+80\n+81} /* namespace AreaWriterImplementation */\n+82\n+83template\n+_\b8_\b4void _\bw_\br_\bi_\bt_\be_\b__\bg_\bl_\bu_\be_\b__\ba_\br_\be_\ba_\b__\bv_\bt_\bk(const Glue& glue, std::ostream& out)\n+85{\n+86 using GridView = typename std::decay< decltype(glue.template gridView\n+()) >::type;\n+87 using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper;\n+88 using ctype = typename GridView::ctype;\n+89\n+90 const GridView gv = glue.template gridView();\n+91 Mapper mapper(gv);\n+92 std::vector coveredArea(mapper.size(), ctype(0));\n+93 std::vector totalArea(mapper.size(), ctype(1));\n+94\n+95 for (const auto& in : _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(glue, _\bR_\be_\bv_\be_\br_\bs_\be_\b<_\bs_\bi_\bd_\be_\b _\b=_\b=_\b _\b1_\b>())) {\n+96 const auto element = in.inside();\n+97 const auto index = mapper.subIndex(element, in.indexInInside(), 1);\n+98 coveredArea[index] += in.geometryInInside().volume();\n+99\n+100 const auto& refElement = Dune::ReferenceElements::general(element.type());\n+101 const auto& subGeometry = refElement.template geometry<1>(in.indexInInside\n+());\n+102 totalArea[index] = subGeometry.volume();\n+103 }\n+104\n+105 for (std::size_t i = 0; i < coveredArea.size(); ++i)\n+106 coveredArea[i] /= totalArea[i];\n+107\n+108 out << \"# vtk DataFile Version 2.0\\n\"\n+109 << \"Filename: Glue Area\\n\"\n+110 << \"ASCII\\n\";\n+111\n+112 _\bA_\br_\be_\ba_\bW_\br_\bi_\bt_\be_\br_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bw_\br_\bi_\bt_\be_\b__\bf_\ba_\bc_\be_\bt_\b__\bg_\be_\bo_\bm_\be_\bt_\br_\by(gv, out);\n+113\n+114 out << \"CELL_DATA \" << coveredArea.size() << \"\\n\"\n+115 << \"SCALARS CoveredArea double 1\\n\"\n+116 << \"LOOKUP_TABLE default\\n\";\n+117 for (const auto& value : coveredArea)\n+118 out << value << \"\\n\";\n+119}\n 120\n-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+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:_\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_\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/a00047.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: projection.hh File Reference\n+dune-grid-glue: projectionwriter.hh File Reference\n \n \n \n \n \n \n \n@@ -70,41 +70,47 @@\n \n
    \n
    \n \n-
    projection.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    projectionwriter.hh File Reference
    \n
    \n
    \n-
    #include <array>
    \n-#include <bitset>
    \n-#include <tuple>
    \n-#include "projection_impl.hh"
    \n+
    #include <iostream>
    \n+#include <string>
    \n+#include <dune/grid-glue/common/projection.hh>
    \n+#include "projectionwriter_impl.hh"
    \n
    \n

    Go to the source code of this file.

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

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

    \n+Functions

    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::write (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, std::ostream &out)
     write projection in VTK format
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::write (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, const std::string &filename)
     write projection in VTK format
     
    template<typename Coordinate , typename Corners , typename Normals >
    void Dune::GridGlue::print (const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals)
     Print information about the projection to std::cout stream.
     
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,28 +1,37 @@\n dune-grid-glue\u00a02.10\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+projectionwriter.hh File Reference\n+#include \n+#include \n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-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 (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/a00047_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00047_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: projection.hh Source File\n+dune-grid-glue: projectionwriter.hh Source File\n \n \n \n \n \n \n \n@@ -74,137 +74,57 @@\n \n \n
    \n
    \n-
    projection.hh
    \n+
    projectionwriter.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH
    \n-
    4#define DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH
    \n+
    3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH
    \n+
    4#define DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH
    \n
    5
    \n-
    6#include <array>
    \n-
    7#include <bitset>
    \n-
    8#include <tuple>
    \n-
    9
    \n-
    10namespace Dune {
    \n-
    11namespace GridGlue {
    \n-
    12
    \n-
    19template<typename Coordinate>
    \n-
    \n-\n-
    21{
    \n-
    22public:
    \n-
    \n-\n-
    29 {
    \n-
    33 std::array<unsigned, 2> edge;
    \n-
    34
    \n-
    41 std::array<Coordinate, 2> local;
    \n-
    42 };
    \n-
    \n-
    43
    \n-
    47 constexpr static unsigned dim = Coordinate::dimension;
    \n-
    48
    \n-
    54 constexpr static unsigned maxEdgeIntersections = dim == 3 ? 9 : 0;
    \n-
    55
    \n-
    56 static_assert(dim == 2 || dim == 3, "Projection only implemented for dim=2 or dim=3");
    \n-
    57
    \n-
    61 typedef typename Coordinate::field_type Field;
    \n-
    62
    \n-
    70 typedef std::array<Coordinate, dim> Images;
    \n-
    71
    \n-\n-
    79
    \n-
    80private:
    \n-
    84 const Field m_overlap;
    \n-
    85
    \n-
    94 const Field m_max_normal_product;
    \n-
    95
    \n-
    101 Field m_epsilon = Field(1e-12);
    \n-
    102
    \n-
    104 std::tuple<Images, Preimages> m_images;
    \n-
    105
    \n-
    107 std::tuple<std::bitset<dim>, std::bitset<dim> > m_success;
    \n-
    108
    \n-
    110 unsigned m_number_of_edge_intersections;
    \n-
    111
    \n-
    113 std::array<EdgeIntersection, maxEdgeIntersections> m_edge_intersections;
    \n-
    114
    \n-
    126 bool m_projection_valid;
    \n-
    127
    \n-
    133 template<typename Corners, typename Normals>
    \n-
    134 void doProjection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals);
    \n-
    135
    \n-
    144 template<typename Corners, typename Normals>
    \n-
    145 void doInverseProjection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals);
    \n-
    146
    \n-
    155 template<typename Corners, typename Normals>
    \n-
    156 void doEdgeIntersection(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals);
    \n-
    157
    \n-
    183 template<typename Corners, typename Normals>
    \n-
    184 inline bool projectionFeasible(const Coordinate& x, const Coordinate& nx, const Coordinate& px, const Corners& corners, const Normals& normals) const;
    \n-
    185
    \n-
    186public:
    \n-
    191 Projection(const Field overlap = Field(0), const Field max_normal_product = Field(-0.1));
    \n-
    192
    \n-
    198 void epsilon(const Field epsilon);
    \n-
    199
    \n-
    212 template<typename Corners, typename Normals>
    \n-
    213 void project(const std::tuple<Corners&, Corners&>& corners, const std::tuple<Normals&, Normals&>& normals);
    \n-
    214
    \n-
    \n-
    235 const std::tuple<Images, Preimages>& images() const
    \n-
    236 { return m_images; }
    \n-
    \n-
    237
    \n-
    \n-
    252 const std::tuple<std::bitset<dim>, std::bitset<dim> >& success() const
    \n-
    253 { return m_success; }
    \n-
    \n-
    254
    \n-
    \n-\n-
    263 { return m_number_of_edge_intersections; }
    \n-
    \n-
    264
    \n-
    \n-
    273 const std::array<EdgeIntersection, maxEdgeIntersections>& edgeIntersections() const
    \n-
    274 { return m_edge_intersections; }
    \n-
    \n-
    275};
    \n-
    \n-
    276
    \n-
    277} /* namespace GridGlue */
    \n-
    278} /* namespace Dune */
    \n-
    279
    \n-
    280#include "projection_impl.hh"
    \n-
    281
    \n-
    282#endif
    \n-\n+
    6#include <iostream>
    \n+
    7#include <string>
    \n+
    8
    \n+\n+
    10
    \n+
    11namespace Dune {
    \n+
    12namespace GridGlue {
    \n+
    13
    \n+
    28template<typename Coordinate, typename Corners, typename Normals>
    \n+
    29void write(const Projection<Coordinate>& projection,
    \n+
    30 const Corners& corners,
    \n+
    31 const Normals& normals,
    \n+
    32 std::ostream& out);
    \n+
    33
    \n+
    40template<typename Coordinate, typename Corners, typename Normals>
    \n+
    41void write(const Projection<Coordinate>& projection,
    \n+
    42 const Corners& corners,
    \n+
    43 const Normals& normals,
    \n+
    44 const std::string& filename);
    \n+
    54template<typename Coordinate, typename Corners, typename Normals>
    \n+
    55void print(const Projection<Coordinate>& projection,
    \n+
    56 const Corners& corners,
    \n+
    57 const Normals& normals);
    \n+
    58
    \n+
    59} /* namespace GridGlue */
    \n+
    60} /* namespace Dune */
    \n+
    61
    \n+\n+
    63
    \n+
    64#endif
    \n+\n+\n
    Definition gridglue.hh:37
    \n-
    Projection of a line (triangle) on another line (triangle).
    Definition projection.hh:21
    \n-
    Coordinate::field_type Field
    Scalar type.
    Definition projection.hh:61
    \n-
    const std::tuple< std::bitset< dim >, std::bitset< dim > > & success() const
    Indicate whether projection (inverse projection) is valid for each corner or not.
    Definition projection.hh:252
    \n-
    static constexpr unsigned maxEdgeIntersections
    maximum number of edge-edge intersections
    Definition projection.hh:54
    \n-
    Images Preimages
    Definition projection.hh:78
    \n-
    std::array< Coordinate, dim > Images
    List of corner images.
    Definition projection.hh:70
    \n-
    void epsilon(const Field epsilon)
    Set epsilon used for floating-point comparisons.
    Definition projection_impl.hh:140
    \n-
    void project(const std::tuple< Corners &, Corners & > &corners, const std::tuple< Normals &, Normals & > &normals)
    Do the actual projection.
    Definition projection_impl.hh:469
    \n-
    static constexpr unsigned dim
    dimension of coordinates
    Definition projection.hh:47
    \n-
    unsigned numberOfEdgeIntersections() const
    Number of edge intersections.
    Definition projection.hh:262
    \n-
    const std::tuple< Images, Preimages > & images() const
    Images and preimages of corners.
    Definition projection.hh:235
    \n-
    const std::array< EdgeIntersection, maxEdgeIntersections > & edgeIntersections() const
    Edge-edge intersections.
    Definition projection.hh:273
    \n-
    Intersection between two edges of a triangle.
    Definition projection.hh:29
    \n-
    std::array< Coordinate, 2 > local
    Local coordinates of intersection and distance along normals.
    Definition projection.hh:41
    \n-
    std::array< unsigned, 2 > edge
    Edge numbers in image and preimage triangle.
    Definition projection.hh:33
    \n+
    void write(const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals, std::ostream &out)
    write projection in VTK format
    Definition projectionwriter_impl.hh:86
    \n+
    void print(const Projection< Coordinate > &projection, const Corners &corners, const Normals &normals)
    Print information about the projection to std::cout stream.
    Definition projectionwriter_impl.hh:140
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,175 +1,62 @@\n dune-grid-glue\u00a02.10\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+projectionwriter.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH\n-4#define DUNE_GRIDGLUE_COMMON_PROJECTIONHELPER2_HH\n+3#ifndef DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH\n+4#define DUNE_GRIDGLUE_COMMON_PROJECTIONWRITER_HH\n 5\n-6#include \n-7#include \n-8#include \n-9\n-10namespace _\bD_\bu_\bn_\be {\n-11namespace GridGlue {\n-12\n-19template\n-_\b2_\b0class _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn\n-21{\n-22public:\n-_\b2_\b8 struct _\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-29 {\n-_\b3_\b3 std::array _\be_\bd_\bg_\be;\n-34\n-_\b4_\b1 std::array _\bl_\bo_\bc_\ba_\bl;\n-42 };\n-43\n-_\b4_\b7 constexpr static unsigned _\bd_\bi_\bm = Coordinate::dimension;\n-48\n-_\b5_\b4 constexpr static unsigned _\bm_\ba_\bx_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs = _\bd_\bi_\bm == 3 ? 9 : 0;\n-55\n-56 static_assert(_\bd_\bi_\bm == 2 || _\bd_\bi_\bm == 3, \"Projection only implemented for dim=2\n-or dim=3\");\n-57\n-_\b6_\b1 typedef typename Coordinate::field_type _\bF_\bi_\be_\bl_\bd;\n-62\n-_\b7_\b0 typedef std::array _\bI_\bm_\ba_\bg_\be_\bs;\n-71\n-_\b7_\b8 typedef _\bI_\bm_\ba_\bg_\be_\bs _\bP_\br_\be_\bi_\bm_\ba_\bg_\be_\bs;\n-79\n-80private:\n-84 const _\bF_\bi_\be_\bl_\bd m_overlap;\n-85\n-94 const _\bF_\bi_\be_\bl_\bd m_max_normal_product;\n-95\n-101 _\bF_\bi_\be_\bl_\bd m_epsilon = _\bF_\bi_\be_\bl_\bd(1e-12);\n-102\n-104 std::tuple m_images;\n-105\n-107 std::tuple, std::bitset > m_success;\n-108\n-110 unsigned m_number_of_edge_intersections;\n-111\n-113 std::array m_edge_intersections;\n-114\n-126 bool m_projection_valid;\n-127\n-133 template\n-134 void doProjection(const std::tuple& corners, const\n-std::tuple& normals);\n-135\n-144 template\n-145 void doInverseProjection(const std::tuple& corners,\n-const std::tuple& normals);\n-146\n-155 template\n-156 void doEdgeIntersection(const std::tuple& corners,\n-const std::tuple& normals);\n-157\n-183 template\n-184 inline bool projectionFeasible(const Coordinate& x, const Coordinate& nx,\n-const Coordinate& px, const Corners& corners, const Normals& normals) const;\n-185\n-186public:\n-191 _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn(const _\bF_\bi_\be_\bl_\bd overlap = _\bF_\bi_\be_\bl_\bd(0), const _\bF_\bi_\be_\bl_\bd max_normal_product =\n-_\bF_\bi_\be_\bl_\bd(-0.1));\n-192\n-198 void _\be_\bp_\bs_\bi_\bl_\bo_\bn(const _\bF_\bi_\be_\bl_\bd _\be_\bp_\bs_\bi_\bl_\bo_\bn);\n-199\n-212 template\n-213 void _\bp_\br_\bo_\bj_\be_\bc_\bt(const std::tuple& corners, const std::\n-tuple& normals);\n-214\n-_\b2_\b3_\b5 const std::tuple& _\bi_\bm_\ba_\bg_\be_\bs() const\n-236 { return m_images; }\n-237\n-_\b2_\b5_\b2 const std::tuple, std::bitset >& _\bs_\bu_\bc_\bc_\be_\bs_\bs() const\n-253 { return m_success; }\n-254\n-_\b2_\b6_\b2 unsigned _\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs() const\n-263 { return m_number_of_edge_intersections; }\n-264\n-_\b2_\b7_\b3 const std::array& _\be_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-() const\n-274 { return m_edge_intersections; }\n-275};\n-276\n-277} /* namespace GridGlue */\n-278} /* namespace Dune */\n-279\n-280#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n-281\n-282#endif\n-_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\n+6#include \n+7#include \n+8\n+9#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bc_\bo_\bm_\bm_\bo_\bn_\b/_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n+10\n+11namespace _\bD_\bu_\bn_\be {\n+12namespace GridGlue {\n+13\n+28template\n+29void _\bw_\br_\bi_\bt_\be(const Projection& projection,\n+30 const Corners& corners,\n+31 const Normals& normals,\n+32 std::ostream& out);\n+33\n+40template\n+41void _\bw_\br_\bi_\bt_\be(const Projection& projection,\n+42 const Corners& corners,\n+43 const Normals& normals,\n+44 const std::string& filename);\n+54template\n+55void _\bp_\br_\bi_\bn_\bt(const Projection& projection,\n+56 const Corners& corners,\n+57 const Normals& normals);\n+58\n+59} /* namespace GridGlue */\n+60} /* namespace Dune */\n+61\n+62#include \"_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\"\n+63\n+64#endif\n+_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bw_\br_\bi_\bt_\be_\br_\b__\bi_\bm_\bp_\bl_\b._\bh_\bh\n+_\bp_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn\n-Projection of a line (triangle) on another line (triangle).\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:21\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bF_\bi_\be_\bl_\bd\n-Coordinate::field_type Field\n-Scalar type.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:61\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bs_\bu_\bc_\bc_\be_\bs_\bs\n-const std::tuple< std::bitset< dim >, std::bitset< dim > > & success() const\n-Indicate whether projection (inverse projection) is valid for each corner or\n-not.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:252\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bm_\ba_\bx_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-static constexpr unsigned maxEdgeIntersections\n-maximum number of edge-edge intersections\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:54\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bP_\br_\be_\bi_\bm_\ba_\bg_\be_\bs\n-Images Preimages\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:78\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bI_\bm_\ba_\bg_\be_\bs\n-std::array< Coordinate, dim > Images\n-List of corner images.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:70\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bp_\bs_\bi_\bl_\bo_\bn\n-void epsilon(const Field epsilon)\n-Set epsilon used for floating-point comparisons.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:140\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bp_\br_\bo_\bj_\be_\bc_\bt\n-void project(const std::tuple< Corners &, Corners & > &corners, const std::\n-tuple< Normals &, Normals & > &normals)\n-Do the actual projection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:469\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bd_\bi_\bm\n-static constexpr unsigned dim\n-dimension of coordinates\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:47\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bn_\bu_\bm_\bb_\be_\br_\bO_\bf_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-unsigned numberOfEdgeIntersections() const\n-Number of edge intersections.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:262\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bi_\bm_\ba_\bg_\be_\bs\n-const std::tuple< Images, Preimages > & images() const\n-Images and preimages of corners.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:235\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-const std::array< EdgeIntersection, maxEdgeIntersections > & edgeIntersections\n-() const\n-Edge-edge intersections.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:273\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-Intersection between two edges of a triangle.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:29\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bl_\bo_\bc_\ba_\bl\n-std::array< Coordinate, 2 > local\n-Local coordinates of intersection and distance along normals.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:41\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\bE_\bd_\bg_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b:_\b:_\be_\bd_\bg_\be\n-std::array< unsigned, 2 > edge\n-Edge numbers in image and preimage triangle.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection.hh:33\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bw_\br_\bi_\bt_\be\n+void write(const Projection< Coordinate > &projection, const Corners &corners,\n+const Normals &normals, std::ostream &out)\n+write projection in VTK format\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:86\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bp_\br_\bi_\bn_\bt\n+void print(const Projection< Coordinate > &projection, const Corners &corners,\n+const Normals &normals)\n+Print information about the projection to std::cout stream.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projectionwriter_impl.hh:140\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00050.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: areawriter_impl.hh File Reference\n+dune-grid-glue: crossproduct.hh File Reference\n \n \n \n \n \n \n \n@@ -70,56 +70,35 @@\n \n
    \n
    \n \n-
    areawriter_impl.hh File Reference
    \n+
    crossproduct.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+\n

    Go to the source code of this file.

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

    \n-Classes

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

    \n Namespaces

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

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

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

    \n-
    #include <fstream>
    \n-#include <iomanip>
    \n-#include <vector>
    \n-#include <cstring>
    \n-#include "../adapter/gridgluevtkwriter.hh"
    \n+
    #include <deque>
    \n+#include <functional>
    \n+#include <dune/common/deprecated.hh>
    \n+#include <dune/grid/common/mcmgmapper.hh>
    \n+#include "extractor.hh"
    \n
    \n

    Go to the source code of this file.

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

    \n Classes

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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n

    Detailed Description

    \n-

    helper class for graphical output of grids in generic representation

    \n+

    Mesh grid extractor base class.

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,27 +2,27 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\bs\n _\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-vtksurfacewriter.hh File Reference\n-helper class for graphical output of grids in generic representation _\bM_\bo_\br_\be_\b._\b._\b.\n-#include \n-#include \n-#include \n-#include \n-#include \"_\b._\b._\b/_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\bv_\bt_\bk_\bw_\br_\bi_\bt_\be_\br_\b._\bh_\bh\"\n+codim0extractor.hh File Reference\n+Mesh grid extractor base class. _\bM_\bo_\br_\be_\b._\b._\b.\n+#include \n+#include \n+#include \n+#include \n+#include \"_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\"\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b _\b>\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n *\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-helper class for graphical output of grids in generic representation\n+Mesh grid extractor base class.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00053_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00053_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: vtksurfacewriter.hh Source File\n+dune-grid-glue: codim0extractor.hh Source File\n \n \n \n \n \n \n \n@@ -74,258 +74,276 @@\n \n \n
    \n
    \n-
    vtksurfacewriter.hh
    \n+
    codim0extractor.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n
    5/*
    \n-
    6 * Filename: VtkSurfaceWriter.hh
    \n+
    6 * Filename: codim0extractor.hh
    \n
    7 * Version: 1.0
    \n-
    8 * Created on: Jan 16, 2009
    \n-
    9 * Author: Gerrit Buse
    \n+
    8 * Created on: Jun 23, 2009
    \n+
    9 * Author: Oliver Sander, Christian Engwer
    \n
    10 * ---------------------------------
    \n
    11 * Project: dune-grid-glue
    \n-
    12 * Description: helper class for graphical output of grids in generic representation
    \n+
    12 * Description: base class for grid extractors extracting surface grids
    \n
    13 *
    \n
    14 */
    \n-
    20#ifndef DUNE_GRIDGLUE_EXTRACTORS_VTKSURFACEWRITER_HH
    \n-
    21#define DUNE_GRIDGLUE_EXTRACTORS_VTKSURFACEWRITER_HH
    \n+
    20#ifndef DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH
    \n+
    21#define DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH
    \n
    22
    \n-
    23#include <fstream>
    \n-
    24#include <iomanip>
    \n-
    25#include <vector>
    \n-
    26#include <cstring>
    \n-
    27
    \n-
    28#include "../adapter/gridgluevtkwriter.hh"
    \n-
    29
    \n-
    30namespace Dune {
    \n-
    31
    \n-
    32 namespace GridGlue {
    \n-
    33
    \n-
    \n-\n-
    35{
    \n-
    36public:
    \n-
    37
    \n-
    38
    \n-
    \n-
    39 VtkSurfaceWriter(const char* filename) : filename_(filename)
    \n-
    40 {}
    \n-
    \n+
    23#include <deque>
    \n+
    24#include <functional>
    \n+
    25
    \n+
    26#include <dune/common/deprecated.hh>
    \n+
    27#include <dune/grid/common/mcmgmapper.hh>
    \n+
    28
    \n+
    29#include "extractor.hh"
    \n+
    30
    \n+
    31namespace Dune {
    \n+
    32
    \n+
    33 namespace GridGlue {
    \n+
    34
    \n+
    38template<typename GV>
    \n+
    \n+
    39class Codim0Extractor : public Extractor<GV,0>
    \n+
    40{
    \n
    41
    \n-
    \n-\n-
    43 {}
    \n-
    \n-
    44
    \n-
    \n-
    45 void setFilename(const char* name)
    \n-
    46 {
    \n-
    47 if (std::strlen(name) > 0)
    \n-
    48 this->filename_ = name;
    \n-
    49 }
    \n-
    \n+
    42public:
    \n+
    43
    \n+
    44 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n+
    45 using Extractor<GV,0>::codim;
    \n+
    46 typedef typename Extractor<GV,0>::ctype ctype;
    \n+
    47 using Extractor<GV,0>::dim;
    \n+
    48 using Extractor<GV,0>::dimworld;
    \n+\n
    50
    \n-
    51
    \n-
    52 template<typename K>
    \n-
    \n-
    53 void writeSurface(const std::vector<K>& coords, const std::vector<unsigned int>& indices, int corners, int dim)
    \n-
    54 {
    \n-
    55 std::ofstream fos;
    \n-
    56 char buffer[64];
    \n-
    57 sprintf(buffer, "%s.vtk", this->filename_);
    \n-
    58 fos.open(buffer);
    \n-
    59 fos << std::setprecision(8) << std::setw(1);
    \n-
    60 // write preamble
    \n-
    61 fos << "# vtk DataFile Version 2.0\\nFilename: " << buffer << "\\nASCII" << std::endl;
    \n-
    62 this->writePoints(coords, dim, fos);
    \n-
    63 const int polycount = indices.size()/corners;
    \n-
    64 int corner_count[polycount];
    \n-
    65 for (int i = 0; i < polycount; ++i)
    \n-
    66 corner_count[i] = corners;
    \n-
    67 this->writePolygons(indices, corner_count, polycount, dim, fos);
    \n-
    68 fos.close();
    \n-
    69 }
    \n-
    \n-
    70
    \n-
    71
    \n-
    72 template<typename K, typename T>
    \n-
    \n-
    73 void writeSurfaceElementData(const std::vector<K>& coords, const std::vector<unsigned int>& indices, int corners, const std::vector<T>& data, const char* dataname, int dim)
    \n-
    74 {
    \n-
    75 std::ofstream fos;
    \n-
    76 char buffer[64];
    \n-
    77 sprintf(buffer, "%s.vtk", this->filename_);
    \n-
    78 fos.open(buffer);
    \n-
    79 fos << std::setprecision(8) << std::setw(1);
    \n-
    80 // write preamble
    \n-
    81 fos << "# vtk DataFile Version 2.0\\nFilename: " << buffer << "\\nASCII" << std::endl;
    \n-
    82 this->writePoints(coords, dim, fos);
    \n-
    83 const int polycount = indices.size()/corners;
    \n-
    84 int corner_count[polycount];
    \n-
    85 for (int i = 0; i < polycount; ++i)
    \n-
    86 corner_count[i] = corners;
    \n-
    87 this->writePolygons(indices, corner_count, polycount, dim, fos);
    \n-
    88 this->writeCellData(data, dataname, dim, fos);
    \n-
    89 fos.close();
    \n-
    90 }
    \n-
    \n+
    51 typedef typename GV::Traits::template Codim<dim>::Entity Vertex;
    \n+
    52 typedef typename GV::Traits::template Codim<0>::Entity Element;
    \n+
    53 typedef std::function<bool(const Element&, unsigned int subentity)> Predicate;
    \n+
    54
    \n+
    55 // import typedefs from base class
    \n+\n+\n+\n+\n+\n+
    61
    \n+
    \n+
    67 Codim0Extractor(const GV& gv, const Predicate& predicate)
    \n+
    68 : Extractor<GV,0>(gv), positiveNormalDirection_(false)
    \n+
    69 {
    \n+
    70 std::cout << "This is Codim0Extractor on a <"
    \n+
    71 << GV::dimension << "," << GV::dimensionworld << "> grid!" << std::endl;
    \n+
    72 update(predicate);
    \n+
    73 }
    \n+
    \n+
    74
    \n+\n+
    76 const bool & positiveNormalDirection() const { return positiveNormalDirection_; }
    \n+
    77
    \n+
    78protected:
    \n+\n+
    80private:
    \n+
    81 void update(const Predicate& predicate);
    \n+
    82};
    \n+
    \n+
    83
    \n+
    84
    \n+
    85template<typename GV>
    \n+
    86void Codim0Extractor<GV>::update(const Predicate& predicate)
    \n+
    87{
    \n+
    88 // In this first pass iterate over all entities of codim 0.
    \n+
    89 // Get its corner vertices, find resp. store them together with their associated index,
    \n+
    90 // and remember the indices of the corners.
    \n
    91
    \n-
    92
    \n-
    93 template<typename K, typename T>
    \n-
    \n-
    94 void writeSurfaceVertexData(const std::vector<K>& coords, const std::vector<unsigned int>& indices, int corners, const std::vector<T>& data, const char* dataname, int dim)
    \n-
    95 {
    \n-
    96 std::ofstream fos;
    \n-
    97 char buffer[64];
    \n-
    98 sprintf(buffer, "%s.vtk", this->filename_);
    \n-
    99 fos.open(buffer);
    \n-
    100 fos << std::setprecision(8) << std::setw(1);
    \n-
    101 // write preamble
    \n-
    102 fos << "# vtk DataFile Version 2.0\\nFilename: " << buffer << "\\nASCII" << std::endl;
    \n-
    103 this->writePoints(coords, dim, fos);
    \n-
    104 const int polycount = indices.size()/corners;
    \n-
    105 int corner_count[polycount];
    \n-
    106 for (int i = 0; i < polycount; ++i)
    \n-
    107 corner_count[i] = corners;
    \n-
    108 this->writePolygons(indices, corner_count, polycount, dim, fos);
    \n-
    109 this->writePointData(data, dataname, dim, fos);
    \n-
    110 fos.close();
    \n-
    111 }
    \n-
    \n-
    112
    \n-
    113protected:
    \n-
    114
    \n-
    115 template<typename K>
    \n-
    \n-
    116 void writePoints(const std::vector<K>& coords, int dim, std::ofstream& fos)
    \n-
    117 {
    \n-
    118 fos << "DATASET POLYDATA\\nPOINTS " << coords.size() << " " << TypeNames[Nametraits<K>::nameidx] << std::endl;
    \n-
    119 for (unsigned int i = 0; i < coords.size(); ++i)
    \n-
    120 {
    \n-
    121 fos << coords[i][0];
    \n-
    122 if (dim == 2)
    \n-
    123 fos << " " << coords[i][1] << " 0 \\n" << coords[i][0] << " " << coords[i][1] << " 0.01" << std::endl;
    \n-
    124 else // dim == 3
    \n-
    125 fos << " " << coords[i][1] << " " << coords[i][2] << std::endl;
    \n-
    126 }
    \n-
    127 }
    \n-
    \n+
    92 // free everything there is in this object
    \n+
    93 this->clear();
    \n+
    94
    \n+
    95 // several counter for consecutive indexing are needed
    \n+
    96 size_t element_index = 0;
    \n+
    97 size_t vertex_index = 0;
    \n+
    98
    \n+
    99 // a temporary container where newly acquired face
    \n+
    100 // information can be stored at first
    \n+
    101 std::deque<SubEntityInfo> temp_faces;
    \n+
    102
    \n+
    103 // iterate over all codim 0 elements on the grid
    \n+
    104 for (const auto& elmt : elements(this->gv_, Partitions::interior))
    \n+
    105 {
    \n+
    106 const auto geometry = elmt.geometry();
    \n+
    107 IndexType eindex = this->cellMapper_.index(elmt);
    \n+
    108
    \n+
    109 // only do sth. if this element is "interesting"
    \n+
    110 // implicit cast is done automatically
    \n+
    111 if (predicate(elmt,0))
    \n+
    112 {
    \n+
    113 // add an entry to the element info map, the index will be set properly later
    \n+
    114 this->elmtInfo_.emplace(eindex, ElementInfo(element_index, elmt, 1));
    \n+
    115
    \n+
    116 unsigned int numCorners = elmt.subEntities(dim);
    \n+
    117 unsigned int vertex_indices[numCorners]; // index in global vector
    \n+
    118 unsigned int vertex_numbers[numCorners]; // index in parent entity
    \n+
    119
    \n+
    120 // try for each of the faces vertices whether it is already inserted or not
    \n+
    121 for (unsigned int i = 0; i < numCorners; ++i)
    \n+
    122 {
    \n+
    123 vertex_numbers[i] = i;
    \n+
    124
    \n+
    125 // get the vertex pointer and the index from the index set
    \n+
    126 const Vertex vertex = elmt.template subEntity<dim>(vertex_numbers[i]);
    \n+
    127 IndexType vindex = this->gv_.indexSet().template index<dim>(vertex);
    \n
    128
    \n-
    \n-
    129 void writePolygons(const std::vector<unsigned int>& indices, const int* corners, int ncorners, int dim, std::ofstream& fos)
    \n-
    130 {
    \n-
    131 if (dim == 2)
    \n-
    132 {
    \n-
    133 fos << "POLYGONS " << indices.size()/2 << " " << 5*(indices.size() / 2) << std::endl;
    \n-
    134 for (unsigned int i = 0; i < indices.size(); i += 2)
    \n-
    135 fos << "4 " << 2*indices[i] << " " << 2*indices[i+1] << " " << 2*indices[i+1]+1 << " "<< 2*indices[i]+1 << std::endl;
    \n-
    136
    \n-
    137 // arbitrary shapes - ignored here!
    \n-
    138 // int sum = ncorners;
    \n-
    139 // for (int i = 0; i < ncorners; ++i)
    \n-
    140 // sum += (corners[i] > 2 ? corners[i] : 3);
    \n-
    141 //
    \n-
    142 // fos << "POLYGONS " << ncorners << " " << sum << std::endl;
    \n-
    143 // int index = 0;
    \n-
    144 // for (int i = 0; i < ncorners; ++i)
    \n-
    145 // {
    \n-
    146 // // write the first index twice if it is an edge
    \n-
    147 // // => triangle instead of edge - paraview can display it then
    \n-
    148 // if (corners[i] > 2)
    \n-
    149 // fos << corners[i];
    \n-
    150 // else
    \n-
    151 // fos << "3 " << indices[index];
    \n-
    152 //
    \n-
    153 // for (int j = 0; j < corners[i]; ++j)
    \n-
    154 // fos << " " << indices[index++];
    \n-
    155 // fos << std::endl;
    \n-
    156 // }
    \n-
    157 }
    \n-
    158 else
    \n-
    159 {
    \n-
    160 int sum = ncorners;
    \n-
    161 for (int i = 0; i < ncorners; ++i)
    \n-
    162 sum += corners[i];
    \n-
    163 fos << "POLYGONS " << ncorners << " " << sum << std::endl;
    \n-
    164 int index = 0;
    \n-
    165 for (int i = 0; i < ncorners; ++i)
    \n-
    166 {
    \n-
    167 fos << corners[i];
    \n-
    168 for (int j = 0; j < corners[i]; ++j)
    \n-
    169 fos << " " << indices[index++];
    \n-
    170 fos << std::endl;
    \n-
    171 }
    \n-
    172 }
    \n-
    173 }
    \n-
    \n-
    174
    \n-
    175 template<typename T>
    \n-
    \n-
    176 void writeCellData(const std::vector<T>& data, const char* dataname, int dim, std::ofstream& fos)
    \n-
    177 {
    \n-
    178 fos << "CELL_DATA " << data.size()*(dim == 2 ? 2 : 1) << std::endl;
    \n-
    179 fos << "SCALARS " << dataname << " " << TypeNames[Nametraits<T>::nameidx] << " 1" << std::endl;
    \n-
    180 fos << "LOOKUP_TABLE default" << std::endl;
    \n-
    181 for (unsigned int i = 0; i < data.size(); ++i)
    \n-
    182 {
    \n-
    183 fos << data[i] << std::endl;
    \n-
    184 if (dim == 2)
    \n-
    185 fos << data[i] << std::endl;
    \n-
    186 }
    \n-
    187 }
    \n-
    \n-
    188
    \n-
    189 template<typename T>
    \n-
    \n-
    190 void writePointData(const std::vector<T>& data, const char* dataname, int dim, std::ofstream& fos)
    \n-
    191 {
    \n-
    192 fos << "POINT_DATA " << data.size()*(dim == 2 ? 2 : 1) << std::endl;
    \n-
    193 fos << "SCALARS " << dataname << " " << TypeNames[Nametraits<T>::nameidx] << " 1" << std::endl;
    \n-
    194 fos << "LOOKUP_TABLE default" << std::endl;
    \n-
    195 for (unsigned int i = 0; i < data.size(); ++i)
    \n-
    196 {
    \n-
    197 fos << data[i] << std::endl;
    \n-
    198 if (dim == 2)
    \n-
    199 fos << data[i] << std::endl;
    \n-
    200 }
    \n-
    201 }
    \n-
    \n-
    202
    \n-
    203
    \n-
    204private:
    \n-
    205 const char* filename_;
    \n-
    206};
    \n-
    \n-
    207
    \n-
    208} // namespace GridGlue
    \n+
    129 // if the vertex is not yet inserted in the vertex info map
    \n+
    130 // it is a new one -> it will be inserted now!
    \n+
    131 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);
    \n+
    132 if (vimit == this->vtxInfo_.end())
    \n+
    133 {
    \n+
    134 // insert into the map
    \n+
    135 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));
    \n+
    136 // remember this vertex' index
    \n+
    137 vertex_indices[i] = vertex_index;
    \n+
    138 // increase the current index
    \n+
    139 vertex_index++;
    \n+
    140 }
    \n+
    141 else
    \n+
    142 {
    \n+
    143 // only remember the vertex' index
    \n+
    144 vertex_indices[i] = vimit->second.idx;
    \n+
    145 }
    \n+
    146 }
    \n+
    147
    \n+
    148 // flip cell if necessary
    \n+
    149 {
    \n+
    150 switch (int(dim))
    \n+
    151 {
    \n+
    152 case 0 :
    \n+
    153 break;
    \n+
    154 case 1 :
    \n+
    155 {
    \n+
    156 // The following test only works if the zero-th coordinate is the
    \n+
    157 // one that defines the orientation. A sufficient condition for
    \n+
    158 // this is dimworld == 1
    \n+
    159 /* assert(dimworld==1); */
    \n+
    160 bool elementNormalDirection =
    \n+
    161 (geometry.corner(1)[0] < geometry.corner(0)[0]);
    \n+
    162 if ( positiveNormalDirection_ != elementNormalDirection )
    \n+
    163 {
    \n+
    164 std::swap(vertex_indices[0], vertex_indices[1]);
    \n+
    165 std::swap(vertex_numbers[0], vertex_numbers[1]);
    \n+
    166 }
    \n+
    167 break;
    \n+
    168 }
    \n+
    169 case 2 :
    \n+
    170 {
    \n+
    171 Dune::FieldVector<ctype, dimworld>
    \n+
    172 v0 = geometry.corner(1),
    \n+
    173 v1 = geometry.corner(2);
    \n+
    174 v0 -= geometry.corner(0);
    \n+
    175 v1 -= geometry.corner(0);
    \n+
    176 ctype normal_sign = v0[0]*v1[1] - v0[1]*v1[0];
    \n+
    177 bool elementNormalDirection = (normal_sign < 0);
    \n+
    178 if ( positiveNormalDirection_ != elementNormalDirection )
    \n+
    179 {
    \n+
    180 std::cout << "swap\\n";
    \n+
    181 if (elmt.type().isCube())
    \n+
    182 {
    \n+
    183 for (int i = 0; i < (1<<dim); i+=2)
    \n+
    184 {
    \n+
    185 // swap i and i+1
    \n+
    186 std::swap(vertex_indices[i], vertex_indices[i+1]);
    \n+
    187 std::swap(vertex_numbers[i], vertex_numbers[i+1]);
    \n+
    188 }
    \n+
    189 } else if (elmt.type().isSimplex()) {
    \n+
    190 std::swap(vertex_indices[0], vertex_indices[1]);
    \n+
    191 std::swap(vertex_numbers[0], vertex_numbers[1]);
    \n+
    192 } else {
    \n+
    193 DUNE_THROW(Dune::Exception, "Unexpected Geometrytype");
    \n+
    194 }
    \n+
    195 }
    \n+
    196 break;
    \n+
    197 }
    \n+
    198 }
    \n+
    199 }
    \n+
    200
    \n+
    201 // add a new face to the temporary collection
    \n+
    202 temp_faces.emplace_back(eindex, 0, elmt.type());
    \n+
    203 element_index++;
    \n+
    204 for (unsigned int i=0; i<numCorners; i++) {
    \n+
    205 temp_faces.back().corners[i].idx = vertex_indices[i];
    \n+
    206 // remember the vertices' numbers in parent element's vertices
    \n+
    207 temp_faces.back().corners[i].num = vertex_numbers[i];
    \n+
    208 }
    \n
    209
    \n-
    210} // namespace Dune
    \n-
    211
    \n-
    212#endif // DUNE_GRIDGLUE_EXTRACTORS_VTKSURFACEWRITER_HH
    \n+
    210 }
    \n+
    211 } // end loop over elements
    \n+
    212
    \n+
    213 // allocate the array for the face specific information...
    \n+
    214 this->subEntities_.resize(element_index);
    \n+
    215 // ...and fill in the data from the temporary containers
    \n+
    216 copy(temp_faces.begin(), temp_faces.end(), this->subEntities_.begin());
    \n+
    217
    \n+
    218 // now first write the array with the coordinates...
    \n+
    219 this->coords_.resize(this->vtxInfo_.size());
    \n+
    220 for (const auto& vinfo : this->vtxInfo_)
    \n+
    221 {
    \n+
    222 // get a pointer to the associated info object
    \n+
    223 CoordinateInfo* current = &this->coords_[vinfo.second.idx];
    \n+
    224 // store this coordinates index // NEEDED?
    \n+
    225 current->index = vinfo.second.idx;
    \n+
    226 // store the vertex' index for the index2vertex mapping
    \n+
    227 current->vtxindex = vinfo.first;
    \n+
    228 // store the vertex' coordinates under the associated index
    \n+
    229 // in the coordinates array
    \n+
    230 const auto vtx = this->grid().entity(vinfo.second.p);
    \n+
    231 current->coord = vtx.geometry().corner(0);
    \n+
    232 }
    \n+
    233
    \n+
    234}
    \n+
    235
    \n+
    236} // namespace GridGlue
    \n+
    237
    \n+
    238} // namespace Dune
    \n+
    239
    \n+
    240#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH
    \n+
    extractor base class
    \n
    Definition gridglue.hh:37
    \n-
    Definition vtksurfacewriter.hh:35
    \n-
    void writeCellData(const std::vector< T > &data, const char *dataname, int dim, std::ofstream &fos)
    Definition vtksurfacewriter.hh:176
    \n-
    void writePointData(const std::vector< T > &data, const char *dataname, int dim, std::ofstream &fos)
    Definition vtksurfacewriter.hh:190
    \n-
    void writeSurfaceVertexData(const std::vector< K > &coords, const std::vector< unsigned int > &indices, int corners, const std::vector< T > &data, const char *dataname, int dim)
    Definition vtksurfacewriter.hh:94
    \n-
    void setFilename(const char *name)
    Definition vtksurfacewriter.hh:45
    \n-
    void writeSurfaceElementData(const std::vector< K > &coords, const std::vector< unsigned int > &indices, int corners, const std::vector< T > &data, const char *dataname, int dim)
    Definition vtksurfacewriter.hh:73
    \n-
    ~VtkSurfaceWriter()
    Definition vtksurfacewriter.hh:42
    \n-
    VtkSurfaceWriter(const char *filename)
    Definition vtksurfacewriter.hh:39
    \n-
    void writeSurface(const std::vector< K > &coords, const std::vector< unsigned int > &indices, int corners, int dim)
    Definition vtksurfacewriter.hh:53
    \n-
    void writePoints(const std::vector< K > &coords, int dim, std::ofstream &fos)
    Definition vtksurfacewriter.hh:116
    \n-
    void writePolygons(const std::vector< unsigned int > &indices, const int *corners, int ncorners, int dim, std::ofstream &fos)
    Definition vtksurfacewriter.hh:129
    \n+
    Definition codim0extractor.hh:40
    \n+
    bool & positiveNormalDirection()
    Definition codim0extractor.hh:75
    \n+
    Extractor< GV, 0 >::IndexType IndexType
    Definition codim0extractor.hh:49
    \n+
    const bool & positiveNormalDirection() const
    Definition codim0extractor.hh:76
    \n+
    GV::Traits::template Codim< dim >::Entity Vertex
    Definition codim0extractor.hh:51
    \n+
    Extractor< GV, 0 >::CoordinateInfo CoordinateInfo
    Definition codim0extractor.hh:59
    \n+
    Extractor< GV, 0 >::VertexInfo VertexInfo
    Definition codim0extractor.hh:58
    \n+
    Extractor< GV, 0 >::ctype ctype
    Definition codim0extractor.hh:46
    \n+
    bool positiveNormalDirection_
    Definition codim0extractor.hh:79
    \n+
    Extractor< GV, 0 >::VertexInfoMap VertexInfoMap
    Definition codim0extractor.hh:60
    \n+
    std::function< bool(const Element &, unsigned int subentity)> Predicate
    Definition codim0extractor.hh:53
    \n+
    Codim0Extractor(const GV &gv, const Predicate &predicate)
    Constructor.
    Definition codim0extractor.hh:67
    \n+
    Extractor< GV, 0 >::ElementInfo ElementInfo
    Definition codim0extractor.hh:57
    \n+
    GV::Traits::template Codim< 0 >::Entity Element
    Definition codim0extractor.hh:52
    \n+
    Extractor< GV, 0 >::SubEntityInfo SubEntityInfo
    Definition codim0extractor.hh:56
    \n+
    Provides codimension-independent methods for grid extraction.
    Definition extractor.hh:46
    \n+
    static constexpr auto dimworld
    Definition extractor.hh:50
    \n+
    int IndexType
    Definition extractor.hh:73
    \n+
    static constexpr auto codim
    Definition extractor.hh:52
    \n+
    std::map< IndexType, VertexInfo > VertexInfoMap
    Definition extractor.hh:186
    \n+
    GV::Grid::ctype ctype
    Definition extractor.hh:59
    \n+
    static constexpr auto dim
    Definition extractor.hh:51
    \n+\n+
    simple struct holding a vertex pointer and an index
    Definition extractor.hh:116
    \n+
    simple struct holding an element seed and an index
    Definition extractor.hh:128
    \n+
    Holds some information about an element's subentity involved in a coupling.
    Definition extractor.hh:147
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,280 +1,325 @@\n dune-grid-glue\u00a02.10\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\bs\n-vtksurfacewriter.hh\n+codim0extractor.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n 5/*\n-6 * Filename: VtkSurfaceWriter.hh\n+6 * Filename: codim0extractor.hh\n 7 * Version: 1.0\n-8 * Created on: Jan 16, 2009\n-9 * Author: Gerrit Buse\n+8 * Created on: Jun 23, 2009\n+9 * Author: Oliver Sander, Christian Engwer\n 10 * ---------------------------------\n 11 * Project: dune-grid-glue\n-12 * Description: helper class for graphical output of grids in generic\n-representation\n+12 * Description: base class for grid extractors extracting surface grids\n 13 *\n 14 */\n-20#ifndef DUNE_GRIDGLUE_EXTRACTORS_VTKSURFACEWRITER_HH\n-21#define DUNE_GRIDGLUE_EXTRACTORS_VTKSURFACEWRITER_HH\n+20#ifndef DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH\n+21#define DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH\n 22\n-23#include \n-24#include \n-25#include \n-26#include \n-27\n-28#include \"../adapter/gridgluevtkwriter.hh\"\n-29\n-30namespace _\bD_\bu_\bn_\be {\n-31\n-32 namespace GridGlue {\n-33\n-_\b3_\b4class _\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br\n-35{\n-36public:\n-37\n-38\n-_\b3_\b9 _\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br(const char* filename) : filename_(filename)\n-40 {}\n+23#include \n+24#include \n+25\n+26#include \n+27#include \n+28\n+29#include \"_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\"\n+30\n+31namespace _\bD_\bu_\bn_\be {\n+32\n+33 namespace GridGlue {\n+34\n+38template\n+_\b3_\b9class _\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br : public _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+40{\n 41\n-_\b4_\b2 _\b~_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br()\n-43 {}\n-44\n-_\b4_\b5 void _\bs_\be_\bt_\bF_\bi_\bl_\be_\bn_\ba_\bm_\be(const char* name)\n-46 {\n-47 if (std::strlen(name) > 0)\n-48 this->filename_ = name;\n-49 }\n+42public:\n+43\n+44 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n+45 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bo_\bd_\bi_\bm;\n+_\b4_\b6 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bc_\bt_\by_\bp_\be _\bc_\bt_\by_\bp_\be;\n+47 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm;\n+48 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd;\n+_\b4_\b9 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be;\n 50\n-51\n-52 template\n-_\b5_\b3 void _\bw_\br_\bi_\bt_\be_\bS_\bu_\br_\bf_\ba_\bc_\be(const std::vector& coords, const std::vector& indices, int corners, int dim)\n-54 {\n-55 std::ofstream fos;\n-56 char buffer[64];\n-57 sprintf(buffer, \"%s.vtk\", this->filename_);\n-58 fos.open(buffer);\n-59 fos << std::setprecision(8) << std::setw(1);\n-60 // write preamble\n-61 fos << \"# vtk DataFile Version 2.0\\nFilename: \" << buffer << \"\\nASCII\" <<\n-std::endl;\n-62 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bs(coords, dim, fos);\n-63 const int polycount = indices.size()/corners;\n-64 int corner_count[polycount];\n-65 for (int i = 0; i < polycount; ++i)\n-66 corner_count[i] = corners;\n-67 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bl_\by_\bg_\bo_\bn_\bs(indices, corner_count, polycount, dim, fos);\n-68 fos.close();\n-69 }\n-70\n-71\n-72 template\n-_\b7_\b3 void _\bw_\br_\bi_\bt_\be_\bS_\bu_\br_\bf_\ba_\bc_\be_\bE_\bl_\be_\bm_\be_\bn_\bt_\bD_\ba_\bt_\ba(const std::vector& coords, const std::\n-vector& indices, int corners, const std::vector& data, const\n-char* dataname, int dim)\n-74 {\n-75 std::ofstream fos;\n-76 char buffer[64];\n-77 sprintf(buffer, \"%s.vtk\", this->filename_);\n-78 fos.open(buffer);\n-79 fos << std::setprecision(8) << std::setw(1);\n-80 // write preamble\n-81 fos << \"# vtk DataFile Version 2.0\\nFilename: \" << buffer << \"\\nASCII\" <<\n-std::endl;\n-82 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bs(coords, dim, fos);\n-83 const int polycount = indices.size()/corners;\n-84 int corner_count[polycount];\n-85 for (int i = 0; i < polycount; ++i)\n-86 corner_count[i] = corners;\n-87 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bl_\by_\bg_\bo_\bn_\bs(indices, corner_count, polycount, dim, fos);\n-88 this->_\bw_\br_\bi_\bt_\be_\bC_\be_\bl_\bl_\bD_\ba_\bt_\ba(data, dataname, dim, fos);\n-89 fos.close();\n-90 }\n+_\b5_\b1 typedef typename GV::Traits::template Codim::Entity _\bV_\be_\br_\bt_\be_\bx;\n+_\b5_\b2 typedef typename GV::Traits::template Codim<0>::Entity _\bE_\bl_\be_\bm_\be_\bn_\bt;\n+_\b5_\b3 typedef std::function\n+_\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be;\n+54\n+55 // import typedefs from base class\n+_\b5_\b6 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo;\n+_\b5_\b7 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo;\n+_\b5_\b8 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo;\n+_\b5_\b9 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo;\n+_\b6_\b0 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp;\n+61\n+_\b6_\b7 _\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(const GV& gv, const _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be& predicate)\n+68 : _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(gv), _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_(false)\n+69 {\n+70 std::cout << \"This is Codim0Extractor on a <\"\n+71 << GV::dimension << \",\" << GV::dimensionworld << \"> grid!\" << std::endl;\n+72 update(predicate);\n+73 }\n+74\n+_\b7_\b5 bool & _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn() { return _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_; }\n+_\b7_\b6 const bool & _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn() const { return\n+_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_; }\n+77\n+78protected:\n+_\b7_\b9 bool _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_;\n+80private:\n+81 void update(const _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be& predicate);\n+82};\n+83\n+84\n+85template\n+86void _\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b>_\b:_\b:_\bu_\bp_\bd_\ba_\bt_\be(const Predicate& predicate)\n+87{\n+88 // In this first pass iterate over all entities of codim 0.\n+89 // Get its corner vertices, find resp. store them together with their\n+associated index,\n+90 // and remember the indices of the corners.\n 91\n-92\n-93 template\n-_\b9_\b4 void _\bw_\br_\bi_\bt_\be_\bS_\bu_\br_\bf_\ba_\bc_\be_\bV_\be_\br_\bt_\be_\bx_\bD_\ba_\bt_\ba(const std::vector& coords, const std::\n-vector& indices, int corners, const std::vector& data, const\n-char* dataname, int dim)\n-95 {\n-96 std::ofstream fos;\n-97 char buffer[64];\n-98 sprintf(buffer, \"%s.vtk\", this->filename_);\n-99 fos.open(buffer);\n-100 fos << std::setprecision(8) << std::setw(1);\n-101 // write preamble\n-102 fos << \"# vtk DataFile Version 2.0\\nFilename: \" << buffer << \"\\nASCII\" <<\n-std::endl;\n-103 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bs(coords, dim, fos);\n-104 const int polycount = indices.size()/corners;\n-105 int corner_count[polycount];\n-106 for (int i = 0; i < polycount; ++i)\n-107 corner_count[i] = corners;\n-108 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bl_\by_\bg_\bo_\bn_\bs(indices, corner_count, polycount, dim, fos);\n-109 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bD_\ba_\bt_\ba(data, dataname, dim, fos);\n-110 fos.close();\n-111 }\n-112\n-113protected:\n-114\n-115 template\n-_\b1_\b1_\b6 void _\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bs(const std::vector& coords, int dim, std::ofstream& fos)\n-117 {\n-118 fos << \"DATASET POLYDATA\\nPOINTS \" << coords.size() << \" \" << TypeNames\n-[Nametraits::nameidx] << std::endl;\n-119 for (unsigned int i = 0; i < coords.size(); ++i)\n-120 {\n-121 fos << coords[i][0];\n-122 if (dim == 2)\n-123 fos << \" \" << coords[i][1] << \" 0 \\n\" << coords[i][0] << \" \" << coords[i]\n-[1] << \" 0.01\" << std::endl;\n-124 else // dim == 3\n-125 fos << \" \" << coords[i][1] << \" \" << coords[i][2] << std::endl;\n-126 }\n-127 }\n+92 // free everything there is in this object\n+93 this->clear();\n+94\n+95 // several counter for consecutive indexing are needed\n+96 size_t element_index = 0;\n+97 size_t vertex_index = 0;\n+98\n+99 // a temporary container where newly acquired face\n+100 // information can be stored at first\n+101 std::deque temp_faces;\n+102\n+103 // iterate over all codim 0 elements on the grid\n+104 for (const auto& elmt : elements(this->gv_, Partitions::interior))\n+105 {\n+106 const auto geometry = elmt.geometry();\n+107 IndexType eindex = this->cellMapper_.index(elmt);\n+108\n+109 // only do sth. if this element is \"interesting\"\n+110 // implicit cast is done automatically\n+111 if (predicate(elmt,0))\n+112 {\n+113 // add an entry to the element info map, the index will be set properly\n+later\n+114 this->elmtInfo_.emplace(eindex, ElementInfo(element_index, elmt, 1));\n+115\n+116 unsigned int numCorners = elmt.subEntities(dim);\n+117 unsigned int vertex_indices[numCorners]; // index in global vector\n+118 unsigned int vertex_numbers[numCorners]; // index in parent entity\n+119\n+120 // try for each of the faces vertices whether it is already inserted or not\n+121 for (unsigned int i = 0; i < numCorners; ++i)\n+122 {\n+123 vertex_numbers[i] = i;\n+124\n+125 // get the vertex pointer and the index from the index set\n+126 const Vertex vertex = elmt.template subEntity(vertex_numbers[i]);\n+127 IndexType vindex = this->gv_.indexSet().template index(vertex);\n 128\n-_\b1_\b2_\b9 void _\bw_\br_\bi_\bt_\be_\bP_\bo_\bl_\by_\bg_\bo_\bn_\bs(const std::vector& indices, const int*\n-corners, int ncorners, int dim, std::ofstream& fos)\n-130 {\n-131 if (dim == 2)\n-132 {\n-133 fos << \"POLYGONS \" << indices.size()/2 << \" \" << 5*(indices.size() / 2) <<\n-std::endl;\n-134 for (unsigned int i = 0; i < indices.size(); i += 2)\n-135 fos << \"4 \" << 2*indices[i] << \" \" << 2*indices[i+1] << \" \" << 2*indices\n-[i+1]+1 << \" \"<< 2*indices[i]+1 << std::endl;\n-136\n-137 // arbitrary shapes - ignored here!\n-138 // int sum = ncorners;\n-139 // for (int i = 0; i < ncorners; ++i)\n-140 // sum += (corners[i] > 2 ? corners[i] : 3);\n-141 //\n-142 // fos << \"POLYGONS \" << ncorners << \" \" << sum << std::endl;\n-143 // int index = 0;\n-144 // for (int i = 0; i < ncorners; ++i)\n-145 // {\n-146 // // write the first index twice if it is an edge\n-147 // // => triangle instead of edge - paraview can display it then\n-148 // if (corners[i] > 2)\n-149 // fos << corners[i];\n-150 // else\n-151 // fos << \"3 \" << indices[index];\n-152 //\n-153 // for (int j = 0; j < corners[i]; ++j)\n-154 // fos << \" \" << indices[index++];\n-155 // fos << std::endl;\n-156 // }\n-157 }\n-158 else\n-159 {\n-160 int sum = ncorners;\n-161 for (int i = 0; i < ncorners; ++i)\n-162 sum += corners[i];\n-163 fos << \"POLYGONS \" << ncorners << \" \" << sum << std::endl;\n-164 int index = 0;\n-165 for (int i = 0; i < ncorners; ++i)\n-166 {\n-167 fos << corners[i];\n-168 for (int j = 0; j < corners[i]; ++j)\n-169 fos << \" \" << indices[index++];\n-170 fos << std::endl;\n-171 }\n-172 }\n-173 }\n-174\n-175 template\n-_\b1_\b7_\b6 void _\bw_\br_\bi_\bt_\be_\bC_\be_\bl_\bl_\bD_\ba_\bt_\ba(const std::vector& data, const char* dataname, int\n-dim, std::ofstream& fos)\n-177 {\n-178 fos << \"CELL_DATA \" << data.size()*(dim == 2 ? 2 : 1) << std::endl;\n-179 fos << \"SCALARS \" << dataname << \" \" << TypeNames[Nametraits::nameidx]\n-<< \" 1\" << std::endl;\n-180 fos << \"LOOKUP_TABLE default\" << std::endl;\n-181 for (unsigned int i = 0; i < data.size(); ++i)\n+129 // if the vertex is not yet inserted in the vertex info map\n+130 // it is a new one -> it will be inserted now!\n+131 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);\n+132 if (vimit == this->vtxInfo_.end())\n+133 {\n+134 // insert into the map\n+135 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));\n+136 // remember this vertex' index\n+137 vertex_indices[i] = vertex_index;\n+138 // increase the current index\n+139 vertex_index++;\n+140 }\n+141 else\n+142 {\n+143 // only remember the vertex' index\n+144 vertex_indices[i] = vimit->second.idx;\n+145 }\n+146 }\n+147\n+148 // flip cell if necessary\n+149 {\n+150 switch (int(dim))\n+151 {\n+152 case 0 :\n+153 break;\n+154 case 1 :\n+155 {\n+156 // The following test only works if the zero-th coordinate is the\n+157 // one that defines the orientation. A sufficient condition for\n+158 // this is dimworld == 1\n+159 /* assert(dimworld==1); */\n+160 bool elementNormalDirection =\n+161 (geometry.corner(1)[0] < geometry.corner(0)[0]);\n+162 if ( positiveNormalDirection_ != elementNormalDirection )\n+163 {\n+164 std::swap(vertex_indices[0], vertex_indices[1]);\n+165 std::swap(vertex_numbers[0], vertex_numbers[1]);\n+166 }\n+167 break;\n+168 }\n+169 case 2 :\n+170 {\n+171 Dune::FieldVector\n+172 v0 = geometry.corner(1),\n+173 v1 = geometry.corner(2);\n+174 v0 -= geometry.corner(0);\n+175 v1 -= geometry.corner(0);\n+176 ctype normal_sign = v0[0]*v1[1] - v0[1]*v1[0];\n+177 bool elementNormalDirection = (normal_sign < 0);\n+178 if ( positiveNormalDirection_ != elementNormalDirection )\n+179 {\n+180 std::cout << \"swap\\n\";\n+181 if (elmt.type().isCube())\n 182 {\n-183 fos << data[i] << std::endl;\n-184 if (dim == 2)\n-185 fos << data[i] << std::endl;\n-186 }\n-187 }\n-188\n-189 template\n-_\b1_\b9_\b0 void _\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bD_\ba_\bt_\ba(const std::vector& data, const char* dataname, int\n-dim, std::ofstream& fos)\n-191 {\n-192 fos << \"POINT_DATA \" << data.size()*(dim == 2 ? 2 : 1) << std::endl;\n-193 fos << \"SCALARS \" << dataname << \" \" << TypeNames[Nametraits::nameidx]\n-<< \" 1\" << std::endl;\n-194 fos << \"LOOKUP_TABLE default\" << std::endl;\n-195 for (unsigned int i = 0; i < data.size(); ++i)\n-196 {\n-197 fos << data[i] << std::endl;\n-198 if (dim == 2)\n-199 fos << data[i] << std::endl;\n-200 }\n-201 }\n-202\n-203\n-204private:\n-205 const char* filename_;\n-206};\n-207\n-208} // namespace GridGlue\n+183 for (int i = 0; i < (1<subEntities_.resize(element_index);\n+215 // ...and fill in the data from the temporary containers\n+216 copy(temp_faces.begin(), temp_faces.end(), this->subEntities_.begin());\n+217\n+218 // now first write the array with the coordinates...\n+219 this->coords_.resize(this->vtxInfo_.size());\n+220 for (const auto& vinfo : this->vtxInfo_)\n+221 {\n+222 // get a pointer to the associated info object\n+223 CoordinateInfo* current = &this->coords_[vinfo.second.idx];\n+224 // store this coordinates index // NEEDED?\n+225 current->index = vinfo.second.idx;\n+226 // store the vertex' index for the index2vertex mapping\n+227 current->vtxindex = vinfo.first;\n+228 // store the vertex' coordinates under the associated index\n+229 // in the coordinates array\n+230 const auto vtx = this->grid().entity(vinfo.second.p);\n+231 current->coord = vtx.geometry().corner(0);\n+232 }\n+233\n+234}\n+235\n+236} // namespace GridGlue\n+237\n+238} // namespace Dune\n+239\n+240#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH\n+_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\n+extractor base class\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:35\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bC_\be_\bl_\bl_\bD_\ba_\bt_\ba\n-void writeCellData(const std::vector< T > &data, const char *dataname, int dim,\n-std::ofstream &fos)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:176\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bD_\ba_\bt_\ba\n-void writePointData(const std::vector< T > &data, const char *dataname, int\n-dim, std::ofstream &fos)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:190\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bS_\bu_\br_\bf_\ba_\bc_\be_\bV_\be_\br_\bt_\be_\bx_\bD_\ba_\bt_\ba\n-void writeSurfaceVertexData(const std::vector< K > &coords, const std::vector<\n-unsigned int > &indices, int corners, const std::vector< T > &data, const char\n-*dataname, int dim)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:94\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bs_\be_\bt_\bF_\bi_\bl_\be_\bn_\ba_\bm_\be\n-void setFilename(const char *name)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:45\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bS_\bu_\br_\bf_\ba_\bc_\be_\bE_\bl_\be_\bm_\be_\bn_\bt_\bD_\ba_\bt_\ba\n-void writeSurfaceElementData(const std::vector< K > &coords, const std::vector<\n-unsigned int > &indices, int corners, const std::vector< T > &data, const char\n-*dataname, int dim)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:73\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\b~_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br\n-~VtkSurfaceWriter()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:42\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br\n-VtkSurfaceWriter(const char *filename)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:39\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bS_\bu_\br_\bf_\ba_\bc_\be\n-void writeSurface(const std::vector< K > &coords, const std::vector< unsigned\n-int > &indices, int corners, int dim)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:53\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bs\n-void writePoints(const std::vector< K > &coords, int dim, std::ofstream &fos)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:116\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bP_\bo_\bl_\by_\bg_\bo_\bn_\bs\n-void writePolygons(const std::vector< unsigned int > &indices, const int\n-*corners, int ncorners, int dim, std::ofstream &fos)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:129\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:40\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn\n+bool & positiveNormalDirection()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:75\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n+Extractor< GV, 0 >::IndexType IndexType\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:49\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn\n+const bool & positiveNormalDirection() const\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:76\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx\n+GV::Traits::template Codim< dim >::Entity Vertex\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:51\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n+Extractor< GV, 0 >::CoordinateInfo CoordinateInfo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:59\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n+Extractor< GV, 0 >::VertexInfo VertexInfo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:58\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bt_\by_\bp_\be\n+Extractor< GV, 0 >::ctype ctype\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:46\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_\n+bool positiveNormalDirection_\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:79\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n+Extractor< GV, 0 >::VertexInfoMap VertexInfoMap\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:60\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be\n+std::function< bool(const Element &, unsigned int subentity)> Predicate\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:53\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+Codim0Extractor(const GV &gv, const Predicate &predicate)\n+Constructor.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:67\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n+Extractor< GV, 0 >::ElementInfo ElementInfo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:57\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt\n+GV::Traits::template Codim< 0 >::Entity Element\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:52\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n+Extractor< GV, 0 >::SubEntityInfo SubEntityInfo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:56\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n+Provides codimension-independent methods for grid extraction.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:46\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b0_\b _\b>_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd\n+static constexpr auto dimworld\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:50\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n+int IndexType\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:73\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b0_\b _\b>_\b:_\b:_\bc_\bo_\bd_\bi_\bm\n+static constexpr auto codim\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:52\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n+std::map< IndexType, VertexInfo > VertexInfoMap\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:186\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bt_\by_\bp_\be\n+GV::Grid::ctype ctype\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:59\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b0_\b _\b>_\b:_\b:_\bd_\bi_\bm\n+static constexpr auto dim\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:51\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:94\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n+simple struct holding a vertex pointer and an index\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:116\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n+simple struct holding an element seed and an index\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:128\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n+Holds some information about an element's subentity involved in a coupling.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:147\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059.html", "unified_diff": "@@ -84,15 +84,15 @@\n More...

    \n
    #include "extractor.hh"
    \n #include <array>
    \n #include <deque>
    \n #include <functional>
    \n #include <dune/common/deprecated.hh>
    \n #include <dune/common/version.hh>
    \n-#include <dune/grid-glue/common/crossproduct.hh>
    \n+#include <dune/grid-glue/common/crossproduct.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/a00059_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00059_source.html", "unified_diff": "@@ -102,15 +102,15 @@\n
    24
    \n
    25#include <array>
    \n
    26#include <deque>
    \n
    27#include <functional>
    \n
    28
    \n
    29#include <dune/common/deprecated.hh>
    \n
    30#include <dune/common/version.hh>
    \n-\n+\n
    32
    \n
    33namespace Dune {
    \n
    34
    \n
    35 namespace GridGlue {
    \n
    36
    \n
    40template<typename GV>
    \n
    \n@@ -429,15 +429,15 @@\n
    369}
    \n
    370
    \n
    371} // namespace GridGlue
    \n
    372
    \n
    373} // namespace Dune
    \n
    374
    \n
    375#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM1EXTRACTOR_HH
    \n-\n+\n
    extractor base class
    \n
    Definition gridglue.hh:37
    \n
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n
    static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim > &a, const Dune::FieldVector< T, dim > &b)
    compute cross product
    Definition crossproduct.hh:15
    \n
    Definition codim1extractor.hh:42
    \n
    Extractor< GV, 1 >::IndexType IndexType
    Definition codim1extractor.hh:51
    \n
    GV GridView
    Definition codim1extractor.hh:56
    \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: codim0extractor.hh File Reference\n+dune-grid-glue: vtksurfacewriter.hh File Reference\n \n \n \n \n \n \n \n@@ -72,42 +72,42 @@\n
  • dune
  • grid-glue
  • extractors
  • \n
    \n \n
    \n \n-
    codim0extractor.hh File Reference
    \n+
    vtksurfacewriter.hh File Reference
    \n
    \n
    \n \n-

    Mesh grid extractor base class. \n+

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

    \n-
    #include <deque>
    \n-#include <functional>
    \n-#include <dune/common/deprecated.hh>
    \n-#include <dune/grid/common/mcmgmapper.hh>
    \n-#include "extractor.hh"
    \n+
    #include <fstream>
    \n+#include <iomanip>
    \n+#include <vector>
    \n+#include <cstring>
    \n+#include "../adapter/gridgluevtkwriter.hh"
    \n
    \n

    Go to the source code of this file.

    \n

    \n Classes

    class  Dune::GridGlue::Codim1Extractor< GV >
     
    \n \n-\n+\n \n

    \n Classes

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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n

    Detailed Description

    \n-

    Mesh grid extractor base class.

    \n+

    helper class for graphical output of grids in generic representation

    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -2,27 +2,27 @@\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\bs\n _\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-codim0extractor.hh File Reference\n-Mesh grid extractor base class. _\bM_\bo_\br_\be_\b._\b._\b.\n-#include \n-#include \n-#include \n-#include \n-#include \"_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\"\n+vtksurfacewriter.hh File Reference\n+helper class for graphical output of grids in generic representation _\bM_\bo_\br_\be_\b._\b._\b.\n+#include \n+#include \n+#include \n+#include \n+#include \"_\b._\b._\b/_\ba_\bd_\ba_\bp_\bt_\be_\br_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\bv_\bt_\bk_\bw_\br_\bi_\bt_\be_\br_\b._\bh_\bh\"\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b _\b>\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br\n \u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n *\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-Mesh grid extractor base class.\n+helper class for graphical output of grids in generic representation\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00062_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: codim0extractor.hh Source File\n+dune-grid-glue: vtksurfacewriter.hh Source File\n \n \n \n \n \n \n \n@@ -74,276 +74,258 @@\n \n \n
    \n
    \n-
    codim0extractor.hh
    \n+
    vtksurfacewriter.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n
    5/*
    \n-
    6 * Filename: codim0extractor.hh
    \n+
    6 * Filename: VtkSurfaceWriter.hh
    \n
    7 * Version: 1.0
    \n-
    8 * Created on: Jun 23, 2009
    \n-
    9 * Author: Oliver Sander, Christian Engwer
    \n+
    8 * Created on: Jan 16, 2009
    \n+
    9 * Author: Gerrit Buse
    \n
    10 * ---------------------------------
    \n
    11 * Project: dune-grid-glue
    \n-
    12 * Description: base class for grid extractors extracting surface grids
    \n+
    12 * Description: helper class for graphical output of grids in generic representation
    \n
    13 *
    \n
    14 */
    \n-
    20#ifndef DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH
    \n-
    21#define DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH
    \n+
    20#ifndef DUNE_GRIDGLUE_EXTRACTORS_VTKSURFACEWRITER_HH
    \n+
    21#define DUNE_GRIDGLUE_EXTRACTORS_VTKSURFACEWRITER_HH
    \n
    22
    \n-
    23#include <deque>
    \n-
    24#include <functional>
    \n-
    25
    \n-
    26#include <dune/common/deprecated.hh>
    \n-
    27#include <dune/grid/common/mcmgmapper.hh>
    \n-
    28
    \n-
    29#include "extractor.hh"
    \n-
    30
    \n-
    31namespace Dune {
    \n-
    32
    \n-
    33 namespace GridGlue {
    \n-
    34
    \n-
    38template<typename GV>
    \n-
    \n-
    39class Codim0Extractor : public Extractor<GV,0>
    \n-
    40{
    \n+
    23#include <fstream>
    \n+
    24#include <iomanip>
    \n+
    25#include <vector>
    \n+
    26#include <cstring>
    \n+
    27
    \n+
    28#include "../adapter/gridgluevtkwriter.hh"
    \n+
    29
    \n+
    30namespace Dune {
    \n+
    31
    \n+
    32 namespace GridGlue {
    \n+
    33
    \n+
    \n+\n+
    35{
    \n+
    36public:
    \n+
    37
    \n+
    38
    \n+
    \n+
    39 VtkSurfaceWriter(const char* filename) : filename_(filename)
    \n+
    40 {}
    \n+
    \n
    41
    \n-
    42public:
    \n-
    43
    \n-
    44 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n-
    45 using Extractor<GV,0>::codim;
    \n-
    46 typedef typename Extractor<GV,0>::ctype ctype;
    \n-
    47 using Extractor<GV,0>::dim;
    \n-
    48 using Extractor<GV,0>::dimworld;
    \n-\n+
    \n+\n+
    43 {}
    \n+
    \n+
    44
    \n+
    \n+
    45 void setFilename(const char* name)
    \n+
    46 {
    \n+
    47 if (std::strlen(name) > 0)
    \n+
    48 this->filename_ = name;
    \n+
    49 }
    \n+
    \n
    50
    \n-
    51 typedef typename GV::Traits::template Codim<dim>::Entity Vertex;
    \n-
    52 typedef typename GV::Traits::template Codim<0>::Entity Element;
    \n-
    53 typedef std::function<bool(const Element&, unsigned int subentity)> Predicate;
    \n-
    54
    \n-
    55 // import typedefs from base class
    \n-\n-\n-\n-\n-\n-
    61
    \n-
    \n-
    67 Codim0Extractor(const GV& gv, const Predicate& predicate)
    \n-
    68 : Extractor<GV,0>(gv), positiveNormalDirection_(false)
    \n-
    69 {
    \n-
    70 std::cout << "This is Codim0Extractor on a <"
    \n-
    71 << GV::dimension << "," << GV::dimensionworld << "> grid!" << std::endl;
    \n-
    72 update(predicate);
    \n-
    73 }
    \n-
    \n-
    74
    \n-\n-
    76 const bool & positiveNormalDirection() const { return positiveNormalDirection_; }
    \n-
    77
    \n-
    78protected:
    \n-\n-
    80private:
    \n-
    81 void update(const Predicate& predicate);
    \n-
    82};
    \n-
    \n-
    83
    \n-
    84
    \n-
    85template<typename GV>
    \n-
    86void Codim0Extractor<GV>::update(const Predicate& predicate)
    \n-
    87{
    \n-
    88 // In this first pass iterate over all entities of codim 0.
    \n-
    89 // Get its corner vertices, find resp. store them together with their associated index,
    \n-
    90 // and remember the indices of the corners.
    \n+
    51
    \n+
    52 template<typename K>
    \n+
    \n+
    53 void writeSurface(const std::vector<K>& coords, const std::vector<unsigned int>& indices, int corners, int dim)
    \n+
    54 {
    \n+
    55 std::ofstream fos;
    \n+
    56 char buffer[64];
    \n+
    57 sprintf(buffer, "%s.vtk", this->filename_);
    \n+
    58 fos.open(buffer);
    \n+
    59 fos << std::setprecision(8) << std::setw(1);
    \n+
    60 // write preamble
    \n+
    61 fos << "# vtk DataFile Version 2.0\\nFilename: " << buffer << "\\nASCII" << std::endl;
    \n+
    62 this->writePoints(coords, dim, fos);
    \n+
    63 const int polycount = indices.size()/corners;
    \n+
    64 int corner_count[polycount];
    \n+
    65 for (int i = 0; i < polycount; ++i)
    \n+
    66 corner_count[i] = corners;
    \n+
    67 this->writePolygons(indices, corner_count, polycount, dim, fos);
    \n+
    68 fos.close();
    \n+
    69 }
    \n+
    \n+
    70
    \n+
    71
    \n+
    72 template<typename K, typename T>
    \n+
    \n+
    73 void writeSurfaceElementData(const std::vector<K>& coords, const std::vector<unsigned int>& indices, int corners, const std::vector<T>& data, const char* dataname, int dim)
    \n+
    74 {
    \n+
    75 std::ofstream fos;
    \n+
    76 char buffer[64];
    \n+
    77 sprintf(buffer, "%s.vtk", this->filename_);
    \n+
    78 fos.open(buffer);
    \n+
    79 fos << std::setprecision(8) << std::setw(1);
    \n+
    80 // write preamble
    \n+
    81 fos << "# vtk DataFile Version 2.0\\nFilename: " << buffer << "\\nASCII" << std::endl;
    \n+
    82 this->writePoints(coords, dim, fos);
    \n+
    83 const int polycount = indices.size()/corners;
    \n+
    84 int corner_count[polycount];
    \n+
    85 for (int i = 0; i < polycount; ++i)
    \n+
    86 corner_count[i] = corners;
    \n+
    87 this->writePolygons(indices, corner_count, polycount, dim, fos);
    \n+
    88 this->writeCellData(data, dataname, dim, fos);
    \n+
    89 fos.close();
    \n+
    90 }
    \n+
    \n
    91
    \n-
    92 // free everything there is in this object
    \n-
    93 this->clear();
    \n-
    94
    \n-
    95 // several counter for consecutive indexing are needed
    \n-
    96 size_t element_index = 0;
    \n-
    97 size_t vertex_index = 0;
    \n-
    98
    \n-
    99 // a temporary container where newly acquired face
    \n-
    100 // information can be stored at first
    \n-
    101 std::deque<SubEntityInfo> temp_faces;
    \n-
    102
    \n-
    103 // iterate over all codim 0 elements on the grid
    \n-
    104 for (const auto& elmt : elements(this->gv_, Partitions::interior))
    \n-
    105 {
    \n-
    106 const auto geometry = elmt.geometry();
    \n-
    107 IndexType eindex = this->cellMapper_.index(elmt);
    \n-
    108
    \n-
    109 // only do sth. if this element is "interesting"
    \n-
    110 // implicit cast is done automatically
    \n-
    111 if (predicate(elmt,0))
    \n-
    112 {
    \n-
    113 // add an entry to the element info map, the index will be set properly later
    \n-
    114 this->elmtInfo_.emplace(eindex, ElementInfo(element_index, elmt, 1));
    \n-
    115
    \n-
    116 unsigned int numCorners = elmt.subEntities(dim);
    \n-
    117 unsigned int vertex_indices[numCorners]; // index in global vector
    \n-
    118 unsigned int vertex_numbers[numCorners]; // index in parent entity
    \n-
    119
    \n-
    120 // try for each of the faces vertices whether it is already inserted or not
    \n-
    121 for (unsigned int i = 0; i < numCorners; ++i)
    \n-
    122 {
    \n-
    123 vertex_numbers[i] = i;
    \n-
    124
    \n-
    125 // get the vertex pointer and the index from the index set
    \n-
    126 const Vertex vertex = elmt.template subEntity<dim>(vertex_numbers[i]);
    \n-
    127 IndexType vindex = this->gv_.indexSet().template index<dim>(vertex);
    \n+
    92
    \n+
    93 template<typename K, typename T>
    \n+
    \n+
    94 void writeSurfaceVertexData(const std::vector<K>& coords, const std::vector<unsigned int>& indices, int corners, const std::vector<T>& data, const char* dataname, int dim)
    \n+
    95 {
    \n+
    96 std::ofstream fos;
    \n+
    97 char buffer[64];
    \n+
    98 sprintf(buffer, "%s.vtk", this->filename_);
    \n+
    99 fos.open(buffer);
    \n+
    100 fos << std::setprecision(8) << std::setw(1);
    \n+
    101 // write preamble
    \n+
    102 fos << "# vtk DataFile Version 2.0\\nFilename: " << buffer << "\\nASCII" << std::endl;
    \n+
    103 this->writePoints(coords, dim, fos);
    \n+
    104 const int polycount = indices.size()/corners;
    \n+
    105 int corner_count[polycount];
    \n+
    106 for (int i = 0; i < polycount; ++i)
    \n+
    107 corner_count[i] = corners;
    \n+
    108 this->writePolygons(indices, corner_count, polycount, dim, fos);
    \n+
    109 this->writePointData(data, dataname, dim, fos);
    \n+
    110 fos.close();
    \n+
    111 }
    \n+
    \n+
    112
    \n+
    113protected:
    \n+
    114
    \n+
    115 template<typename K>
    \n+
    \n+
    116 void writePoints(const std::vector<K>& coords, int dim, std::ofstream& fos)
    \n+
    117 {
    \n+
    118 fos << "DATASET POLYDATA\\nPOINTS " << coords.size() << " " << TypeNames[Nametraits<K>::nameidx] << std::endl;
    \n+
    119 for (unsigned int i = 0; i < coords.size(); ++i)
    \n+
    120 {
    \n+
    121 fos << coords[i][0];
    \n+
    122 if (dim == 2)
    \n+
    123 fos << " " << coords[i][1] << " 0 \\n" << coords[i][0] << " " << coords[i][1] << " 0.01" << std::endl;
    \n+
    124 else // dim == 3
    \n+
    125 fos << " " << coords[i][1] << " " << coords[i][2] << std::endl;
    \n+
    126 }
    \n+
    127 }
    \n+
    \n
    128
    \n-
    129 // if the vertex is not yet inserted in the vertex info map
    \n-
    130 // it is a new one -> it will be inserted now!
    \n-
    131 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);
    \n-
    132 if (vimit == this->vtxInfo_.end())
    \n-
    133 {
    \n-
    134 // insert into the map
    \n-
    135 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));
    \n-
    136 // remember this vertex' index
    \n-
    137 vertex_indices[i] = vertex_index;
    \n-
    138 // increase the current index
    \n-
    139 vertex_index++;
    \n-
    140 }
    \n-
    141 else
    \n-
    142 {
    \n-
    143 // only remember the vertex' index
    \n-
    144 vertex_indices[i] = vimit->second.idx;
    \n-
    145 }
    \n-
    146 }
    \n-
    147
    \n-
    148 // flip cell if necessary
    \n-
    149 {
    \n-
    150 switch (int(dim))
    \n-
    151 {
    \n-
    152 case 0 :
    \n-
    153 break;
    \n-
    154 case 1 :
    \n-
    155 {
    \n-
    156 // The following test only works if the zero-th coordinate is the
    \n-
    157 // one that defines the orientation. A sufficient condition for
    \n-
    158 // this is dimworld == 1
    \n-
    159 /* assert(dimworld==1); */
    \n-
    160 bool elementNormalDirection =
    \n-
    161 (geometry.corner(1)[0] < geometry.corner(0)[0]);
    \n-
    162 if ( positiveNormalDirection_ != elementNormalDirection )
    \n-
    163 {
    \n-
    164 std::swap(vertex_indices[0], vertex_indices[1]);
    \n-
    165 std::swap(vertex_numbers[0], vertex_numbers[1]);
    \n-
    166 }
    \n-
    167 break;
    \n-
    168 }
    \n-
    169 case 2 :
    \n-
    170 {
    \n-
    171 Dune::FieldVector<ctype, dimworld>
    \n-
    172 v0 = geometry.corner(1),
    \n-
    173 v1 = geometry.corner(2);
    \n-
    174 v0 -= geometry.corner(0);
    \n-
    175 v1 -= geometry.corner(0);
    \n-
    176 ctype normal_sign = v0[0]*v1[1] - v0[1]*v1[0];
    \n-
    177 bool elementNormalDirection = (normal_sign < 0);
    \n-
    178 if ( positiveNormalDirection_ != elementNormalDirection )
    \n-
    179 {
    \n-
    180 std::cout << "swap\\n";
    \n-
    181 if (elmt.type().isCube())
    \n-
    182 {
    \n-
    183 for (int i = 0; i < (1<<dim); i+=2)
    \n-
    184 {
    \n-
    185 // swap i and i+1
    \n-
    186 std::swap(vertex_indices[i], vertex_indices[i+1]);
    \n-
    187 std::swap(vertex_numbers[i], vertex_numbers[i+1]);
    \n-
    188 }
    \n-
    189 } else if (elmt.type().isSimplex()) {
    \n-
    190 std::swap(vertex_indices[0], vertex_indices[1]);
    \n-
    191 std::swap(vertex_numbers[0], vertex_numbers[1]);
    \n-
    192 } else {
    \n-
    193 DUNE_THROW(Dune::Exception, "Unexpected Geometrytype");
    \n-
    194 }
    \n-
    195 }
    \n-
    196 break;
    \n-
    197 }
    \n-
    198 }
    \n-
    199 }
    \n-
    200
    \n-
    201 // add a new face to the temporary collection
    \n-
    202 temp_faces.emplace_back(eindex, 0, elmt.type());
    \n-
    203 element_index++;
    \n-
    204 for (unsigned int i=0; i<numCorners; i++) {
    \n-
    205 temp_faces.back().corners[i].idx = vertex_indices[i];
    \n-
    206 // remember the vertices' numbers in parent element's vertices
    \n-
    207 temp_faces.back().corners[i].num = vertex_numbers[i];
    \n-
    208 }
    \n+
    \n+
    129 void writePolygons(const std::vector<unsigned int>& indices, const int* corners, int ncorners, int dim, std::ofstream& fos)
    \n+
    130 {
    \n+
    131 if (dim == 2)
    \n+
    132 {
    \n+
    133 fos << "POLYGONS " << indices.size()/2 << " " << 5*(indices.size() / 2) << std::endl;
    \n+
    134 for (unsigned int i = 0; i < indices.size(); i += 2)
    \n+
    135 fos << "4 " << 2*indices[i] << " " << 2*indices[i+1] << " " << 2*indices[i+1]+1 << " "<< 2*indices[i]+1 << std::endl;
    \n+
    136
    \n+
    137 // arbitrary shapes - ignored here!
    \n+
    138 // int sum = ncorners;
    \n+
    139 // for (int i = 0; i < ncorners; ++i)
    \n+
    140 // sum += (corners[i] > 2 ? corners[i] : 3);
    \n+
    141 //
    \n+
    142 // fos << "POLYGONS " << ncorners << " " << sum << std::endl;
    \n+
    143 // int index = 0;
    \n+
    144 // for (int i = 0; i < ncorners; ++i)
    \n+
    145 // {
    \n+
    146 // // write the first index twice if it is an edge
    \n+
    147 // // => triangle instead of edge - paraview can display it then
    \n+
    148 // if (corners[i] > 2)
    \n+
    149 // fos << corners[i];
    \n+
    150 // else
    \n+
    151 // fos << "3 " << indices[index];
    \n+
    152 //
    \n+
    153 // for (int j = 0; j < corners[i]; ++j)
    \n+
    154 // fos << " " << indices[index++];
    \n+
    155 // fos << std::endl;
    \n+
    156 // }
    \n+
    157 }
    \n+
    158 else
    \n+
    159 {
    \n+
    160 int sum = ncorners;
    \n+
    161 for (int i = 0; i < ncorners; ++i)
    \n+
    162 sum += corners[i];
    \n+
    163 fos << "POLYGONS " << ncorners << " " << sum << std::endl;
    \n+
    164 int index = 0;
    \n+
    165 for (int i = 0; i < ncorners; ++i)
    \n+
    166 {
    \n+
    167 fos << corners[i];
    \n+
    168 for (int j = 0; j < corners[i]; ++j)
    \n+
    169 fos << " " << indices[index++];
    \n+
    170 fos << std::endl;
    \n+
    171 }
    \n+
    172 }
    \n+
    173 }
    \n+
    \n+
    174
    \n+
    175 template<typename T>
    \n+
    \n+
    176 void writeCellData(const std::vector<T>& data, const char* dataname, int dim, std::ofstream& fos)
    \n+
    177 {
    \n+
    178 fos << "CELL_DATA " << data.size()*(dim == 2 ? 2 : 1) << std::endl;
    \n+
    179 fos << "SCALARS " << dataname << " " << TypeNames[Nametraits<T>::nameidx] << " 1" << std::endl;
    \n+
    180 fos << "LOOKUP_TABLE default" << std::endl;
    \n+
    181 for (unsigned int i = 0; i < data.size(); ++i)
    \n+
    182 {
    \n+
    183 fos << data[i] << std::endl;
    \n+
    184 if (dim == 2)
    \n+
    185 fos << data[i] << std::endl;
    \n+
    186 }
    \n+
    187 }
    \n+
    \n+
    188
    \n+
    189 template<typename T>
    \n+
    \n+
    190 void writePointData(const std::vector<T>& data, const char* dataname, int dim, std::ofstream& fos)
    \n+
    191 {
    \n+
    192 fos << "POINT_DATA " << data.size()*(dim == 2 ? 2 : 1) << std::endl;
    \n+
    193 fos << "SCALARS " << dataname << " " << TypeNames[Nametraits<T>::nameidx] << " 1" << std::endl;
    \n+
    194 fos << "LOOKUP_TABLE default" << std::endl;
    \n+
    195 for (unsigned int i = 0; i < data.size(); ++i)
    \n+
    196 {
    \n+
    197 fos << data[i] << std::endl;
    \n+
    198 if (dim == 2)
    \n+
    199 fos << data[i] << std::endl;
    \n+
    200 }
    \n+
    201 }
    \n+
    \n+
    202
    \n+
    203
    \n+
    204private:
    \n+
    205 const char* filename_;
    \n+
    206};
    \n+
    \n+
    207
    \n+
    208} // namespace GridGlue
    \n
    209
    \n-
    210 }
    \n-
    211 } // end loop over elements
    \n-
    212
    \n-
    213 // allocate the array for the face specific information...
    \n-
    214 this->subEntities_.resize(element_index);
    \n-
    215 // ...and fill in the data from the temporary containers
    \n-
    216 copy(temp_faces.begin(), temp_faces.end(), this->subEntities_.begin());
    \n-
    217
    \n-
    218 // now first write the array with the coordinates...
    \n-
    219 this->coords_.resize(this->vtxInfo_.size());
    \n-
    220 for (const auto& vinfo : this->vtxInfo_)
    \n-
    221 {
    \n-
    222 // get a pointer to the associated info object
    \n-
    223 CoordinateInfo* current = &this->coords_[vinfo.second.idx];
    \n-
    224 // store this coordinates index // NEEDED?
    \n-
    225 current->index = vinfo.second.idx;
    \n-
    226 // store the vertex' index for the index2vertex mapping
    \n-
    227 current->vtxindex = vinfo.first;
    \n-
    228 // store the vertex' coordinates under the associated index
    \n-
    229 // in the coordinates array
    \n-
    230 const auto vtx = this->grid().entity(vinfo.second.p);
    \n-
    231 current->coord = vtx.geometry().corner(0);
    \n-
    232 }
    \n-
    233
    \n-
    234}
    \n-
    235
    \n-
    236} // namespace GridGlue
    \n-
    237
    \n-
    238} // namespace Dune
    \n-
    239
    \n-
    240#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH
    \n-
    extractor base class
    \n+
    210} // namespace Dune
    \n+
    211
    \n+
    212#endif // DUNE_GRIDGLUE_EXTRACTORS_VTKSURFACEWRITER_HH
    \n
    Definition gridglue.hh:37
    \n-
    Definition codim0extractor.hh:40
    \n-
    bool & positiveNormalDirection()
    Definition codim0extractor.hh:75
    \n-
    Extractor< GV, 0 >::IndexType IndexType
    Definition codim0extractor.hh:49
    \n-
    const bool & positiveNormalDirection() const
    Definition codim0extractor.hh:76
    \n-
    GV::Traits::template Codim< dim >::Entity Vertex
    Definition codim0extractor.hh:51
    \n-
    Extractor< GV, 0 >::CoordinateInfo CoordinateInfo
    Definition codim0extractor.hh:59
    \n-
    Extractor< GV, 0 >::VertexInfo VertexInfo
    Definition codim0extractor.hh:58
    \n-
    Extractor< GV, 0 >::ctype ctype
    Definition codim0extractor.hh:46
    \n-
    bool positiveNormalDirection_
    Definition codim0extractor.hh:79
    \n-
    Extractor< GV, 0 >::VertexInfoMap VertexInfoMap
    Definition codim0extractor.hh:60
    \n-
    std::function< bool(const Element &, unsigned int subentity)> Predicate
    Definition codim0extractor.hh:53
    \n-
    Codim0Extractor(const GV &gv, const Predicate &predicate)
    Constructor.
    Definition codim0extractor.hh:67
    \n-
    Extractor< GV, 0 >::ElementInfo ElementInfo
    Definition codim0extractor.hh:57
    \n-
    GV::Traits::template Codim< 0 >::Entity Element
    Definition codim0extractor.hh:52
    \n-
    Extractor< GV, 0 >::SubEntityInfo SubEntityInfo
    Definition codim0extractor.hh:56
    \n-
    Provides codimension-independent methods for grid extraction.
    Definition extractor.hh:46
    \n-
    static constexpr auto dimworld
    Definition extractor.hh:50
    \n-
    int IndexType
    Definition extractor.hh:73
    \n-
    static constexpr auto codim
    Definition extractor.hh:52
    \n-
    std::map< IndexType, VertexInfo > VertexInfoMap
    Definition extractor.hh:186
    \n-
    GV::Grid::ctype ctype
    Definition extractor.hh:59
    \n-
    static constexpr auto dim
    Definition extractor.hh:51
    \n-\n-
    simple struct holding a vertex pointer and an index
    Definition extractor.hh:116
    \n-
    simple struct holding an element seed and an index
    Definition extractor.hh:128
    \n-
    Holds some information about an element's subentity involved in a coupling.
    Definition extractor.hh:147
    \n+
    Definition vtksurfacewriter.hh:35
    \n+
    void writeCellData(const std::vector< T > &data, const char *dataname, int dim, std::ofstream &fos)
    Definition vtksurfacewriter.hh:176
    \n+
    void writePointData(const std::vector< T > &data, const char *dataname, int dim, std::ofstream &fos)
    Definition vtksurfacewriter.hh:190
    \n+
    void writeSurfaceVertexData(const std::vector< K > &coords, const std::vector< unsigned int > &indices, int corners, const std::vector< T > &data, const char *dataname, int dim)
    Definition vtksurfacewriter.hh:94
    \n+
    void setFilename(const char *name)
    Definition vtksurfacewriter.hh:45
    \n+
    void writeSurfaceElementData(const std::vector< K > &coords, const std::vector< unsigned int > &indices, int corners, const std::vector< T > &data, const char *dataname, int dim)
    Definition vtksurfacewriter.hh:73
    \n+
    ~VtkSurfaceWriter()
    Definition vtksurfacewriter.hh:42
    \n+
    VtkSurfaceWriter(const char *filename)
    Definition vtksurfacewriter.hh:39
    \n+
    void writeSurface(const std::vector< K > &coords, const std::vector< unsigned int > &indices, int corners, int dim)
    Definition vtksurfacewriter.hh:53
    \n+
    void writePoints(const std::vector< K > &coords, int dim, std::ofstream &fos)
    Definition vtksurfacewriter.hh:116
    \n+
    void writePolygons(const std::vector< unsigned int > &indices, const int *corners, int ncorners, int dim, std::ofstream &fos)
    Definition vtksurfacewriter.hh:129
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,325 +1,280 @@\n dune-grid-glue\u00a02.10\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\bs\n-codim0extractor.hh\n+vtksurfacewriter.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n 5/*\n-6 * Filename: codim0extractor.hh\n+6 * Filename: VtkSurfaceWriter.hh\n 7 * Version: 1.0\n-8 * Created on: Jun 23, 2009\n-9 * Author: Oliver Sander, Christian Engwer\n+8 * Created on: Jan 16, 2009\n+9 * Author: Gerrit Buse\n 10 * ---------------------------------\n 11 * Project: dune-grid-glue\n-12 * Description: base class for grid extractors extracting surface grids\n+12 * Description: helper class for graphical output of grids in generic\n+representation\n 13 *\n 14 */\n-20#ifndef DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH\n-21#define DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH\n+20#ifndef DUNE_GRIDGLUE_EXTRACTORS_VTKSURFACEWRITER_HH\n+21#define DUNE_GRIDGLUE_EXTRACTORS_VTKSURFACEWRITER_HH\n 22\n-23#include \n-24#include \n-25\n-26#include \n-27#include \n-28\n-29#include \"_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\"\n-30\n-31namespace _\bD_\bu_\bn_\be {\n-32\n-33 namespace GridGlue {\n-34\n-38template\n-_\b3_\b9class _\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br : public _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-40{\n+23#include \n+24#include \n+25#include \n+26#include \n+27\n+28#include \"../adapter/gridgluevtkwriter.hh\"\n+29\n+30namespace _\bD_\bu_\bn_\be {\n+31\n+32 namespace GridGlue {\n+33\n+_\b3_\b4class _\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br\n+35{\n+36public:\n+37\n+38\n+_\b3_\b9 _\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br(const char* filename) : filename_(filename)\n+40 {}\n 41\n-42public:\n-43\n-44 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n-45 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bo_\bd_\bi_\bm;\n-_\b4_\b6 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bc_\bt_\by_\bp_\be _\bc_\bt_\by_\bp_\be;\n-47 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm;\n-48 using _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd;\n-_\b4_\b9 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be _\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be;\n+_\b4_\b2 _\b~_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br()\n+43 {}\n+44\n+_\b4_\b5 void _\bs_\be_\bt_\bF_\bi_\bl_\be_\bn_\ba_\bm_\be(const char* name)\n+46 {\n+47 if (std::strlen(name) > 0)\n+48 this->filename_ = name;\n+49 }\n 50\n-_\b5_\b1 typedef typename GV::Traits::template Codim::Entity _\bV_\be_\br_\bt_\be_\bx;\n-_\b5_\b2 typedef typename GV::Traits::template Codim<0>::Entity _\bE_\bl_\be_\bm_\be_\bn_\bt;\n-_\b5_\b3 typedef std::function\n-_\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be;\n-54\n-55 // import typedefs from base class\n-_\b5_\b6 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo _\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo;\n-_\b5_\b7 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo _\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo;\n-_\b5_\b8 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo;\n-_\b5_\b9 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo _\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo;\n-_\b6_\b0 typedef typename _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b,_\b0_\b>_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp _\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp;\n-61\n-_\b6_\b7 _\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(const GV& gv, const _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be& predicate)\n-68 : _\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br(gv), _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_(false)\n-69 {\n-70 std::cout << \"This is Codim0Extractor on a <\"\n-71 << GV::dimension << \",\" << GV::dimensionworld << \"> grid!\" << std::endl;\n-72 update(predicate);\n-73 }\n-74\n-_\b7_\b5 bool & _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn() { return _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_; }\n-_\b7_\b6 const bool & _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn() const { return\n-_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_; }\n-77\n-78protected:\n-_\b7_\b9 bool _\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_;\n-80private:\n-81 void update(const _\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be& predicate);\n-82};\n-83\n-84\n-85template\n-86void _\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\bG_\bV_\b>_\b:_\b:_\bu_\bp_\bd_\ba_\bt_\be(const Predicate& predicate)\n-87{\n-88 // In this first pass iterate over all entities of codim 0.\n-89 // Get its corner vertices, find resp. store them together with their\n-associated index,\n-90 // and remember the indices of the corners.\n+51\n+52 template\n+_\b5_\b3 void _\bw_\br_\bi_\bt_\be_\bS_\bu_\br_\bf_\ba_\bc_\be(const std::vector& coords, const std::vector& indices, int corners, int dim)\n+54 {\n+55 std::ofstream fos;\n+56 char buffer[64];\n+57 sprintf(buffer, \"%s.vtk\", this->filename_);\n+58 fos.open(buffer);\n+59 fos << std::setprecision(8) << std::setw(1);\n+60 // write preamble\n+61 fos << \"# vtk DataFile Version 2.0\\nFilename: \" << buffer << \"\\nASCII\" <<\n+std::endl;\n+62 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bs(coords, dim, fos);\n+63 const int polycount = indices.size()/corners;\n+64 int corner_count[polycount];\n+65 for (int i = 0; i < polycount; ++i)\n+66 corner_count[i] = corners;\n+67 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bl_\by_\bg_\bo_\bn_\bs(indices, corner_count, polycount, dim, fos);\n+68 fos.close();\n+69 }\n+70\n+71\n+72 template\n+_\b7_\b3 void _\bw_\br_\bi_\bt_\be_\bS_\bu_\br_\bf_\ba_\bc_\be_\bE_\bl_\be_\bm_\be_\bn_\bt_\bD_\ba_\bt_\ba(const std::vector& coords, const std::\n+vector& indices, int corners, const std::vector& data, const\n+char* dataname, int dim)\n+74 {\n+75 std::ofstream fos;\n+76 char buffer[64];\n+77 sprintf(buffer, \"%s.vtk\", this->filename_);\n+78 fos.open(buffer);\n+79 fos << std::setprecision(8) << std::setw(1);\n+80 // write preamble\n+81 fos << \"# vtk DataFile Version 2.0\\nFilename: \" << buffer << \"\\nASCII\" <<\n+std::endl;\n+82 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bs(coords, dim, fos);\n+83 const int polycount = indices.size()/corners;\n+84 int corner_count[polycount];\n+85 for (int i = 0; i < polycount; ++i)\n+86 corner_count[i] = corners;\n+87 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bl_\by_\bg_\bo_\bn_\bs(indices, corner_count, polycount, dim, fos);\n+88 this->_\bw_\br_\bi_\bt_\be_\bC_\be_\bl_\bl_\bD_\ba_\bt_\ba(data, dataname, dim, fos);\n+89 fos.close();\n+90 }\n 91\n-92 // free everything there is in this object\n-93 this->clear();\n-94\n-95 // several counter for consecutive indexing are needed\n-96 size_t element_index = 0;\n-97 size_t vertex_index = 0;\n-98\n-99 // a temporary container where newly acquired face\n-100 // information can be stored at first\n-101 std::deque temp_faces;\n-102\n-103 // iterate over all codim 0 elements on the grid\n-104 for (const auto& elmt : elements(this->gv_, Partitions::interior))\n-105 {\n-106 const auto geometry = elmt.geometry();\n-107 IndexType eindex = this->cellMapper_.index(elmt);\n-108\n-109 // only do sth. if this element is \"interesting\"\n-110 // implicit cast is done automatically\n-111 if (predicate(elmt,0))\n-112 {\n-113 // add an entry to the element info map, the index will be set properly\n-later\n-114 this->elmtInfo_.emplace(eindex, ElementInfo(element_index, elmt, 1));\n-115\n-116 unsigned int numCorners = elmt.subEntities(dim);\n-117 unsigned int vertex_indices[numCorners]; // index in global vector\n-118 unsigned int vertex_numbers[numCorners]; // index in parent entity\n-119\n-120 // try for each of the faces vertices whether it is already inserted or not\n-121 for (unsigned int i = 0; i < numCorners; ++i)\n-122 {\n-123 vertex_numbers[i] = i;\n-124\n-125 // get the vertex pointer and the index from the index set\n-126 const Vertex vertex = elmt.template subEntity(vertex_numbers[i]);\n-127 IndexType vindex = this->gv_.indexSet().template index(vertex);\n+92\n+93 template\n+_\b9_\b4 void _\bw_\br_\bi_\bt_\be_\bS_\bu_\br_\bf_\ba_\bc_\be_\bV_\be_\br_\bt_\be_\bx_\bD_\ba_\bt_\ba(const std::vector& coords, const std::\n+vector& indices, int corners, const std::vector& data, const\n+char* dataname, int dim)\n+95 {\n+96 std::ofstream fos;\n+97 char buffer[64];\n+98 sprintf(buffer, \"%s.vtk\", this->filename_);\n+99 fos.open(buffer);\n+100 fos << std::setprecision(8) << std::setw(1);\n+101 // write preamble\n+102 fos << \"# vtk DataFile Version 2.0\\nFilename: \" << buffer << \"\\nASCII\" <<\n+std::endl;\n+103 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bs(coords, dim, fos);\n+104 const int polycount = indices.size()/corners;\n+105 int corner_count[polycount];\n+106 for (int i = 0; i < polycount; ++i)\n+107 corner_count[i] = corners;\n+108 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bl_\by_\bg_\bo_\bn_\bs(indices, corner_count, polycount, dim, fos);\n+109 this->_\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bD_\ba_\bt_\ba(data, dataname, dim, fos);\n+110 fos.close();\n+111 }\n+112\n+113protected:\n+114\n+115 template\n+_\b1_\b1_\b6 void _\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bs(const std::vector& coords, int dim, std::ofstream& fos)\n+117 {\n+118 fos << \"DATASET POLYDATA\\nPOINTS \" << coords.size() << \" \" << TypeNames\n+[Nametraits::nameidx] << std::endl;\n+119 for (unsigned int i = 0; i < coords.size(); ++i)\n+120 {\n+121 fos << coords[i][0];\n+122 if (dim == 2)\n+123 fos << \" \" << coords[i][1] << \" 0 \\n\" << coords[i][0] << \" \" << coords[i]\n+[1] << \" 0.01\" << std::endl;\n+124 else // dim == 3\n+125 fos << \" \" << coords[i][1] << \" \" << coords[i][2] << std::endl;\n+126 }\n+127 }\n 128\n-129 // if the vertex is not yet inserted in the vertex info map\n-130 // it is a new one -> it will be inserted now!\n-131 typename VertexInfoMap::iterator vimit = this->vtxInfo_.find(vindex);\n-132 if (vimit == this->vtxInfo_.end())\n-133 {\n-134 // insert into the map\n-135 this->vtxInfo_.emplace(vindex, VertexInfo(vertex_index, vertex));\n-136 // remember this vertex' index\n-137 vertex_indices[i] = vertex_index;\n-138 // increase the current index\n-139 vertex_index++;\n-140 }\n-141 else\n-142 {\n-143 // only remember the vertex' index\n-144 vertex_indices[i] = vimit->second.idx;\n-145 }\n-146 }\n-147\n-148 // flip cell if necessary\n-149 {\n-150 switch (int(dim))\n-151 {\n-152 case 0 :\n-153 break;\n-154 case 1 :\n-155 {\n-156 // The following test only works if the zero-th coordinate is the\n-157 // one that defines the orientation. A sufficient condition for\n-158 // this is dimworld == 1\n-159 /* assert(dimworld==1); */\n-160 bool elementNormalDirection =\n-161 (geometry.corner(1)[0] < geometry.corner(0)[0]);\n-162 if ( positiveNormalDirection_ != elementNormalDirection )\n-163 {\n-164 std::swap(vertex_indices[0], vertex_indices[1]);\n-165 std::swap(vertex_numbers[0], vertex_numbers[1]);\n-166 }\n-167 break;\n-168 }\n-169 case 2 :\n-170 {\n-171 Dune::FieldVector\n-172 v0 = geometry.corner(1),\n-173 v1 = geometry.corner(2);\n-174 v0 -= geometry.corner(0);\n-175 v1 -= geometry.corner(0);\n-176 ctype normal_sign = v0[0]*v1[1] - v0[1]*v1[0];\n-177 bool elementNormalDirection = (normal_sign < 0);\n-178 if ( positiveNormalDirection_ != elementNormalDirection )\n-179 {\n-180 std::cout << \"swap\\n\";\n-181 if (elmt.type().isCube())\n+_\b1_\b2_\b9 void _\bw_\br_\bi_\bt_\be_\bP_\bo_\bl_\by_\bg_\bo_\bn_\bs(const std::vector& indices, const int*\n+corners, int ncorners, int dim, std::ofstream& fos)\n+130 {\n+131 if (dim == 2)\n+132 {\n+133 fos << \"POLYGONS \" << indices.size()/2 << \" \" << 5*(indices.size() / 2) <<\n+std::endl;\n+134 for (unsigned int i = 0; i < indices.size(); i += 2)\n+135 fos << \"4 \" << 2*indices[i] << \" \" << 2*indices[i+1] << \" \" << 2*indices\n+[i+1]+1 << \" \"<< 2*indices[i]+1 << std::endl;\n+136\n+137 // arbitrary shapes - ignored here!\n+138 // int sum = ncorners;\n+139 // for (int i = 0; i < ncorners; ++i)\n+140 // sum += (corners[i] > 2 ? corners[i] : 3);\n+141 //\n+142 // fos << \"POLYGONS \" << ncorners << \" \" << sum << std::endl;\n+143 // int index = 0;\n+144 // for (int i = 0; i < ncorners; ++i)\n+145 // {\n+146 // // write the first index twice if it is an edge\n+147 // // => triangle instead of edge - paraview can display it then\n+148 // if (corners[i] > 2)\n+149 // fos << corners[i];\n+150 // else\n+151 // fos << \"3 \" << indices[index];\n+152 //\n+153 // for (int j = 0; j < corners[i]; ++j)\n+154 // fos << \" \" << indices[index++];\n+155 // fos << std::endl;\n+156 // }\n+157 }\n+158 else\n+159 {\n+160 int sum = ncorners;\n+161 for (int i = 0; i < ncorners; ++i)\n+162 sum += corners[i];\n+163 fos << \"POLYGONS \" << ncorners << \" \" << sum << std::endl;\n+164 int index = 0;\n+165 for (int i = 0; i < ncorners; ++i)\n+166 {\n+167 fos << corners[i];\n+168 for (int j = 0; j < corners[i]; ++j)\n+169 fos << \" \" << indices[index++];\n+170 fos << std::endl;\n+171 }\n+172 }\n+173 }\n+174\n+175 template\n+_\b1_\b7_\b6 void _\bw_\br_\bi_\bt_\be_\bC_\be_\bl_\bl_\bD_\ba_\bt_\ba(const std::vector& data, const char* dataname, int\n+dim, std::ofstream& fos)\n+177 {\n+178 fos << \"CELL_DATA \" << data.size()*(dim == 2 ? 2 : 1) << std::endl;\n+179 fos << \"SCALARS \" << dataname << \" \" << TypeNames[Nametraits::nameidx]\n+<< \" 1\" << std::endl;\n+180 fos << \"LOOKUP_TABLE default\" << std::endl;\n+181 for (unsigned int i = 0; i < data.size(); ++i)\n 182 {\n-183 for (int i = 0; i < (1<\n+_\b1_\b9_\b0 void _\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bD_\ba_\bt_\ba(const std::vector& data, const char* dataname, int\n+dim, std::ofstream& fos)\n+191 {\n+192 fos << \"POINT_DATA \" << data.size()*(dim == 2 ? 2 : 1) << std::endl;\n+193 fos << \"SCALARS \" << dataname << \" \" << TypeNames[Nametraits::nameidx]\n+<< \" 1\" << std::endl;\n+194 fos << \"LOOKUP_TABLE default\" << std::endl;\n+195 for (unsigned int i = 0; i < data.size(); ++i)\n+196 {\n+197 fos << data[i] << std::endl;\n+198 if (dim == 2)\n+199 fos << data[i] << std::endl;\n+200 }\n+201 }\n+202\n+203\n+204private:\n+205 const char* filename_;\n+206};\n+207\n+208} // namespace GridGlue\n 209\n-210 }\n-211 } // end loop over elements\n-212\n-213 // allocate the array for the face specific information...\n-214 this->subEntities_.resize(element_index);\n-215 // ...and fill in the data from the temporary containers\n-216 copy(temp_faces.begin(), temp_faces.end(), this->subEntities_.begin());\n-217\n-218 // now first write the array with the coordinates...\n-219 this->coords_.resize(this->vtxInfo_.size());\n-220 for (const auto& vinfo : this->vtxInfo_)\n-221 {\n-222 // get a pointer to the associated info object\n-223 CoordinateInfo* current = &this->coords_[vinfo.second.idx];\n-224 // store this coordinates index // NEEDED?\n-225 current->index = vinfo.second.idx;\n-226 // store the vertex' index for the index2vertex mapping\n-227 current->vtxindex = vinfo.first;\n-228 // store the vertex' coordinates under the associated index\n-229 // in the coordinates array\n-230 const auto vtx = this->grid().entity(vinfo.second.p);\n-231 current->coord = vtx.geometry().corner(0);\n-232 }\n-233\n-234}\n-235\n-236} // namespace GridGlue\n-237\n-238} // namespace Dune\n-239\n-240#endif // DUNE_GRIDGLUE_EXTRACTORS_CODIM0EXTRACTOR_HH\n-_\be_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b._\bh_\bh\n-extractor base class\n+210} // namespace Dune\n+211\n+212#endif // DUNE_GRIDGLUE_EXTRACTORS_VTKSURFACEWRITER_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:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:40\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn\n-bool & positiveNormalDirection()\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:75\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n-Extractor< GV, 0 >::IndexType IndexType\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:49\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn\n-const bool & positiveNormalDirection() const\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:76\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx\n-GV::Traits::template Codim< dim >::Entity Vertex\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:51\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n-Extractor< GV, 0 >::CoordinateInfo CoordinateInfo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:59\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n-Extractor< GV, 0 >::VertexInfo VertexInfo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:58\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bt_\by_\bp_\be\n-Extractor< GV, 0 >::ctype ctype\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:46\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bp_\bo_\bs_\bi_\bt_\bi_\bv_\be_\bN_\bo_\br_\bm_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b_\n-bool positiveNormalDirection_\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:79\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n-Extractor< GV, 0 >::VertexInfoMap VertexInfoMap\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:60\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bP_\br_\be_\bd_\bi_\bc_\ba_\bt_\be\n-std::function< bool(const Element &, unsigned int subentity)> Predicate\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:53\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-Codim0Extractor(const GV &gv, const Predicate &predicate)\n-Constructor.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:67\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n-Extractor< GV, 0 >::ElementInfo ElementInfo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:57\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt\n-GV::Traits::template Codim< 0 >::Entity Element\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:52\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bd_\bi_\bm_\b0_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n-Extractor< GV, 0 >::SubEntityInfo SubEntityInfo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn codim0extractor.hh:56\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br\n-Provides codimension-independent methods for grid extraction.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:46\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b0_\b _\b>_\b:_\b:_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd\n-static constexpr auto dimworld\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:50\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bI_\bn_\bd_\be_\bx_\bT_\by_\bp_\be\n-int IndexType\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:73\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b0_\b _\b>_\b:_\b:_\bc_\bo_\bd_\bi_\bm\n-static constexpr auto codim\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:52\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo_\bM_\ba_\bp\n-std::map< IndexType, VertexInfo > VertexInfoMap\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:186\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bc_\bt_\by_\bp_\be\n-GV::Grid::ctype ctype\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:59\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b<_\b _\bG_\bV_\b,_\b _\b0_\b _\b>_\b:_\b:_\bd_\bi_\bm\n-static constexpr auto dim\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:51\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bC_\bo_\bo_\br_\bd_\bi_\bn_\ba_\bt_\be_\bI_\bn_\bf_\bo\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:94\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bV_\be_\br_\bt_\be_\bx_\bI_\bn_\bf_\bo\n-simple struct holding a vertex pointer and an index\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:116\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bE_\bl_\be_\bm_\be_\bn_\bt_\bI_\bn_\bf_\bo\n-simple struct holding an element seed and an index\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:128\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bE_\bx_\bt_\br_\ba_\bc_\bt_\bo_\br_\b:_\b:_\bS_\bu_\bb_\bE_\bn_\bt_\bi_\bt_\by_\bI_\bn_\bf_\bo\n-Holds some information about an element's subentity involved in a coupling.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn extractor.hh:147\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:35\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bC_\be_\bl_\bl_\bD_\ba_\bt_\ba\n+void writeCellData(const std::vector< T > &data, const char *dataname, int dim,\n+std::ofstream &fos)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:176\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bD_\ba_\bt_\ba\n+void writePointData(const std::vector< T > &data, const char *dataname, int\n+dim, std::ofstream &fos)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:190\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bS_\bu_\br_\bf_\ba_\bc_\be_\bV_\be_\br_\bt_\be_\bx_\bD_\ba_\bt_\ba\n+void writeSurfaceVertexData(const std::vector< K > &coords, const std::vector<\n+unsigned int > &indices, int corners, const std::vector< T > &data, const char\n+*dataname, int dim)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:94\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bs_\be_\bt_\bF_\bi_\bl_\be_\bn_\ba_\bm_\be\n+void setFilename(const char *name)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:45\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bS_\bu_\br_\bf_\ba_\bc_\be_\bE_\bl_\be_\bm_\be_\bn_\bt_\bD_\ba_\bt_\ba\n+void writeSurfaceElementData(const std::vector< K > &coords, const std::vector<\n+unsigned int > &indices, int corners, const std::vector< T > &data, const char\n+*dataname, int dim)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:73\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\b~_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br\n+~VtkSurfaceWriter()\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:42\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br\n+VtkSurfaceWriter(const char *filename)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:39\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bS_\bu_\br_\bf_\ba_\bc_\be\n+void writeSurface(const std::vector< K > &coords, const std::vector< unsigned\n+int > &indices, int corners, int dim)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:53\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bP_\bo_\bi_\bn_\bt_\bs\n+void writePoints(const std::vector< K > &coords, int dim, std::ofstream &fos)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.hh:116\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bV_\bt_\bk_\bS_\bu_\br_\bf_\ba_\bc_\be_\bW_\br_\bi_\bt_\be_\br_\b:_\b:_\bw_\br_\bi_\bt_\be_\bP_\bo_\bl_\by_\bg_\bo_\bn_\bs\n+void writePolygons(const std::vector< unsigned int > &indices, const int\n+*corners, int ncorners, int dim, std::ofstream &fos)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn vtksurfacewriter.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/a00065.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: computeintersection.cc File Reference\n+dune-grid-glue: conformingmerge.hh File Reference\n \n \n \n \n \n \n \n@@ -70,28 +70,48 @@\n \n \n
    \n \n-
    computeintersection.cc File Reference
    \n+
    conformingmerge.hh File Reference
    \n
    \n
    \n \n+

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

    \n+
    #include <iomanip>
    \n+#include <vector>
    \n+#include <algorithm>
    \n+#include <bitset>
    \n+#include <dune/common/fmatrix.hh>
    \n+#include <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 \n \n \n \n \n

    \n Namespaces

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

    Detailed Description

    \n+

    Implementation of the Merger concept for conforming interfaces.

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,17 +1,32 @@\n dune-grid-glue\u00a02.10\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-computeintersection.cc File Reference\n+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n+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 N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+*\b**\b**\b**\b**\b* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n+Implementation of the Merger concept for conforming interfaces.\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00065_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: computeintersection.cc Source File\n+dune-grid-glue: conformingmerge.hh Source File\n \n \n \n \n \n \n \n@@ -74,356 +74,220 @@\n \n \n \n
    \n-
    computeintersection.cc
    \n+
    conformingmerge.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    5
    \n-
    6namespace Dune {
    \n-
    7namespace GridGlue {
    \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-
    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+
    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//****************************************************************************************
    \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+
    66 /* M E M B E R V A R I A B L E S */
    \n+
    67
    \n+
    69 T tolerance_;
    \n+
    70
    \n+
    71 typedef typename StandardMerge<T,dim,dim,dimworld>::SimplicialIntersection SimplicialIntersection;
    \n+
    72
    \n+
    77 void computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n+
    78 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n+
    79 std::bitset<(1<<dim)>& neighborIntersects1,
    \n+
    80 unsigned int grid1Index,
    \n+
    81 const Dune::GeometryType& grid2ElementType,
    \n+
    82 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n+
    83 std::bitset<(1<<dim)>& neighborIntersects2,
    \n+
    84 unsigned int grid2Index,
    \n+
    85 std::vector<SimplicialIntersection>& intersections);
    \n
    86
    \n-
    87 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+
    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+
    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-
    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+
    158 for (int i=0; i<refElement.size(dim); i++) {
    \n+
    159 intersections.back().corners0[0][i] = refElement.position(i,dim);
    \n+
    160 intersections.back().corners1[0][i] = refElement.position(other[i],dim);
    \n+
    161 }
    \n+
    162
    \n+
    163 } else if (dim == 2 && grid1ElementType.isQuadrilateral()) {
    \n+
    164
    \n+
    165 // split the quadrilateral into two triangles
    \n+
    166 const unsigned int subVertices[2][3] = {{0,1,3}, {0,3,2}};
    \n+
    167
    \n+
    168 for (int i=0; i<2; i++) {
    \n
    169
    \n-
    170 orderPointsCC(std::integral_constant<int,2>(),centroid,id,P);
    \n+
    170 SimplicialIntersection newSimplicialIntersection(grid1Index, grid2Index);
    \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+
    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-
    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+
    179 }
    \n+
    180
    \n+
    181 } else if (grid1ElementType.isHexahedron()) {
    \n+
    182
    \n+
    183 // split the hexahedron into five tetrahedra
    \n+
    184 // This can be removed if ever we allow Intersections that are not simplices
    \n+
    185 const unsigned int subVertices[5][4] = {{0,1,3,5}, {0,3,2,6}, {4,5,0,6}, {6,7,6,3}, {6,0,5,3}};
    \n+
    186
    \n+
    187 for (int i=0; i<5; i++) {
    \n+
    188
    \n+
    189 SimplicialIntersection newSimplicialIntersection(grid1Index, grid2Index);
    \n
    190
    \n-
    191 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+
    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-
    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+
    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-
    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+
    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,382 +1,253 @@\n dune-grid-glue\u00a02.10\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+conformingmerge.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-5\n-6namespace _\bD_\bu_\bn_\be {\n-7namespace GridGlue {\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-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+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//\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+66 /* M E M B E R V A R I A B L E S */\n+67\n+69 T tolerance_;\n+70\n+71 typedef typename _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bd_\bi_\bm_\b,_\bd_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b>_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+SimplicialIntersection;\n+72\n+77 void computeIntersections(const Dune::GeometryType& grid1ElementType,\n+78 const std::vector >& grid1ElementCorners,\n+79 std::bitset<(1<& neighborIntersects1,\n+80 unsigned int grid1Index,\n+81 const Dune::GeometryType& grid2ElementType,\n+82 const std::vector >& grid2ElementCorners,\n+83 std::bitset<(1<& neighborIntersects2,\n+84 unsigned int grid2Index,\n+85 std::vector& intersections);\n 86\n-87 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+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::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-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+158 for (int i=0; i(),centroid,id,P);\n+170 SimplicialIntersection newSimplicialIntersection(grid1Index, grid2Index);\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+172 for (int j=0; j\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+179 }\n+180\n+181 } else if (grid1ElementType.isHexahedron()) {\n+182\n+183 // split the hexahedron into five tetrahedra\n+184 // This can be removed if ever we allow Intersections that are not\n+simplices\n+185 const unsigned int subVertices[5][4] = {{0,1,3,5}, {0,3,2,6}, {4,5,0,6},\n+{6,7,6,3}, {6,0,5,3}};\n+186\n+187 for (int i=0; i<5; i++) {\n+188\n+189 SimplicialIntersection newSimplicialIntersection(grid1Index, grid2Index);\n 190\n-191 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+191 for (int j=0; j\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+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+_\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_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt\n-int insertPoint(const V p, std::vector< V > &P)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:164\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn\n-Intersection computation method for two elements of arbitrary dimension.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:39\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-static bool computeIntersection(const std::vector< V > &X, const std::vector< V\n-> &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > >\n-&SY, std::vector< V > &P)\n-Compute the intersection of two elements X and Y Compute the intersection of\n-two elements X and Y,...\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.cc:14\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\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/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: overlappingmerge.hh File Reference\n+dune-grid-glue: computeintersection.hh File Reference\n \n \n \n \n \n \n \n@@ -71,45 +71,46 @@\n \n \n \n
    \n \n-
    overlappingmerge.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    computeintersection.hh File Reference
    \n \n
    \n-
    #include <iostream>
    \n-#include <iomanip>
    \n-#include <vector>
    \n-#include <algorithm>
    \n+
    #include <dune/common/fvector.hh>
    \n #include <dune/common/fmatrix.hh>
    \n-#include <dune/common/fvector.hh>
    \n-#include <dune/geometry/referenceelements.hh>
    \n-#include <dune/geometry/multilineargeometry.hh>
    \n-#include <dune/grid/common/grid.hh>
    \n-#include <dune/grid-glue/merging/standardmerge.hh>
    \n-#include <dune/grid-glue/merging/computeintersection.hh>
    \n-#include "overlappingmerge.cc"
    \n+#include "simplexintersection.cc"
    \n+#include "computeintersection.cc"
    \n
    \n

    Go to the source code of this file.

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

    \n Classes

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

    \n Namespaces

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

    \n+Functions

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

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

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

    Go to the source code of this file.

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

    \n+Classes

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

    \n Namespaces

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

    \n-Macros

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

    \n-Functions

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

    Macro Definition Documentation

    \n-\n-

    ◆ DECL

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

    ◆ STANDARD_MERGE_INSTANTIATE

    \n-\n-
    \n-
    \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n- \n-
    #define STANDARD_MERGE_INSTANTIATE( T,
     A,
     B,
     
    )
    \n-
    \n-Value:
    DECL template \\
    \n-
    void StandardMerge<T,A,B,C>::build(const std::vector<Dune::FieldVector<T,C> >& grid1_coords, \\
    \n-
    const std::vector<unsigned int>& grid1_elements, \\
    \n-
    const std::vector<Dune::GeometryType>& grid1_element_types, \\
    \n-
    const std::vector<Dune::FieldVector<T,C> >& grid2_coords, \\
    \n-
    const std::vector<unsigned int>& grid2_elements, \\
    \n-
    const std::vector<Dune::GeometryType>& grid2_element_types \\
    \n-
    )
    \n-
    #define DECL
    Definition standardmerge.cc:12
    \n-
    \n-
    \n-
    \n-
    \n+

    Detailed Description

    \n+

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

    \n+
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,52 +1,41 @@\n dune-grid-glue\u00a02.10\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+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n+contactmerge.hh File Reference\n+Merge two grid boundary surfaces that may be a positive distance apart. _\bM_\bo_\br_\be_\b._\b._\b.\n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include \n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n+#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n+#include \"_\bc_\bo_\bn_\bt_\ba_\bc_\bt_\bm_\be_\br_\bg_\be_\b._\bc_\bc\"\n+_\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n+C\bCl\bla\bas\bss\bse\bes\bs\n+class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b _\b>\n+\u00a0 Merge two codimension-1 surfaces that may be a positive distance apart.\n+ _\bM_\bo_\br_\be_\b._\b._\b.\n+\u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n-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+*\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/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: computeintersection.hh File Reference\n+dune-grid-glue: overlappingmerge.hh File Reference\n \n \n \n \n \n \n \n@@ -71,46 +71,45 @@\n \n \n \n
    \n \n-
    computeintersection.hh File Reference
    \n+Namespaces
    \n+
    overlappingmerge.hh File Reference
    \n \n
    \n-
    #include <dune/common/fvector.hh>
    \n+
    #include <iostream>
    \n+#include <iomanip>
    \n+#include <vector>
    \n+#include <algorithm>
    \n #include <dune/common/fmatrix.hh>
    \n-#include "simplexintersection.cc"
    \n-#include "computeintersection.cc"
    \n+#include <dune/common/fvector.hh>
    \n+#include <dune/geometry/referenceelements.hh>
    \n+#include <dune/geometry/multilineargeometry.hh>
    \n+#include <dune/grid/common/grid.hh>
    \n+#include <dune/grid-glue/merging/standardmerge.hh>
    \n+#include <dune/grid-glue/merging/computeintersection.hh>
    \n+#include "overlappingmerge.cc"
    \n
    \n

    Go to the source code of this file.

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

    \n Classes

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

    \n Namespaces

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

    \n-Functions

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

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

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

    Go to the source code of this file.

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

    \n-Classes

    class  Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >
     Common base class for many merger implementations: produce pairs of entities that may intersect. More...
     
    \n+
    #include "config.h"
    \n+#include "standardmerge.hh"
    \n+
    \n \n \n \n \n \n

    \n Namespaces

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

    \n Macros

    #define DECL   extern
    #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-

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

    \n-

    Macro Definition Documentation

    \n+

    Macro Definition Documentation

    \n \n

    ◆ DECL

    \n \n
    \n
    \n \n \n- \n+ \n \n
    #define DECL   extern#define DECL
    \n
    \n \n
    \n
    \n \n@@ -185,22 +155,22 @@\n \n )\n \n \n \n
    \n Value:
    DECL template \\
    \n-
    void StandardMerge<T,A,B,C>::build(const std::vector<Dune::FieldVector<T,C> >& grid1Coords, \\
    \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> >& grid2Coords, \\
    \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.hh:827
    \n+
    #define DECL
    Definition standardmerge.cc:12
    \n
    \n
    \n \n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,79 +1,52 @@\n dune-grid-glue\u00a02.10\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n-standardmerge.hh File Reference\n-Common base class for many merger implementations: produce pairs of entities\n-that m\bma\bay\by intersect. _\bM_\bo_\br_\be_\b._\b._\b.\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh>\n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bm_\be_\br_\bg_\be_\br_\b._\bh_\bh>\n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\b._\bh_\bh>\n-_\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\b _\bT_\b,_\b _\bg_\br_\bi_\bd_\b1_\bD_\bi_\bm_\b,_\b _\bg_\br_\bi_\bd_\b2_\bD_\bi_\bm_\b,_\b _\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b _\b>\n-\u00a0 Common base class for many merger implementations: produce pairs of\n- entities that m\bma\bay\by intersect. _\bM_\bo_\br_\be_\b._\b._\b.\n-\u00a0\n+_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs | _\bF_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\bs\n+standardmerge.cc File Reference\n+#include \"config.h\"\n+#include \"_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh\"\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n M\bMa\bac\bcr\bro\bos\bs\n-#define\u00a0 _\bD_\bE_\bC_\bL\u00a0\u00a0\u00a0extern\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* D\bDe\bet\bta\bai\bil\ble\bed\bd D\bDe\bes\bsc\bcr\bri\bip\bpt\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-Common base class for many merger implementations: produce pairs of entities\n-that m\bma\bay\by intersect.\n *\b**\b**\b**\b**\b* M\bMa\bac\bcr\bro\bo D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn D\bDo\boc\bcu\bum\bme\ben\bnt\bta\bat\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n *\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0D\bDE\bEC\bCL\bL *\b**\b**\b**\b**\b*\n-#define DECL\u00a0\u00a0\u00a0extern\n+#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-grid1Coords, \\\n+grid1_coords, \\\n const std::vector& grid1_elements, \\\n const std::vector& grid1_element_types, \\\n-const std::vector >& grid2Coords, \\\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.hh:827\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: 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-\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.10\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/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: 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.10\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/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: simplexintersection.cc File Reference\n \n \n \n \n \n \n \n@@ -71,55 +71,69 @@\n \n \n \n
    \n \n-
    contactmerge.hh File Reference
    \n+Namespaces |\n+Functions
    \n+
    simplexintersection.cc File Reference
    \n \n
    \n \n-

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

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

    Go to the source code of this file.

    \n \n \n-\n-\n+\n+\n+\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::ContactMerge< dimworld, T >
     Merge two codimension-1 surfaces that may be a positive distance apart. More...
    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-

    Detailed Description

    \n-

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

    \n-
    \n+\n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,41 +1,65 @@\n dune-grid-glue\u00a02.10\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n-contactmerge.hh File Reference\n-Merge two grid boundary surfaces that may be a positive distance apart. _\bM_\bo_\br_\be_\b._\b._\b.\n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include \n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n-#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n-#include \"_\bc_\bo_\bn_\bt_\ba_\bc_\bt_\bm_\be_\br_\bg_\be_\b._\bc_\bc\"\n+_\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:_\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:_\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-*\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+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/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: simplexintersection.cc Source File\n \n \n \n \n \n \n \n@@ -74,235 +74,1430 @@\n \n \n \n
    \n-
    contactmerge.hh
    \n+
    simplexintersection.cc
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    10#ifndef DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH
    \n-
    11#define DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH
    \n-
    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+
    5
    \n+
    6namespace Dune {
    \n+
    7namespace GridGlue {
    \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+
    26
    \n
    27
    \n-
    28#include <dune/grid/common/grid.hh>
    \n-
    29
    \n-\n-\n-
    32
    \n-
    33namespace Dune {
    \n-
    34namespace GridGlue {
    \n-
    35
    \n-
    41template<int dimworld, typename T = double>
    \n-
    \n-\n-
    43: public StandardMerge<T,dimworld-1,dimworld-1,dimworld>
    \n-
    44{
    \n-
    45 static constexpr int dim = dimworld-1;
    \n-
    46
    \n-
    47 static_assert( dim==1 || dim==2,
    \n-
    48 "ContactMerge yet only handles the cases dim==1 and dim==2!");
    \n-
    49
    \n-\n-
    51public:
    \n-
    52
    \n-
    53 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */
    \n-
    54
    \n-
    56 typedef T ctype;
    \n-
    57
    \n-
    59 typedef Dune::FieldVector<T, dimworld> WorldCoords;
    \n-
    60
    \n-
    62 typedef Dune::FieldVector<T, dim> LocalCoords;
    \n-
    63
    \n-\n-
    \n-
    73 ContactMerge(const T allowedOverlap=T(0),
    \n-
    74 std::function<WorldCoords(WorldCoords)> domainDirections=nullptr,
    \n-
    75 std::function<WorldCoords(WorldCoords)> targetDirections=nullptr,
    \n-\n-
    77 : domainDirections_(domainDirections), targetDirections_(targetDirections),
    \n-
    78 overlap_(allowedOverlap), type_(type)
    \n-
    79 {}
    \n-
    \n-
    80
    \n-
    \n-
    86 ContactMerge(const T allowedOverlap, ProjectionType type)
    \n-
    87 : overlap_(allowedOverlap),
    \n-
    88 type_(type)
    \n-
    89 {}
    \n-
    \n-
    90
    \n-
    99 inline
    \n-
    \n-
    100 void setSurfaceDirections(std::function<WorldCoords(WorldCoords)> domainDirections,
    \n-
    101 std::function<WorldCoords(WorldCoords)> targetDirections)
    \n-
    102 {
    \n-
    103 domainDirections_ = domainDirections;
    \n-
    104 targetDirections_ = targetDirections;
    \n-
    105 this->valid = false;
    \n-
    106 }
    \n-
    \n-
    107
    \n-
    \n-
    109 void setOverlap(T overlap)
    \n-
    110 {
    \n-
    111 overlap_ = overlap;
    \n-
    112 }
    \n-
    \n-
    113
    \n-
    \n-
    115 T getOverlap() const
    \n-
    116 {
    \n-
    117 return overlap_;
    \n-
    118 }
    \n+
    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+
    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+
    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-
    \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+
    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-
    163 ProjectionType type_;
    \n-
    164
    \n-
    168 T maxNormalProduct_ = T(-0.1);
    \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-
    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+
    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+
    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+
    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
    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+
    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+
    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+
    225
    \n+
    226 FieldVector<T,dimWorld> v0,v1,v2,r;
    \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+
    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-
    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+
    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+
    238
    \n+
    239 v0*=s;
    \n+
    240 v1*=t;
    \n+
    241 r = Y[0] + v0 + v1;
    \n
    242
    \n-
    243#endif // DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH
    \n-
    Central component of the module implementing the coupling of two grids.
    \n-
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    \n-\n+
    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+
    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+
    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+
    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 parallels, 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
    Definition gridglue.hh:37
    \n-
    Merge two codimension-1 surfaces that may be a positive distance apart.
    Definition contactmerge.hh:44
    \n-
    void computeCyclicOrder(const std::vector< std::array< LocalCoords, 2 > > &polytopeCorners, const LocalCoords &center, std::vector< int > &ordering) const
    Order the corners of the intersection polytope in cyclic order.
    Definition contactmerge.cc:214
    \n-
    StandardMerge< T, dimworld-1, dimworld-1, dimworld >::SimplicialIntersection SimplicialIntersection
    Definition contactmerge.hh:139
    \n-
    void removeDoubles(std::vector< std::array< LocalCoords, 2 > > &polytopeCorners)
    Remove all multiples.
    Definition contactmerge.cc:335
    \n-
    void setOverlap(T overlap)
    Set the allowed overlap of the surfaces.
    Definition contactmerge.hh:109
    \n-
    Dune::FieldVector< T, dimworld > WorldCoords
    the coordinate type used in this interface
    Definition contactmerge.hh:59
    \n-
    void setupNodalDirections(const std::vector< WorldCoords > &coords1, const std::vector< unsigned int > &elements1, const std::vector< Dune::GeometryType > &elementTypes1, const std::vector< WorldCoords > &coords2, const std::vector< unsigned int > &elements2, const std::vector< Dune::GeometryType > &elementTypes2)
    Setup the direction vectors containing the directions for each vertex.
    Definition contactmerge.cc:269
    \n-
    void minNormalAngle(T angle)
    set minimum angle in radians between normals at x and \u03a6(x)
    Definition contactmerge.hh:123
    \n-
    T ctype
    the numeric type used in this interface
    Definition contactmerge.hh:56
    \n-
    ProjectionType
    Type of the projection, closest point or outer normal projection.
    Definition contactmerge.hh:65
    \n-
    @ CLOSEST_POINT
    Definition contactmerge.hh:65
    \n-
    @ OUTER_NORMAL
    Definition contactmerge.hh:65
    \n-
    void computeOuterNormalField(const std::vector< WorldCoords > &coords, const std::vector< unsigned int > &elements, const std::vector< Dune::GeometryType > &elementTypes, std::vector< WorldCoords > &normals)
    If no direction field was specified compute the outer normal field.
    Definition contactmerge.cc:296
    \n-
    T getOverlap() const
    Get the allowed overlap of the surfaces.
    Definition contactmerge.hh:115
    \n-
    ContactMerge(const T allowedOverlap=T(0), std::function< WorldCoords(WorldCoords)> domainDirections=nullptr, std::function< WorldCoords(WorldCoords)> targetDirections=nullptr, ProjectionType type=OUTER_NORMAL)
    Construct merger given overlap and possible projection directions.
    Definition contactmerge.hh:73
    \n-
    void setSurfaceDirections(std::function< WorldCoords(WorldCoords)> domainDirections, std::function< WorldCoords(WorldCoords)> targetDirections)
    Set surface direction functions.
    Definition contactmerge.hh:100
    \n-
    void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1Coords, const std::vector< unsigned int > &grid1Elements, const std::vector< Dune::GeometryType > &grid1ElementTypes, const std::vector< Dune::FieldVector< T, dimworld > > &grid2Coords, const std::vector< unsigned int > &grid2Elements, const std::vector< Dune::GeometryType > &grid2ElementTypes) override
    Definition contactmerge.hh:188
    \n-
    ContactMerge(const T allowedOverlap, ProjectionType type)
    Construct merger given overlap and type of the projection.
    Definition contactmerge.hh:86
    \n-
    T minNormalAngle() const
    get minimum angle in radians between normals at x and \u03a6(x)
    Definition contactmerge.hh:132
    \n-
    Dune::FieldVector< T, dim > LocalCoords
    the coordinate type used in this interface
    Definition contactmerge.hh:62
    \n-
    Common base class for many merger implementations: produce pairs of entities that may intersect.
    Definition standardmerge.hh:58
    \n-
    void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1_Coords, const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< T, dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements, const std::vector< Dune::GeometryType > &grid2_element_types) override
    Definition standardmerge.hh:392
    \n-
    bool valid
    Definition standardmerge.hh:86
    \n+
    int insertPoint(const V p, std::vector< V > &P)
    Definition computeintersection.hh:164
    \n+
    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
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,304 +1,1578 @@\n dune-grid-glue\u00a02.10\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+simplexintersection.cc\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-10#ifndef DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH\n-11#define DUNE_GRIDGLUE_MERGING_CONTACTMERGE_HH\n-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+5\n+6namespace _\bD_\bu_\bn_\be {\n+7namespace GridGlue {\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+26\n 27\n-28#include \n-29\n-30#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bm_\be_\br_\bg_\bi_\bn_\bg_\b/_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh>\n-31#include <_\bd_\bu_\bn_\be_\b/_\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be_\b/_\bg_\br_\bi_\bd_\bg_\bl_\bu_\be_\b._\bh_\bh>\n-32\n-33namespace _\bD_\bu_\bn_\be {\n-34namespace GridGlue {\n-35\n-41template\n-_\b4_\b2class _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be\n-43: public _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n-44{\n-45 static constexpr int dim = dimworld-1;\n-46\n-47 static_assert( dim==1 || dim==2,\n-48 \"ContactMerge yet only handles the cases dim==1 and dim==2!\");\n-49\n-50 typedef _\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b<_\bT_\b,_\bd_\bi_\bm_\b,_\bd_\bi_\bm_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b> _\bB_\ba_\bs_\be;\n-51public:\n-52\n-53 /* E X P O R T E D T Y P E S A N D C O N S T A N T S */\n-54\n-_\b5_\b6 typedef T _\bc_\bt_\by_\bp_\be;\n-57\n-_\b5_\b9 typedef Dune::FieldVector _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\n-60\n-_\b6_\b2 typedef Dune::FieldVector _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs;\n-63\n-_\b6_\b5 enum _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be {_\bO_\bU_\bT_\bE_\bR_\b__\bN_\bO_\bR_\bM_\bA_\bL, _\bC_\bL_\bO_\bS_\bE_\bS_\bT_\b__\bP_\bO_\bI_\bN_\bT};\n-_\b7_\b3 _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be(const T allowedOverlap=T(0),\n-74 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> domainDirections=nullptr,\n-75 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> targetDirections=nullptr,\n-76 _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be type = _\bO_\bU_\bT_\bE_\bR_\b__\bN_\bO_\bR_\bM_\bA_\bL)\n-77 : domainDirections_(domainDirections), targetDirections_(targetDirections),\n-78 overlap_(allowedOverlap), type_(type)\n-79 {}\n-80\n-_\b8_\b6 _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be(const T allowedOverlap, _\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be type)\n-87 : overlap_(allowedOverlap),\n-88 type_(type)\n-89 {}\n-90\n-99 inline\n-_\b1_\b0_\b0 void _\bs_\be_\bt_\bS_\bu_\br_\bf_\ba_\bc_\be_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs(std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)>\n-domainDirections,\n-101 std::function<_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs)> targetDirections)\n-102 {\n-103 domainDirections_ = domainDirections;\n-104 targetDirections_ = targetDirections;\n-105 this->_\bv_\ba_\bl_\bi_\bd = false;\n-106 }\n-107\n-_\b1_\b0_\b9 void _\bs_\be_\bt_\bO_\bv_\be_\br_\bl_\ba_\bp(T overlap)\n-110 {\n-111 overlap_ = overlap;\n-112 }\n-113\n-_\b1_\b1_\b5 T _\bg_\be_\bt_\bO_\bv_\be_\br_\bl_\ba_\bp() const\n-116 {\n-117 return overlap_;\n+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+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+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+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-_\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+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-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+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-174 void computeIntersections(const Dune::GeometryType& grid1ElementType,\n-175 const std::vector >& grid1ElementCorners,\n-176 std::bitset<(1<& neighborIntersects1,\n-177 unsigned int grid1Index,\n-178 const Dune::GeometryType& grid2ElementType,\n-179 const std::vector >& grid2ElementCorners,\n-180 std::bitset<(1<& neighborIntersects2,\n-181 unsigned int grid2Index,\n-182 std::vector& intersections) override;\n-183\n-187protected:\n-_\b1_\b8_\b8 void _\bb_\bu_\bi_\bl_\bd(const std::vector >& grid1Coords,\n-189 const std::vector& grid1Elements,\n-190 const std::vector& grid1ElementTypes,\n-191 const std::vector >& grid2Coords,\n-192 const std::vector& grid2Elements,\n-193 const std::vector& grid2ElementTypes) override\n-194 {\n-195 std::cout<<\"ContactMerge building grid!\\n\";\n-196 // setup the nodal direction vectors\n-197 _\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs(grid1Coords, grid1Elements, grid1ElementTypes,\n-198 grid2Coords, grid2Elements, grid2ElementTypes);\n+170 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+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 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+200// POINT IN TRIANGLE - :)\n+201template\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 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+205public:\n+_\b2_\b0_\b6 typedef FieldVector _\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+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+225\n+226 FieldVector v0,v1,v2,r;\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+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-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+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+238\n+239 v0*=s;\n+240 v1*=t;\n+241 r = Y[0] + v0 + v1;\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-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bm_\be_\br_\bg_\be_\b._\bh_\bh\n-Common base class for many merger implementations: produce pairs of entities\n-that may intersect.\n-_\bc_\bo_\bn_\bt_\ba_\bc_\bt_\bm_\be_\br_\bg_\be_\b._\bc_\bc\n+243 if (s > -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+255\n+256 return true;\n+257 }\n+258\n+259 return false;\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+284\n+285public:\n+_\b2_\b8_\b6 typedef FieldVector _\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+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+346 }\n+347};\n+348\n+349// SEGEMENT-SEGMENT INTERSECTION - :)\n+350template\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 parallels, 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 _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be\n-Merge two codimension-1 surfaces that may be a positive distance apart.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:44\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bC_\by_\bc_\bl_\bi_\bc_\bO_\br_\bd_\be_\br\n-void computeCyclicOrder(const std::vector< std::array< LocalCoords, 2 > >\n-&polytopeCorners, const LocalCoords ¢er, std::vector< int > &ordering)\n-const\n-Order the corners of the intersection polytope in cyclic order.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:214\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-StandardMerge< T, dimworld-1, dimworld-1, dimworld >::SimplicialIntersection\n-SimplicialIntersection\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:139\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\br_\be_\bm_\bo_\bv_\be_\bD_\bo_\bu_\bb_\bl_\be_\bs\n-void removeDoubles(std::vector< std::array< LocalCoords, 2 > >\n-&polytopeCorners)\n-Remove all multiples.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:335\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bs_\be_\bt_\bO_\bv_\be_\br_\bl_\ba_\bp\n-void setOverlap(T overlap)\n-Set the allowed overlap of the surfaces.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:109\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, dimworld > WorldCoords\n-the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:59\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-void setupNodalDirections(const std::vector< WorldCoords > &coords1, const\n-std::vector< unsigned int > &elements1, const std::vector< Dune::GeometryType >\n-&elementTypes1, const std::vector< WorldCoords > &coords2, const std::vector<\n-unsigned int > &elements2, const std::vector< Dune::GeometryType >\n-&elementTypes2)\n-Setup the direction vectors containing the directions for each vertex.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:269\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bm_\bi_\bn_\bN_\bo_\br_\bm_\ba_\bl_\bA_\bn_\bg_\bl_\be\n-void minNormalAngle(T angle)\n-set minimum angle in radians between normals at x and \u00ce\u00a6(x)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:123\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bt_\by_\bp_\be\n-T ctype\n-the numeric type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:56\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bT_\by_\bp_\be\n-ProjectionType\n-Type of the projection, closest point or outer normal projection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:65\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bC_\bL_\bO_\bS_\bE_\bS_\bT_\b__\bP_\bO_\bI_\bN_\bT\n-@ CLOSEST_POINT\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:65\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bO_\bU_\bT_\bE_\bR_\b__\bN_\bO_\bR_\bM_\bA_\bL\n-@ OUTER_NORMAL\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:65\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl_\bF_\bi_\be_\bl_\bd\n-void computeOuterNormalField(const std::vector< WorldCoords > &coords, const\n-std::vector< unsigned int > &elements, const std::vector< Dune::GeometryType >\n-&elementTypes, std::vector< WorldCoords > &normals)\n-If no direction field was specified compute the outer normal field.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:296\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bg_\be_\bt_\bO_\bv_\be_\br_\bl_\ba_\bp\n-T getOverlap() const\n-Get the allowed overlap of the surfaces.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:115\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be\n-ContactMerge(const T allowedOverlap=T(0), std::function< WorldCoords\n-(WorldCoords)> domainDirections=nullptr, std::function< WorldCoords\n-(WorldCoords)> targetDirections=nullptr, ProjectionType type=OUTER_NORMAL)\n-Construct merger given overlap and possible projection directions.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:73\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bs_\be_\bt_\bS_\bu_\br_\bf_\ba_\bc_\be_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-void setSurfaceDirections(std::function< WorldCoords(WorldCoords)>\n-domainDirections, std::function< WorldCoords(WorldCoords)> targetDirections)\n-Set surface direction functions.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:100\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bb_\bu_\bi_\bl_\bd\n-void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1Coords,\n-const std::vector< unsigned int > &grid1Elements, const std::vector< Dune::\n-GeometryType > &grid1ElementTypes, const std::vector< Dune::FieldVector< T,\n-dimworld > > &grid2Coords, const std::vector< unsigned int > &grid2Elements,\n-const std::vector< Dune::GeometryType > &grid2ElementTypes) override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:188\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be\n-ContactMerge(const T allowedOverlap, ProjectionType type)\n-Construct merger given overlap and type of the projection.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:86\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bm_\bi_\bn_\bN_\bo_\br_\bm_\ba_\bl_\bA_\bn_\bg_\bl_\be\n-T minNormalAngle() const\n-get minimum angle in radians between normals at x and \u00ce\u00a6(x)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:132\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, dim > LocalCoords\n-the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:62\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be\n-Common base class for many merger implementations: produce pairs of entities\n-that may intersect.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:58\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bb_\bu_\bi_\bl_\bd\n-void build(const std::vector< Dune::FieldVector< T, dimworld > > &grid1_Coords,\n-const std::vector< unsigned int > &grid1_elements, const std::vector< Dune::\n-GeometryType > &grid1_element_types, const std::vector< Dune::FieldVector< T,\n-dimworld > > &grid2_coords, const std::vector< unsigned int > &grid2_elements,\n-const std::vector< Dune::GeometryType > &grid2_element_types) override\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:392\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bt_\ba_\bn_\bd_\ba_\br_\bd_\bM_\be_\br_\bg_\be_\b:_\b:_\bv_\ba_\bl_\bi_\bd\n-bool valid\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn standardmerge.hh:86\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\bs_\be_\br_\bt_\bP_\bo_\bi_\bn_\bt\n+int insertPoint(const V p, std::vector< V > &P)\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:164\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\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 ===============================================================================\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: intersectionlist.hh File Reference\n+dune-grid-glue: contactmerge.cc File Reference\n \n \n \n \n \n \n \n@@ -70,38 +70,23 @@\n \n
    \n
    \n \n-
    intersectionlist.hh File Reference
    \n+
    contactmerge.cc File Reference
    \n
    \n
    \n-
    #include <array>
    \n-#include <type_traits>
    \n-#include <utility>
    \n-#include <vector>
    \n-#include <dune/common/fvector.hh>
    \n+\n

    Go to the source code of this file.

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

    \n-Classes

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

    \n Namespaces

    namespace  Dune
     
    namespace  Dune::GridGlue
     
    \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,32 +1,19 @@\n dune-grid-glue\u00a02.10\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-#include \n-#include \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:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\b _\bL_\b0_\b,_\b _\bL_\b1_\b _\b>\n-\u00a0\n- class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b<_\b _\bL_\bo_\bc_\ba_\bl_\b0_\b,_\b _\bL_\bo_\bc_\ba_\bl_\b1_\b _\b>\n-\u00a0\n- class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\b _\bd_\bi_\bm_\b0_\b,_\b _\bd_\bi_\bm_\b1_\b _\b>\n-\u00a0\n-struct \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br_\b<_\b _\bd_\bi_\bm_\b0_\b,_\b _\bd_\bi_\bm_\b1_\b _\b>_\b:_\b:\n- _\bS_\bi_\bm_\bp_\bl_\bi_\bc_\bi_\ba_\bl_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-\u00a0\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/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: intersectionlist.hh Source File\n+dune-grid-glue: contactmerge.cc Source File\n \n \n \n \n \n \n \n@@ -74,299 +74,389 @@\n \n \n
    \n
    \n-
    intersectionlist.hh
    \n+
    contactmerge.cc
    \n
    \n
    \n-Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n-
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    3#ifndef DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH
    \n-
    4#define DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH 1
    \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#include <array>
    \n-
    7#include <type_traits>
    \n-
    8#include <utility>
    \n-
    9#include <vector>
    \n-
    10
    \n-
    11#include <dune/common/fvector.hh>
    \n-
    12
    \n-
    13namespace Dune {
    \n-
    14namespace GridGlue {
    \n-
    15
    \n-
    20template<typename L0, typename L1>
    \n-
    \n-\n+\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-
    23public:
    \n+
    23 using std::get;
    \n
    24
    \n-
    28 using Local0 = L0;
    \n-
    29
    \n-
    33 using Local1 = L1;
    \n-
    34
    \n-
    38 using Index = unsigned int;
    \n-
    39
    \n-
    43 virtual std::size_t size() const = 0;
    \n-
    44
    \n-
    50 virtual std::size_t parents0(Index intersection) const = 0;
    \n-
    51
    \n-
    57 virtual std::size_t parents1(Index intersection) const = 0;
    \n-
    58
    \n-
    65 virtual Index parent0(Index intersection, unsigned index) const = 0;
    \n-
    66
    \n-
    73 virtual Index parent1(Index intersection, unsigned index) const = 0;
    \n-
    74
    \n-
    82 virtual Local0 corner0(Index intersection, unsigned corner, unsigned index) const = 0;
    \n-
    83
    \n-
    91 virtual Local1 corner1(Index intersection, unsigned corner, unsigned index) const = 0;
    \n-
    92};
    \n-
    \n-
    93
    \n-
    94namespace Impl {
    \n-
    95
    \n-
    96template<typename P, int I>
    \n-
    97struct IntersectionListLocal
    \n-
    98{};
    \n+
    25 std::vector<std::array<LocalCoords,2> > polytopeCorners;
    \n+
    26
    \n+
    27 // Initialize
    \n+
    28 neighborIntersects1.reset();
    \n+
    29 neighborIntersects2.reset();
    \n+
    30
    \n+
    31 const int nCorners1 = grid1ElementCorners.size();
    \n+
    32 const int nCorners2 = grid2ElementCorners.size();
    \n+
    33
    \n+
    34 if (nCorners1 != dimworld)
    \n+
    35 DUNE_THROW(Dune::Exception, "element1 must have " << dimworld << " corners, but has " << nCorners1);
    \n+
    36 if (nCorners2 != dimworld)
    \n+
    37 DUNE_THROW(Dune::Exception, "element2 must have " << dimworld << " corners, but has " << nCorners2);
    \n+
    38
    \n+
    39 // The grid1 projection directions
    \n+
    40 std::vector<WorldCoords> directions1(nCorners1);
    \n+
    41 for (size_t i=0; i<directions1.size(); i++)
    \n+
    42 directions1[i] = nodalDomainDirections_[this->grid1ElementCorners_[grid1Index][i]];
    \n+
    43
    \n+
    44 // The grid2 projection directions
    \n+
    45 std::vector<WorldCoords> directions2(nCorners2);
    \n+
    46 for (size_t i=0; i<directions2.size(); i++)
    \n+
    47 directions2[i] = nodalTargetDirections_[this->grid2ElementCorners_[grid2Index][i]];
    \n+
    48
    \n+
    49 // The difference between the closest point projection and the normal projection is just the ordering
    \n+
    50 // of the involved surfaces. The closest point projection is done along the outer normal field of grid2
    \n+
    51 // (due to being a best approximation) and the outer normal projection is using the outer normal field
    \n+
    52 // of grid1 instead.
    \n+
    53 std::array<decltype(std::cref(grid1ElementCorners)),2> cornersRef ={std::cref(grid1ElementCorners), std::cref(grid2ElementCorners)};
    \n+
    54 std::array<decltype(std::cref(directions1)),2> directionsRef ={std::cref(directions1), std::cref(directions2)};
    \n+
    55 std::array<Dune::GeometryType,2> elementTypes = {grid1ElementType, grid2ElementType};
    \n+
    56
    \n+
    57 // Determine which is the grid we use for outer normal projection
    \n+
    58 const size_t domGrid = (type_==ProjectionType::OUTER_NORMAL) ? 0 : 1;
    \n+
    59 const size_t tarGrid = (type_==ProjectionType::OUTER_NORMAL) ? 1 : 0;
    \n+
    60
    \n+
    62 // Compute all corners of the intersection polytope
    \n+
    64
    \n+
    65 const auto corners = std::tie(cornersRef[domGrid].get(),cornersRef[tarGrid].get());
    \n+
    66 const auto normals = std::tie(directionsRef[domGrid].get(), directionsRef[tarGrid].get());
    \n+
    67 Projection<WorldCoords> p(overlap_, maxNormalProduct_);
    \n+
    68 p.project(corners, normals);
    \n+
    69
    \n+
    70 /* projection */
    \n+
    71 {
    \n+
    72 const auto& success = get<0>(p.success());
    \n+
    73 const auto& images = get<0>(p.images());
    \n+
    74 for (unsigned i = 0; i < dimworld; ++i) {
    \n+
    75 if (success[i]) {
    \n+
    76 std::array<LocalCoords, 2> corner;
    \n+
    77 corner[domGrid] = localCornerCoords(i, elementTypes[domGrid]);
    \n+
    78 for (unsigned j = 0; j < dim; ++j)
    \n+
    79 corner[tarGrid][j] = images[i][j];
    \n+
    80 polytopeCorners.push_back(corner);
    \n+
    81 }
    \n+
    82 }
    \n+
    83 }
    \n+
    84
    \n+
    85 /* inverse projection */
    \n+
    86 {
    \n+
    87 const auto& success = get<1>(p.success());
    \n+
    88 const auto& preimages = get<1>(p.images());
    \n+
    89 for (unsigned i = 0; i < dimworld; ++i) {
    \n+
    90 if (success[i]) {
    \n+
    91 std::array<LocalCoords, 2> corner;
    \n+
    92 for (unsigned j = 0; j < dim; ++j)
    \n+
    93 corner[domGrid][j] = preimages[i][j];
    \n+
    94 corner[tarGrid] = localCornerCoords(i, elementTypes[tarGrid]);
    \n+
    95 polytopeCorners.push_back(corner);
    \n+
    96 }
    \n+
    97 }
    \n+
    98 }
    \n
    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+
    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-
    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+
    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-
    \n-
    139 IntersectionList(const std::shared_ptr<Provider>& provider)
    \n-
    140 : impl_(provider)
    \n-
    141 {}
    \n-
    \n+
    139 if (intersects)
    \n+
    140 neighborIntersectsRef[domGrid].get()[i] = true;
    \n+
    141 }
    \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+
    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-
    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+
    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-
    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+
    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-
    268
    \n+
    267
    \n+
    268template<int dimworld, typename T>
    \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+
    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-
    \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+
    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-
    \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+
    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-
    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+
    295template<int dimworld, typename T>
    \n+
    \n+
    296void ContactMerge<dimworld, T>::computeOuterNormalField(const std::vector<WorldCoords>& coords,
    \n+
    297 const std::vector<unsigned int>& elements,
    \n+
    298 const std::vector<Dune::GeometryType>& elementTypes,
    \n+
    299 std::vector<WorldCoords>& normals)
    \n+
    300{
    \n+
    301 normals.assign(coords.size(),WorldCoords(0));
    \n+
    302
    \n+
    303
    \n+
    304 int offset = 0;
    \n+
    305
    \n+
    306 for (size_t i=0; i<elementTypes.size(); i++) {
    \n+
    307
    \n+
    308 int nCorners = Dune::ReferenceElements<T,dim>::general(elementTypes[i]).size(dim);
    \n+
    309
    \n+
    310 // For segments 1, for triangles or quadrilaterals take the first 2
    \n+
    311 std::array<WorldCoords, dim> edges;
    \n+
    312 for (int j=1; j<=dim; j++)
    \n+
    313 edges[j-1] = coords[elements[offset + j]] - coords[elements[offset]];
    \n+
    314
    \n+
    315 WorldCoords elementNormal;
    \n+
    316
    \n+
    317 if (dim==1) {
    \n+
    318 elementNormal[0] = edges[0][1]; elementNormal[1] = -edges[0][0];
    \n+
    319 } else
    \n+
    320 elementNormal = crossProduct(edges[0], edges[1]);
    \n+
    321
    \n+
    322 elementNormal /= elementNormal.two_norm();
    \n+
    323
    \n+
    324 for (int j=0; j<nCorners;j++)
    \n+
    325 normals[elements[offset + j]] += elementNormal;
    \n+
    326
    \n+
    327 offset += nCorners;
    \n+
    328 }
    \n+
    329
    \n+
    330 for (size_t i=0; i<coords.size(); i++)
    \n+
    331 normals[i] /= normals[i].two_norm();
    \n+
    332}
    \n+
    \n+
    333
    \n+
    334template<int dimworld, typename T>
    \n+
    \n+
    335void ContactMerge<dimworld, T>::removeDoubles(std::vector<std::array<LocalCoords,2> >& polytopeCorners)
    \n+
    336{
    \n+
    337
    \n+
    338 size_t counter(1);
    \n+
    339 for (size_t i=1; i<polytopeCorners.size(); i++) {
    \n+
    340 bool contained = false;
    \n+
    341 for (size_t j=0; j<counter; j++)
    \n+
    342 if ( (polytopeCorners[j][0]-polytopeCorners[i][0]).two_norm()<1e-10) {
    \n+
    343 assert((polytopeCorners[j][1]-polytopeCorners[i][1]).two_norm()<1e-10);
    \n+
    344 contained = true;
    \n+
    345 break;
    \n+
    346 }
    \n+
    347
    \n+
    348 if (!contained) {
    \n+
    349 if (counter < i)
    \n+
    350 polytopeCorners[counter] = polytopeCorners[i];
    \n+
    351 counter++;
    \n+
    352 }
    \n+
    353 }
    \n+
    354 polytopeCorners.resize(counter);
    \n+
    355}
    \n+
    \n+
    356
    \n+
    357} /* namespace GridGlue */
    \n+
    358} /* namespace Dune */
    \n+\n+\n
    Definition gridglue.hh:37
    \n+
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n+
    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-
    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+
    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,357 +1,439 @@\n dune-grid-glue\u00a02.10\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.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-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-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+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-23public:\n+23 using std::get;\n 24\n-_\b2_\b8 using _\bL_\bo_\bc_\ba_\bl_\b0 = L0;\n-29\n-_\b3_\b3 using _\bL_\bo_\bc_\ba_\bl_\b1 = L1;\n-34\n-_\b3_\b8 using _\bI_\bn_\bd_\be_\bx = unsigned int;\n-39\n-_\b4_\b3 virtual std::size_t _\bs_\bi_\bz_\be() const = 0;\n-44\n-_\b5_\b0 virtual std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs_\b0(_\bI_\bn_\bd_\be_\bx intersection) const = 0;\n-51\n-_\b5_\b7 virtual std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs_\b1(_\bI_\bn_\bd_\be_\bx intersection) const = 0;\n-58\n-_\b6_\b5 virtual _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b0(_\bI_\bn_\bd_\be_\bx intersection, unsigned index) const = 0;\n-66\n-_\b7_\b3 virtual _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b1(_\bI_\bn_\bd_\be_\bx intersection, unsigned index) const = 0;\n-74\n-_\b8_\b2 virtual _\bL_\bo_\bc_\ba_\bl_\b0 _\bc_\bo_\br_\bn_\be_\br_\b0(_\bI_\bn_\bd_\be_\bx intersection, unsigned corner, unsigned index)\n-const = 0;\n-83\n-_\b9_\b1 virtual _\bL_\bo_\bc_\ba_\bl_\b1 _\bc_\bo_\br_\bn_\be_\br_\b1(_\bI_\bn_\bd_\be_\bx intersection, unsigned corner, unsigned index)\n-const = 0;\n-92};\n-93\n-94namespace Impl {\n-95\n-96template\n-97struct IntersectionListLocal\n-98{};\n+25 std::vector > polytopeCorners;\n+26\n+27 // Initialize\n+28 neighborIntersects1.reset();\n+29 neighborIntersects2.reset();\n+30\n+31 const int nCorners1 = grid1ElementCorners.size();\n+32 const int nCorners2 = grid2ElementCorners.size();\n+33\n+34 if (nCorners1 != dimworld)\n+35 DUNE_THROW(Dune::Exception, \"element1 must have \" << dimworld << \" corners,\n+but has \" << nCorners1);\n+36 if (nCorners2 != dimworld)\n+37 DUNE_THROW(Dune::Exception, \"element2 must have \" << dimworld << \" corners,\n+but has \" << nCorners2);\n+38\n+39 // The grid1 projection directions\n+40 std::vector directions1(nCorners1);\n+41 for (size_t i=0; igrid1ElementCorners_\n+[grid1Index][i]];\n+43\n+44 // The grid2 projection directions\n+45 std::vector directions2(nCorners2);\n+46 for (size_t i=0; igrid2ElementCorners_\n+[grid2Index][i]];\n+48\n+49 // The difference between the closest point projection and the normal\n+projection is just the ordering\n+50 // of the involved surfaces. The closest point projection is done along the\n+outer normal field of grid2\n+51 // (due to being a best approximation) and the outer normal projection is\n+using the outer normal field\n+52 // of grid1 instead.\n+53 std::array cornersRef ={std::\n+cref(grid1ElementCorners), std::cref(grid2ElementCorners)};\n+54 std::array directionsRef ={std::cref\n+(directions1), std::cref(directions2)};\n+55 std::array elementTypes = {grid1ElementType,\n+grid2ElementType};\n+56\n+57 // Determine which is the grid we use for outer normal projection\n+58 const size_t domGrid = (type_==ProjectionType::OUTER_NORMAL) ? 0 : 1;\n+59 const size_t tarGrid = (type_==ProjectionType::OUTER_NORMAL) ? 1 : 0;\n+60\n+62 // Compute all corners of the intersection polytope\n+64\n+65 const auto corners = std::tie(cornersRef[domGrid].get(),cornersRef\n+[tarGrid].get());\n+66 const auto normals = std::tie(directionsRef[domGrid].get(), directionsRef\n+[tarGrid].get());\n+67 Projection p(overlap_, maxNormalProduct_);\n+68 p.project(corners, normals);\n+69\n+70 /* projection */\n+71 {\n+72 const auto& success = get<0>(p.success());\n+73 const auto& images = get<0>(p.images());\n+74 for (unsigned i = 0; i < dimworld; ++i) {\n+75 if (success[i]) {\n+76 std::array _\bc_\bo_\br_\bn_\be_\br;\n+77 _\bc_\bo_\br_\bn_\be_\br[domGrid] = localCornerCoords(i, elementTypes[domGrid]);\n+78 for (unsigned j = 0; j < dim; ++j)\n+79 corner[tarGrid][j] = images[i][j];\n+80 polytopeCorners.push_back(corner);\n+81 }\n+82 }\n+83 }\n+84\n+85 /* inverse projection */\n+86 {\n+87 const auto& success = get<1>(p.success());\n+88 const auto& preimages = get<1>(p.images());\n+89 for (unsigned i = 0; i < dimworld; ++i) {\n+90 if (success[i]) {\n+91 std::array _\bc_\bo_\br_\bn_\be_\br;\n+92 for (unsigned j = 0; j < dim; ++j)\n+93 corner[domGrid][j] = preimages[i][j];\n+94 _\bc_\bo_\br_\bn_\be_\br[tarGrid] = localCornerCoords(i, elementTypes[tarGrid]);\n+95 polytopeCorners.push_back(corner);\n+96 }\n+97 }\n+98 }\n 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+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-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+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-_\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+139 if (intersects)\n+140 neighborIntersectsRef[domGrid].get()[i] = true;\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+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\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+163 // std::cout<<\"Add intersection: 1\\n\";\n+164 typename Base::SimplicialIntersection intersect(grid1Index, grid2Index);\n+165\n+166 for (int j=0;j=3\n+176\n+178 // Compute a point in the middle of the polytope and order all corners\n+cyclic\n+180\n+181 std::array center;\n+182 center[0] = 0; center[1] = 0;\n+183 for (int i=0; i ordering;\n+190 computeCyclicOrder(polytopeCorners,center[0],ordering);\n+191\n+193 // Add intersections\n+195\n+196 for (size_t i=1; i\n-_\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+198 typename Base::SimplicialIntersection intersect(grid1Index, grid2Index);\n+199\n+200 for (int j=0;j\n+_\b2_\b1_\b4void _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bC_\by_\bc_\bl_\bi_\bc_\bO_\br_\bd_\be_\br(const std::vector >& polytopeCorners,\n+215 const _\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs& center, std::vector& ordering) const\n+216{\n+217 ordering.resize(polytopeCorners.size());\n+218\n+219 for (size_t k=0; k angles(polytopeCorners.size());\n+236\n+237 for (size_t i=0; i1; i--){\n+252 bool swapped = false;\n+253\n+254 for (int j=0; j angles[j+1]){\n+257 swapped = true;\n+258 std::swap(angles[j], angles[j+1]);\n+259 std::swap(ordering[j], ordering[j+1]);\n+260 }\n+261 }\n+262\n+263 if (!swapped)\n+264 break;\n+265 }\n+266}\n+267\n+268template\n+_\b2_\b6_\b9void _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs(const std::\n+vector& coords1,\n+270 const std::vector& elements1,\n+271 const std::vector& elementTypes1,\n+272 const std::vector& coords2,\n+273 const std::vector& elements2,\n+274 const std::vector& elementTypes2)\n+275{\n+276 if (domainDirections_) {\n 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+278 // Sample the provided analytical contact direction field\n+279 nodalDomainDirections_.resize(coords1.size());\n+280 for (size_t i=0; i intersections_;\n-297};\n-298\n-299} /* namespace GridGlue */\n-300} /* namespace Dune */\n-301\n-302#endif\n+295template\n+_\b2_\b9_\b6void _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl_\bF_\bi_\be_\bl_\bd(const std::\n+vector& coords,\n+297 const std::vector& elements,\n+298 const std::vector& elementTypes,\n+299 std::vector& normals)\n+300{\n+301 normals.assign(coords.size(),_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs(0));\n+302\n+303\n+304 int offset = 0;\n+305\n+306 for (size_t i=0; i::general(elementTypes\n+[i]).size(dim);\n+309\n+310 // For segments 1, for triangles or quadrilaterals take the first 2\n+311 std::array edges;\n+312 for (int j=1; j<=dim; j++)\n+313 edges[j-1] = coords[elements[offset + j]] - coords[elements[offset]];\n+314\n+315 _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs elementNormal;\n+316\n+317 if (dim==1) {\n+318 elementNormal[0] = edges[0][1]; elementNormal[1] = -edges[0][0];\n+319 } else\n+320 elementNormal = _\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt(edges[0], edges[1]);\n+321\n+322 elementNormal /= elementNormal.two_norm();\n+323\n+324 for (int j=0; j\n+_\b3_\b3_\b5void _\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\br_\be_\bm_\bo_\bv_\be_\bD_\bo_\bu_\bb_\bl_\be_\bs(std::vector >& polytopeCorners)\n+336{\n+337\n+338 size_t counter(1);\n+339 for (size_t i=1; i intersections(const GridGlue<... > &glue, const Reverse<...\n+> &reverse=!reversed)\n+Iterate over all intersections of a GridGlue.\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\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:_\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_\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/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: simplexintersection.cc File Reference\n+dune-grid-glue: intersectionlist.hh File Reference\n \n \n \n \n \n \n \n@@ -71,68 +71,43 @@\n \n
    \n
    \n
    \n \n-
    simplexintersection.cc File Reference
    \n+Namespaces
    \n+
    intersectionlist.hh File Reference
    \n
    \n
    \n-\n+
    #include <array>
    \n+#include <type_traits>
    \n+#include <utility>
    \n+#include <vector>
    \n+#include <dune/common/fvector.hh>
    \n+
    \n

    Go to the source code of this file.

    \n \n \n-\n-\n-\n-\n-\n-\n-\n+\n \n-\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::IntersectionListProvider< L0, L1 >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 0, 3, T >
    class  Dune::GridGlue::IntersectionList< Local0, Local1 >
     
    class  Dune::GridGlue::SimplexMethod< dimWorld, 1, 1, T >
    class  Dune::GridGlue::SimplicialIntersectionListProvider< dim0, dim1 >
     
    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 >
    struct  Dune::GridGlue::SimplicialIntersectionListProvider< dim0, dim1 >::SimplicialIntersection
     
    \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,32 @@\n dune-grid-glue\u00a02.10\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+_\bC_\bl_\ba_\bs_\bs_\be_\bs | _\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs\n+intersectionlist.hh File Reference\n+#include \n+#include \n+#include \n+#include \n+#include \n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n C\bCl\bla\bas\bss\bse\bes\bs\n-class \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\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+ 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:_\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+ 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_\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+ 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-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+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-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/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: simplexintersection.cc Source File\n+dune-grid-glue: intersectionlist.hh Source File\n \n \n \n \n \n \n \n@@ -74,1430 +74,299 @@\n \n \n
    \n
    \n-
    simplexintersection.cc
    \n+
    intersectionlist.hh
    \n
    \n
    \n-Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n-
    2// vi: set et ts=4 sw=2 sts=2:
    \n-
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n-
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+Go to the documentation of this file.
    1// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n+
    2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n+
    3#ifndef DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH
    \n+
    4#define DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH 1
    \n
    5
    \n-
    6namespace Dune {
    \n-
    7namespace GridGlue {
    \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-
    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-
    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-
    64
    \n-
    65
    \n+
    6#include <array>
    \n+
    7#include <type_traits>
    \n+
    8#include <utility>
    \n+
    9#include <vector>
    \n+
    10
    \n+
    11#include <dune/common/fvector.hh>
    \n+
    12
    \n+
    13namespace Dune {
    \n+
    14namespace GridGlue {
    \n+
    15
    \n+
    20template<typename L0, typename L1>
    \n+
    \n+\n+
    22{
    \n+
    23public:
    \n+
    24
    \n+
    28 using Local0 = L0;
    \n+
    29
    \n+
    33 using Local1 = L1;
    \n+
    34
    \n+
    38 using Index = unsigned int;
    \n+
    39
    \n+
    43 virtual std::size_t size() const = 0;
    \n+
    44
    \n+
    50 virtual std::size_t parents0(Index intersection) const = 0;
    \n+
    51
    \n+
    57 virtual std::size_t parents1(Index intersection) const = 0;
    \n+
    58
    \n+
    65 virtual Index parent0(Index intersection, unsigned index) const = 0;
    \n
    66
    \n-
    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+
    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
    \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+
    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-
    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+
    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-
    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-
    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-
    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-
    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-
    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-
    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+
    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-
    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-
    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-
    255
    \n-
    256 return true;
    \n-
    257 }
    \n-
    258
    \n-
    259 return false;
    \n-
    260 }
    \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-
    261
    \n+
    260
    \n+\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-
    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+
    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 P.clear(); SX.clear(); SY.clear();
    \n-
    300 SY.resize(4);
    \n+
    299} /* namespace GridGlue */
    \n+
    300} /* namespace Dune */
    \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-
    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 parallels, 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+
    302#endif
    \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+
    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,1578 +1,357 @@\n dune-grid-glue\u00a02.10\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+intersectionlist.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n-1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n-2// vi: set et ts=4 sw=2 sts=2:\n-3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n+1// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n-4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n+2// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n+3#ifndef DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH\n+4#define DUNE_GRIDGLUE_MERGING_INTERSECTIONLIST_HH 1\n 5\n-6namespace _\bD_\bu_\bn_\be {\n-7namespace GridGlue {\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-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-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-64\n-65\n+6#include \n+7#include \n+8#include \n+9#include \n+10\n+11#include \n+12\n+13namespace _\bD_\bu_\bn_\be {\n+14namespace GridGlue {\n+15\n+20template\n+_\b2_\b1class _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\bP_\br_\bo_\bv_\bi_\bd_\be_\br\n+22{\n+23public:\n+24\n+_\b2_\b8 using _\bL_\bo_\bc_\ba_\bl_\b0 = L0;\n+29\n+_\b3_\b3 using _\bL_\bo_\bc_\ba_\bl_\b1 = L1;\n+34\n+_\b3_\b8 using _\bI_\bn_\bd_\be_\bx = unsigned int;\n+39\n+_\b4_\b3 virtual std::size_t _\bs_\bi_\bz_\be() const = 0;\n+44\n+_\b5_\b0 virtual std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs_\b0(_\bI_\bn_\bd_\be_\bx intersection) const = 0;\n+51\n+_\b5_\b7 virtual std::size_t _\bp_\ba_\br_\be_\bn_\bt_\bs_\b1(_\bI_\bn_\bd_\be_\bx intersection) const = 0;\n+58\n+_\b6_\b5 virtual _\bI_\bn_\bd_\be_\bx _\bp_\ba_\br_\be_\bn_\bt_\b0(_\bI_\bn_\bd_\be_\bx intersection, unsigned index) const = 0;\n 66\n-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-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+_\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\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+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-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+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-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+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-178 return false;\n-179 }\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-199\n-200// POINT IN TRIANGLE - :)\n-201template\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-204\n-205public:\n-_\b2_\b0_\b6 typedef FieldVector _\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-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-225\n-226 FieldVector 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+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-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-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-{\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-255\n-256 return true;\n-257 }\n-258\n-259 return false;\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-284\n-285public:\n-_\b2_\b8_\b6 typedef FieldVector _\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+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 P.clear(); SX.clear(); SY.clear();\n-300 SY.resize(4);\n+299} /* namespace GridGlue */\n+300} /* namespace Dune */\n 301\n-302 T eps = 1e-8;\n-303 // if not, check whether its inside the tetrahedron\n-304 FieldMatrix D,DD ;\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-346 }\n-347};\n-348\n-349// SEGEMENT-SEGMENT INTERSECTION - :)\n-350template\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 parallels, 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+302#endif\n _\bD_\bu_\bn_\be\n D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn gridglue.hh:37\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bi_\bn_\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:_\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/a00092.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: overlappingmerge.cc File Reference\n+dune-grid-glue: merger.hh File Reference\n \n \n \n \n \n \n \n@@ -70,49 +70,39 @@\n \n
    \n
    \n \n-
    overlappingmerge.cc File Reference
    \n+Classes |\n+Namespaces
    \n+
    merger.hh File Reference
    \n \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

    Go to the source code of this file.

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

    \n+Classes

    class  Dune::GridGlue::Merger< ctype, grid1Dim, grid2Dim, dimworld >
     Abstract base for all classes that take extracted grids and build sets of intersections. More...
     
    \n \n \n \n \n \n-

    \n Namespaces

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

    \n-Macros

    #define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
     
    \n-

    Macro Definition Documentation

    \n-\n-

    ◆ DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC

    \n-\n-
    \n-
    \n- \n- \n- \n- \n-
    #define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \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,23 +1,26 @@\n dune-grid-glue\u00a02.10\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs\n-overlappingmerge.cc File Reference\n+_\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 _\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-M\bMa\bac\bcr\bro\bos\bs\n-#define\u00a0 _\bD_\bU_\bN_\bE_\b__\bG_\bR_\bI_\bD_\bG_\bL_\bU_\bE_\b__\bO_\bV_\bE_\bR_\bL_\bA_\bP_\bP_\bI_\bN_\bG_\bM_\bE_\bR_\bG_\bE_\b__\bC_\bC\n-\u00a0\n-*\b**\b**\b**\b**\b* M\bMa\bac\bcr\bro\bo D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn D\bDo\boc\bcu\bum\bme\ben\bnt\bta\bat\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n-*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0D\bDU\bUN\bNE\bE_\b_G\bGR\bRI\bID\bDG\bGL\bLU\bUE\bE_\b_O\bOV\bVE\bER\bRL\bLA\bAP\bPP\bPI\bIN\bNG\bGM\bME\bER\bRG\bGE\bE_\b_C\bCC\bC *\b**\b**\b**\b**\b*\n-#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n ===============================================================================\n Generated by\u00a0_\b[_\bd_\bo_\bx_\by_\bg_\be_\bn_\b] 1.9.8\n"}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00092_source.html", "unified_diff": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: overlappingmerge.cc Source File\n+dune-grid-glue: merger.hh Source File\n \n \n \n \n \n \n \n@@ -74,215 +74,110 @@\n \n \n \n
    \n-
    overlappingmerge.cc
    \n+
    merger.hh
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n-
    5
    \n-
    6#ifndef DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n-
    7#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n-
    8//#include <algorithm>
    \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-
    10namespace Dune {
    \n-
    11namespace GridGlue {
    \n+
    10#include <dune/common/fvector.hh>
    \n+
    11#include <dune/geometry/type.hh>
    \n
    12
    \n-
    13template<int dim1, int dim2, int dimworld, typename T>
    \n-
    14bool OverlappingMerge<dim1,dim2,dimworld, T>::inPlane(std::vector<FieldVector<T,dimworld> >& points) {
    \n-
    15
    \n-
    16 T eps = 1e-8;
    \n+\n+
    14
    \n+
    15namespace Dune {
    \n+
    16namespace GridGlue {
    \n
    17
    \n-
    18 assert(dim1 == 3 && dim2 == 3 && dimworld == 3);
    \n-
    19 assert(points.size() == 4);
    \n-
    20
    \n-
    21 FieldVector<T,dimworld> v1 = points[1]-points[0];
    \n-
    22 FieldVector<T,dimworld> v2 = points[2]-points[0];
    \n-
    23 FieldVector<T,dimworld> v3 = points[3]-points[0];
    \n-
    24
    \n-
    25 FieldVector<T,dimworld> v1xv2;
    \n-
    26 v1xv2[0] = v1[1]*v2[2] - v1[2]*v2[1];
    \n-
    27 v1xv2[1] = v1[2]*v2[0] - v1[0]*v2[2];
    \n-
    28 v1xv2[2] = v1[0]*v2[1] - v1[1]*v2[0];
    \n+
    25template <class ctype, int grid1Dim, int grid2Dim, int dimworld>
    \n+
    \n+
    26class Merger
    \n+
    27{
    \n+
    28public:
    \n
    29
    \n-
    30 return (std::abs(v3.dot(v1xv2)) < eps);
    \n-
    31}
    \n+
    31 typedef Dune::FieldVector<ctype, grid1Dim> Grid1Coords;
    \n
    32
    \n-
    33template<int dim1, int dim2, int dimworld, typename T>
    \n-
    \n-
    34void OverlappingMerge<dim1,dim2,dimworld, T>::computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n-
    35 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n-
    36 std::bitset<(1<<dim1)>& neighborIntersects1,
    \n-
    37 unsigned int grid1Index,
    \n-
    38 const Dune::GeometryType& grid2ElementType,
    \n-
    39 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n-
    40 std::bitset<(1<<dim2)>& neighborIntersects2,
    \n-
    41 unsigned int grid2Index,
    \n-
    42 std::vector<SimplicialIntersection>& intersections)
    \n-
    43{
    \n-
    44 using std::min;
    \n-
    45
    \n-
    46 this->counter++;
    \n-
    47 intersections.clear();
    \n-
    48
    \n-\n-
    50
    \n-
    51#ifndef NDEBUG
    \n-
    52 const auto& refElement1 = Dune::ReferenceElements<T,dim1>::general(grid1ElementType);
    \n-
    53 const auto& refElement2 = Dune::ReferenceElements<T,dim2>::general(grid2ElementType);
    \n-
    54
    \n-
    55 // A few consistency checks
    \n-
    56 assert((unsigned int)(refElement1.size(dim1)) == grid1ElementCorners.size());
    \n-
    57 assert((unsigned int)(refElement2.size(dim2)) == grid2ElementCorners.size());
    \n-
    58#endif
    \n-
    59
    \n-
    60 // Make generic geometries representing the grid1- and grid2 element.
    \n-
    61 // this eases computation of local coordinates.
    \n-
    62 typedef MultiLinearGeometry<T,dim1,dimworld> Geometry1;
    \n-
    63 typedef MultiLinearGeometry<T,dim2,dimworld> Geometry2;
    \n-
    64
    \n-
    65 Geometry1 grid1Geometry(grid1ElementType, grid1ElementCorners);
    \n-
    66 Geometry2 grid2Geometry(grid2ElementType, grid2ElementCorners);
    \n-
    67
    \n-
    68 // Dirty workaround for the intersection computation scaling problem (part 1/2)
    \n-
    69 std::vector<Dune::FieldVector<T,dimworld> > scaledGrid1ElementCorners(grid1ElementCorners.size());
    \n-
    70 std::vector<Dune::FieldVector<T,dimworld> > scaledGrid2ElementCorners(grid2ElementCorners.size());
    \n-
    71
    \n-
    72 // the scaling parameter is the length minimum of the lengths of the first edge in the grid1 geometry
    \n-
    73 // and the first edge in the grid2 geometry
    \n-
    74 T scaling = min((grid1ElementCorners[0] - grid1ElementCorners[1]).two_norm(),
    \n-
    75 (grid2ElementCorners[0] - grid2ElementCorners[1]).two_norm());
    \n-
    76
    \n-
    77 // scale the coordinates according to scaling parameter
    \n-
    78 for (unsigned int i = 0; i < grid1ElementCorners.size(); ++i) {
    \n-
    79 scaledGrid1ElementCorners[i] = grid1ElementCorners[i];
    \n-
    80 scaledGrid1ElementCorners[i] *= (1.0/scaling);
    \n-
    81 }
    \n-
    82 for (unsigned int i = 0; i < grid2ElementCorners.size(); ++i) {
    \n-
    83 scaledGrid2ElementCorners[i] = grid2ElementCorners[i];
    \n-
    84 scaledGrid2ElementCorners[i] *= (1.0/scaling);
    \n-
    85 }
    \n-
    86
    \n-
    87 // get size_type for all the vectors we are using
    \n-
    88 typedef typename std::vector<Empty>::size_type size_type;
    \n-
    89
    \n-
    90 const int dimis = dim1 < dim2 ? dim1 : dim2;
    \n-
    91 const size_type n_intersectionnodes = dimis+1;
    \n-
    92 size_type i;
    \n-
    93
    \n-
    94 std::vector<FieldVector<T,dimworld> > scaledP(0), P(0);
    \n-
    95 std::vector<std::vector<int> > H,SX(1<<dim1),SY(1<<dim2);
    \n-
    96 FieldVector<T,dimworld> centroid;
    \n-
    97 // local grid1 coordinates of the intersections
    \n-
    98 std::vector<FieldVector<T,dim1> > g1local(n_intersectionnodes);
    \n-
    99 // local grid2 coordinates of the intersections
    \n-
    100 std::vector<FieldVector<T,dim2> > g2local(n_intersectionnodes);
    \n-
    101
    \n-
    102 // compute the intersection nodes
    \n-
    103 IntersectionComputation<CM>::computeIntersection(scaledGrid1ElementCorners,
    \n-
    104 scaledGrid2ElementCorners,
    \n-
    105 SX,SY,scaledP);
    \n-
    106
    \n-
    107 // Dirty workaround - rescale the result (part 2/2)
    \n-
    108 P.resize(scaledP.size());
    \n-
    109 for (unsigned int i = 0; i < scaledP.size(); ++i) {
    \n-
    110 P[i] = scaledP[i];
    \n-
    111 P[i] *= scaling;
    \n-
    112 }
    \n-
    113
    \n-
    114 for (size_type i = 0; i < neighborIntersects1.size(); ++i) {
    \n-
    115 if (i < SX.size())
    \n-
    116 neighborIntersects1[i] = (SX[i].size() > 0);
    \n-
    117 else
    \n-
    118 neighborIntersects1[i] = false;
    \n-
    119 }
    \n-
    120 for (size_type i = 0; i < neighborIntersects2.size(); ++i) {
    \n-
    121 if (i < SY.size())
    \n-
    122 neighborIntersects2[i] = (SY[i].size() > 0);
    \n-
    123 else
    \n-
    124 neighborIntersects2[i] = false;
    \n-
    125 }
    \n-
    126
    \n-
    127 // P is an simplex of dimension dimis
    \n-
    128 if (P.size() == n_intersectionnodes) {
    \n-
    129
    \n-
    130 for (i = 0; i < n_intersectionnodes; ++i) {
    \n-
    131 g1local[i] = grid1Geometry.local(P[i]);
    \n-
    132 g2local[i] = grid2Geometry.local(P[i]);
    \n-
    133 }
    \n-
    134
    \n-
    135 intersections.emplace_back(grid1Index, grid2Index);
    \n-
    136 for (i = 0; i < n_intersectionnodes; ++i) {
    \n-
    137 intersections.back().corners0[0][i] = g1local[i];
    \n-
    138 intersections.back().corners1[0][i] = g2local[i];
    \n-
    139 }
    \n-
    140
    \n-
    141 } else if (P.size() > n_intersectionnodes) { // P is a union of simplices of dimension dimis
    \n-
    142
    \n-
    143 assert(dimis != 1);
    \n-
    144 std::vector<FieldVector<T,dimworld> > global(n_intersectionnodes);
    \n-
    145
    \n-
    146 // Compute the centroid
    \n-
    147 centroid=0;
    \n-
    148 for (size_type i=0; i < P.size(); i++)
    \n-
    149 centroid += P[i] ;
    \n-
    150 centroid /= static_cast<T>(P.size()) ;
    \n-
    151
    \n-
    152 // order the points and get intersection face indices
    \n-
    153 H.clear() ;
    \n-
    154 IntersectionComputation<CM>::template orderPoints<dimis,dimworld>(centroid,SX,SY,P,H);
    \n-
    155
    \n-
    156 // Loop over all intersection elements
    \n-
    157 for (size_type i=0; i < H.size(); i++) {
    \n-
    158 int hs = H[i].size(); // number of nodes of the intersection
    \n-
    159
    \n-
    160 // if the intersection element is not degenerated
    \n-
    161 if (hs==dimis) {
    \n-
    162
    \n-
    163 // create the intersection geometry
    \n-
    164 for ( size_type j=0 ; j < dimis; ++j) {
    \n-
    165 global[j]= P[H[i][j]]; // get the intersection face
    \n-
    166 }
    \n-
    167
    \n-
    168 // intersection face + centroid = new element
    \n-
    169 global[dimis]=centroid;
    \n-
    170
    \n-
    171 // create local representation of the intersection
    \n-
    172 for (size_type j = 0; j < n_intersectionnodes; ++j) {
    \n-
    173 g1local[j] = grid1Geometry.local(global[j]);
    \n-
    174 g2local[j] = grid2Geometry.local(global[j]);
    \n-
    175 }
    \n-
    176
    \n-
    177 intersections.emplace_back(grid1Index,grid2Index);
    \n-
    178 for (size_type j = 0; j < n_intersectionnodes; ++j) {
    \n-
    179 intersections.back().corners0[0][j] = g1local[j];
    \n-
    180 intersections.back().corners1[0][j] = g2local[j];
    \n-
    181 }
    \n-
    182 }
    \n-
    183 }
    \n-
    184 }
    \n-
    185}
    \n-
    \n-
    186
    \n-
    187} /* namespace Dune::GridGlue */
    \n-
    188} /* namespace Dune */
    \n-
    189
    \n-
    190#endif // DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n+
    34 typedef Dune::FieldVector<ctype, grid2Dim> Grid2Coords;
    \n+
    35
    \n+
    37 typedef Dune::FieldVector<ctype, dimworld> WorldCoords;
    \n+
    38
    \n+\n+
    40
    \n+
    54 virtual void build(const std::vector<Dune::FieldVector<ctype,dimworld> >& grid1_coords,
    \n+
    55 const std::vector<unsigned int>& grid1_elements,
    \n+
    56 const std::vector<Dune::GeometryType>& grid1_element_types,
    \n+
    57 const std::vector<Dune::FieldVector<ctype,dimworld> >& grid2_coords,
    \n+
    58 const std::vector<unsigned int>& grid2_elements,
    \n+
    59 const std::vector<Dune::GeometryType>& grid2_element_types) = 0;
    \n+
    60
    \n+
    \n+
    64 unsigned int nSimplices() const
    \n+
    65 { return intersectionList()->size(); }
    \n+
    \n+
    66
    \n+
    67 virtual void clear() = 0;
    \n+
    68
    \n+
    74 virtual std::shared_ptr<IntersectionList> intersectionList() const = 0;
    \n+
    75
    \n+
    79 template<int n>
    \n+
    \n+
    80 unsigned int parents(unsigned int idx) const {
    \n+
    81 return intersectionList()->template parents<n>(idx);
    \n+
    82 }
    \n+
    \n+
    83
    \n+
    90 template<int n>
    \n+
    \n+
    91 unsigned int parent(unsigned int idx, unsigned int parId = 0) const
    \n+
    92 {
    \n+
    93 return intersectionList()->template parent<n>(idx, parId);
    \n+
    94 }
    \n+
    \n+
    95
    \n+
    104 template<int n>
    \n+
    \n+
    105 auto parentLocal(unsigned int idx, unsigned int corner, unsigned int parId = 0) const
    \n+
    106 {
    \n+
    107 return intersectionList()->template corner<n>(idx, corner, parId);
    \n+
    108 }
    \n+
    \n+
    109
    \n+
    114 unsigned int counter;
    \n+
    115};
    \n+
    \n+
    116
    \n+
    117} /* namespace GridGlue */
    \n+
    118} /* namespace Dune */
    \n+
    119
    \n+
    120#endif
    \n+\n
    Definition gridglue.hh:37
    \n-
    IteratorRange<... > intersections(const GridGlue<... > &glue, const Reverse<... > &reverse=!reversed)
    Iterate over all intersections of a GridGlue.
    \n-
    Intersection computation method for two elements of arbitrary dimension.
    Definition computeintersection.hh:39
    \n-
    static bool computeIntersection(const std::vector< V > &X, const std::vector< V > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< V > &P)
    Compute the intersection of two elements X and Y Compute the intersection of two elements X and Y,...
    Definition computeintersection.cc:14
    \n-
    void computeIntersections(const Dune::GeometryType &grid1ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)> &neighborIntersects2, unsigned int grid2Index, std::vector< SimplicialIntersection > &intersections)
    Compute the intersection between two overlapping elements.
    Definition overlappingmerge.cc:34
    \n-
    Definition simplexintersection.cc:30
    \n+
    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,244 +1,139 @@\n dune-grid-glue\u00a02.10\n Loading...\n Searching...\n No Matches\n * _\bd_\bu_\bn_\be\n * _\bg_\br_\bi_\bd_\b-_\bg_\bl_\bu_\be\n * _\bm_\be_\br_\bg_\bi_\bn_\bg\n-overlappingmerge.cc\n+merger.hh\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n-5\n-6#ifndef DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n-_\b7#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n-8//#include \n+5#ifndef DUNE_GRIDGLUE_MERGING_MERGER_HH\n+6#define DUNE_GRIDGLUE_MERGING_MERGER_HH\n+7\n+8#include \n 9\n-10namespace _\bD_\bu_\bn_\be {\n-11namespace GridGlue {\n+10#include \n+11#include \n 12\n-13template\n-14bool OverlappingMerge::inPlane(std::\n-vector >& points) {\n-15\n-16 T eps = 1e-8;\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-18 assert(dim1 == 3 && dim2 == 3 && dimworld == 3);\n-19 assert(points.size() == 4);\n-20\n-21 FieldVector v1 = points[1]-points[0];\n-22 FieldVector v2 = points[2]-points[0];\n-23 FieldVector v3 = points[3]-points[0];\n-24\n-25 FieldVector v1xv2;\n-26 v1xv2[0] = v1[1]*v2[2] - v1[2]*v2[1];\n-27 v1xv2[1] = v1[2]*v2[0] - v1[0]*v2[2];\n-28 v1xv2[2] = v1[0]*v2[1] - v1[1]*v2[0];\n+25template \n+_\b2_\b6class _\bM_\be_\br_\bg_\be_\br\n+27{\n+28public:\n 29\n-30 return (std::abs(v3.dot(v1xv2)) < eps);\n-31}\n+_\b3_\b1 typedef Dune::FieldVector _\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs;\n 32\n-33template\n-_\b3_\b4void _\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\b1_\b,_\bd_\bi_\bm_\b2_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(const\n-Dune::GeometryType& grid1ElementType,\n-35 const std::vector >& grid1ElementCorners,\n-36 std::bitset<(1<& neighborIntersects1,\n-37 unsigned int grid1Index,\n-38 const Dune::GeometryType& grid2ElementType,\n-39 const std::vector >& grid2ElementCorners,\n-40 std::bitset<(1<& neighborIntersects2,\n-41 unsigned int grid2Index,\n-42 std::vector& _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs)\n-43{\n-44 using std::min;\n-45\n-46 this->counter++;\n-47 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.clear();\n-48\n-49 typedef _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\bd_\bi_\bm_\b1_\b,_\bd_\bi_\bm_\b2_\b,_\bT_\b> CM;\n-50\n-51#ifndef NDEBUG\n-52 const auto& refElement1 = Dune::ReferenceElements::general\n-(grid1ElementType);\n-53 const auto& refElement2 = Dune::ReferenceElements::general\n-(grid2ElementType);\n-54\n-55 // A few consistency checks\n-56 assert((unsigned int)(refElement1.size(dim1)) == grid1ElementCorners.size\n-());\n-57 assert((unsigned int)(refElement2.size(dim2)) == grid2ElementCorners.size\n-());\n-58#endif\n-59\n-60 // Make generic geometries representing the grid1- and grid2 element.\n-61 // this eases computation of local coordinates.\n-62 typedef MultiLinearGeometry Geometry1;\n-63 typedef MultiLinearGeometry Geometry2;\n-64\n-65 Geometry1 grid1Geometry(grid1ElementType, grid1ElementCorners);\n-66 Geometry2 grid2Geometry(grid2ElementType, grid2ElementCorners);\n-67\n-68 // Dirty workaround for the intersection computation scaling problem (part\n-1/2)\n-69 std::vector > scaledGrid1ElementCorners\n-(grid1ElementCorners.size());\n-70 std::vector > scaledGrid2ElementCorners\n-(grid2ElementCorners.size());\n-71\n-72 // the scaling parameter is the length minimum of the lengths of the first\n-edge in the grid1 geometry\n-73 // and the first edge in the grid2 geometry\n-74 T scaling = min((grid1ElementCorners[0] - grid1ElementCorners[1]).two_norm\n-(),\n-75 (grid2ElementCorners[0] - grid2ElementCorners[1]).two_norm());\n-76\n-77 // scale the coordinates according to scaling parameter\n-78 for (unsigned int i = 0; i < grid1ElementCorners.size(); ++i) {\n-79 scaledGrid1ElementCorners[i] = grid1ElementCorners[i];\n-80 scaledGrid1ElementCorners[i] *= (1.0/scaling);\n-81 }\n-82 for (unsigned int i = 0; i < grid2ElementCorners.size(); ++i) {\n-83 scaledGrid2ElementCorners[i] = grid2ElementCorners[i];\n-84 scaledGrid2ElementCorners[i] *= (1.0/scaling);\n-85 }\n-86\n-87 // get size_type for all the vectors we are using\n-88 typedef typename std::vector::size_type size_type;\n-89\n-90 const int dimis = dim1 < dim2 ? dim1 : dim2;\n-91 const size_type n_intersectionnodes = dimis+1;\n-92 size_type i;\n-93\n-94 std::vector > scaledP(0), P(0);\n-95 std::vector > H,SX(1< centroid;\n-97 // local grid1 coordinates of the intersections\n-98 std::vector > g1local(n_intersectionnodes);\n-99 // local grid2 coordinates of the intersections\n-100 std::vector > g2local(n_intersectionnodes);\n-101\n-102 // compute the intersection nodes\n-103 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\bC_\bM_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(scaledGrid1ElementCorners,\n-104 scaledGrid2ElementCorners,\n-105 SX,SY,scaledP);\n-106\n-107 // Dirty workaround - rescale the result (part 2/2)\n-108 P.resize(scaledP.size());\n-109 for (unsigned int i = 0; i < scaledP.size(); ++i) {\n-110 P[i] = scaledP[i];\n-111 P[i] *= scaling;\n-112 }\n-113\n-114 for (size_type i = 0; i < neighborIntersects1.size(); ++i) {\n-115 if (i < SX.size())\n-116 neighborIntersects1[i] = (SX[i].size() > 0);\n-117 else\n-118 neighborIntersects1[i] = false;\n-119 }\n-120 for (size_type i = 0; i < neighborIntersects2.size(); ++i) {\n-121 if (i < SY.size())\n-122 neighborIntersects2[i] = (SY[i].size() > 0);\n-123 else\n-124 neighborIntersects2[i] = false;\n-125 }\n-126\n-127 // P is an simplex of dimension dimis\n-128 if (P.size() == n_intersectionnodes) {\n-129\n-130 for (i = 0; i < n_intersectionnodes; ++i) {\n-131 g1local[i] = grid1Geometry.local(P[i]);\n-132 g2local[i] = grid2Geometry.local(P[i]);\n-133 }\n-134\n-135 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.emplace_back(grid1Index, grid2Index);\n-136 for (i = 0; i < n_intersectionnodes; ++i) {\n-137 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.back().corners0[0][i] = g1local[i];\n-138 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.back().corners1[0][i] = g2local[i];\n-139 }\n-140\n-141 } else if (P.size() > n_intersectionnodes) { // P is a union of simplices\n-of dimension dimis\n-142\n-143 assert(dimis != 1);\n-144 std::vector > global(n_intersectionnodes);\n-145\n-146 // Compute the centroid\n-147 centroid=0;\n-148 for (size_type i=0; i < P.size(); i++)\n-149 centroid += P[i] ;\n-150 centroid /= static_cast(P.size()) ;\n-151\n-152 // order the points and get intersection face indices\n-153 H.clear() ;\n-154 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\bC_\bM_\b>_\b:_\b:_\bt_\be_\bm_\bp_\bl_\ba_\bt_\be orderPoints\n-(centroid,SX,SY,P,H);\n-155\n-156 // Loop over all intersection elements\n-157 for (size_type i=0; i < H.size(); i++) {\n-158 int hs = H[i].size(); // number of nodes of the intersection\n-159\n-160 // if the intersection element is not degenerated\n-161 if (hs==dimis) {\n-162\n-163 // create the intersection geometry\n-164 for ( size_type j=0 ; j < dimis; ++j) {\n-165 global[j]= P[H[i][j]]; // get the intersection face\n-166 }\n-167\n-168 // intersection face + centroid = new element\n-169 global[dimis]=centroid;\n-170\n-171 // create local representation of the intersection\n-172 for (size_type j = 0; j < n_intersectionnodes; ++j) {\n-173 g1local[j] = grid1Geometry.local(global[j]);\n-174 g2local[j] = grid2Geometry.local(global[j]);\n-175 }\n-176\n-177 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.emplace_back(grid1Index,grid2Index);\n-178 for (size_type j = 0; j < n_intersectionnodes; ++j) {\n-179 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.back().corners0[0][j] = g1local[j];\n-180 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.back().corners1[0][j] = g2local[j];\n-181 }\n-182 }\n-183 }\n-184 }\n-185}\n-186\n-187} /* namespace Dune::GridGlue */\n-188} /* namespace Dune */\n-189\n-190#endif // DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n+_\b3_\b4 typedef Dune::FieldVector _\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs;\n+35\n+_\b3_\b7 typedef Dune::FieldVector _\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs;\n+38\n+_\b3_\b9 using _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt = _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt_\b<_\bG_\br_\bi_\bd_\b1_\bC_\bo_\bo_\br_\bd_\bs_\b,\n+_\bG_\br_\bi_\bd_\b2_\bC_\bo_\bo_\br_\bd_\bs_\b>;\n+40\n+_\b5_\b4 virtual void _\bb_\bu_\bi_\bl_\bd(const std::vector >&\n+grid1_coords,\n+55 const std::vector& grid1_elements,\n+56 const std::vector& grid1_element_types,\n+57 const std::vector >& grid2_coords,\n+58 const std::vector& grid2_elements,\n+59 const std::vector& grid2_element_types) = 0;\n+60\n+_\b6_\b4 unsigned int _\bn_\bS_\bi_\bm_\bp_\bl_\bi_\bc_\be_\bs() const\n+65 { return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt()->size(); }\n+66\n+_\b6_\b7 virtual void _\bc_\bl_\be_\ba_\br() = 0;\n+68\n+_\b7_\b4 virtual std::shared_ptr _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt() const = 0;\n+75\n+79 template\n+_\b8_\b0 unsigned int _\bp_\ba_\br_\be_\bn_\bt_\bs(unsigned int idx) const {\n+81 return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt()->template parents(idx);\n+82 }\n+83\n+90 template\n+_\b9_\b1 unsigned int _\bp_\ba_\br_\be_\bn_\bt(unsigned int idx, unsigned int parId = 0) const\n+92 {\n+93 return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt()->template parent(idx, parId);\n+94 }\n+95\n+104 template\n+_\b1_\b0_\b5 auto _\bp_\ba_\br_\be_\bn_\bt_\bL_\bo_\bc_\ba_\bl(unsigned int idx, unsigned int corner, unsigned int parId\n+= 0) const\n+106 {\n+107 return _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bL_\bi_\bs_\bt()->template corner(idx, corner, parId);\n+108 }\n+109\n+_\b1_\b1_\b4 unsigned int _\bc_\bo_\bu_\bn_\bt_\be_\br;\n+115};\n+116\n+117} /* namespace GridGlue */\n+118} /* namespace Dune */\n+119\n+120#endif\n+_\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bl_\bi_\bs_\bt_\b._\bh_\bh\n _\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:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn\n-Intersection computation method for two elements of arbitrary dimension.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:39\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n-static bool computeIntersection(const std::vector< V > &X, const std::vector< V\n-> &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > >\n-&SY, std::vector< V > &P)\n-Compute the intersection of two elements X and Y Compute the intersection of\n-two elements X and Y,...\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.cc:14\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-void computeIntersections(const Dune::GeometryType &grid1ElementType, const\n-std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::\n-bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::\n-GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T,\n-dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)>\n-&neighborIntersects2, unsigned int grid2Index, std::vector<\n-SimplicialIntersection > &intersections)\n-Compute the intersection between two overlapping elements.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.cc:34\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:30\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\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 ===============================================================================\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": "@@ -1,15 +1,15 @@\n \n \n \n \n \n \n \n-dune-grid-glue: contactmerge.cc File Reference\n+dune-grid-glue: overlappingmerge.cc File Reference\n \n \n \n \n \n \n \n@@ -70,30 +70,49 @@\n \n \n
    \n \n-
    contactmerge.cc File Reference
    \n+Namespaces |\n+Macros
    \n+
    overlappingmerge.cc File Reference
    \n \n
    \n-\n+\n

    Go to the source code of this file.

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

    \n Namespaces

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

    \n+Macros

    #define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
     
    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC

    \n+\n+
    \n+
    \n+ \n+ \n+ \n+ \n+
    #define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \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,19 +1,23 @@\n dune-grid-glue\u00a02.10\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+_\bN_\ba_\bm_\be_\bs_\bp_\ba_\bc_\be_\bs | _\bM_\ba_\bc_\br_\bo_\bs\n+overlappingmerge.cc File Reference\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bs_\bo_\bu_\br_\bc_\be_\b _\bc_\bo_\bd_\be_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n N\bNa\bam\bme\bes\bsp\bpa\bac\bce\bes\bs\n namespace \u00a0 _\bD_\bu_\bn_\be\n \u00a0\n namespace \u00a0 _\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be\n \u00a0\n+M\bMa\bac\bcr\bro\bos\bs\n+#define\u00a0 _\bD_\bU_\bN_\bE_\b__\bG_\bR_\bI_\bD_\bG_\bL_\bU_\bE_\b__\bO_\bV_\bE_\bR_\bL_\bA_\bP_\bP_\bI_\bN_\bG_\bM_\bE_\bR_\bG_\bE_\b__\bC_\bC\n+\u00a0\n+*\b**\b**\b**\b**\b* M\bMa\bac\bcr\bro\bo D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn D\bDo\boc\bcu\bum\bme\ben\bnt\bta\bat\bti\bio\bon\bn *\b**\b**\b**\b**\b*\n+*\b**\b**\b**\b**\b* _\b?\b\u25c6_\b?\b\u00a0D\bDU\bUN\bNE\bE_\b_G\bGR\bRI\bID\bDG\bGL\bLU\bUE\bE_\b_O\bOV\bVE\bER\bRL\bLA\bAP\bPP\bPI\bIN\bNG\bGM\bME\bER\bRG\bGE\bE_\b_C\bCC\bC *\b**\b**\b**\b**\b*\n+#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n ===============================================================================\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_source.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a00095_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.cc Source File\n \n \n \n \n \n \n \n@@ -74,389 +74,215 @@\n \n \n \n
    \n-
    contactmerge.cc
    \n+
    overlappingmerge.cc
    \n
    \n
    \n Go to the documentation of this file.
    1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
    \n
    2// vi: set et ts=4 sw=2 sts=2:
    \n
    3// SPDX-FileCopyrightInfo: Copyright \u00a9 DUNE Project contributors, see file LICENSE.md in module root
    \n
    4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-dune-grid-glue-exception
    \n
    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+
    6#ifndef DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n+
    7#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n+
    8//#include <algorithm>
    \n+
    9
    \n+
    10namespace Dune {
    \n+
    11namespace GridGlue {
    \n+
    12
    \n+
    13template<int dim1, int dim2, int dimworld, typename T>
    \n+
    14bool OverlappingMerge<dim1,dim2,dimworld, T>::inPlane(std::vector<FieldVector<T,dimworld> >& points) {
    \n+
    15
    \n+
    16 T eps = 1e-8;
    \n+
    17
    \n+
    18 assert(dim1 == 3 && dim2 == 3 && dimworld == 3);
    \n+
    19 assert(points.size() == 4);
    \n+
    20
    \n+
    21 FieldVector<T,dimworld> v1 = points[1]-points[0];
    \n+
    22 FieldVector<T,dimworld> v2 = points[2]-points[0];
    \n+
    23 FieldVector<T,dimworld> v3 = points[3]-points[0];
    \n
    24
    \n-
    25 std::vector<std::array<LocalCoords,2> > polytopeCorners;
    \n-
    26
    \n-
    27 // Initialize
    \n-
    28 neighborIntersects1.reset();
    \n-
    29 neighborIntersects2.reset();
    \n-
    30
    \n-
    31 const int nCorners1 = grid1ElementCorners.size();
    \n-
    32 const int nCorners2 = grid2ElementCorners.size();
    \n-
    33
    \n-
    34 if (nCorners1 != dimworld)
    \n-
    35 DUNE_THROW(Dune::Exception, "element1 must have " << dimworld << " corners, but has " << nCorners1);
    \n-
    36 if (nCorners2 != dimworld)
    \n-
    37 DUNE_THROW(Dune::Exception, "element2 must have " << dimworld << " corners, but has " << nCorners2);
    \n-
    38
    \n-
    39 // The grid1 projection directions
    \n-
    40 std::vector<WorldCoords> directions1(nCorners1);
    \n-
    41 for (size_t i=0; i<directions1.size(); i++)
    \n-
    42 directions1[i] = nodalDomainDirections_[this->grid1ElementCorners_[grid1Index][i]];
    \n-
    43
    \n-
    44 // The grid2 projection directions
    \n-
    45 std::vector<WorldCoords> directions2(nCorners2);
    \n-
    46 for (size_t i=0; i<directions2.size(); i++)
    \n-
    47 directions2[i] = nodalTargetDirections_[this->grid2ElementCorners_[grid2Index][i]];
    \n+
    25 FieldVector<T,dimworld> v1xv2;
    \n+
    26 v1xv2[0] = v1[1]*v2[2] - v1[2]*v2[1];
    \n+
    27 v1xv2[1] = v1[2]*v2[0] - v1[0]*v2[2];
    \n+
    28 v1xv2[2] = v1[0]*v2[1] - v1[1]*v2[0];
    \n+
    29
    \n+
    30 return (std::abs(v3.dot(v1xv2)) < eps);
    \n+
    31}
    \n+
    32
    \n+
    33template<int dim1, int dim2, int dimworld, typename T>
    \n+
    \n+
    34void OverlappingMerge<dim1,dim2,dimworld, T>::computeIntersections(const Dune::GeometryType& grid1ElementType,
    \n+
    35 const std::vector<Dune::FieldVector<T,dimworld> >& grid1ElementCorners,
    \n+
    36 std::bitset<(1<<dim1)>& neighborIntersects1,
    \n+
    37 unsigned int grid1Index,
    \n+
    38 const Dune::GeometryType& grid2ElementType,
    \n+
    39 const std::vector<Dune::FieldVector<T,dimworld> >& grid2ElementCorners,
    \n+
    40 std::bitset<(1<<dim2)>& neighborIntersects2,
    \n+
    41 unsigned int grid2Index,
    \n+
    42 std::vector<SimplicialIntersection>& intersections)
    \n+
    43{
    \n+
    44 using std::min;
    \n+
    45
    \n+
    46 this->counter++;
    \n+
    47 intersections.clear();
    \n
    48
    \n-
    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+\n+
    50
    \n+
    51#ifndef NDEBUG
    \n+
    52 const auto& refElement1 = Dune::ReferenceElements<T,dim1>::general(grid1ElementType);
    \n+
    53 const auto& refElement2 = Dune::ReferenceElements<T,dim2>::general(grid2ElementType);
    \n+
    54
    \n+
    55 // A few consistency checks
    \n+
    56 assert((unsigned int)(refElement1.size(dim1)) == grid1ElementCorners.size());
    \n+
    57 assert((unsigned int)(refElement2.size(dim2)) == grid2ElementCorners.size());
    \n+
    58#endif
    \n+
    59
    \n+
    60 // Make generic geometries representing the grid1- and grid2 element.
    \n+
    61 // this eases computation of local coordinates.
    \n+
    62 typedef MultiLinearGeometry<T,dim1,dimworld> Geometry1;
    \n+
    63 typedef MultiLinearGeometry<T,dim2,dimworld> Geometry2;
    \n
    64
    \n-
    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+
    65 Geometry1 grid1Geometry(grid1ElementType, grid1ElementCorners);
    \n+
    66 Geometry2 grid2Geometry(grid2ElementType, grid2ElementCorners);
    \n+
    67
    \n+
    68 // Dirty workaround for the intersection computation scaling problem (part 1/2)
    \n+
    69 std::vector<Dune::FieldVector<T,dimworld> > scaledGrid1ElementCorners(grid1ElementCorners.size());
    \n+
    70 std::vector<Dune::FieldVector<T,dimworld> > scaledGrid2ElementCorners(grid2ElementCorners.size());
    \n+
    71
    \n+
    72 // the scaling parameter is the length minimum of the lengths of the first edge in the grid1 geometry
    \n+
    73 // and the first edge in the grid2 geometry
    \n+
    74 T scaling = min((grid1ElementCorners[0] - grid1ElementCorners[1]).two_norm(),
    \n+
    75 (grid2ElementCorners[0] - grid2ElementCorners[1]).two_norm());
    \n+
    76
    \n+
    77 // scale the coordinates according to scaling parameter
    \n+
    78 for (unsigned int i = 0; i < grid1ElementCorners.size(); ++i) {
    \n+
    79 scaledGrid1ElementCorners[i] = grid1ElementCorners[i];
    \n+
    80 scaledGrid1ElementCorners[i] *= (1.0/scaling);
    \n+
    81 }
    \n+
    82 for (unsigned int i = 0; i < grid2ElementCorners.size(); ++i) {
    \n+
    83 scaledGrid2ElementCorners[i] = grid2ElementCorners[i];
    \n+
    84 scaledGrid2ElementCorners[i] *= (1.0/scaling);
    \n+
    85 }
    \n+
    86
    \n+
    87 // get size_type for all the vectors we are using
    \n+
    88 typedef typename std::vector<Empty>::size_type size_type;
    \n+
    89
    \n+
    90 const int dimis = dim1 < dim2 ? dim1 : dim2;
    \n+
    91 const size_type n_intersectionnodes = dimis+1;
    \n+
    92 size_type i;
    \n+
    93
    \n+
    94 std::vector<FieldVector<T,dimworld> > scaledP(0), P(0);
    \n+
    95 std::vector<std::vector<int> > H,SX(1<<dim1),SY(1<<dim2);
    \n+
    96 FieldVector<T,dimworld> centroid;
    \n+
    97 // local grid1 coordinates of the intersections
    \n+
    98 std::vector<FieldVector<T,dim1> > g1local(n_intersectionnodes);
    \n+
    99 // local grid2 coordinates of the intersections
    \n+
    100 std::vector<FieldVector<T,dim2> > g2local(n_intersectionnodes);
    \n+
    101
    \n+
    102 // compute the intersection nodes
    \n+
    103 IntersectionComputation<CM>::computeIntersection(scaledGrid1ElementCorners,
    \n+
    104 scaledGrid2ElementCorners,
    \n+
    105 SX,SY,scaledP);
    \n+
    106
    \n+
    107 // Dirty workaround - rescale the result (part 2/2)
    \n+
    108 P.resize(scaledP.size());
    \n+
    109 for (unsigned int i = 0; i < scaledP.size(); ++i) {
    \n+
    110 P[i] = scaledP[i];
    \n+
    111 P[i] *= scaling;
    \n+
    112 }
    \n+
    113
    \n+
    114 for (size_type i = 0; i < neighborIntersects1.size(); ++i) {
    \n+
    115 if (i < SX.size())
    \n+
    116 neighborIntersects1[i] = (SX[i].size() > 0);
    \n+
    117 else
    \n+
    118 neighborIntersects1[i] = false;
    \n+
    119 }
    \n+
    120 for (size_type i = 0; i < neighborIntersects2.size(); ++i) {
    \n+
    121 if (i < SY.size())
    \n+
    122 neighborIntersects2[i] = (SY[i].size() > 0);
    \n+
    123 else
    \n+
    124 neighborIntersects2[i] = false;
    \n+
    125 }
    \n+
    126
    \n+
    127 // P is an simplex of dimension dimis
    \n+
    128 if (P.size() == n_intersectionnodes) {
    \n+
    129
    \n+
    130 for (i = 0; i < n_intersectionnodes; ++i) {
    \n+
    131 g1local[i] = grid1Geometry.local(P[i]);
    \n+
    132 g2local[i] = grid2Geometry.local(P[i]);
    \n+
    133 }
    \n
    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+
    135 intersections.emplace_back(grid1Index, grid2Index);
    \n+
    136 for (i = 0; i < n_intersectionnodes; ++i) {
    \n+
    137 intersections.back().corners0[0][i] = g1local[i];
    \n+
    138 intersections.back().corners1[0][i] = g2local[i];
    \n+
    139 }
    \n+
    140
    \n+
    141 } else if (P.size() > n_intersectionnodes) { // P is a union of simplices of dimension dimis
    \n
    142
    \n-
    143 // 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+
    143 assert(dimis != 1);
    \n+
    144 std::vector<FieldVector<T,dimworld> > global(n_intersectionnodes);
    \n+
    145
    \n+
    146 // Compute the centroid
    \n+
    147 centroid=0;
    \n+
    148 for (size_type i=0; i < P.size(); i++)
    \n+
    149 centroid += P[i] ;
    \n+
    150 centroid /= static_cast<T>(P.size()) ;
    \n+
    151
    \n+
    152 // order the points and get intersection face indices
    \n+
    153 H.clear() ;
    \n+
    154 IntersectionComputation<CM>::template orderPoints<dimis,dimworld>(centroid,SX,SY,P,H);
    \n
    155
    \n-
    156 // If the polytope is degenerated then there is no intersection
    \n-
    157 if (nPolyCorners<dimworld)
    \n-
    158 return;
    \n+
    156 // Loop over all intersection elements
    \n+
    157 for (size_type i=0; i < H.size(); i++) {
    \n+
    158 int hs = H[i].size(); // number of nodes of the intersection
    \n
    159
    \n-
    160 // If the polytope is a simplex return it
    \n-
    161 if (nPolyCorners==dim+1) {
    \n+
    160 // if the intersection element is not degenerated
    \n+
    161 if (hs==dimis) {
    \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+
    163 // create the intersection geometry
    \n+
    164 for ( size_type j=0 ; j < dimis; ++j) {
    \n+
    165 global[j]= P[H[i][j]]; // get the intersection face
    \n+
    166 }
    \n+
    167
    \n+
    168 // intersection face + centroid = new element
    \n+
    169 global[dimis]=centroid;
    \n+
    170
    \n+
    171 // create local representation of the intersection
    \n+
    172 for (size_type j = 0; j < n_intersectionnodes; ++j) {
    \n+
    173 g1local[j] = grid1Geometry.local(global[j]);
    \n+
    174 g2local[j] = grid2Geometry.local(global[j]);
    \n+
    175 }
    \n
    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+
    177 intersections.emplace_back(grid1Index,grid2Index);
    \n+
    178 for (size_type j = 0; j < n_intersectionnodes; ++j) {
    \n+
    179 intersections.back().corners0[0][j] = g1local[j];
    \n+
    180 intersections.back().corners1[0][j] = g2local[j];
    \n+
    181 }
    \n+
    182 }
    \n+
    183 }
    \n+
    184 }
    \n+
    185}
    \n+
    \n+
    186
    \n+
    187} /* namespace Dune::GridGlue */
    \n+
    188} /* namespace Dune */
    \n+
    189
    \n+
    190#endif // DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC
    \n
    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+
    Intersection computation method for two elements of arbitrary dimension.
    Definition computeintersection.hh:39
    \n+
    static bool computeIntersection(const std::vector< V > &X, const std::vector< V > &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > > &SY, std::vector< V > &P)
    Compute the intersection of two elements X and Y Compute the intersection of two elements X and Y,...
    Definition computeintersection.cc:14
    \n+
    void computeIntersections(const Dune::GeometryType &grid1ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T, dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)> &neighborIntersects2, unsigned int grid2Index, std::vector< SimplicialIntersection > &intersections)
    Compute the intersection between two overlapping elements.
    Definition overlappingmerge.cc:34
    \n+
    Definition simplexintersection.cc:30
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n \n", "details": [{"source1": "html2text {}", "source2": "html2text {}", "unified_diff": "@@ -1,439 +1,244 @@\n dune-grid-glue\u00a02.10\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.cc\n _\bG_\bo_\b _\bt_\bo_\b _\bt_\bh_\be_\b _\bd_\bo_\bc_\bu_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b _\bo_\bf_\b _\bt_\bh_\bi_\bs_\b _\bf_\bi_\bl_\be_\b.\n 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-\n 2// vi: set et ts=4 sw=2 sts=2:\n 3// SPDX-FileCopyrightInfo: Copyright \u00c2\u00a9 DUNE Project contributors, see file\n LICENSE.md in module root\n 4// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-GPL-2.0-only-with-\n dune-grid-glue-exception\n 5\n-6#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+6#ifndef DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n+_\b7#define DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n+8//#include \n+9\n+10namespace _\bD_\bu_\bn_\be {\n+11namespace GridGlue {\n+12\n+13template\n+14bool OverlappingMerge::inPlane(std::\n+vector >& points) {\n+15\n+16 T eps = 1e-8;\n+17\n+18 assert(dim1 == 3 && dim2 == 3 && dimworld == 3);\n+19 assert(points.size() == 4);\n+20\n+21 FieldVector v1 = points[1]-points[0];\n+22 FieldVector v2 = points[2]-points[0];\n+23 FieldVector v3 = points[3]-points[0];\n 24\n-25 std::vector > polytopeCorners;\n-26\n-27 // Initialize\n-28 neighborIntersects1.reset();\n-29 neighborIntersects2.reset();\n-30\n-31 const int nCorners1 = grid1ElementCorners.size();\n-32 const int nCorners2 = grid2ElementCorners.size();\n-33\n-34 if (nCorners1 != dimworld)\n-35 DUNE_THROW(Dune::Exception, \"element1 must have \" << dimworld << \" corners,\n-but has \" << nCorners1);\n-36 if (nCorners2 != dimworld)\n-37 DUNE_THROW(Dune::Exception, \"element2 must have \" << dimworld << \" corners,\n-but has \" << nCorners2);\n-38\n-39 // The grid1 projection directions\n-40 std::vector directions1(nCorners1);\n-41 for (size_t i=0; igrid1ElementCorners_\n-[grid1Index][i]];\n-43\n-44 // The grid2 projection directions\n-45 std::vector directions2(nCorners2);\n-46 for (size_t i=0; igrid2ElementCorners_\n-[grid2Index][i]];\n+25 FieldVector v1xv2;\n+26 v1xv2[0] = v1[1]*v2[2] - v1[2]*v2[1];\n+27 v1xv2[1] = v1[2]*v2[0] - v1[0]*v2[2];\n+28 v1xv2[2] = v1[0]*v2[1] - v1[1]*v2[0];\n+29\n+30 return (std::abs(v3.dot(v1xv2)) < eps);\n+31}\n+32\n+33template\n+_\b3_\b4void _\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b<_\bd_\bi_\bm_\b1_\b,_\bd_\bi_\bm_\b2_\b,_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\b _\bT_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs(const\n+Dune::GeometryType& grid1ElementType,\n+35 const std::vector >& grid1ElementCorners,\n+36 std::bitset<(1<& neighborIntersects1,\n+37 unsigned int grid1Index,\n+38 const Dune::GeometryType& grid2ElementType,\n+39 const std::vector >& grid2ElementCorners,\n+40 std::bitset<(1<& neighborIntersects2,\n+41 unsigned int grid2Index,\n+42 std::vector& _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs)\n+43{\n+44 using std::min;\n+45\n+46 this->counter++;\n+47 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.clear();\n 48\n-49 // 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+49 typedef _\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd_\b<_\bd_\bi_\bm_\bw_\bo_\br_\bl_\bd_\b,_\bd_\bi_\bm_\b1_\b,_\bd_\bi_\bm_\b2_\b,_\bT_\b> CM;\n+50\n+51#ifndef NDEBUG\n+52 const auto& refElement1 = Dune::ReferenceElements::general\n+(grid1ElementType);\n+53 const auto& refElement2 = Dune::ReferenceElements::general\n+(grid2ElementType);\n+54\n+55 // A few consistency checks\n+56 assert((unsigned int)(refElement1.size(dim1)) == grid1ElementCorners.size\n+());\n+57 assert((unsigned int)(refElement2.size(dim2)) == grid2ElementCorners.size\n+());\n+58#endif\n+59\n+60 // Make generic geometries representing the grid1- and grid2 element.\n+61 // this eases computation of local coordinates.\n+62 typedef MultiLinearGeometry Geometry1;\n+63 typedef MultiLinearGeometry Geometry2;\n 64\n-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+65 Geometry1 grid1Geometry(grid1ElementType, grid1ElementCorners);\n+66 Geometry2 grid2Geometry(grid2ElementType, grid2ElementCorners);\n+67\n+68 // Dirty workaround for the intersection computation scaling problem (part\n+1/2)\n+69 std::vector > scaledGrid1ElementCorners\n+(grid1ElementCorners.size());\n+70 std::vector > scaledGrid2ElementCorners\n+(grid2ElementCorners.size());\n+71\n+72 // the scaling parameter is the length minimum of the lengths of the first\n+edge in the grid1 geometry\n+73 // and the first edge in the grid2 geometry\n+74 T scaling = min((grid1ElementCorners[0] - grid1ElementCorners[1]).two_norm\n+(),\n+75 (grid2ElementCorners[0] - grid2ElementCorners[1]).two_norm());\n+76\n+77 // scale the coordinates according to scaling parameter\n+78 for (unsigned int i = 0; i < grid1ElementCorners.size(); ++i) {\n+79 scaledGrid1ElementCorners[i] = grid1ElementCorners[i];\n+80 scaledGrid1ElementCorners[i] *= (1.0/scaling);\n 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::size_type size_type;\n+89\n+90 const int dimis = dim1 < dim2 ? dim1 : dim2;\n+91 const size_type n_intersectionnodes = dimis+1;\n+92 size_type i;\n+93\n+94 std::vector > scaledP(0), P(0);\n+95 std::vector > H,SX(1< centroid;\n+97 // local grid1 coordinates of the intersections\n+98 std::vector > g1local(n_intersectionnodes);\n+99 // local grid2 coordinates of the intersections\n+100 std::vector > g2local(n_intersectionnodes);\n+101\n+102 // compute the intersection nodes\n+103 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\bC_\bM_\b>_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn(scaledGrid1ElementCorners,\n+104 scaledGrid2ElementCorners,\n+105 SX,SY,scaledP);\n+106\n+107 // Dirty workaround - rescale the result (part 2/2)\n+108 P.resize(scaledP.size());\n+109 for (unsigned int i = 0; i < scaledP.size(); ++i) {\n+110 P[i] = scaledP[i];\n+111 P[i] *= scaling;\n+112 }\n+113\n+114 for (size_type i = 0; i < neighborIntersects1.size(); ++i) {\n+115 if (i < SX.size())\n+116 neighborIntersects1[i] = (SX[i].size() > 0);\n+117 else\n+118 neighborIntersects1[i] = false;\n+119 }\n+120 for (size_type i = 0; i < neighborIntersects2.size(); ++i) {\n+121 if (i < SY.size())\n+122 neighborIntersects2[i] = (SY[i].size() > 0);\n+123 else\n+124 neighborIntersects2[i] = false;\n+125 }\n+126\n+127 // P is an simplex of dimension dimis\n+128 if (P.size() == n_intersectionnodes) {\n+129\n+130 for (i = 0; i < n_intersectionnodes; ++i) {\n+131 g1local[i] = grid1Geometry.local(P[i]);\n+132 g2local[i] = grid2Geometry.local(P[i]);\n+133 }\n 134\n-135 bool intersects(true);\n-136 for (int k=0; k(p.success())[refDom.subEntity(i,1,k,dim)];\n-138\n-139 if (intersects)\n-140 neighborIntersectsRef[domGrid].get()[i] = true;\n-141 }\n+135 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.emplace_back(grid1Index, grid2Index);\n+136 for (i = 0; i < n_intersectionnodes; ++i) {\n+137 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.back().corners0[0][i] = g1local[i];\n+138 _\bi_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs.back().corners1[0][i] = g2local[i];\n+139 }\n+140\n+141 } else if (P.size() > n_intersectionnodes) { // P is a union of simplices\n+of dimension dimis\n 142\n-143 // 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+143 assert(dimis != 1);\n+144 std::vector > global(n_intersectionnodes);\n+145\n+146 // Compute the centroid\n+147 centroid=0;\n+148 for (size_type i=0; i < P.size(); i++)\n+149 centroid += P[i] ;\n+150 centroid /= static_cast(P.size()) ;\n+151\n+152 // order the points and get intersection face indices\n+153 H.clear() ;\n+154 _\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b<_\bC_\bM_\b>_\b:_\b:_\bt_\be_\bm_\bp_\bl_\ba_\bt_\be orderPoints\n+(centroid,SX,SY,P,H);\n 155\n-156 // If the polytope is degenerated then there is no intersection\n-157 if (nPolyCorners=3\n+163 // create the intersection geometry\n+164 for ( size_type j=0 ; j < dimis; ++j) {\n+165 global[j]= P[H[i][j]]; // get the intersection face\n+166 }\n+167\n+168 // intersection face + centroid = new element\n+169 global[dimis]=centroid;\n+170\n+171 // create local representation of the intersection\n+172 for (size_type j = 0; j < n_intersectionnodes; ++j) {\n+173 g1local[j] = grid1Geometry.local(global[j]);\n+174 g2local[j] = grid2Geometry.local(global[j]);\n+175 }\n 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 intersections(const GridGlue<... > &glue, const Reverse<...\n > &reverse=!reversed)\n Iterate over all intersections of a GridGlue.\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bc_\br_\bo_\bs_\bs_\bP_\br_\bo_\bd_\bu_\bc_\bt\n-static Dune::FieldVector< T, dim > crossProduct(const Dune::FieldVector< T, dim\n-> &a, const Dune::FieldVector< T, dim > &b)\n-compute cross product\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn crossproduct.hh:15\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bP_\br_\bo_\bj_\be_\bc_\bt_\bi_\bo_\bn_\bI_\bm_\bp_\bl_\be_\bm_\be_\bn_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\br_\bn_\be_\br\n-Coordinate corner(unsigned c)\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn projection_impl.hh:24\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bC_\by_\bc_\bl_\bi_\bc_\bO_\br_\bd_\be_\br\n-void computeCyclicOrder(const std::vector< std::array< LocalCoords, 2 > >\n-&polytopeCorners, const LocalCoords ¢er, std::vector< int > &ordering)\n-const\n-Order the corners of the intersection polytope in cyclic order.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:214\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\br_\be_\bm_\bo_\bv_\be_\bD_\bo_\bu_\bb_\bl_\be_\bs\n-void removeDoubles(std::vector< std::array< LocalCoords, 2 > >\n-&polytopeCorners)\n-Remove all multiples.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:335\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bW_\bo_\br_\bl_\bd_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, dimworld > WorldCoords\n-the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:59\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bs_\be_\bt_\bu_\bp_\bN_\bo_\bd_\ba_\bl_\bD_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\bs\n-void setupNodalDirections(const std::vector< WorldCoords > &coords1, const\n-std::vector< unsigned int > &elements1, const std::vector< Dune::GeometryType >\n-&elementTypes1, const std::vector< WorldCoords > &coords2, const std::vector<\n-unsigned int > &elements2, const std::vector< Dune::GeometryType >\n-&elementTypes2)\n-Setup the direction vectors containing the directions for each vertex.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:269\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bO_\bu_\bt_\be_\br_\bN_\bo_\br_\bm_\ba_\bl_\bF_\bi_\be_\bl_\bd\n-void computeOuterNormalField(const std::vector< WorldCoords > &coords, const\n-std::vector< unsigned int > &elements, const std::vector< Dune::GeometryType >\n-&elementTypes, std::vector< WorldCoords > &normals)\n-If no direction field was specified compute the outer normal field.\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.cc:296\n-_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bC_\bo_\bn_\bt_\ba_\bc_\bt_\bM_\be_\br_\bg_\be_\b:_\b:_\bL_\bo_\bc_\ba_\bl_\bC_\bo_\bo_\br_\bd_\bs\n-Dune::FieldVector< T, dim > LocalCoords\n-the coordinate type used in this interface\n-D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn contactmerge.hh:62\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn\n+Intersection computation method for two elements of arbitrary dimension.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.hh:39\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bC_\bo_\bm_\bp_\bu_\bt_\ba_\bt_\bi_\bo_\bn_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn\n+static bool computeIntersection(const std::vector< V > &X, const std::vector< V\n+> &Y, std::vector< std::vector< int > > &SX, std::vector< std::vector< int > >\n+&SY, std::vector< V > &P)\n+Compute the intersection of two elements X and Y Compute the intersection of\n+two elements X and Y,...\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn computeintersection.cc:14\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bO_\bv_\be_\br_\bl_\ba_\bp_\bp_\bi_\bn_\bg_\bM_\be_\br_\bg_\be_\b:_\b:_\bc_\bo_\bm_\bp_\bu_\bt_\be_\bI_\bn_\bt_\be_\br_\bs_\be_\bc_\bt_\bi_\bo_\bn_\bs\n+void computeIntersections(const Dune::GeometryType &grid1ElementType, const\n+std::vector< Dune::FieldVector< T, dimworld > > &grid1ElementCorners, std::\n+bitset<(1<< dim1)> &neighborIntersects1, unsigned int grid1Index, const Dune::\n+GeometryType &grid2ElementType, const std::vector< Dune::FieldVector< T,\n+dimworld > > &grid2ElementCorners, std::bitset<(1<< dim2)>\n+&neighborIntersects2, unsigned int grid2Index, std::vector<\n+SimplicialIntersection > &intersections)\n+Compute the intersection between two overlapping elements.\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn overlappingmerge.cc:34\n+_\bD_\bu_\bn_\be_\b:_\b:_\bG_\br_\bi_\bd_\bG_\bl_\bu_\be_\b:_\b:_\bS_\bi_\bm_\bp_\bl_\be_\bx_\bM_\be_\bt_\bh_\bo_\bd\n+D\bDe\bef\bfi\bin\bni\bit\bti\bio\bon\bn simplexintersection.cc:30\n ===============================================================================\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.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: conformingmerge.hh File Reference\n+dune-grid-glue: standardmerge.hh File Reference\n \n \n \n \n \n \n \n@@ -71,47 +71,139 @@\n \n \n \n
    \n \n-
    conformingmerge.hh File Reference
    \n+Namespaces |\n+Macros |\n+Functions
    \n+
    standardmerge.hh File Reference
    \n \n
    \n \n-

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

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

    \n-
    #include <iomanip>
    \n+
    #include <iostream>
    \n+#include <iomanip>
    \n #include <vector>
    \n+#include <stack>
    \n+#include <set>
    \n+#include <utility>
    \n+#include <map>
    \n+#include <memory>
    \n #include <algorithm>
    \n-#include <bitset>
    \n-#include <dune/common/fmatrix.hh>
    \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-glue/merging/standardmerge.hh>
    \n+#include <dune/grid/common/grid.hh>
    \n+#include <dune/grid-glue/merging/intersectionlist.hh>
    \n+#include <dune/grid-glue/merging/merger.hh>
    \n+#include <dune/grid-glue/merging/computeintersection.hh>
    \n
    \n

    Go to the source code of this file.

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

    \n Classes

    class  Dune::GridGlue::ConformingMerge< dim, dimworld, T >
     Implementation of the Merger concept for conforming interfaces. More...
    class  Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >
     Common base class for many merger implementations: produce pairs of entities that may intersect. More...
     
    \n \n \n \n \n \n+

    \n Namespaces

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

    \n+Macros

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

    \n+Functions

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

    Detailed Description

    \n-

    Implementation of the Merger concept for conforming interfaces.

    \n-
    \n+

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

    \n+

    Macro Definition Documentation

    \n+\n+

    ◆ DECL

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

    ◆ STANDARD_MERGE_INSTANTIATE

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

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

    \n+

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

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

    a map enabling faster access to vertices and coordinates

    \n

    Maps a vertex' index (from index set) to an object holding the locally associated index of the vertex' coordinate in coords_ and an entity pointer to the codim<dim> entity.

    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01062.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01062.html", "unified_diff": "@@ -77,15 +77,15 @@\n Public Member Functions |\n Protected Member Functions |\n List of all members\n
    Dune::GridGlue::VtkSurfaceWriter Class Reference
    \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 \n@@ -563,15 +563,15 @@\n \n

    \n Public Member Functions

     VtkSurfaceWriter (const char *filename)
     
     ~VtkSurfaceWriter ()
     
    \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/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
    \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,16 +1220,16 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following files:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/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/a01162.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/a01162.html", "unified_diff": "@@ -84,15 +84,15 @@\n
    Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld > Class Template Referenceabstract
    \n \n
    \n \n

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

    \n \n-

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

    \n+

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

    \n
    \n Inheritance diagram for Dune::GridGlue::StandardMerge< T, grid1Dim, grid2Dim, dimworld >:
    \n
    \n
    \"Inheritance
    \n \n \"\"\n \"\"\n@@ -1138,15 +1138,15 @@\n \n \n
    \n \n
    \n
    \n
    The documentation for this class was generated from the following file:\n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000000_000001.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/dir_000000_000001.html", "unified_diff": "@@ -69,14 +69,14 @@\n \n \n \n
    \n-

    adapter → common Relation

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

    adapter → common Relation

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

    extractors → common Relation

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

    extractors → common Relation

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

    grid-glue → adapter Relation

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

    grid-glue → merging Relation

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

    grid-glue → merging Relation

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

    merging → common Relation

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

    merging → common Relation

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

    \n Files

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

    \n Files

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

    \n Files

     codim0extractor.hh
     Mesh grid extractor base class.
     codim0extractor.hh
     Mesh grid extractor base class.
     
     codim1extractor.hh
     Grid extractor class for codim 1 subgrids.
     
     extractor.hh
     extractor base class
     
     vtksurfacewriter.hh
     helper class for graphical output of grids in generic representation
     vtksurfacewriter.hh
     helper class for graphical output of grids in generic representation
     
    \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,23 +1,23 @@\n \n \n \n gridglue.cc\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/adapter/\n a00011.html\n- intersection.hh\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.10.0/dune/grid-glue/adapter/\n- a00017.html\n+ a00020.html\n Dune::GridGlue::GridGlueAmiraWriter\n Dune\n Dune::GridGlue\n \n \n gridgluecommunicate.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/adapter/\n@@ -30,153 +30,153 @@\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.10.0/dune/grid-glue/adapter/\n- a00005.html\n+ a00008.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.10.0/dune/grid-glue/adapter/\n- a00026.html\n+ a00005.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- a00026.html\n+ a00005.html\n aac752eae6e9ad7d1e576f1fe3f7c8a6b\n \n \n \n \n intersectionindexset.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/adapter/\n- a00008.html\n+ a00017.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.10.0/dune/grid-glue/adapter/\n- a00020.html\n+ a00023.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.10.0/dune/grid-glue/adapter/\n- a00023.html\n+ a00026.html\n Dune::GridGlue::Reverse\n Dune\n Dune::GridGlue\n \n \n areawriter.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/common/\n- a00035.html\n- areawriter_impl.hh\n+ a00032.html\n+ areawriter_impl.hh\n Dune\n Dune::GridGlue\n \n \n areawriter_impl.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/common/\n- a00050.html\n+ a00044.html\n Dune::GridGlue::AreaWriterImplementation::FacetLayout\n Dune\n Dune::GridGlue\n Dune::GridGlue::AreaWriterImplementation\n \n \n crossproduct.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/common/\n- a00041.html\n+ a00050.html\n Dune\n Dune::GridGlue\n \n \n projection.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/common/\n- a00047.html\n- projection_impl.hh\n+ a00041.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.10.0/dune/grid-glue/common/\n- a00029.html\n+ a00038.html\n Dune\n Dune::GridGlue\n Dune::GridGlue::ProjectionImplementation\n \n \n projectionwriter.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/common/\n- a00032.html\n- dune/grid-glue/common/projection.hh\n- projectionwriter_impl.hh\n+ a00047.html\n+ dune/grid-glue/common/projection.hh\n+ projectionwriter_impl.hh\n Dune\n Dune::GridGlue\n \n \n projectionwriter_impl.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/common/\n- a00038.html\n+ a00029.html\n Dune\n Dune::GridGlue\n Dune::GridGlue::ProjectionWriterImplementation\n \n \n ringcomm.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/common/\n- a00044.html\n+ a00035.html\n Dune\n Dune::Parallel\n \n #define\n CheckMPIStatus\n- a00044.html\n+ a00035.html\n a1a95f4074572a7a9e13bcb072afef070\n (A, B)\n \n \n \n codim0extractor.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/extractors/\n- a00062.html\n+ a00053.html\n extractor.hh\n Dune::GridGlue::Codim0Extractor\n Dune\n Dune::GridGlue\n \n \n codim1extractor.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/extractors/\n a00059.html\n extractor.hh\n- dune/grid-glue/common/crossproduct.hh\n+ dune/grid-glue/common/crossproduct.hh\n Dune::GridGlue::Codim1Extractor\n Dune\n Dune::GridGlue\n \n \n extractor.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/extractors/\n@@ -189,16 +189,16 @@\n Dune::GridGlue::Extractor::SubEntityInfo\n Dune\n Dune::GridGlue\n \n \n vtksurfacewriter.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/extractors/\n- a00053.html\n- ../adapter/gridgluevtkwriter.hh\n+ a00062.html\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.10.0/dune/grid-glue/adapter/\n@@ -206,120 +206,120 @@\n dune/grid-glue/gridglue.hh\n \n \n gridglue.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/\n a00002.html\n adapter/gridgluecommunicate.hh\n- dune/grid-glue/merging/merger.hh\n- adapter/rangegenerators.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/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.10.0/dune/grid-glue/merging/\n- a00065.html\n+ a00080.html\n Dune\n Dune::GridGlue\n \n \n computeintersection.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/merging/\n- a00074.html\n- simplexintersection.cc\n- computeintersection.cc\n+ a00068.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.10.0/dune/grid-glue/merging/\n- a00098.html\n- dune/grid-glue/merging/standardmerge.hh\n+ a00065.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.10.0/dune/grid-glue/merging/\n- a00095.html\n- dune/grid-glue/common/crossproduct.hh\n- dune/grid-glue/common/projection.hh\n+ a00086.html\n+ dune/grid-glue/common/crossproduct.hh\n+ dune/grid-glue/common/projection.hh\n Dune\n Dune::GridGlue\n \n \n contactmerge.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/merging/\n- a00083.html\n- dune/grid-glue/merging/standardmerge.hh\n+ a00071.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.10.0/dune/grid-glue/merging/\n- a00086.html\n+ a00089.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.10.0/dune/grid-glue/merging/\n- a00080.html\n- dune/grid-glue/merging/intersectionlist.hh\n+ a00092.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.10.0/dune/grid-glue/merging/\n- a00092.html\n+ a00095.html\n Dune\n Dune::GridGlue\n \n #define\n DUNE_GRIDGLUE_OVERLAPPINGMERGE_CC\n- a00092.html\n+ a00095.html\n ad63267c6d27a8f09d98506419b206db8\n \n \n \n \n overlappingmerge.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/merging/\n- a00068.html\n- dune/grid-glue/merging/standardmerge.hh\n- dune/grid-glue/merging/computeintersection.hh\n- overlappingmerge.cc\n+ a00074.html\n+ dune/grid-glue/merging/standardmerge.hh\n+ dune/grid-glue/merging/computeintersection.hh\n+ overlappingmerge.cc\n Dune::GridGlue::OverlappingMerge\n Dune\n Dune::GridGlue\n \n \n simplexintersection.cc\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/merging/\n- a00089.html\n+ a00083.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,54 +329,54 @@\n Dune::GridGlue::SimplexMethod< dimWorld, 3, 3, T >\n Dune\n Dune::GridGlue\n \n \n standardmerge.cc\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/merging/\n- a00071.html\n- standardmerge.hh\n+ a00077.html\n+ standardmerge.hh\n Dune\n Dune::GridGlue\n \n #define\n DECL\n- a00071.html\n+ a00077.html\n ad5c7ca0181fea7823b37d06d5f61e9cd\n \n \n \n #define\n STANDARD_MERGE_INSTANTIATE\n- a00071.html\n+ a00077.html\n a4a2b0f7fb92723749fc6d5cca82a4297\n (T, A, B, C)\n \n \n \n standardmerge.hh\n /build/reproducible-path/dune-grid-glue-2.10.0/dune/grid-glue/merging/\n- a00077.html\n- dune/grid-glue/merging/intersectionlist.hh\n- dune/grid-glue/merging/merger.hh\n- dune/grid-glue/merging/computeintersection.hh\n+ a00098.html\n+ dune/grid-glue/merging/intersectionlist.hh\n+ dune/grid-glue/merging/merger.hh\n+ dune/grid-glue/merging/computeintersection.hh\n Dune::GridGlue::StandardMerge\n Dune\n Dune::GridGlue\n \n #define\n DECL\n- a00077.html\n+ a00098.html\n ad5c7ca0181fea7823b37d06d5f61e9cd\n \n \n \n #define\n STANDARD_MERGE_INSTANTIATE\n- a00077.html\n+ a00098.html\n a4a2b0f7fb92723749fc6d5cca82a4297\n (T, A, B, C)\n \n \n \n Dune::GridGlue::Codim0Extractor\n a01030.html\n"}]}]}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/files.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/files.html", "unified_diff": "@@ -75,48 +75,48 @@\n
    Here is a list of all files with brief descriptions:
    \n
    [detail level 1234]
    \n \n \n \n \n \n-\n+\n \n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n \n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n \n-\n+\n \n \n-\n+\n \n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n-\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n+\n \n
      dune
      grid-glue
      adapter
     gridglue.cc
     gridglue.hh
     gridglueamirawriter.hhWrite all remote intersections to a AmiraMesh file
     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
     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
     crossproduct.hh
     projection.hh
     projection_impl.hh
     projectionwriter.hh
     projectionwriter_impl.hh
     ringcomm.hh
     areawriter.hh
     areawriter_impl.hh
     crossproduct.hh
     projection.hh
     projection_impl.hh
     projectionwriter.hh
     projectionwriter_impl.hh
     ringcomm.hh
      extractors
     codim0extractor.hhMesh grid extractor base class
     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
     vtksurfacewriter.hhHelper class for graphical output of grids in generic representation
      merging
     computeintersection.cc
     computeintersection.hh
     conformingmerge.hhImplementation of the Merger concept for conforming interfaces
     contactmerge.cc
     contactmerge.hhMerge two grid boundary surfaces that may be a positive distance apart
     intersectionlist.hh
     merger.hh
     overlappingmerge.cc
     overlappingmerge.hh
     simplexintersection.cc
     standardmerge.cc
     standardmerge.hhCommon base class for many merger implementations: produce pairs of entities that may intersect
     computeintersection.cc
     computeintersection.hh
     conformingmerge.hhImplementation of the Merger concept for conforming interfaces
     contactmerge.cc
     contactmerge.hhMerge two grid boundary surfaces that may be a positive distance apart
     intersectionlist.hh
     merger.hh
     overlappingmerge.cc
     overlappingmerge.hh
     simplexintersection.cc
     standardmerge.cc
     standardmerge.hhCommon base class for many merger implementations: produce pairs of entities that may intersect
     gridglue.hhCentral component of the module implementing the coupling of two grids
    \n
    \n \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/globals.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/globals.html", "unified_diff": "@@ -66,19 +66,19 @@\n \n \n \n \n \n
    \n
    Here is a list of all file members with links to the files they belong to:
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}, {"source1": "./usr/share/doc/libdune-grid-glue-doc/doxygen/globals_defs.html", "source2": "./usr/share/doc/libdune-grid-glue-doc/doxygen/globals_defs.html", "unified_diff": "@@ -66,19 +66,19 @@\n \n \n \n \n \n
    \n
    Here is a list of all macros with links to the files they belong to:
    \n
    \n \n
    \n Generated by \"doxygen\"/ 1.9.8\n
    \n \n"}]}]}]}]}