]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add GridGenerator::concentric_hyper_shells. 6924/head
authorDavid Wells <drwells@email.unc.edu>
Sun, 15 Jul 2018 23:32:43 +0000 (19:32 -0400)
committerDavid Wells <drwells@email.unc.edu>
Thu, 26 Jul 2018 14:41:17 +0000 (10:41 -0400)
This function generates a grid comprised of (as the name states) concentric
hyper shells, where the shells are (controlled by the skewness parameter)
clustered near the inner boundary.

doc/doxygen/images/concentric_hyper_shells_2d.svg [new file with mode: 0644]
doc/news/changes/minor/20180715DavidWells [new file with mode: 0644]
include/deal.II/grid/grid_generator.h
source/grid/grid_generator.cc
source/grid/grid_generator.inst.in
tests/grid/concentric_hyper_shell_01.cc [new file with mode: 0644]
tests/grid/concentric_hyper_shell_01.output [new file with mode: 0644]
tests/grid/concentric_hyper_shell_02.cc [new file with mode: 0644]
tests/grid/concentric_hyper_shell_02.output [new file with mode: 0644]

diff --git a/doc/doxygen/images/concentric_hyper_shells_2d.svg b/doc/doxygen/images/concentric_hyper_shells_2d.svg
new file mode 100644 (file)
index 0000000..ac9383d
--- /dev/null
@@ -0,0 +1,737 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="79.49691mm"
+   height="79.49691mm"
+   viewBox="0 0 225.3455 225.34563"
+   version="1.2"
+   id="svg336"
+   sodipodi:docname="concentric_hyper_shells_2d.svg"
+   inkscape:version="0.92.2 2405546, 2018-03-11">
+  <metadata
+     id="metadata340">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title>Qt SVG Document</dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1918"
+     inkscape:window-height="1078"
+     id="namedview338"
+     showgrid="false"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     inkscape:zoom="0.58654832"
+     inkscape:cx="433.97208"
+     inkscape:cy="-184.94956"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg336" />
+  <title
+     id="title2">Qt SVG Document</title>
+  <desc
+     id="desc4">Generated with Qt</desc>
+  <defs
+     id="defs6" />
+  <g
+     id="g334"
+     style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel"
+     transform="matrix(0.375,0,0,0.375,-246.18129,-81.79801)">
+    <g
+       font-size="9"
+       font-weight="400"
+       font-style="normal"
+       id="g8"
+       style="font-style:normal;font-weight:400;font-size:9px;font-family:'Sans Serif';fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1" />
+    <g
+       transform="scale(1.00104)"
+       font-size="9"
+       font-weight="400"
+       font-style="normal"
+       id="g10"
+       style="font-style:normal;font-weight:400;font-size:9px;font-family:'Sans Serif';fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1" />
+    <g
+       transform="scale(1.00104)"
+       font-size="9"
+       font-weight="400"
+       font-style="normal"
+       id="g12"
+       style="font-style:normal;font-weight:400;font-size:9px;font-family:'Sans Serif';fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1" />
+    <g
+       transform="scale(1.00104)"
+       font-size="9"
+       font-weight="400"
+       font-style="normal"
+       id="g14"
+       style="font-style:normal;font-weight:400;font-size:9px;font-family:'Sans Serif';fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1" />
+    <g
+       stroke-miterlimit="2"
+       transform="scale(1.00104)"
+       font-size="9"
+       font-weight="400"
+       font-style="normal"
+       id="g328"
+       style="font-style:normal;font-weight:400;font-size:9px;font-family:'Sans Serif';fill:none;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2;stroke-opacity:1">
+      <polyline
+         points="1254.5,518.5 1254.5,518.5 1195.5,518.5 "
+         id="polyline16"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1166.7,307.3 1166.7,307.3 1125.2,348.8 "
+         id="polyline18"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1254.1,518.1 1254.1,518.1 1253.3,496.8 1251.1,475.6 1247.2,454.7 1241.9,434.1 1235.2,413.9 1227.1,394.2 1217.6,375.2 1206.7,356.9 1194.6,339.4 1181.3,322.8 1166.7,307.3 "
+         id="polyline20"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1195.3,518.1 1195.3,518.1 1194.7,501 1192.9,484 1189.8,467.2 1185.6,450.6 1180.2,434.4 1173.6,418.6 1166,403.4 1157.3,388.6 1147.6,374.6 1136.9,361.3 1125.2,348.8 "
+         id="polyline22"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1166.7,307.3 1166.7,307.3 1125.2,348.8 "
+         id="polyline24"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,219.5 956.5,219.5 956.5,278.5 "
+         id="polyline26"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1166.7,307.3 1166.7,307.3 1151.2,292.7 1134.6,279.4 1117.1,267.3 1098.8,256.4 1079.8,246.9 1060.1,238.8 1039.9,232.1 1019.3,226.8 998.4,222.9 977.2,220.7 956,219.9 "
+         id="polyline28"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1125.2,348.8 1125.2,348.8 1112.7,337.1 1099.4,326.4 1085.4,316.7 1070.6,308 1055.4,300.4 1039.6,293.8 1023.4,288.4 1006.8,284.2 990,281.1 973,279.3 956,278.7 "
+         id="polyline30"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,219.5 956.5,219.5 956.5,278.5 "
+         id="polyline32"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="745.2,307.3 745.2,307.3 786.7,348.8 "
+         id="polyline34"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,219.9 956,219.9 934.7,220.7 913.5,222.9 892.6,226.8 872,232.1 851.8,238.8 832.1,246.9 813.1,256.4 794.8,267.3 777.3,279.4 760.7,292.7 745.2,307.3 "
+         id="polyline36"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,278.7 956,278.7 938.9,279.3 921.9,281.1 905.1,284.2 888.5,288.4 872.3,293.8 856.5,300.4 841.3,308 826.5,316.7 812.5,326.4 799.2,337.1 786.7,348.8 "
+         id="polyline38"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="745.2,307.3 745.2,307.3 786.7,348.8 "
+         id="polyline40"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="657.8,518 657.8,518 716.6,518.1 "
+         id="polyline42"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="745.2,307.3 745.2,307.3 730.6,322.8 717.3,339.4 705.2,356.9 694.3,375.2 684.8,394.2 676.7,413.9 670,434.1 664.7,454.7 660.8,475.6 658.6,496.8 657.8,518 "
+         id="polyline44"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="786.7,348.8 786.7,348.8 775,361.3 764.3,374.6 754.6,388.6 745.9,403.4 738.3,418.6 731.7,434.4 726.3,450.6 722.1,467.2 719,484 717.2,501 716.6,518.1 "
+         id="polyline46"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="657.8,518 657.8,518 716.6,518.1 "
+         id="polyline48"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="745.2,728.8 745.2,728.8 786.7,687.3 "
+         id="polyline50"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="657.8,518 657.8,518 658.6,539.3 660.8,560.5 664.7,581.4 670,602 676.7,622.2 684.8,641.9 694.3,660.9 705.2,679.2 717.3,696.7 730.6,713.3 745.2,728.8 "
+         id="polyline52"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="716.6,518.1 716.6,518.1 717.2,535.1 719,552.1 722.1,568.9 726.3,585.5 731.7,601.7 738.3,617.5 745.9,632.7 754.6,647.5 764.3,661.5 775,674.8 786.7,687.3 "
+         id="polyline54"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="745.2,728.8 745.2,728.8 786.7,687.3 "
+         id="polyline56"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,816.5 956.5,816.5 956.5,757.5 "
+         id="polyline58"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="745.2,728.8 745.2,728.8 760.7,743.4 777.3,756.7 794.8,768.8 813.1,779.7 832.1,789.2 851.8,797.3 872,804 892.6,809.3 913.5,813.2 934.7,815.4 956,816.2 "
+         id="polyline60"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="786.7,687.3 786.7,687.3 799.2,699 812.5,709.7 826.5,719.4 841.3,728.1 856.5,735.7 872.3,742.3 888.5,747.7 905.1,751.9 921.9,755 938.9,756.8 956,757.4 "
+         id="polyline62"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,816.5 956.5,816.5 956.5,757.5 "
+         id="polyline64"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1166.7,728.8 1166.7,728.8 1125.2,687.3 "
+         id="polyline66"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,816.2 956,816.2 977.2,815.4 998.4,813.2 1019.3,809.3 1039.9,804 1060.1,797.3 1079.8,789.2 1098.8,779.7 1117.1,768.8 1134.6,756.7 1151.2,743.4 1166.7,728.8 "
+         id="polyline68"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,757.4 956,757.4 973,756.8 990,755 1006.8,751.9 1023.4,747.7 1039.6,742.3 1055.4,735.7 1070.6,728.1 1085.4,719.4 1099.4,709.7 1112.7,699 1125.2,687.3 "
+         id="polyline70"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1166.7,728.8 1166.7,728.8 1125.2,687.3 "
+         id="polyline72"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1254.5,518.5 1254.5,518.5 1195.5,518.5 "
+         id="polyline74"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1166.7,728.8 1166.7,728.8 1181.3,713.3 1194.6,696.7 1206.7,679.2 1217.6,660.9 1227.1,641.9 1235.2,622.2 1241.9,602 1247.2,581.4 1251.1,560.5 1253.3,539.3 1254.1,518.1 "
+         id="polyline76"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1125.2,687.3 1125.2,687.3 1136.9,674.8 1147.6,661.5 1157.3,647.5 1166,632.7 1173.6,617.5 1180.2,601.7 1185.6,585.5 1189.8,568.9 1192.9,552.1 1194.7,535.1 1195.3,518.1 1195.3,518.1 1195.3,518.1 1151.4,518.1 "
+         id="polyline78"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1125.2,348.8 1125.2,348.8 1094.1,379.9 "
+         id="polyline80"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1195.3,518.1 1195.3,518.1 1194.7,501 1192.9,484 1189.8,467.2 1185.6,450.6 1180.2,434.4 1173.6,418.6 1166,403.4 1157.3,388.6 1147.6,374.6 1136.9,361.3 1125.2,348.8 "
+         id="polyline82"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1151.4,518.1 1151.4,518.1 1150.9,504.1 1149.4,490.2 1146.9,476.5 1143.4,463 1139,449.8 1133.7,436.9 1127.5,424.4 1120.4,412.4 1112.4,400.9 1103.7,390.1 1094.1,379.9 "
+         id="polyline84"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1125.2,348.8 1125.2,348.8 1094.1,379.9 "
+         id="polyline86"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,278.5 956.5,278.5 956.5,322.5 "
+         id="polyline88"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1125.2,348.8 1125.2,348.8 1112.7,337.1 1099.4,326.4 1085.4,316.7 1070.6,308 1055.4,300.4 1039.6,293.8 1023.4,288.4 1006.8,284.2 990,281.1 973,279.3 956,278.7 "
+         id="polyline90"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1094.1,379.9 1094.1,379.9 1083.9,370.3 1073.1,361.6 1061.6,353.6 1049.6,346.5 1037.1,340.3 1024.2,335 1011,330.6 997.5,327.1 983.8,324.6 969.9,323.1 956,322.6 "
+         id="polyline92"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,278.5 956.5,278.5 956.5,322.5 "
+         id="polyline94"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="786.7,348.8 786.7,348.8 817.8,379.9 "
+         id="polyline96"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,278.7 956,278.7 938.9,279.3 921.9,281.1 905.1,284.2 888.5,288.4 872.3,293.8 856.5,300.4 841.3,308 826.5,316.7 812.5,326.4 799.2,337.1 786.7,348.8 "
+         id="polyline98"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,322.6 956,322.6 942,323.1 928.1,324.6 914.4,327.1 900.9,330.6 887.7,335 874.8,340.3 862.3,346.5 850.3,353.6 838.8,361.6 828,370.3 817.8,379.9 "
+         id="polyline100"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="786.7,348.8 786.7,348.8 817.8,379.9 "
+         id="polyline102"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="716.5,518.5 716.5,518.5 760.5,518.5 "
+         id="polyline104"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="786.7,348.8 786.7,348.8 775,361.3 764.3,374.6 754.6,388.6 745.9,403.4 738.3,418.6 731.7,434.4 726.3,450.6 722.1,467.2 719,484 717.2,501 716.6,518.1 "
+         id="polyline106"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="817.8,379.9 817.8,379.9 808.2,390.1 799.5,400.9 791.5,412.4 784.4,424.4 778.2,436.9 772.9,449.8 768.5,463 765,476.5 762.5,490.2 761,504.1 760.5,518.1 "
+         id="polyline108"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="716.5,518.5 716.5,518.5 760.5,518.5 "
+         id="polyline110"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="786.7,687.3 786.7,687.3 817.8,656.2 "
+         id="polyline112"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="716.6,518.1 716.6,518.1 717.2,535.1 719,552.1 722.1,568.9 726.3,585.5 731.7,601.7 738.3,617.5 745.9,632.7 754.6,647.5 764.3,661.5 775,674.8 786.7,687.3 "
+         id="polyline114"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="760.5,518.1 760.5,518.1 761,532 762.5,545.9 765,559.6 768.5,573.1 772.9,586.3 778.2,599.2 784.4,611.7 791.5,623.7 799.5,635.2 808.2,646 817.8,656.2 "
+         id="polyline116"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="786.7,687.3 786.7,687.3 817.8,656.2 "
+         id="polyline118"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,757.5 956.5,757.5 956.5,713.5 "
+         id="polyline120"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="786.7,687.3 786.7,687.3 799.2,699 812.5,709.7 826.5,719.4 841.3,728.1 856.5,735.7 872.3,742.3 888.5,747.7 905.1,751.9 921.9,755 938.9,756.8 956,757.4 "
+         id="polyline122"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="817.8,656.2 817.8,656.2 828,665.8 838.8,674.5 850.3,682.5 862.3,689.6 874.8,695.8 887.7,701.1 900.9,705.5 914.4,709 928.1,711.5 942,713 956,713.5 "
+         id="polyline124"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,757.5 956.5,757.5 956.5,713.5 "
+         id="polyline126"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1125.2,687.3 1125.2,687.3 1094.1,656.2 "
+         id="polyline128"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,757.4 956,757.4 973,756.8 990,755 1006.8,751.9 1023.4,747.7 1039.6,742.3 1055.4,735.7 1070.6,728.1 1085.4,719.4 1099.4,709.7 1112.7,699 1125.2,687.3 "
+         id="polyline130"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,713.5 956,713.5 969.9,713 983.8,711.5 997.5,709 1011,705.5 1024.2,701.1 1037.1,695.8 1049.6,689.6 1061.6,682.5 1073.1,674.5 1083.9,665.8 1094.1,656.2 "
+         id="polyline132"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1125.2,687.3 1125.2,687.3 1094.1,656.2 "
+         id="polyline134"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1195.5,518.5 1195.5,518.5 1151.5,518.5 "
+         id="polyline136"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1125.2,687.3 1125.2,687.3 1136.9,674.8 1147.6,661.5 1157.3,647.5 1166,632.7 1173.6,617.5 1180.2,601.7 1185.6,585.5 1189.8,568.9 1192.9,552.1 1194.7,535.1 1195.3,518.1 "
+         id="polyline138"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1094.1,656.2 1094.1,656.2 1103.7,646 1112.4,635.2 1120.4,623.7 1127.5,611.7 1133.7,599.2 1139,586.3 1143.4,573.1 1146.9,559.6 1149.4,545.9 1150.9,532 1151.4,518.1 1151.4,518.1 1151.4,518.1 1125.2,518.1 "
+         id="polyline140"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1094.1,379.9 1094.1,379.9 1075.6,398.4 "
+         id="polyline142"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1151.4,518.1 1151.4,518.1 1150.9,504.1 1149.4,490.2 1146.9,476.5 1143.4,463 1139,449.8 1133.7,436.9 1127.5,424.4 1120.4,412.4 1112.4,400.9 1103.7,390.1 1094.1,379.9 "
+         id="polyline144"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1125.2,518.1 1125.2,518.1 1124.8,506 1123.5,494 1121.3,482.1 1118.3,470.4 1114.5,458.9 1109.8,447.8 1104.4,437 1098.3,426.6 1091.4,416.6 1083.9,407.2 1075.6,398.4 "
+         id="polyline146"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1094.1,379.9 1094.1,379.9 1075.6,398.4 "
+         id="polyline148"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,322.5 956.5,322.5 956.5,348.5 "
+         id="polyline150"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1094.1,379.9 1094.1,379.9 1083.9,370.3 1073.1,361.6 1061.6,353.6 1049.6,346.5 1037.1,340.3 1024.2,335 1011,330.6 997.5,327.1 983.8,324.6 969.9,323.1 956,322.6 "
+         id="polyline152"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1075.6,398.4 1075.6,398.4 1066.8,390.1 1057.4,382.6 1047.4,375.7 1037,369.6 1026.2,364.2 1015.1,359.5 1003.6,355.7 991.9,352.7 980,350.5 968,349.2 956,348.8 "
+         id="polyline154"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,322.5 956.5,322.5 956.5,348.5 "
+         id="polyline156"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="817.8,379.9 817.8,379.9 836.3,398.4 "
+         id="polyline158"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,322.6 956,322.6 942,323.1 928.1,324.6 914.4,327.1 900.9,330.6 887.7,335 874.8,340.3 862.3,346.5 850.3,353.6 838.8,361.6 828,370.3 817.8,379.9 "
+         id="polyline160"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,348.8 956,348.8 943.9,349.2 931.9,350.5 920,352.7 908.3,355.7 896.8,359.5 885.7,364.2 874.9,369.6 864.5,375.7 854.5,382.6 845.1,390.1 836.3,398.4 "
+         id="polyline162"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="817.8,379.9 817.8,379.9 836.3,398.4 "
+         id="polyline164"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="760.5,518.5 760.5,518.5 786.5,518.5 "
+         id="polyline166"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="817.8,379.9 817.8,379.9 808.2,390.1 799.5,400.9 791.5,412.4 784.4,424.4 778.2,436.9 772.9,449.8 768.5,463 765,476.5 762.5,490.2 761,504.1 760.5,518.1 "
+         id="polyline168"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="836.3,398.4 836.3,398.4 828,407.2 820.5,416.6 813.6,426.6 807.5,437 802.1,447.8 797.4,458.9 793.6,470.4 790.6,482.1 788.4,494 787.1,506 786.7,518.1 "
+         id="polyline170"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="760.5,518.5 760.5,518.5 786.5,518.5 "
+         id="polyline172"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="817.8,656.2 817.8,656.2 836.3,637.7 "
+         id="polyline174"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="760.5,518.1 760.5,518.1 761,532 762.5,545.9 765,559.6 768.5,573.1 772.9,586.3 778.2,599.2 784.4,611.7 791.5,623.7 799.5,635.2 808.2,646 817.8,656.2 "
+         id="polyline176"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="786.7,518.1 786.7,518.1 787.1,530.1 788.4,542.1 790.6,554 793.6,565.7 797.4,577.2 802.1,588.3 807.5,599.1 813.6,609.5 820.5,619.5 828,628.9 836.3,637.7 "
+         id="polyline178"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="817.8,656.2 817.8,656.2 836.3,637.7 "
+         id="polyline180"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,713.5 956.5,713.5 956.5,687.5 "
+         id="polyline182"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="817.8,656.2 817.8,656.2 828,665.8 838.8,674.5 850.3,682.5 862.3,689.6 874.8,695.8 887.7,701.1 900.9,705.5 914.4,709 928.1,711.5 942,713 956,713.5 "
+         id="polyline184"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="836.3,637.7 836.3,637.7 845.1,646 854.5,653.5 864.5,660.4 874.9,666.5 885.7,671.9 896.8,676.6 908.3,680.4 920,683.4 931.9,685.6 943.9,686.9 956,687.3 "
+         id="polyline186"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,713.5 956.5,713.5 956.5,687.5 "
+         id="polyline188"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1094.1,656.2 1094.1,656.2 1075.6,637.7 "
+         id="polyline190"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,713.5 956,713.5 969.9,713 983.8,711.5 997.5,709 1011,705.5 1024.2,701.1 1037.1,695.8 1049.6,689.6 1061.6,682.5 1073.1,674.5 1083.9,665.8 1094.1,656.2 "
+         id="polyline192"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,687.3 956,687.3 968,686.9 980,685.6 991.9,683.4 1003.6,680.4 1015.1,676.6 1026.2,671.9 1037,666.5 1047.4,660.4 1057.4,653.5 1066.8,646 1075.6,637.7 "
+         id="polyline194"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1094.1,656.2 1094.1,656.2 1075.6,637.7 "
+         id="polyline196"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1151.5,518.5 1151.5,518.5 1125.5,518.5 "
+         id="polyline198"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1094.1,656.2 1094.1,656.2 1103.7,646 1112.4,635.2 1120.4,623.7 1127.5,611.7 1133.7,599.2 1139,586.3 1143.4,573.1 1146.9,559.6 1149.4,545.9 1150.9,532 1151.4,518.1 "
+         id="polyline200"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1075.6,637.7 1075.6,637.7 1083.9,628.9 1091.4,619.5 1098.3,609.5 1104.4,599.1 1109.8,588.3 1114.5,577.2 1118.3,565.7 1121.3,554 1123.5,542.1 1124.8,530.1 1125.2,518.1 1125.2,518.1 1125.2,518.1 1111.5,518.1 "
+         id="polyline202"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1075.6,398.4 1075.6,398.4 1066,408 "
+         id="polyline204"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1125.2,518.1 1125.2,518.1 1124.8,506 1123.5,494 1121.3,482.1 1118.3,470.4 1114.5,458.9 1109.8,447.8 1104.4,437 1098.3,426.6 1091.4,416.6 1083.9,407.2 1075.6,398.4 "
+         id="polyline206"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1111.5,518.1 1111.5,518.1 1111.2,506.9 1110,495.9 1108,485 1105.2,474.2 1101.7,463.7 1097.5,453.4 1092.5,443.5 1086.8,433.9 1080.5,424.8 1073.6,416.1 1066,408 "
+         id="polyline208"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1075.6,398.4 1075.6,398.4 1066,408 "
+         id="polyline210"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,348.5 956.5,348.5 956.5,362.5 "
+         id="polyline212"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1075.6,398.4 1075.6,398.4 1066.8,390.1 1057.4,382.6 1047.4,375.7 1037,369.6 1026.2,364.2 1015.1,359.5 1003.6,355.7 991.9,352.7 980,350.5 968,349.2 956,348.8 "
+         id="polyline214"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1066,408 1066,408 1057.9,400.4 1049.2,393.5 1040.1,387.2 1030.5,381.5 1020.6,376.5 1010.3,372.3 999.8,368.8 989,366 978.1,364 967.1,362.8 956,362.5 "
+         id="polyline216"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,348.5 956.5,348.5 956.5,362.5 "
+         id="polyline218"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="836.3,398.4 836.3,398.4 845.9,408 "
+         id="polyline220"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,348.8 956,348.8 943.9,349.2 931.9,350.5 920,352.7 908.3,355.7 896.8,359.5 885.7,364.2 874.9,369.6 864.5,375.7 854.5,382.6 845.1,390.1 836.3,398.4 "
+         id="polyline222"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,362.5 956,362.5 944.8,362.8 933.8,364 922.9,366 912.1,368.8 901.6,372.3 891.3,376.5 881.4,381.5 871.8,387.2 862.7,393.5 854,400.4 845.9,408 "
+         id="polyline224"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="836.3,398.4 836.3,398.4 845.9,408 "
+         id="polyline226"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="786.5,518.5 786.5,518.5 800.5,518.5 "
+         id="polyline228"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="836.3,398.4 836.3,398.4 828,407.2 820.5,416.6 813.6,426.6 807.5,437 802.1,447.8 797.4,458.9 793.6,470.4 790.6,482.1 788.4,494 787.1,506 786.7,518.1 "
+         id="polyline230"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="845.9,408 845.9,408 838.3,416.1 831.4,424.8 825.1,433.9 819.4,443.5 814.4,453.4 810.2,463.7 806.7,474.2 803.9,485 801.9,495.9 800.7,506.9 800.4,518.1 "
+         id="polyline232"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="786.5,518.5 786.5,518.5 800.5,518.5 "
+         id="polyline234"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="836.3,637.7 836.3,637.7 845.9,628.1 "
+         id="polyline236"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="786.7,518.1 786.7,518.1 787.1,530.1 788.4,542.1 790.6,554 793.6,565.7 797.4,577.2 802.1,588.3 807.5,599.1 813.6,609.5 820.5,619.5 828,628.9 836.3,637.7 "
+         id="polyline238"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="800.4,518.1 800.4,518.1 800.7,529.2 801.9,540.2 803.9,551.1 806.7,561.9 810.2,572.4 814.4,582.7 819.4,592.6 825.1,602.2 831.4,611.3 838.3,620 845.9,628.1 "
+         id="polyline240"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="836.3,637.7 836.3,637.7 845.9,628.1 "
+         id="polyline242"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,687.5 956.5,687.5 956.5,673.5 "
+         id="polyline244"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="836.3,637.7 836.3,637.7 845.1,646 854.5,653.5 864.5,660.4 874.9,666.5 885.7,671.9 896.8,676.6 908.3,680.4 920,683.4 931.9,685.6 943.9,686.9 956,687.3 "
+         id="polyline246"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="845.9,628.1 845.9,628.1 854,635.7 862.7,642.6 871.8,648.9 881.4,654.6 891.3,659.6 901.6,663.8 912.1,667.3 922.9,670.1 933.8,672.1 944.8,673.3 956,673.6 "
+         id="polyline248"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,687.5 956.5,687.5 956.5,673.5 "
+         id="polyline250"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1075.6,637.7 1075.6,637.7 1066,628.1 "
+         id="polyline252"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,687.3 956,687.3 968,686.9 980,685.6 991.9,683.4 1003.6,680.4 1015.1,676.6 1026.2,671.9 1037,666.5 1047.4,660.4 1057.4,653.5 1066.8,646 1075.6,637.7 "
+         id="polyline254"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,673.6 956,673.6 967.1,673.3 978.1,672.1 989,670.1 999.8,667.3 1010.3,663.8 1020.6,659.6 1030.5,654.6 1040.1,648.9 1049.2,642.6 1057.9,635.7 1066,628.1 "
+         id="polyline256"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1075.6,637.7 1075.6,637.7 1066,628.1 "
+         id="polyline258"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1125.5,518.5 1125.5,518.5 1111.5,518.5 "
+         id="polyline260"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1075.6,637.7 1075.6,637.7 1083.9,628.9 1091.4,619.5 1098.3,609.5 1104.4,599.1 1109.8,588.3 1114.5,577.2 1118.3,565.7 1121.3,554 1123.5,542.1 1124.8,530.1 1125.2,518.1 "
+         id="polyline262"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1066,628.1 1066,628.1 1073.6,620 1080.5,611.3 1086.8,602.2 1092.5,592.6 1097.5,582.7 1101.7,572.4 1105.2,561.9 1108,551.1 1110,540.2 1111.2,529.2 1111.5,518.1 1111.5,518.1 1111.5,518.1 1105,518.1 "
+         id="polyline264"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1066,408 1066,408 1061.3,412.7 "
+         id="polyline266"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1111.5,518.1 1111.5,518.1 1111.2,506.9 1110,495.9 1108,485 1105.2,474.2 1101.7,463.7 1097.5,453.4 1092.5,443.5 1086.8,433.9 1080.5,424.8 1073.6,416.1 1066,408 "
+         id="polyline268"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1105,518.1 1105,518.1 1104.6,507.4 1103.5,496.8 1101.6,486.4 1098.9,476.1 1095.6,466 1091.5,456.1 1086.8,446.6 1081.3,437.5 1075.3,428.7 1068.6,420.4 1061.3,412.7 "
+         id="polyline270"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1066,408 1066,408 1061.3,412.7 "
+         id="polyline272"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,362.5 956.5,362.5 956.5,369.5 "
+         id="polyline274"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1066,408 1066,408 1057.9,400.4 1049.2,393.5 1040.1,387.2 1030.5,381.5 1020.6,376.5 1010.3,372.3 999.8,368.8 989,366 978.1,364 967.1,362.8 956,362.5 "
+         id="polyline276"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1061.3,412.7 1061.3,412.7 1053.6,405.4 1045.3,398.7 1036.5,392.7 1027.4,387.2 1017.9,382.5 1008,378.4 997.9,375.1 987.6,372.4 977.2,370.5 966.6,369.4 956,369 "
+         id="polyline278"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,362.5 956.5,362.5 956.5,369.5 "
+         id="polyline280"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="845.9,408 845.9,408 850.6,412.7 "
+         id="polyline282"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,362.5 956,362.5 944.8,362.8 933.8,364 922.9,366 912.1,368.8 901.6,372.3 891.3,376.5 881.4,381.5 871.8,387.2 862.7,393.5 854,400.4 845.9,408 "
+         id="polyline284"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,369 956,369 945.3,369.4 934.7,370.5 924.3,372.4 914,375.1 903.9,378.4 894,382.5 884.5,387.2 875.4,392.7 866.6,398.7 858.3,405.4 850.6,412.7 "
+         id="polyline286"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="845.9,408 845.9,408 850.6,412.7 "
+         id="polyline288"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="800.5,518.5 800.5,518.5 806.5,518.5 "
+         id="polyline290"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="845.9,408 845.9,408 838.3,416.1 831.4,424.8 825.1,433.9 819.4,443.5 814.4,453.4 810.2,463.7 806.7,474.2 803.9,485 801.9,495.9 800.7,506.9 800.4,518.1 "
+         id="polyline292"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="850.6,412.7 850.6,412.7 843.3,420.4 836.6,428.7 830.6,437.5 825.1,446.6 820.4,456.1 816.3,466 813,476.1 810.3,486.4 808.4,496.8 807.3,507.4 806.9,518.1 "
+         id="polyline294"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="800.5,518.5 800.5,518.5 806.5,518.5 "
+         id="polyline296"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="845.9,628.1 845.9,628.1 850.6,623.4 "
+         id="polyline298"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="800.4,518.1 800.4,518.1 800.7,529.2 801.9,540.2 803.9,551.1 806.7,561.9 810.2,572.4 814.4,582.7 819.4,592.6 825.1,602.2 831.4,611.3 838.3,620 845.9,628.1 "
+         id="polyline300"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="806.9,518.1 806.9,518.1 807.3,528.7 808.4,539.3 810.3,549.7 813,560 816.3,570.1 820.4,580 825.1,589.5 830.6,598.6 836.6,607.4 843.3,615.7 850.6,623.4 "
+         id="polyline302"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="845.9,628.1 845.9,628.1 850.6,623.4 "
+         id="polyline304"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,673.5 956.5,673.5 956.5,667.5 "
+         id="polyline306"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="845.9,628.1 845.9,628.1 854,635.7 862.7,642.6 871.8,648.9 881.4,654.6 891.3,659.6 901.6,663.8 912.1,667.3 922.9,670.1 933.8,672.1 944.8,673.3 956,673.6 "
+         id="polyline308"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="850.6,623.4 850.6,623.4 858.3,630.7 866.6,637.4 875.4,643.4 884.5,648.9 894,653.6 903.9,657.7 914,661 924.3,663.7 934.7,665.6 945.3,666.7 956,667.1 "
+         id="polyline310"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956.5,673.5 956.5,673.5 956.5,667.5 "
+         id="polyline312"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1066,628.1 1066,628.1 1061.3,623.4 "
+         id="polyline314"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,673.6 956,673.6 967.1,673.3 978.1,672.1 989,670.1 999.8,667.3 1010.3,663.8 1020.6,659.6 1030.5,654.6 1040.1,648.9 1049.2,642.6 1057.9,635.7 1066,628.1 "
+         id="polyline316"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="956,667.1 956,667.1 966.6,666.7 977.2,665.6 987.6,663.7 997.9,661 1008,657.7 1017.9,653.6 1027.4,648.9 1036.5,643.4 1045.3,637.4 1053.6,630.7 1061.3,623.4 "
+         id="polyline318"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1066,628.1 1066,628.1 1061.3,623.4 "
+         id="polyline320"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1111.5,518.5 1111.5,518.5 1105.5,518.5 "
+         id="polyline322"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1066,628.1 1066,628.1 1073.6,620 1080.5,611.3 1086.8,602.2 1092.5,592.6 1097.5,582.7 1101.7,572.4 1105.2,561.9 1108,551.1 1110,540.2 1111.2,529.2 1111.5,518.1 "
+         id="polyline324"
+         style="vector-effect:none;fill:none" />
+      <polyline
+         points="1061.3,623.4 1061.3,623.4 1068.6,615.7 1075.3,607.4 1081.3,598.6 1086.8,589.5 1091.5,580 1095.6,570.1 1098.9,560 1101.6,549.7 1103.5,539.3 1104.6,528.7 1105,518.1 "
+         id="polyline326"
+         style="vector-effect:none;fill:none" />
+    </g>
+    <g
+       transform="scale(1.00104)"
+       font-size="9"
+       font-weight="400"
+       font-style="normal"
+       id="g330"
+       style="font-style:normal;font-weight:400;font-size:9px;font-family:'Sans Serif';fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1" />
+    <g
+       font-size="9"
+       font-weight="400"
+       font-style="normal"
+       id="g332"
+       style="font-style:normal;font-weight:400;font-size:9px;font-family:'Sans Serif';fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1" />
+  </g>
+</svg>
diff --git a/doc/news/changes/minor/20180715DavidWells b/doc/news/changes/minor/20180715DavidWells
new file mode 100644 (file)
index 0000000..b589f5e
--- /dev/null
@@ -0,0 +1,5 @@
+New: A new function GridGenerator::concentric_hyper_shells has been added. This
+function generates a grid comprised of shells of varying widths, where the
+shells near the center are much thinner than those near the outer boundary.
+<br>
+(David Wells, 2018/07/15)
index e470279f47d149632a1a2e1e96edbef5a959aae2..56da7be5609a6e6eab231d4cedcaac1f7179371b 100644 (file)
@@ -991,6 +991,88 @@ namespace GridGenerator
                                    const unsigned int  repetitions  = 1,
                                    const bool          colorize     = false);
 
+  /**
+   * Produce a grid consisting of concentric shells. The primary difference
+   * between this function and GridGenerator::hyper_shell is that this
+   * function permits unevenly spaced (in the radial direction) coarse level
+   * cells.
+   *
+   * The parameters @p center, @p inner_radius, and @p outer_radius behave in
+   * the same way as the first three arguments to
+   * GridGenerator::hyper_shell. @p n_shells gives the total number of shells
+   * to use (i.e., the number of cells in the radial direction). The outer
+   * radius of the $k$th shell is given by
+   *
+   * @f[
+   *     r = r_{\text{inner}} + (r_\text{outer} - r_\text{inner})
+   *     \frac{1 - \tanh(\text{skewness}(1 - k/\text{n_shells}))}
+   *          {\tanh(\text{skewness})}
+   * @f]
+   *
+   * where @p skewness is a parameter controlling the shell spacing in the
+   * radial direction: values of @p skewness close to zero correspond to even
+   * spacing, while larger values of @p skewness (such as $2$ or $3$)
+   * correspond to shells biased to the inner radius.
+   *
+   * @p n_cells_per_shell is the same as in GridGenerator::hyper_shell: in 2d
+   * the default choice of zero will result in 8 cells per shell (and 12 in
+   * 3d). The only valid values in 3d are 6 (the default), 12, and 96 cells:
+   * see the documentation of GridGenerator::hyper_shell for more information.
+   *
+   * If @p colorize is <code>true</code> then the outer boundary of the merged
+   * shells has a boundary id of $1$ and the inner boundary has a boundary id
+   * of $0$.
+   *
+   * Example: The following code (see, e.g., step-10 for instructions on how
+   * to visualize GNUPLOT output)
+   *
+   * @code
+   * #include <deal.II/fe/mapping_q_generic.h>
+   *
+   * #include <deal.II/grid/grid_generator.h>
+   * #include <deal.II/grid/grid_out.h>
+   * #include <deal.II/grid/tria.h>
+   *
+   * #include <fstream>
+   *
+   * int main()
+   * {
+   *   using namespace dealii;
+   *
+   *   Triangulation<2> triangulation;
+   *   GridGenerator::concentric_hyper_shells(triangulation,
+   *                                          Point<2>(),
+   *                                          1.0,
+   *                                          2.0,
+   *                                          5u,
+   *                                          2.0);
+   *
+   *   GridOut grid_out;
+   *   GridOutFlags::Gnuplot gnuplot_flags(false, 10, true);
+   *   grid_out.set_flags(gnuplot_flags);
+   *
+   *   const MappingQGeneric<2> mapping(3);
+   *   std::ofstream out("out.gpl");
+   *   grid_out.write_gnuplot(triangulation, out, &mapping);
+   * }
+   * @endcode
+   *
+   * generates the following output:
+   *
+   * @image html concentric_hyper_shells_2d.svg
+   *
+   */
+  template <int dim>
+  void
+  concentric_hyper_shells(Triangulation<dim> &triangulation,
+                          const Point<dim> &  center,
+                          const double        inner_radius      = 0.125,
+                          const double        outer_radius      = 0.25,
+                          const unsigned int  n_shells          = 1,
+                          const double        skewness          = 0.1,
+                          const unsigned int  n_cells_per_shell = 0,
+                          const bool          colorize          = false);
+
   /**
    * Produce a ring of cells in 3d that is cut open, twisted and glued
    * together again. This results in a kind of moebius-loop.
index 313a3302f00b9d0a9c9ef155b09ded1629f711ed..a05207881cf892a1ed4da8a95a0a5187df288c2b 100644 (file)
@@ -4701,6 +4701,127 @@ namespace GridGenerator
 
 
 
+  template <int dim>
+  void
+  concentric_hyper_shells(Triangulation<dim> &triangulation,
+                          const Point<dim> &  center,
+                          const double        inner_radius,
+                          const double        outer_radius,
+                          const unsigned int  n_shells,
+                          const double        skewness,
+                          const unsigned int  n_cells,
+                          const bool          colorize)
+  {
+    Assert(dim == 2 || dim == 3, ExcNotImplemented());
+    (void)colorize;
+    (void)n_cells;
+    Assert(inner_radius < outer_radius,
+           ExcMessage("outer_radius has to be bigger than inner_radius."));
+    if (n_shells == 0)
+      return; // empty Triangulation
+
+    std::vector<double> radii;
+    radii.push_back(inner_radius);
+    for (unsigned int shell_n = 1; shell_n < n_shells; ++shell_n)
+      if (skewness == 0.0)
+        // same as below, but works in the limiting case of zero skewness
+        radii.push_back(inner_radius +
+                        (outer_radius - inner_radius) *
+                          (1.0 - (1.0 - double(shell_n) / n_shells)));
+      else
+        radii.push_back(
+          inner_radius +
+          (outer_radius - inner_radius) *
+            (1.0 - std::tanh(skewness * (1.0 - double(shell_n) / n_shells)) /
+                     std::tanh(skewness)));
+    radii.push_back(outer_radius);
+
+    auto min_line_length = [](const Triangulation<dim> &tria) -> double {
+      double length = std::numeric_limits<double>::max();
+      for (const auto cell : tria.active_cell_iterators())
+        for (unsigned int n = 0; n < GeometryInfo<dim>::lines_per_cell; ++n)
+          length = std::min(length, cell->line(n)->diameter());
+      return length;
+    };
+
+    double grid_vertex_tolerance = 0.0;
+    for (unsigned int shell_n = 0; shell_n < radii.size() - 1; ++shell_n)
+      {
+        Triangulation<dim> current_shell;
+        GridGenerator::hyper_shell(current_shell,
+                                   center,
+                                   radii[shell_n],
+                                   radii[shell_n + 1],
+                                   n_cells == 0 ? (dim == 2 ? 8 : 12) :
+                                                  n_cells);
+
+        // The innermost shell has the smallest cells: use that to set the
+        // vertex merging tolerance
+        if (grid_vertex_tolerance == 0.0)
+          grid_vertex_tolerance = 0.5 * min_line_length(current_shell);
+
+        Triangulation<dim> temp(std::move(triangulation));
+        triangulation.clear();
+        GridGenerator::merge_triangulations(current_shell,
+                                            temp,
+                                            triangulation,
+                                            grid_vertex_tolerance);
+      }
+
+    const types::manifold_id manifold_id = 0;
+    triangulation.set_all_manifold_ids(manifold_id);
+    if (dim == 2)
+      triangulation.set_manifold(manifold_id, PolarManifold<dim>(center));
+    else if (dim == 3)
+      triangulation.set_manifold(manifold_id, SphericalManifold<dim>(center));
+
+    // We use boundary vertex positions to see if things are on the inner or
+    // outer boundary.
+    constexpr double radial_vertex_tolerance =
+      100.0 * std::numeric_limits<double>::epsilon();
+    auto assert_vertex_distance_within_tolerance =
+      [center, radial_vertex_tolerance](
+        const TriaIterator<TriaAccessor<dim - 1, dim, dim>> face,
+        const double                                        radius) {
+        (void)face;
+        (void)radius;
+        for (unsigned int vertex_n = 0;
+             vertex_n < GeometryInfo<dim>::vertices_per_face;
+             ++vertex_n)
+          {
+            Assert(std::abs((face->vertex(vertex_n) - center).norm() - radius) <
+                     (center.norm() + radius) * radial_vertex_tolerance,
+                   ExcInternalError());
+          }
+      };
+    if (colorize)
+      for (const auto &cell : triangulation.active_cell_iterators())
+        for (unsigned int face_n = 0;
+             face_n < GeometryInfo<dim>::faces_per_cell;
+             ++face_n)
+          {
+            auto face = cell->face(face_n);
+            if (face->at_boundary())
+              {
+                if (((face->vertex(0) - center).norm() - inner_radius) <
+                    (center.norm() + inner_radius) * radial_vertex_tolerance)
+                  {
+                    // we must be at an inner face, but check
+                    assert_vertex_distance_within_tolerance(face, inner_radius);
+                    face->set_all_boundary_ids(0);
+                  }
+                else
+                  {
+                    // we must be at an outer face, but check
+                    assert_vertex_distance_within_tolerance(face, outer_radius);
+                    face->set_all_boundary_ids(1);
+                  }
+              }
+          }
+  }
+
+
+
   template <>
   void hyper_cube_with_cylindrical_hole(Triangulation<3> & triangulation,
                                         const double       inner_radius,
index b64c8f60a4a8d21f6b045b2fd96db50489da2ebe..6ac4262276c12971676437da5e4dc17b97e63f6f 100644 (file)
@@ -183,6 +183,15 @@ for (deal_II_dimension : DIMENSIONS)
         const bool);
 #endif
 
+      template void
+      concentric_hyper_shells(Triangulation<deal_II_dimension> &,
+                              const Point<deal_II_dimension> &,
+                              const double,
+                              const double,
+                              const unsigned int,
+                              const double,
+                              const unsigned int,
+                              const bool);
 
     \}
   }
diff --git a/tests/grid/concentric_hyper_shell_01.cc b/tests/grid/concentric_hyper_shell_01.cc
new file mode 100644 (file)
index 0000000..916298b
--- /dev/null
@@ -0,0 +1,90 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/tria.h>
+
+#include "../tests.h"
+
+// Test GridGenerator::concentric_hyper_shell with skewness = 2.0
+
+int
+main()
+{
+  initlog();
+
+  // 2D test
+  {
+    Triangulation<2> triangulation;
+    const Point<2>   center(0.0, 1.0);
+    GridGenerator::concentric_hyper_shells(
+      triangulation, center, 1.0, 4.0, 3u, 2.0, 4, true);
+
+    for (const auto &cell : triangulation.active_cell_iterators())
+      {
+        deallog << "vertices: " << cell->vertex(0) << ", " << cell->vertex(1)
+                << ", " << cell->vertex(2) << ", " << cell->vertex(3)
+                << std::endl;
+
+        bool manifold_ids_are_zero = cell->manifold_id() == 0;
+        for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell;
+             ++face_n)
+          manifold_ids_are_zero &= cell->face(face_n)->manifold_id() == 0;
+        AssertThrow(manifold_ids_are_zero, ExcInternalError());
+
+        for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell;
+             ++face_n)
+          if (cell->face(face_n)->at_boundary())
+            deallog << "boundary face center distance to origin: "
+                    << (cell->face(face_n)->center(/*respect_manifold*/ true) -
+                        center)
+                         .norm()
+                    << " boundary id: " << cell->face(face_n)->boundary_id()
+                    << std::endl;
+      }
+  }
+
+  // 3D test
+  {
+    Triangulation<3> triangulation;
+    const Point<3>   center(0.0, 1.0, 2.0);
+    GridGenerator::concentric_hyper_shells(
+      triangulation, center, 1.0, 5.0, 2u, 2.0, 0, true);
+
+    for (const auto &cell : triangulation.active_cell_iterators())
+      {
+        deallog << "vertices: " << cell->vertex(0) << ", " << cell->vertex(1)
+                << ", " << cell->vertex(2) << ", " << cell->vertex(3) << ", "
+                << cell->vertex(4) << ", " << cell->vertex(5) << ", "
+                << cell->vertex(6) << ", " << cell->vertex(7) << std::endl;
+
+        bool manifold_ids_are_zero = cell->manifold_id() == 0;
+        for (unsigned int face_n = 0; face_n < GeometryInfo<3>::faces_per_cell;
+             ++face_n)
+          manifold_ids_are_zero &= cell->face(face_n)->manifold_id() == 0;
+        AssertThrow(manifold_ids_are_zero, ExcInternalError());
+
+        for (unsigned int face_n = 0; face_n < GeometryInfo<3>::faces_per_cell;
+             ++face_n)
+          if (cell->face(face_n)->at_boundary())
+            deallog << "boundary face center distance to origin: "
+                    << (cell->face(face_n)->center(/*respect_manifold*/ true) -
+                        center)
+                         .norm()
+                    << " boundary id: " << cell->face(face_n)->boundary_id()
+                    << std::endl;
+      }
+  }
+}
diff --git a/tests/grid/concentric_hyper_shell_01.output b/tests/grid/concentric_hyper_shell_01.output
new file mode 100644 (file)
index 0000000..adc606b
--- /dev/null
@@ -0,0 +1,69 @@
+
+DEAL::vertices: 4.00000 1.00000, 2.44929e-16 5.00000, 2.18641 1.00000, 1.33879e-16 3.18641
+DEAL::boundary face center distance to origin: 4.00000 boundary id: 1
+DEAL::vertices: 2.44929e-16 5.00000, -4.00000 1.00000, 1.33879e-16 3.18641, -2.18641 1.00000
+DEAL::boundary face center distance to origin: 4.00000 boundary id: 1
+DEAL::vertices: -4.00000 1.00000, -7.34788e-16 -3.00000, -2.18641 1.00000, -4.01637e-16 -1.18641
+DEAL::boundary face center distance to origin: 4.00000 boundary id: 1
+DEAL::vertices: -7.34788e-16 -3.00000, 4.00000 1.00000, -4.01637e-16 -1.18641, 2.18641 1.00000
+DEAL::boundary face center distance to origin: 4.00000 boundary id: 1
+DEAL::vertices: 2.18641 1.00000, 1.33879e-16 3.18641, 1.29242 1.00000, 7.91377e-17 2.29242
+DEAL::vertices: 1.33879e-16 3.18641, -2.18641 1.00000, 7.91377e-17 2.29242, -1.29242 1.00000
+DEAL::vertices: -2.18641 1.00000, -4.01637e-16 -1.18641, -1.29242 1.00000, -2.37413e-16 -0.292417
+DEAL::vertices: -4.01637e-16 -1.18641, 2.18641 1.00000, -2.37413e-16 -0.292417, 1.29242 1.00000
+DEAL::vertices: 1.29242 1.00000, 7.91377e-17 2.29242, 1.00000 1.00000, 6.12323e-17 2.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 7.91377e-17 2.29242, -1.29242 1.00000, 6.12323e-17 2.00000, -1.00000 1.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: -1.29242 1.00000, -2.37413e-16 -0.292417, -1.00000 1.00000, -1.83697e-16 0.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: -2.37413e-16 -0.292417, 1.29242 1.00000, -1.83697e-16 0.00000, 1.00000 1.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.00000 -0.839949 2.00000, -1.06229 -0.0622949 3.06229, -1.06229 -0.0622949 0.937705, -1.83995 1.00000 2.00000, 0.00000 -4.00000 2.00000, -2.88675 -1.88675 4.88675, -2.88675 -1.88675 -0.886751, -5.00000 1.00000 2.00000
+DEAL::boundary face center distance to origin: 5.00000 boundary id: 1
+DEAL::vertices: -1.06229 -0.0622949 3.06229, 0.00000 1.00000 3.83995, -1.83995 1.00000 2.00000, -1.06229 2.06229 3.06229, -2.88675 -1.88675 4.88675, 0.00000 1.00000 7.00000, -5.00000 1.00000 2.00000, -2.88675 3.88675 4.88675
+DEAL::boundary face center distance to origin: 5.00000 boundary id: 1
+DEAL::vertices: 0.00000 -0.839949 2.00000, 1.06229 -0.0622949 3.06229, -1.06229 -0.0622949 3.06229, 0.00000 1.00000 3.83995, 0.00000 -4.00000 2.00000, 2.88675 -1.88675 4.88675, -2.88675 -1.88675 4.88675, 0.00000 1.00000 7.00000
+DEAL::boundary face center distance to origin: 5.00000 boundary id: 1
+DEAL::vertices: 1.06229 -0.0622949 0.937705, 1.83995 1.00000 2.00000, 0.00000 -0.839949 2.00000, 1.06229 -0.0622949 3.06229, 2.88675 -1.88675 -0.886751, 5.00000 1.00000 2.00000, 0.00000 -4.00000 2.00000, 2.88675 -1.88675 4.88675
+DEAL::boundary face center distance to origin: 5.00000 boundary id: 1
+DEAL::vertices: 1.83995 1.00000 2.00000, 1.06229 2.06229 3.06229, 1.06229 -0.0622949 3.06229, 0.00000 1.00000 3.83995, 5.00000 1.00000 2.00000, 2.88675 3.88675 4.88675, 2.88675 -1.88675 4.88675, 0.00000 1.00000 7.00000
+DEAL::boundary face center distance to origin: 5.00000 boundary id: 1
+DEAL::vertices: 1.06229 2.06229 3.06229, 0.00000 2.83995 2.00000, 0.00000 1.00000 3.83995, -1.06229 2.06229 3.06229, 2.88675 3.88675 4.88675, 0.00000 6.00000 2.00000, 0.00000 1.00000 7.00000, -2.88675 3.88675 4.88675
+DEAL::boundary face center distance to origin: 5.00000 boundary id: 1
+DEAL::vertices: 1.83995 1.00000 2.00000, 1.06229 2.06229 0.937705, 1.06229 2.06229 3.06229, 0.00000 2.83995 2.00000, 5.00000 1.00000 2.00000, 2.88675 3.88675 -0.886751, 2.88675 3.88675 4.88675, 0.00000 6.00000 2.00000
+DEAL::boundary face center distance to origin: 5.00000 boundary id: 1
+DEAL::vertices: 1.06229 -0.0622949 0.937705, 0.00000 1.00000 0.160051, 1.83995 1.00000 2.00000, 1.06229 2.06229 0.937705, 2.88675 -1.88675 -0.886751, 0.00000 1.00000 -3.00000, 5.00000 1.00000 2.00000, 2.88675 3.88675 -0.886751
+DEAL::boundary face center distance to origin: 5.00000 boundary id: 1
+DEAL::vertices: 0.00000 1.00000 0.160051, -1.06229 2.06229 0.937705, 1.06229 2.06229 0.937705, 0.00000 2.83995 2.00000, 0.00000 1.00000 -3.00000, -2.88675 3.88675 -0.886751, 2.88675 3.88675 -0.886751, 0.00000 6.00000 2.00000
+DEAL::boundary face center distance to origin: 5.00000 boundary id: 1
+DEAL::vertices: -1.06229 2.06229 0.937705, -1.83995 1.00000 2.00000, 0.00000 2.83995 2.00000, -1.06229 2.06229 3.06229, -2.88675 3.88675 -0.886751, -5.00000 1.00000 2.00000, 0.00000 6.00000 2.00000, -2.88675 3.88675 4.88675
+DEAL::boundary face center distance to origin: 5.00000 boundary id: 1
+DEAL::vertices: 0.00000 1.00000 0.160051, -1.06229 -0.0622949 0.937705, -1.06229 2.06229 0.937705, -1.83995 1.00000 2.00000, 0.00000 1.00000 -3.00000, -2.88675 -1.88675 -0.886751, -2.88675 3.88675 -0.886751, -5.00000 1.00000 2.00000
+DEAL::boundary face center distance to origin: 5.00000 boundary id: 1
+DEAL::vertices: 1.06229 -0.0622949 0.937705, 0.00000 -0.839949 2.00000, 0.00000 1.00000 0.160051, -1.06229 -0.0622949 0.937705, 2.88675 -1.88675 -0.886751, 0.00000 -4.00000 2.00000, 0.00000 1.00000 -3.00000, -2.88675 -1.88675 -0.886751
+DEAL::boundary face center distance to origin: 5.00000 boundary id: 1
+DEAL::vertices: 0.00000 0.00000 2.00000, -0.577350 0.422650 2.57735, -0.577350 0.422650 1.42265, -1.00000 1.00000 2.00000, 0.00000 -0.839949 2.00000, -1.06229 -0.0622949 3.06229, -1.06229 -0.0622949 0.937705, -1.83995 1.00000 2.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: -0.577350 0.422650 2.57735, 0.00000 1.00000 3.00000, -1.00000 1.00000 2.00000, -0.577350 1.57735 2.57735, -1.06229 -0.0622949 3.06229, 0.00000 1.00000 3.83995, -1.83995 1.00000 2.00000, -1.06229 2.06229 3.06229
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.00000 0.00000 2.00000, 0.577350 0.422650 2.57735, -0.577350 0.422650 2.57735, 0.00000 1.00000 3.00000, 0.00000 -0.839949 2.00000, 1.06229 -0.0622949 3.06229, -1.06229 -0.0622949 3.06229, 0.00000 1.00000 3.83995
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.577350 0.422650 1.42265, 1.00000 1.00000 2.00000, 0.00000 0.00000 2.00000, 0.577350 0.422650 2.57735, 1.06229 -0.0622949 0.937705, 1.83995 1.00000 2.00000, 0.00000 -0.839949 2.00000, 1.06229 -0.0622949 3.06229
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 1.00000 1.00000 2.00000, 0.577350 1.57735 2.57735, 0.577350 0.422650 2.57735, 0.00000 1.00000 3.00000, 1.83995 1.00000 2.00000, 1.06229 2.06229 3.06229, 1.06229 -0.0622949 3.06229, 0.00000 1.00000 3.83995
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.577350 1.57735 2.57735, 0.00000 2.00000 2.00000, 0.00000 1.00000 3.00000, -0.577350 1.57735 2.57735, 1.06229 2.06229 3.06229, 0.00000 2.83995 2.00000, 0.00000 1.00000 3.83995, -1.06229 2.06229 3.06229
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 1.00000 1.00000 2.00000, 0.577350 1.57735 1.42265, 0.577350 1.57735 2.57735, 0.00000 2.00000 2.00000, 1.83995 1.00000 2.00000, 1.06229 2.06229 0.937705, 1.06229 2.06229 3.06229, 0.00000 2.83995 2.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.577350 0.422650 1.42265, 0.00000 1.00000 1.00000, 1.00000 1.00000 2.00000, 0.577350 1.57735 1.42265, 1.06229 -0.0622949 0.937705, 0.00000 1.00000 0.160051, 1.83995 1.00000 2.00000, 1.06229 2.06229 0.937705
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.00000 1.00000 1.00000, -0.577350 1.57735 1.42265, 0.577350 1.57735 1.42265, 0.00000 2.00000 2.00000, 0.00000 1.00000 0.160051, -1.06229 2.06229 0.937705, 1.06229 2.06229 0.937705, 0.00000 2.83995 2.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: -0.577350 1.57735 1.42265, -1.00000 1.00000 2.00000, 0.00000 2.00000 2.00000, -0.577350 1.57735 2.57735, -1.06229 2.06229 0.937705, -1.83995 1.00000 2.00000, 0.00000 2.83995 2.00000, -1.06229 2.06229 3.06229
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.00000 1.00000 1.00000, -0.577350 0.422650 1.42265, -0.577350 1.57735 1.42265, -1.00000 1.00000 2.00000, 0.00000 1.00000 0.160051, -1.06229 -0.0622949 0.937705, -1.06229 2.06229 0.937705, -1.83995 1.00000 2.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.577350 0.422650 1.42265, 0.00000 0.00000 2.00000, 0.00000 1.00000 1.00000, -0.577350 0.422650 1.42265, 1.06229 -0.0622949 0.937705, 0.00000 -0.839949 2.00000, 0.00000 1.00000 0.160051, -1.06229 -0.0622949 0.937705
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
diff --git a/tests/grid/concentric_hyper_shell_02.cc b/tests/grid/concentric_hyper_shell_02.cc
new file mode 100644 (file)
index 0000000..e8d4a70
--- /dev/null
@@ -0,0 +1,88 @@
+// ---------------------------------------------------------------------
+//
+// Copyright (C) 2018 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/tria.h>
+
+#include "../tests.h"
+
+// Test GridGenerator::concentric_hyper_shell with skewness = 0.0
+
+int
+main()
+{
+  initlog();
+
+  // 2D test
+  {
+    Triangulation<2> triangulation;
+    const Point<2>   center(0.0, 1.0);
+    GridGenerator::concentric_hyper_shells(
+      triangulation, center, 1.0, 4.0, 3u, 0.0, 4, true);
+
+    for (const auto &cell : triangulation.active_cell_iterators())
+      {
+        deallog << "vertices: " << cell->vertex(0) << ", " << cell->vertex(1)
+                << ", " << cell->vertex(2) << ", " << cell->vertex(3)
+                << std::endl;
+
+        bool manifold_ids_are_zero = cell->manifold_id() == 0;
+        for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell;
+             ++face_n)
+          manifold_ids_are_zero &= cell->face(face_n)->manifold_id() == 0;
+        AssertThrow(manifold_ids_are_zero, ExcInternalError());
+
+        for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell;
+             ++face_n)
+          if (cell->face(face_n)->at_boundary())
+            deallog << "boundary face center distance to origin: "
+                    << (cell->face(face_n)->center(true) - center).norm()
+                    << " boundary id: " << cell->face(face_n)->boundary_id()
+                    << std::endl;
+      }
+  }
+
+  // 3D test
+  {
+    Triangulation<3> triangulation;
+    const Point<3>   center(0.0, 1.0, 2.0);
+    GridGenerator::concentric_hyper_shells(
+      triangulation, center, 1.0, 20.0, 2u, 0.0, 0, true);
+
+    for (const auto &cell : triangulation.active_cell_iterators())
+      {
+        deallog << "vertices: " << cell->vertex(0) << ", " << cell->vertex(1)
+                << ", " << cell->vertex(2) << ", " << cell->vertex(3) << ", "
+                << cell->vertex(4) << ", " << cell->vertex(5) << ", "
+                << cell->vertex(6) << ", " << cell->vertex(7) << std::endl;
+
+        bool manifold_ids_are_zero = cell->manifold_id() == 0;
+        for (unsigned int face_n = 0; face_n < GeometryInfo<3>::faces_per_cell;
+             ++face_n)
+          manifold_ids_are_zero &= cell->face(face_n)->manifold_id() == 0;
+        AssertThrow(manifold_ids_are_zero, ExcInternalError());
+
+        for (unsigned int face_n = 0; face_n < GeometryInfo<3>::faces_per_cell;
+             ++face_n)
+          if (cell->face(face_n)->at_boundary())
+            {
+              deallog << "boundary face center distance to origin: "
+                      << (cell->face(face_n)->center(true) - center).norm()
+                      << " boundary id: " << cell->face(face_n)->boundary_id()
+                      << std::endl;
+            }
+      }
+  }
+}
diff --git a/tests/grid/concentric_hyper_shell_02.output b/tests/grid/concentric_hyper_shell_02.output
new file mode 100644 (file)
index 0000000..ac78edd
--- /dev/null
@@ -0,0 +1,69 @@
+
+DEAL::vertices: 4.00000 1.00000, 2.44929e-16 5.00000, 3.00000 1.00000, 1.83697e-16 4.00000
+DEAL::boundary face center distance to origin: 4.00000 boundary id: 1
+DEAL::vertices: 2.44929e-16 5.00000, -4.00000 1.00000, 1.83697e-16 4.00000, -3.00000 1.00000
+DEAL::boundary face center distance to origin: 4.00000 boundary id: 1
+DEAL::vertices: -4.00000 1.00000, -7.34788e-16 -3.00000, -3.00000 1.00000, -5.51091e-16 -2.00000
+DEAL::boundary face center distance to origin: 4.00000 boundary id: 1
+DEAL::vertices: -7.34788e-16 -3.00000, 4.00000 1.00000, -5.51091e-16 -2.00000, 3.00000 1.00000
+DEAL::boundary face center distance to origin: 4.00000 boundary id: 1
+DEAL::vertices: 3.00000 1.00000, 1.83697e-16 4.00000, 2.00000 1.00000, 1.22465e-16 3.00000
+DEAL::vertices: 1.83697e-16 4.00000, -3.00000 1.00000, 1.22465e-16 3.00000, -2.00000 1.00000
+DEAL::vertices: -3.00000 1.00000, -5.51091e-16 -2.00000, -2.00000 1.00000, -3.67394e-16 -1.00000
+DEAL::vertices: -5.51091e-16 -2.00000, 3.00000 1.00000, -3.67394e-16 -1.00000, 2.00000 1.00000
+DEAL::vertices: 2.00000 1.00000, 1.22465e-16 3.00000, 1.00000 1.00000, 6.12323e-17 2.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 1.22465e-16 3.00000, -2.00000 1.00000, 6.12323e-17 2.00000, -1.00000 1.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: -2.00000 1.00000, -3.67394e-16 -1.00000, -1.00000 1.00000, -1.83697e-16 0.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: -3.67394e-16 -1.00000, 2.00000 1.00000, -1.83697e-16 0.00000, 1.00000 1.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.00000 -9.50000 2.00000, -6.06218 -5.06218 8.06218, -6.06218 -5.06218 -4.06218, -10.5000 1.00000 2.00000, 0.00000 -19.0000 2.00000, -11.5470 -10.5470 13.5470, -11.5470 -10.5470 -9.54701, -20.0000 1.00000 2.00000
+DEAL::boundary face center distance to origin: 20.0000 boundary id: 1
+DEAL::vertices: -6.06218 -5.06218 8.06218, 0.00000 1.00000 12.5000, -10.5000 1.00000 2.00000, -6.06218 7.06218 8.06218, -11.5470 -10.5470 13.5470, 0.00000 1.00000 22.0000, -20.0000 1.00000 2.00000, -11.5470 12.5470 13.5470
+DEAL::boundary face center distance to origin: 20.0000 boundary id: 1
+DEAL::vertices: 0.00000 -9.50000 2.00000, 6.06218 -5.06218 8.06218, -6.06218 -5.06218 8.06218, 0.00000 1.00000 12.5000, 0.00000 -19.0000 2.00000, 11.5470 -10.5470 13.5470, -11.5470 -10.5470 13.5470, 0.00000 1.00000 22.0000
+DEAL::boundary face center distance to origin: 20.0000 boundary id: 1
+DEAL::vertices: 6.06218 -5.06218 -4.06218, 10.5000 1.00000 2.00000, 0.00000 -9.50000 2.00000, 6.06218 -5.06218 8.06218, 11.5470 -10.5470 -9.54701, 20.0000 1.00000 2.00000, 0.00000 -19.0000 2.00000, 11.5470 -10.5470 13.5470
+DEAL::boundary face center distance to origin: 20.0000 boundary id: 1
+DEAL::vertices: 10.5000 1.00000 2.00000, 6.06218 7.06218 8.06218, 6.06218 -5.06218 8.06218, 0.00000 1.00000 12.5000, 20.0000 1.00000 2.00000, 11.5470 12.5470 13.5470, 11.5470 -10.5470 13.5470, 0.00000 1.00000 22.0000
+DEAL::boundary face center distance to origin: 20.0000 boundary id: 1
+DEAL::vertices: 6.06218 7.06218 8.06218, 0.00000 11.5000 2.00000, 0.00000 1.00000 12.5000, -6.06218 7.06218 8.06218, 11.5470 12.5470 13.5470, 0.00000 21.0000 2.00000, 0.00000 1.00000 22.0000, -11.5470 12.5470 13.5470
+DEAL::boundary face center distance to origin: 20.0000 boundary id: 1
+DEAL::vertices: 10.5000 1.00000 2.00000, 6.06218 7.06218 -4.06218, 6.06218 7.06218 8.06218, 0.00000 11.5000 2.00000, 20.0000 1.00000 2.00000, 11.5470 12.5470 -9.54701, 11.5470 12.5470 13.5470, 0.00000 21.0000 2.00000
+DEAL::boundary face center distance to origin: 20.0000 boundary id: 1
+DEAL::vertices: 6.06218 -5.06218 -4.06218, 0.00000 1.00000 -8.50000, 10.5000 1.00000 2.00000, 6.06218 7.06218 -4.06218, 11.5470 -10.5470 -9.54701, 0.00000 1.00000 -18.0000, 20.0000 1.00000 2.00000, 11.5470 12.5470 -9.54701
+DEAL::boundary face center distance to origin: 20.0000 boundary id: 1
+DEAL::vertices: 0.00000 1.00000 -8.50000, -6.06218 7.06218 -4.06218, 6.06218 7.06218 -4.06218, 0.00000 11.5000 2.00000, 0.00000 1.00000 -18.0000, -11.5470 12.5470 -9.54701, 11.5470 12.5470 -9.54701, 0.00000 21.0000 2.00000
+DEAL::boundary face center distance to origin: 20.0000 boundary id: 1
+DEAL::vertices: -6.06218 7.06218 -4.06218, -10.5000 1.00000 2.00000, 0.00000 11.5000 2.00000, -6.06218 7.06218 8.06218, -11.5470 12.5470 -9.54701, -20.0000 1.00000 2.00000, 0.00000 21.0000 2.00000, -11.5470 12.5470 13.5470
+DEAL::boundary face center distance to origin: 20.0000 boundary id: 1
+DEAL::vertices: 0.00000 1.00000 -8.50000, -6.06218 -5.06218 -4.06218, -6.06218 7.06218 -4.06218, -10.5000 1.00000 2.00000, 0.00000 1.00000 -18.0000, -11.5470 -10.5470 -9.54701, -11.5470 12.5470 -9.54701, -20.0000 1.00000 2.00000
+DEAL::boundary face center distance to origin: 20.0000 boundary id: 1
+DEAL::vertices: 6.06218 -5.06218 -4.06218, 0.00000 -9.50000 2.00000, 0.00000 1.00000 -8.50000, -6.06218 -5.06218 -4.06218, 11.5470 -10.5470 -9.54701, 0.00000 -19.0000 2.00000, 0.00000 1.00000 -18.0000, -11.5470 -10.5470 -9.54701
+DEAL::boundary face center distance to origin: 20.0000 boundary id: 1
+DEAL::vertices: 0.00000 0.00000 2.00000, -0.577350 0.422650 2.57735, -0.577350 0.422650 1.42265, -1.00000 1.00000 2.00000, 0.00000 -9.50000 2.00000, -6.06218 -5.06218 8.06218, -6.06218 -5.06218 -4.06218, -10.5000 1.00000 2.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: -0.577350 0.422650 2.57735, 0.00000 1.00000 3.00000, -1.00000 1.00000 2.00000, -0.577350 1.57735 2.57735, -6.06218 -5.06218 8.06218, 0.00000 1.00000 12.5000, -10.5000 1.00000 2.00000, -6.06218 7.06218 8.06218
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.00000 0.00000 2.00000, 0.577350 0.422650 2.57735, -0.577350 0.422650 2.57735, 0.00000 1.00000 3.00000, 0.00000 -9.50000 2.00000, 6.06218 -5.06218 8.06218, -6.06218 -5.06218 8.06218, 0.00000 1.00000 12.5000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.577350 0.422650 1.42265, 1.00000 1.00000 2.00000, 0.00000 0.00000 2.00000, 0.577350 0.422650 2.57735, 6.06218 -5.06218 -4.06218, 10.5000 1.00000 2.00000, 0.00000 -9.50000 2.00000, 6.06218 -5.06218 8.06218
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 1.00000 1.00000 2.00000, 0.577350 1.57735 2.57735, 0.577350 0.422650 2.57735, 0.00000 1.00000 3.00000, 10.5000 1.00000 2.00000, 6.06218 7.06218 8.06218, 6.06218 -5.06218 8.06218, 0.00000 1.00000 12.5000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.577350 1.57735 2.57735, 0.00000 2.00000 2.00000, 0.00000 1.00000 3.00000, -0.577350 1.57735 2.57735, 6.06218 7.06218 8.06218, 0.00000 11.5000 2.00000, 0.00000 1.00000 12.5000, -6.06218 7.06218 8.06218
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 1.00000 1.00000 2.00000, 0.577350 1.57735 1.42265, 0.577350 1.57735 2.57735, 0.00000 2.00000 2.00000, 10.5000 1.00000 2.00000, 6.06218 7.06218 -4.06218, 6.06218 7.06218 8.06218, 0.00000 11.5000 2.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.577350 0.422650 1.42265, 0.00000 1.00000 1.00000, 1.00000 1.00000 2.00000, 0.577350 1.57735 1.42265, 6.06218 -5.06218 -4.06218, 0.00000 1.00000 -8.50000, 10.5000 1.00000 2.00000, 6.06218 7.06218 -4.06218
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.00000 1.00000 1.00000, -0.577350 1.57735 1.42265, 0.577350 1.57735 1.42265, 0.00000 2.00000 2.00000, 0.00000 1.00000 -8.50000, -6.06218 7.06218 -4.06218, 6.06218 7.06218 -4.06218, 0.00000 11.5000 2.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: -0.577350 1.57735 1.42265, -1.00000 1.00000 2.00000, 0.00000 2.00000 2.00000, -0.577350 1.57735 2.57735, -6.06218 7.06218 -4.06218, -10.5000 1.00000 2.00000, 0.00000 11.5000 2.00000, -6.06218 7.06218 8.06218
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.00000 1.00000 1.00000, -0.577350 0.422650 1.42265, -0.577350 1.57735 1.42265, -1.00000 1.00000 2.00000, 0.00000 1.00000 -8.50000, -6.06218 -5.06218 -4.06218, -6.06218 7.06218 -4.06218, -10.5000 1.00000 2.00000
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0
+DEAL::vertices: 0.577350 0.422650 1.42265, 0.00000 0.00000 2.00000, 0.00000 1.00000 1.00000, -0.577350 0.422650 1.42265, 6.06218 -5.06218 -4.06218, 0.00000 -9.50000 2.00000, 0.00000 1.00000 -8.50000, -6.06218 -5.06218 -4.06218
+DEAL::boundary face center distance to origin: 1.00000 boundary id: 0

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.