diff --git a/dumux/multidomain/facet/enrichmenthelper.hh b/dumux/multidomain/facet/enrichmenthelper.hh index fba9bf8d28cc07c1a4dabd2d7a913cb5a5dc4a75..adeb2ba5986d2edf9eed83841d39e9c7381d188d 100644 --- a/dumux/multidomain/facet/enrichmenthelper.hh +++ b/dumux/multidomain/facet/enrichmenthelper.hh @@ -304,7 +304,7 @@ private: } } - if (foundCounter != 2) + if (foundCounter != numIsToFind) DUNE_THROW(Dune::InvalidStateException, "Could not find all intersections at the vertex"); } }; diff --git a/test/multidomain/facet/2d_grid.msh b/test/multidomain/facet/2d_grid.msh new file mode 100644 index 0000000000000000000000000000000000000000..3001e3b042b19bb3c612541bd5d146b82f1b76fa --- /dev/null +++ b/test/multidomain/facet/2d_grid.msh @@ -0,0 +1,486 @@ +$MeshFormat +2.2 0 8 +$EndMeshFormat +$Nodes +169 +1 0 0 0 +2 1 0 0 +3 1 1 0 +4 0 1 0 +5 0.5 0.5 0 +6 0.5 0.25 0 +7 0.5 0.75 0 +8 0.25 0.5 0 +9 0.75 0.5 0 +10 0 0.8999999999995836 0 +11 0 0.7999999999999998 0 +12 0 0.7000000000006934 0 +13 0 0.6000000000013869 0 +14 0 0.5000000000020587 0 +15 0 0.4000000000016644 0 +16 0 0.3000000000012483 0 +17 0 0.2000000000008322 0 +18 0 0.100000000000416 0 +19 0.09999999999981467 0 0 +20 0.1999999999995579 0 0 +21 0.2999999999992664 0 0 +22 0.3999999999989749 0 0 +23 0.4999999999986943 0 0 +24 0.5999999999989468 0 0 +25 0.69999999999921 0 0 +26 0.7999999999994734 0 0 +27 0.8999999999997368 0 0 +28 1 0.09999999999981467 0 +29 1 0.1999999999995579 0 +30 1 0.2999999999992664 0 +31 1 0.3999999999989749 0 +32 1 0.4999999999986943 0 +33 1 0.5999999999989468 0 +34 1 0.69999999999921 0 +35 1 0.7999999999994734 0 +36 1 0.8999999999997368 0 +37 0.8999999999995836 1 0 +38 0.7999999999999998 1 0 +39 0.7000000000006934 1 0 +40 0.6000000000013869 1 0 +41 0.5000000000020587 1 0 +42 0.4000000000016644 1 0 +43 0.3000000000012483 1 0 +44 0.2000000000008322 1 0 +45 0.100000000000416 1 0 +46 0.3333333333333333 0.5 0 +47 0.4166666666666666 0.5 0 +48 0.5833333333333333 0.5 0 +49 0.6666666666666666 0.5 0 +50 0.5 0.6666666666666667 0 +51 0.5 0.5833333333333334 0 +52 0.5 0.4166666666666667 0 +53 0.5 0.3333333333333334 0 +54 0.7522727272726816 0.7522727272726816 0 +55 0.7522727272726816 0.2477272727273185 0 +56 0.2477272727273449 0.752272727272655 0 +57 0.2477272727273449 0.2477272727273449 0 +58 0.6472499660279647 0.6472499660279647 0 +59 0.6472499660279645 0.3527500339720354 0 +60 0.352750033972052 0.647249966027948 0 +61 0.352750033972052 0.352750033972052 0 +62 0.6252917968107794 0.8448832812755481 0 +63 0.1551167187244505 0.6252917968107756 0 +64 0.8448832812755847 0.374708203189221 0 +65 0.3747082031892247 0.1551167187244138 0 +66 0.8448832812757958 0.6252917968107772 0 +67 0.6252917968107771 0.1551167187242043 0 +68 0.3747082031892273 0.8448832812758594 0 +69 0.1551167187241407 0.3747082031892273 0 +70 0.8591847360702282 0.848228088511517 0 +71 0.8482280885116198 0.1408152639298217 0 +72 0.1517719114884802 0.8591847360701907 0 +73 0.1408152639298593 0.1517719114883773 0 +74 0.502267851834123 0.8905678989741184 0 +75 0.1094321010258831 0.5022678518341219 0 +76 0.890567898974131 0.4977321481660483 0 +77 0.4977321481660494 0.1094321010258704 0 +78 0.727770705740711 0.8577507313438621 0 +79 0.142249268656177 0.7277707057406892 0 +80 0.8577507313438237 0.2722292942593246 0 +81 0.7411075653180574 0.1488230273129464 0 +82 0.8511769726870219 0.7411075653180057 0 +83 0.1488230273129572 0.2588924346819313 0 +84 0.2722292942593467 0.1422492686562155 0 +85 0.2588924346819833 0.8511769726870112 0 +86 0.61035099694684 0.7441244661265612 0 +87 0.2558755338734404 0.6103509969468294 0 +88 0.7418616701645074 0.387386207091089 0 +89 0.387386207091087 0.2581383298355062 0 +90 0.6094389874496877 0.2546712404817987 0 +91 0.7430659635561316 0.6117017834117576 0 +92 0.3882982165882425 0.7430659635561481 0 +93 0.2546712404817695 0.3905610125503248 0 +94 0.5858523700849627 0.5858523700849476 0 +95 0.5858523700849498 0.414147629915037 0 +96 0.414147629915054 0.5858523700849649 0 +97 0.4141476299150346 0.4141476299150514 0 +98 0.9161048453701052 0.5737817996427168 0 +99 0.5737817996427195 0.08389515462989455 0 +100 0.4262182003573541 0.9161048453700208 0 +101 0.08389515462997874 0.4262182003573517 0 +102 0.457981238422835 0.8250529820057102 0 +103 0.1777996447817385 0.4559671530342442 0 +104 0.8250529820057164 0.5420187615772067 0 +105 0.544032846965784 0.1777996447817363 0 +106 0.5787369923312382 0.916912790043679 0 +107 0.08308720995632 0.578736992331233 0 +108 0.9169127900436402 0.4212630076688013 0 +109 0.4212630076688056 0.08308720995635878 0 +110 0.6614887710578801 0.9265664515543017 0 +111 0.07343354844572783 0.66148877105787 0 +112 0.926566451554252 0.3385112289421995 0 +113 0.3385112289422095 0.07343354844577769 0 +114 0.9253361676658939 0.6628857155386925 0 +115 0.6628857155387198 0.07466383233405006 0 +116 0.3371142844614897 0.925336167665882 0 +117 0.07466383233406203 0.3371142844614624 0 +118 0.5509748161307705 0.8173766852796224 0 +119 0.1828658850254363 0.5508035503664344 0 +120 0.8171842706570098 0.448832769246628 0 +121 0.4490040350109619 0.1830582996480497 0 +122 0.6760360430590967 0.7811013056007011 0 +123 0.2188986943992938 0.6760360430590879 0 +124 0.7798697781106436 0.3206512791015957 0 +125 0.3206512791016015 0.2201302218893646 0 +126 0.7788292624958589 0.6819416338790494 0 +127 0.6817178176789315 0.2194935022180984 0 +128 0.2194935022180637 0.3182821823210832 0 +129 0.3180583661209487 0.7788292624958939 0 +130 0.5756426533788115 0.6722596746061192 0 +131 0.6722596746061392 0.4243573466211859 0 +132 0.6722596746062587 0.5756426533788299 0 +133 0.5756426533788298 0.3277403253937411 0 +134 0.3277403253938765 0.5756426533788068 0 +135 0.4243573466211906 0.3277403253938558 0 +136 0.42435734662117 0.6722596746062981 0 +137 0.3277403253937017 0.4243573466211702 0 +138 0.9137901270184938 0.9119640190920465 0 +139 0.08803598090797393 0.9137901270184751 0 +140 0.9119640190921016 0.08620987298144747 0 +141 0.0862098729814664 0.08803598090791882 0 +142 0.7013008265597622 0.7030653137197859 0 +143 0.6991465110218567 0.2957434306606624 0 +144 0.2969346862802204 0.7013008265597602 0 +145 0.2957434306606479 0.3008534889781791 0 +146 0.8147697923652724 0.9129201309823013 0 +147 0.08707986901772412 0.8147697923652399 0 +148 0.9129201309822909 0.185230207634683 0 +149 0.1852302076347158 0.08707986901773476 0 +150 0.8093838277008178 0.07883850941264532 0 +151 0.9211614905873514 0.8093838277006474 0 +152 0.0788385094126537 0.1906161722991777 0 +153 0.190616172299348 0.9211614905873429 0 +154 0.7940784618168996 0.8156524681725504 0 +155 0.8156524681725401 0.2059215381830834 0 +156 0.1843475318274906 0.794078461816886 0 +157 0.2059215381830971 0.1843475318275015 0 +158 0.7408058538329114 0.939447462776093 0 +159 0.0605525372239258 0.7408058538328984 0 +160 0.9394474627760734 0.2591941461670063 0 +161 0.7399608305690606 0.06030981806923131 0 +162 0.2591941461670192 0.06055253722394558 0 +163 0.06030981806925426 0.2600391694310146 0 +164 0.9396901819306107 0.7399608305689815 0 +165 0.2600391694310936 0.9396901819305881 0 +166 0.4577035741454301 0.5422964258545746 0 +167 0.5422964258545739 0.5422964258545703 0 +168 0.4577035741454253 0.4577035741454295 0 +169 0.5422964258545708 0.457703574145426 0 +$EndNodes +$Elements +308 +1 1 2 1 5 8 46 +2 1 2 1 5 46 47 +3 1 2 1 5 47 5 +4 1 2 1 6 5 48 +5 1 2 1 6 48 49 +6 1 2 1 6 49 9 +7 1 2 1 7 7 50 +8 1 2 1 7 50 51 +9 1 2 1 7 51 5 +10 1 2 1 8 5 52 +11 1 2 1 8 52 53 +12 1 2 1 8 53 6 +13 2 2 1 1 48 49 94 +14 2 2 1 1 48 95 49 +15 2 2 1 1 52 53 95 +16 2 2 1 1 94 50 51 +17 2 2 1 1 96 46 47 +18 2 2 1 1 52 97 53 +19 2 2 1 1 97 47 46 +20 2 2 1 1 96 51 50 +21 2 2 1 1 130 50 94 +22 2 2 1 1 95 131 49 +23 2 2 1 1 134 46 96 +24 2 2 1 1 97 135 53 +25 2 2 1 1 94 49 132 +26 2 2 1 1 95 53 133 +27 2 2 1 1 137 97 46 +28 2 2 1 1 136 96 50 +29 2 2 1 1 41 74 106 +30 2 2 1 1 14 75 107 +31 2 2 1 1 32 76 108 +32 2 2 1 1 23 77 109 +33 2 2 1 1 61 145 89 +34 2 2 1 1 59 143 88 +35 2 2 1 1 58 91 142 +36 2 2 1 1 60 92 144 +37 2 2 1 1 41 100 74 +38 2 2 1 1 14 101 75 +39 2 2 1 1 32 98 76 +40 2 2 1 1 23 99 77 +41 2 2 1 1 7 130 86 +42 2 2 1 1 8 134 87 +43 2 2 1 1 9 131 88 +44 2 2 1 1 6 135 89 +45 2 2 1 1 9 91 132 +46 2 2 1 1 6 90 133 +47 2 2 1 1 7 92 136 +48 2 2 1 1 8 93 137 +49 2 2 1 1 54 78 122 +50 2 2 1 1 56 79 123 +51 2 2 1 1 55 80 124 +52 2 2 1 1 55 127 81 +53 2 2 1 1 57 84 125 +54 2 2 1 1 54 126 82 +55 2 2 1 1 57 128 83 +56 2 2 1 1 56 129 85 +57 2 2 1 1 62 122 78 +58 2 2 1 1 63 123 79 +59 2 2 1 1 64 124 80 +60 2 2 1 1 65 125 84 +61 2 2 1 1 67 81 127 +62 2 2 1 1 66 82 126 +63 2 2 1 1 69 83 128 +64 2 2 1 1 68 85 129 +65 2 2 1 1 89 145 125 +66 2 2 1 1 88 143 124 +67 2 2 1 1 91 126 142 +68 2 2 1 1 92 129 144 +69 2 2 1 1 19 149 141 +70 2 2 1 1 28 148 140 +71 2 2 1 1 10 147 139 +72 2 2 1 1 37 146 138 +73 2 2 1 1 36 138 151 +74 2 2 1 1 27 140 150 +75 2 2 1 1 45 139 153 +76 2 2 1 1 18 141 152 +77 2 2 1 1 7 50 130 +78 2 2 1 1 8 46 134 +79 2 2 1 1 9 49 131 +80 2 2 1 1 6 53 135 +81 2 2 1 1 9 132 49 +82 2 2 1 1 6 133 53 +83 2 2 1 1 7 136 50 +84 2 2 1 1 8 137 46 +85 2 2 1 1 54 154 78 +86 2 2 1 1 56 156 79 +87 2 2 1 1 55 81 155 +88 2 2 1 1 55 155 80 +89 2 2 1 1 54 82 154 +90 2 2 1 1 57 83 157 +91 2 2 1 1 56 85 156 +92 2 2 1 1 57 157 84 +93 2 2 1 1 71 155 81 +94 2 2 1 1 70 154 82 +95 2 2 1 1 73 157 83 +96 2 2 1 1 72 156 85 +97 2 2 1 1 19 20 149 +98 2 2 1 1 28 29 148 +99 2 2 1 1 10 11 147 +100 2 2 1 1 37 38 146 +101 2 2 1 1 35 36 151 +102 2 2 1 1 26 27 150 +103 2 2 1 1 44 45 153 +104 2 2 1 1 17 18 152 +105 2 2 1 1 62 78 110 +106 2 2 1 1 63 79 111 +107 2 2 1 1 64 80 112 +108 2 2 1 1 65 84 113 +109 2 2 1 1 67 115 81 +110 2 2 1 1 66 114 82 +111 2 2 1 1 69 117 83 +112 2 2 1 1 68 116 85 +113 2 2 1 1 9 104 91 +114 2 2 1 1 6 105 90 +115 2 2 1 1 7 102 92 +116 2 2 1 1 8 103 93 +117 2 2 1 1 74 118 106 +118 2 2 1 1 75 119 107 +119 2 2 1 1 76 120 108 +120 2 2 1 1 77 121 109 +121 2 2 1 1 7 118 102 +122 2 2 1 1 8 119 103 +123 2 2 1 1 9 120 104 +124 2 2 1 1 6 121 105 +125 2 2 1 1 62 106 118 +126 2 2 1 1 63 107 119 +127 2 2 1 1 64 108 120 +128 2 2 1 1 65 109 121 +129 2 2 1 1 58 142 86 +130 2 2 1 1 60 144 87 +131 2 2 1 1 59 90 143 +132 2 2 1 1 61 93 145 +133 2 2 1 1 71 81 150 +134 2 2 1 1 70 82 151 +135 2 2 1 1 73 83 152 +136 2 2 1 1 72 85 153 +137 2 2 1 1 7 86 118 +138 2 2 1 1 8 87 119 +139 2 2 1 1 9 88 120 +140 2 2 1 1 6 89 121 +141 2 2 1 1 75 103 119 +142 2 2 1 1 74 102 118 +143 2 2 1 1 77 105 121 +144 2 2 1 1 76 104 120 +145 2 2 1 1 58 132 91 +146 2 2 1 1 59 133 90 +147 2 2 1 1 58 86 130 +148 2 2 1 1 60 136 92 +149 2 2 1 1 61 137 93 +150 2 2 1 1 59 88 131 +151 2 2 1 1 60 87 134 +152 2 2 1 1 61 89 135 +153 2 2 1 1 66 91 104 +154 2 2 1 1 67 90 105 +155 2 2 1 1 68 92 102 +156 2 2 1 1 69 93 103 +157 2 2 1 1 3 37 138 +158 2 2 1 1 2 28 140 +159 2 2 1 1 4 10 139 +160 2 2 1 1 1 19 141 +161 2 2 1 1 2 140 27 +162 2 2 1 1 1 141 18 +163 2 2 1 1 3 138 36 +164 2 2 1 1 4 139 45 +165 2 2 1 1 40 41 106 +166 2 2 1 1 31 32 108 +167 2 2 1 1 13 14 107 +168 2 2 1 1 22 23 109 +169 2 2 1 1 14 15 101 +170 2 2 1 1 41 42 100 +171 2 2 1 1 23 24 99 +172 2 2 1 1 32 33 98 +173 2 2 1 1 62 118 86 +174 2 2 1 1 63 119 87 +175 2 2 1 1 64 120 88 +176 2 2 1 1 65 121 89 +177 2 2 1 1 62 86 122 +178 2 2 1 1 63 87 123 +179 2 2 1 1 64 88 124 +180 2 2 1 1 65 89 125 +181 2 2 1 1 66 126 91 +182 2 2 1 1 67 127 90 +183 2 2 1 1 69 128 93 +184 2 2 1 1 68 129 92 +185 2 2 1 1 77 99 105 +186 2 2 1 1 76 98 104 +187 2 2 1 1 75 101 103 +188 2 2 1 1 74 100 102 +189 2 2 1 1 67 105 99 +190 2 2 1 1 66 104 98 +191 2 2 1 1 69 103 101 +192 2 2 1 1 68 102 100 +193 2 2 1 1 42 116 100 +194 2 2 1 1 15 117 101 +195 2 2 1 1 33 114 98 +196 2 2 1 1 24 115 99 +197 2 2 1 1 71 140 148 +198 2 2 1 1 73 141 149 +199 2 2 1 1 70 138 146 +200 2 2 1 1 72 139 147 +201 2 2 1 1 70 151 138 +202 2 2 1 1 72 153 139 +203 2 2 1 1 71 150 140 +204 2 2 1 1 73 152 141 +205 2 2 1 1 15 16 117 +206 2 2 1 1 42 43 116 +207 2 2 1 1 24 25 115 +208 2 2 1 1 33 34 114 +209 2 2 1 1 12 13 111 +210 2 2 1 1 39 40 110 +211 2 2 1 1 21 22 113 +212 2 2 1 1 30 31 112 +213 2 2 1 1 13 107 111 +214 2 2 1 1 40 106 110 +215 2 2 1 1 22 109 113 +216 2 2 1 1 31 108 112 +217 2 2 1 1 59 95 133 +218 2 2 1 1 58 94 132 +219 2 2 1 1 61 97 137 +220 2 2 1 1 60 96 136 +221 2 2 1 1 59 131 95 +222 2 2 1 1 58 130 94 +223 2 2 1 1 61 135 97 +224 2 2 1 1 60 134 96 +225 2 2 1 1 66 98 114 +226 2 2 1 1 67 99 115 +227 2 2 1 1 68 100 116 +228 2 2 1 1 69 101 117 +229 2 2 1 1 86 142 122 +230 2 2 1 1 87 144 123 +231 2 2 1 1 90 127 143 +232 2 2 1 1 93 128 145 +233 2 2 1 1 78 154 146 +234 2 2 1 1 79 156 147 +235 2 2 1 1 80 155 148 +236 2 2 1 1 84 157 149 +237 2 2 1 1 70 146 154 +238 2 2 1 1 72 147 156 +239 2 2 1 1 71 148 155 +240 2 2 1 1 73 149 157 +241 2 2 1 1 55 124 143 +242 2 2 1 1 57 125 145 +243 2 2 1 1 54 142 126 +244 2 2 1 1 56 144 129 +245 2 2 1 1 62 110 106 +246 2 2 1 1 63 111 107 +247 2 2 1 1 64 112 108 +248 2 2 1 1 65 113 109 +249 2 2 1 1 20 21 162 +250 2 2 1 1 29 30 160 +251 2 2 1 1 11 12 159 +252 2 2 1 1 38 39 158 +253 2 2 1 1 34 35 164 +254 2 2 1 1 43 44 165 +255 2 2 1 1 25 26 161 +256 2 2 1 1 16 17 163 +257 2 2 1 1 48 94 167 +258 2 2 1 1 48 169 95 +259 2 2 1 1 52 95 169 +260 2 2 1 1 51 167 94 +261 2 2 1 1 47 166 96 +262 2 2 1 1 52 168 97 +263 2 2 1 1 47 97 168 +264 2 2 1 1 51 96 166 +265 2 2 1 1 5 167 51 +266 2 2 1 1 5 51 166 +267 2 2 1 1 5 47 168 +268 2 2 1 1 5 166 47 +269 2 2 1 1 5 169 48 +270 2 2 1 1 5 52 169 +271 2 2 1 1 5 48 167 +272 2 2 1 1 5 168 52 +273 2 2 1 1 54 122 142 +274 2 2 1 1 55 143 127 +275 2 2 1 1 56 123 144 +276 2 2 1 1 57 145 128 +277 2 2 1 1 11 159 147 +278 2 2 1 1 38 158 146 +279 2 2 1 1 20 162 149 +280 2 2 1 1 29 160 148 +281 2 2 1 1 35 151 164 +282 2 2 1 1 26 150 161 +283 2 2 1 1 44 153 165 +284 2 2 1 1 17 152 163 +285 2 2 1 1 78 158 110 +286 2 2 1 1 79 159 111 +287 2 2 1 1 80 160 112 +288 2 2 1 1 84 162 113 +289 2 2 1 1 81 115 161 +290 2 2 1 1 82 114 164 +291 2 2 1 1 83 117 163 +292 2 2 1 1 85 116 165 +293 2 2 1 1 39 110 158 +294 2 2 1 1 12 111 159 +295 2 2 1 1 30 112 160 +296 2 2 1 1 21 113 162 +297 2 2 1 1 34 164 114 +298 2 2 1 1 25 161 115 +299 2 2 1 1 43 165 116 +300 2 2 1 1 16 163 117 +301 2 2 1 1 78 146 158 +302 2 2 1 1 79 147 159 +303 2 2 1 1 80 148 160 +304 2 2 1 1 84 149 162 +305 2 2 1 1 81 161 150 +306 2 2 1 1 83 163 152 +307 2 2 1 1 82 164 151 +308 2 2 1 1 85 165 153 +$EndElements diff --git a/test/multidomain/facet/3d_grid.msh b/test/multidomain/facet/3d_grid.msh new file mode 100644 index 0000000000000000000000000000000000000000..e1e8bb55d44f32404604c434bc0c5bb52eeee639 --- /dev/null +++ b/test/multidomain/facet/3d_grid.msh @@ -0,0 +1,687 @@ +$MeshFormat +2.2 0 8 +$EndMeshFormat +$Nodes +153 +1 0 0 0 +2 1 0 0 +3 1 1 0 +4 0 1 0 +5 0 0 1 +6 1 0 1 +7 1 1 1 +8 0 1 1 +9 0.5 0.25 0.25 +10 0.5 0.75 0.25 +11 0.5 0.25 0.5 +12 0.5 0.75 0.5 +13 0.5 0.25 0.75 +14 0.5 0.75 0.75 +15 0.25 0.25 0.5 +16 0.25 0.75 0.5 +17 0.75 0.25 0.5 +18 0.75 0.75 0.5 +19 0.75 0.5000000000003469 0.5 +20 0.25 0.5000000000013765 0.5 +21 0.5 0.5000000000003469 0.5 +22 0.5 0.5000000000013765 0.75 +23 0.5 0.5000000000003469 0.25 +24 0.2499999999994121 0 1 +25 0.499999999998694 0 1 +26 0.7499999999993416 0 1 +27 1 0.2499999999994121 1 +28 1 0.499999999998694 1 +29 1 0.7499999999993416 1 +30 0.7500000000003465 1 1 +31 0.5000000000020591 1 1 +32 0.2500000000010404 1 1 +33 0 0.7500000000003465 1 +34 0 0.5000000000020591 1 +35 0 0.2500000000010404 1 +36 0 0 0.7500000000003465 +37 0 0 0.5000000000020591 +38 0 0 0.2500000000010404 +39 0.2499999999994121 0 0 +40 0.499999999998694 0 0 +41 0.7499999999993416 0 0 +42 1 0 0.2499999999994121 +43 1 0 0.499999999998694 +44 1 0 0.7499999999993416 +45 1 0.2499999999994121 0 +46 1 0.499999999998694 0 +47 1 0.7499999999993416 0 +48 1 1 0.2499999999994121 +49 1 1 0.499999999998694 +50 1 1 0.7499999999993416 +51 0.7500000000003465 1 0 +52 0.5000000000020591 1 0 +53 0.2500000000010404 1 0 +54 0 1 0.2499999999994121 +55 0 1 0.499999999998694 +56 0 1 0.7499999999993416 +57 0 0.7500000000003465 0 +58 0 0.5000000000020591 0 +59 0 0.2500000000010404 0 +60 0.375 0.3750000000004309 0.5 +61 0.375 0.6250000000006882 0.5 +62 0.5 0.3750000000004308 0.6249999999999998 +63 0.5 0.6250000000006882 0.6249999999999999 +64 0.5 0.3750000000001735 0.375 +65 0.5 0.6250000000001734 0.3749999999999999 +66 0.625 0.3750000000001733 0.5 +67 0.625 0.6250000000001734 0.5 +68 0.5000000000000449 0 0.4999999999999981 +69 0.2916666666666607 0 0.7083333333333794 +70 0.7083333333334353 0 0.2916666666667725 +71 0.291666666666815 0 0.2916666666665436 +72 0.7083333333332968 0 0.7083333333332968 +73 0.2202380952381732 0 0.4999999999999352 +74 0.499999999999993 0 0.779761904761917 +75 0.5000000000001643 0 0.2202380952380766 +76 0.7797619047619635 0 0.5000000000000582 +77 0.1614583333333942 0 0.8385416666665201 +78 0.8385416666664537 0 0.1614583333331048 +79 0.1614583333329948 0 0.1614583333335715 +80 0.848032069970875 0 0.848032069970875 +81 1 0.5000000000000464 0.5000000000000464 +82 1 0.291666666666634 0.291666666666634 +83 1 0.7083333333334353 0.2916666666667725 +84 1 0.2916666666667725 0.7083333333334353 +85 1 0.7083333333332966 0.7083333333332966 +86 1 0.5000000000000585 0.2202380952381523 +87 1 0.2202380952381523 0.5000000000000584 +88 1 0.5000000000000583 0.7797619047619637 +89 1 0.7797619047619635 0.5000000000000582 +90 1 0.1546794738304047 0.1546794738304047 +91 1 0.8385416666664537 0.1614583333331048 +92 1 0.1614583333331049 0.8385416666664538 +93 1 0.848032069970875 0.848032069970875 +94 0.4999999999999483 1 0.5000000000000464 +95 0.7083333333333794 1 0.2916666666666607 +96 0.7083333333332408 1 0.7083333333334085 +97 0.2916666666665436 1 0.291666666666815 +98 0.2916666666666819 1 0.7083333333332543 +99 0.4999999999999351 1 0.2202380952381731 +100 0.7797619047618699 1 0.5000000000000585 +101 0.4999999999999351 1 0.779761904761943 +102 0.2202380952380008 1 0.5000000000000583 +103 0.8385416666665201 1 0.1614583333333942 +104 0.838541666666879 1 0.8385416666665233 +105 0.1614583333335715 1 0.1614583333329948 +106 0.161458333333212 1 0.8385416666669231 +107 0 0.4999999999999647 0.4999999999999974 +108 0 0.7083333333333794 0.2916666666666607 +109 0 0.7083333333332408 0.7083333333334085 +110 0 0.2916666666665703 0.7083333333331985 +111 0 0.2916666666667245 0.2916666666667245 +112 0 0.4999999999998695 0.7797619047618961 +113 0 0.5000000000000411 0.2202380952380974 +114 0 0.77976190476187 0.5000000000000585 +115 0 0.2202380952380217 0.499999999999935 +116 0 0.8385416666665201 0.1614583333333942 +117 0 0.838541666666879 0.8385416666665233 +118 0 0.1614583333335019 0.8385416666669893 +119 0 0.1546794738302489 0.1546794738302489 +120 0.5000000000000137 0.4999999999999811 0 +121 0.7083333333332408 0.7083333333334084 0 +122 0.2916666666665703 0.7083333333331985 0 +123 0.7083333333334353 0.2916666666667725 0 +124 0.291666666666815 0.2916666666665435 0 +125 0.4999999999998697 0.779761904761896 0 +126 0.2202380952380974 0.4999999999998291 0 +127 0.7797619047619169 0.5000000000001238 0 +128 0.5000000000001644 0.2202380952380766 0 +129 0.8385416666668789 0.8385416666665232 0 +130 0.1614583333335019 0.8385416666669893 0 +131 0.8385416666664537 0.1614583333331048 0 +132 0.1614583333329947 0.1614583333335714 0 +133 0.5000000000000137 0.4999999999999811 1 +134 0.7083333333332408 0.7083333333334084 1 +135 0.2916666666665703 0.7083333333331985 1 +136 0.7083333333334353 0.2916666666667725 1 +137 0.291666666666815 0.2916666666665435 1 +138 0.4999999999998697 0.779761904761896 1 +139 0.2202380952380974 0.4999999999998291 1 +140 0.7797619047619169 0.5000000000001238 1 +141 0.5000000000001644 0.2202380952380766 1 +142 0.8385416666668789 0.8385416666665232 1 +143 0.1614583333335019 0.8385416666669893 1 +144 0.8385416666664537 0.1614583333331048 1 +145 0.1614583333329947 0.1614583333335714 1 +146 0.2552083333331428 0.3802083333344794 0.7447916666668574 +147 0.2648904914534241 0.639890491453506 0.735109508546576 +148 0.2552083333332967 0.3802083333336253 0.255208333333286 +149 0.7447916666666987 0.380208333333641 0.7447916666666883 +150 0.2648904914530648 0.6398904914531468 0.2648904914530649 +151 0.735109508546928 0.6398904914531539 0.735109508546928 +152 0.7447916666666909 0.3802083333336488 0.2552083333333091 +153 0.7351095085468875 0.6398904914531333 0.2648904914531126 +$EndNodes +$Elements +525 +1 1 2 1 7 11 21 +2 1 2 1 7 21 12 +3 2 2 100 15 11 60 15 +4 2 2 100 15 11 21 60 +5 2 2 100 15 12 16 61 +6 2 2 100 15 12 61 21 +7 2 2 100 15 15 60 20 +8 2 2 100 15 16 20 61 +9 2 2 100 15 20 60 21 +10 2 2 100 15 20 21 61 +11 2 2 100 17 11 62 13 +12 2 2 100 17 11 21 62 +13 2 2 100 17 12 14 63 +14 2 2 100 17 12 63 21 +15 2 2 100 17 13 62 22 +16 2 2 100 17 14 22 63 +17 2 2 100 17 21 22 62 +18 2 2 100 17 63 22 21 +19 2 2 100 19 9 11 64 +20 2 2 100 19 9 64 23 +21 2 2 100 19 10 65 12 +22 2 2 100 19 10 23 65 +23 2 2 100 19 11 21 64 +24 2 2 100 19 12 65 21 +25 2 2 100 19 64 21 65 +26 2 2 100 19 23 64 65 +27 2 2 100 21 11 66 17 +28 2 2 100 21 11 21 66 +29 2 2 100 21 12 18 67 +30 2 2 100 21 12 67 21 +31 2 2 100 21 17 66 19 +32 2 2 100 21 18 19 67 +33 2 2 100 21 66 67 19 +34 2 2 100 21 21 67 66 +35 4 2 100 47 144 92 80 149 +36 4 2 100 47 79 132 119 148 +37 4 2 100 47 90 131 78 152 +38 4 2 100 47 77 118 145 146 +39 4 2 100 47 142 104 93 151 +40 4 2 100 47 145 137 77 146 +41 4 2 100 47 77 110 118 146 +42 4 2 100 47 72 144 80 149 +43 4 2 100 47 72 80 92 149 +44 4 2 100 47 70 78 131 152 +45 4 2 100 47 132 79 124 148 +46 4 2 100 47 82 90 78 152 +47 4 2 100 47 79 119 111 148 +48 4 2 100 47 61 14 63 12 +49 4 2 100 47 22 61 63 21 +50 4 2 100 47 15 62 11 60 +51 4 2 100 47 62 60 22 21 +52 4 2 100 47 117 106 143 147 +53 4 2 100 47 62 60 15 146 +54 4 2 100 47 116 130 105 150 +55 4 2 100 47 129 91 103 153 +56 4 2 100 47 98 143 106 147 +57 4 2 100 47 98 106 117 147 +58 4 2 100 47 122 105 130 150 +59 4 2 100 47 142 96 104 151 +60 4 2 100 47 91 83 103 153 +61 4 2 100 47 129 103 121 153 +62 4 2 100 47 116 105 97 150 +63 4 2 100 47 61 22 63 147 +64 4 2 100 47 60 62 22 146 +65 4 2 100 47 104 85 93 151 +66 4 2 100 47 61 63 14 147 +67 4 2 100 47 77 69 110 146 +68 4 2 100 47 77 137 69 146 +69 4 2 100 47 79 111 71 148 +70 4 2 100 47 136 144 72 149 +71 4 2 100 47 123 70 131 152 +72 4 2 100 47 72 92 84 149 +73 4 2 100 47 79 71 124 148 +74 4 2 100 47 70 82 78 152 +75 4 2 100 47 110 69 15 146 +76 4 2 100 47 69 137 13 146 +77 4 2 100 47 98 135 143 147 +78 4 2 100 47 117 109 98 147 +79 4 2 100 47 122 97 105 150 +80 4 2 100 47 96 85 104 151 +81 4 2 100 47 134 96 142 151 +82 4 2 100 47 95 121 103 153 +83 4 2 100 47 108 116 97 150 +84 4 2 100 47 83 95 103 153 +85 4 2 100 47 123 9 70 152 +86 4 2 100 47 84 17 72 149 +87 4 2 100 47 71 9 124 148 +88 4 2 100 47 70 17 82 152 +89 4 2 100 47 71 111 15 148 +90 4 2 100 47 13 136 72 149 +91 4 2 100 47 53 122 105 130 +92 4 2 100 47 41 70 78 131 +93 4 2 100 47 143 98 106 32 +94 4 2 100 47 96 142 104 30 +95 4 2 100 47 117 98 56 106 +96 4 2 100 47 79 39 132 124 +97 4 2 100 47 51 129 103 121 +98 4 2 100 47 83 48 91 103 +99 4 2 100 47 118 77 36 110 +100 4 2 100 47 54 116 105 97 +101 4 2 100 47 24 77 145 137 +102 4 2 100 47 135 98 14 147 +103 4 2 100 47 16 98 109 147 +104 4 2 100 47 14 63 12 18 +105 4 2 100 47 61 16 14 12 +106 4 2 100 47 61 16 12 10 +107 4 2 100 47 60 23 65 64 +108 4 2 100 47 60 65 21 64 +109 4 2 100 47 67 66 62 21 +110 4 2 100 47 67 66 19 62 +111 4 2 100 47 65 61 12 10 +112 4 2 100 47 63 67 12 18 +113 4 2 100 47 23 20 60 65 +114 4 2 100 47 62 22 19 67 +115 4 2 100 47 20 61 22 21 +116 4 2 100 47 60 15 64 11 +117 4 2 100 47 22 62 21 67 +118 4 2 100 47 20 60 65 21 +119 4 2 100 47 66 13 62 11 +120 4 2 100 47 60 20 22 21 +121 4 2 100 47 15 62 13 11 +122 4 2 100 47 61 20 65 21 +123 4 2 100 47 63 22 21 67 +124 4 2 100 47 122 10 97 150 +125 4 2 100 47 85 96 18 151 +126 4 2 100 47 14 96 134 151 +127 4 2 100 47 95 10 121 153 +128 4 2 100 47 16 108 97 150 +129 4 2 100 47 95 83 18 153 +130 4 2 100 47 15 13 62 146 +131 4 2 100 47 16 97 12 10 +132 4 2 100 47 96 14 12 18 +133 4 2 100 47 16 98 14 12 +134 4 2 100 47 12 95 18 10 +135 4 2 100 47 11 70 9 17 +136 4 2 100 47 13 72 11 17 +137 4 2 100 47 71 15 11 9 +138 4 2 100 47 69 15 13 11 +139 4 2 100 47 69 13 15 146 +140 4 2 100 47 20 22 61 147 +141 4 2 100 47 60 64 15 148 +142 4 2 100 47 66 62 13 149 +143 4 2 100 47 20 60 22 146 +144 4 2 100 47 22 67 63 151 +145 4 2 100 47 20 61 65 150 +146 4 2 100 47 42 82 90 78 +147 4 2 100 47 79 119 38 111 +148 4 2 100 47 70 9 17 152 +149 4 2 100 47 13 72 17 149 +150 4 2 100 47 71 15 9 148 +151 4 2 100 47 23 64 60 148 +152 4 2 100 47 66 19 62 149 +153 4 2 100 47 23 60 20 148 +154 4 2 100 47 62 19 22 149 +155 4 2 100 47 93 104 50 85 +156 4 2 100 47 44 72 80 92 +157 4 2 100 47 26 72 144 80 +158 4 2 100 47 61 14 16 147 +159 4 2 100 47 63 18 14 151 +160 4 2 100 47 61 16 10 150 +161 4 2 100 47 61 10 65 150 +162 4 2 100 47 63 67 18 151 +163 4 2 100 47 29 142 93 151 +164 4 2 100 47 16 14 98 147 +165 4 2 100 47 16 97 10 150 +166 4 2 100 47 14 18 96 151 +167 4 2 100 47 95 18 10 153 +168 4 2 100 47 122 125 97 10 +169 4 2 100 47 98 138 135 14 +170 4 2 100 47 96 100 85 18 +171 4 2 100 47 109 114 98 16 +172 4 2 100 47 101 96 134 14 +173 4 2 100 47 99 95 10 121 +174 4 2 100 47 72 84 87 17 +175 4 2 100 47 123 128 70 9 +176 4 2 100 47 83 100 95 18 +177 4 2 100 47 114 108 97 16 +178 4 2 100 47 87 82 70 17 +179 4 2 100 47 124 71 75 9 +180 4 2 100 47 73 71 111 15 +181 4 2 100 47 141 136 72 13 +182 4 2 100 47 69 73 110 15 +183 4 2 100 47 74 69 137 13 +184 4 2 100 47 117 143 33 147 +185 4 2 100 47 129 47 91 153 +186 4 2 100 47 116 57 130 150 +187 4 2 100 47 132 59 119 148 +188 4 2 100 47 90 45 131 152 +189 4 2 100 47 118 35 145 146 +190 4 2 100 47 144 27 92 149 +191 4 2 100 47 122 53 105 97 +192 4 2 100 47 143 98 32 135 +193 4 2 100 47 79 38 71 111 +194 4 2 100 47 41 123 70 131 +195 4 2 100 47 84 72 44 92 +196 4 2 100 47 136 26 72 144 +197 4 2 100 47 104 96 50 85 +198 4 2 100 47 109 117 98 56 +199 4 2 100 47 77 69 36 110 +200 4 2 100 47 95 51 103 121 +201 4 2 100 47 96 134 142 30 +202 4 2 100 47 54 108 116 97 +203 4 2 100 47 83 95 48 103 +204 4 2 100 47 69 77 24 137 +205 4 2 100 47 70 82 42 78 +206 4 2 100 47 39 79 71 124 +207 4 2 100 47 97 94 12 10 +208 4 2 100 47 94 96 12 18 +209 4 2 100 47 94 95 12 10 +210 4 2 100 47 95 94 12 18 +211 4 2 100 47 94 96 14 12 +212 4 2 100 47 98 94 14 12 +213 4 2 100 47 97 94 16 12 +214 4 2 100 47 94 98 16 12 +215 4 2 100 47 11 70 68 9 +216 4 2 100 47 11 72 68 17 +217 4 2 100 47 70 11 68 17 +218 4 2 100 47 71 11 68 9 +219 4 2 100 47 15 71 11 68 +220 4 2 100 47 69 15 11 68 +221 4 2 100 47 13 69 11 68 +222 4 2 100 47 72 13 11 68 +223 4 2 100 47 125 99 97 10 +224 4 2 100 47 138 98 101 14 +225 4 2 100 47 100 89 85 18 +226 4 2 100 47 114 98 16 102 +227 4 2 100 47 125 99 10 121 +228 4 2 100 47 138 101 134 14 +229 4 2 100 47 76 72 87 17 +230 4 2 100 47 89 100 83 18 +231 4 2 100 47 128 75 70 9 +232 4 2 100 47 97 114 16 102 +233 4 2 100 47 76 87 70 17 +234 4 2 100 47 115 73 111 15 +235 4 2 100 47 128 124 75 9 +236 4 2 100 47 73 115 110 15 +237 4 2 100 47 74 141 72 13 +238 4 2 100 47 74 137 141 13 +239 4 2 100 47 67 10 65 12 +240 4 2 100 47 67 10 12 18 +241 4 2 100 47 21 65 67 64 +242 4 2 100 47 65 19 67 64 +243 4 2 100 47 64 66 67 21 +244 4 2 100 47 66 64 67 19 +245 4 2 100 47 65 23 19 64 +246 4 2 100 47 64 66 11 9 +247 4 2 100 47 66 11 9 17 +248 4 2 100 47 15 64 11 9 +249 4 2 100 47 66 13 11 17 +250 4 2 100 47 66 9 64 152 +251 4 2 100 47 9 66 17 152 +252 4 2 100 47 15 64 9 148 +253 4 2 100 47 13 17 66 149 +254 4 2 100 47 19 65 67 153 +255 4 2 100 47 23 65 19 153 +256 4 2 100 47 22 19 67 151 +257 4 2 100 47 23 20 65 150 +258 4 2 100 47 29 93 85 151 +259 4 2 100 47 19 66 64 152 +260 4 2 100 47 23 19 64 152 +261 4 2 100 47 143 135 33 147 +262 4 2 100 47 109 117 33 147 +263 4 2 100 47 20 146 22 147 +264 4 2 100 47 129 121 47 153 +265 4 2 100 47 47 83 91 153 +266 4 2 100 47 29 134 142 151 +267 4 2 100 47 122 130 57 150 +268 4 2 100 47 108 57 116 150 +269 4 2 100 47 10 67 65 153 +270 4 2 100 47 10 18 67 153 +271 4 2 100 47 23 19 152 153 +272 4 2 100 47 23 148 20 150 +273 4 2 100 47 22 149 19 151 +274 4 2 100 47 53 122 125 97 +275 4 2 100 47 38 73 71 111 +276 4 2 100 47 98 138 32 135 +277 4 2 100 47 123 128 41 70 +278 4 2 100 47 72 84 44 87 +279 4 2 100 47 50 96 100 85 +280 4 2 100 47 114 109 98 56 +281 4 2 100 47 141 136 26 72 +282 4 2 100 47 95 99 51 121 +283 4 2 100 47 96 101 134 30 +284 4 2 100 47 69 73 36 110 +285 4 2 100 47 82 87 70 42 +286 4 2 100 47 100 83 95 48 +287 4 2 100 47 114 108 54 97 +288 4 2 100 47 69 24 74 137 +289 4 2 100 47 71 39 124 75 +290 4 2 100 47 119 59 111 148 +291 4 2 100 47 90 82 45 152 +292 4 2 100 47 118 110 35 146 +293 4 2 100 47 35 137 145 146 +294 4 2 100 47 123 131 45 152 +295 4 2 100 47 144 136 27 149 +296 4 2 100 47 84 92 27 149 +297 4 2 100 47 124 59 132 148 +298 4 2 100 47 112 146 20 147 +299 4 2 100 47 139 22 146 147 +300 4 2 100 47 23 126 148 150 +301 4 2 100 47 88 19 149 151 +302 4 2 100 47 23 152 127 153 +303 4 2 100 47 19 86 152 153 +304 4 2 100 47 20 148 113 150 +305 4 2 100 47 140 149 22 151 +306 4 2 100 47 139 133 22 147 +307 4 2 100 47 112 20 107 147 +308 4 2 100 47 23 120 126 150 +309 4 2 100 47 23 127 120 153 +310 4 2 100 47 88 81 19 151 +311 4 2 100 47 81 86 19 153 +312 4 2 100 47 107 20 113 150 +313 4 2 100 47 140 22 133 151 +314 4 2 100 47 115 73 38 111 +315 4 2 100 47 99 53 125 97 +316 4 2 100 47 138 98 32 101 +317 4 2 100 47 128 75 41 70 +318 4 2 100 47 76 72 44 87 +319 4 2 100 47 89 50 100 85 +320 4 2 100 47 114 98 102 56 +321 4 2 100 47 74 141 26 72 +322 4 2 100 47 73 115 36 110 +323 4 2 100 47 99 125 51 121 +324 4 2 100 47 101 138 134 30 +325 4 2 100 47 87 76 70 42 +326 4 2 100 47 100 89 83 48 +327 4 2 100 47 54 114 97 102 +328 4 2 100 47 124 39 128 75 +329 4 2 100 47 24 74 137 141 +330 4 2 100 47 139 22 133 146 +331 4 2 100 47 112 107 20 146 +332 4 2 100 47 23 126 120 148 +333 4 2 100 47 127 23 120 152 +334 4 2 100 47 88 19 81 149 +335 4 2 100 47 81 19 86 152 +336 4 2 100 47 107 113 20 148 +337 4 2 100 47 133 22 140 149 +338 4 2 100 47 33 135 139 147 +339 4 2 100 47 112 109 33 147 +340 4 2 100 47 126 122 57 150 +341 4 2 100 47 113 57 108 150 +342 4 2 100 47 29 85 88 151 +343 4 2 100 47 83 47 86 153 +344 4 2 100 47 47 121 127 153 +345 4 2 100 47 29 140 134 151 +346 4 2 100 47 20 15 60 146 +347 4 2 100 47 13 22 62 146 +348 4 2 100 47 135 138 133 14 +349 4 2 100 47 122 125 10 120 +350 4 2 100 47 97 99 94 10 +351 4 2 100 47 94 99 95 10 +352 4 2 100 47 114 109 107 16 +353 4 2 100 47 10 125 121 120 +354 4 2 100 47 133 138 134 14 +355 4 2 100 47 96 94 100 18 +356 4 2 100 47 108 114 107 16 +357 4 2 100 47 98 94 101 14 +358 4 2 100 47 94 96 101 14 +359 4 2 100 47 100 94 95 18 +360 4 2 100 47 85 89 81 18 +361 4 2 100 47 81 89 83 18 +362 4 2 100 47 98 94 16 102 +363 4 2 100 47 94 97 16 102 +364 4 2 100 47 87 84 81 17 +365 4 2 100 47 123 120 128 9 +366 4 2 100 47 87 81 82 17 +367 4 2 100 47 70 75 68 9 +368 4 2 100 47 72 76 68 17 +369 4 2 100 47 76 70 68 17 +370 4 2 100 47 120 124 128 9 +371 4 2 100 47 75 71 68 9 +372 4 2 100 47 73 71 15 68 +373 4 2 100 47 69 73 15 68 +374 4 2 100 47 115 111 107 15 +375 4 2 100 47 133 136 141 13 +376 4 2 100 47 74 69 13 68 +377 4 2 100 47 115 107 110 15 +378 4 2 100 47 72 74 13 68 +379 4 2 100 47 137 133 141 13 +380 4 2 100 47 20 60 15 148 +381 4 2 100 47 13 62 22 149 +382 4 2 100 47 33 139 112 147 +383 4 2 100 47 126 57 113 150 +384 4 2 100 47 47 127 86 153 +385 4 2 100 47 140 29 88 151 +386 4 2 100 47 139 135 133 147 +387 4 2 100 47 109 112 107 147 +388 4 2 100 47 126 120 122 150 +389 4 2 100 47 108 107 113 150 +390 4 2 100 47 140 133 134 151 +391 4 2 100 47 121 120 127 153 +392 4 2 100 47 83 86 81 153 +393 4 2 100 47 88 85 81 151 +394 4 2 100 47 35 110 112 146 +395 4 2 100 47 139 137 35 146 +396 4 2 100 47 127 123 45 152 +397 4 2 100 47 27 136 140 149 +398 4 2 100 47 84 27 88 149 +399 4 2 100 47 86 45 82 152 +400 4 2 100 47 59 113 111 148 +401 4 2 100 47 124 126 59 148 +402 4 2 100 47 112 33 34 139 +403 4 2 100 47 52 99 125 51 +404 4 2 100 47 138 101 31 30 +405 4 2 100 47 115 73 36 37 +406 4 2 100 47 126 58 113 57 +407 4 2 100 47 39 40 128 75 +408 4 2 100 47 86 127 46 45 +409 4 2 100 47 28 27 140 88 +410 4 2 100 47 76 87 43 42 +411 4 2 100 47 89 100 49 48 +412 4 2 100 47 24 25 74 141 +413 4 2 100 47 114 54 55 102 +414 4 2 100 47 44 76 87 43 +415 4 2 100 47 50 89 100 49 +416 4 2 100 47 55 114 102 56 +417 4 2 100 47 47 86 127 46 +418 4 2 100 47 25 74 141 26 +419 4 2 100 47 29 28 140 88 +420 4 2 100 47 40 128 75 41 +421 4 2 100 47 73 115 38 37 +422 4 2 100 47 58 59 126 113 +423 4 2 100 47 53 52 99 125 +424 4 2 100 47 32 138 101 31 +425 4 2 100 47 35 112 34 139 +426 4 2 100 47 20 61 16 147 +427 4 2 100 47 14 63 22 147 +428 4 2 100 47 20 16 61 150 +429 4 2 100 47 14 22 63 151 +430 4 2 100 47 35 112 139 146 +431 4 2 100 47 137 139 133 146 +432 4 2 100 47 112 110 107 146 +433 4 2 100 47 27 140 88 149 +434 4 2 100 47 127 45 86 152 +435 4 2 100 47 59 126 113 148 +436 4 2 100 47 107 111 113 148 +437 4 2 100 47 124 120 126 148 +438 4 2 100 47 136 133 140 149 +439 4 2 100 47 127 120 123 152 +440 4 2 100 47 81 86 82 152 +441 4 2 100 47 84 88 81 149 +442 4 2 100 47 23 9 64 148 +443 4 2 100 47 64 9 23 152 +444 4 2 100 47 66 17 19 149 +445 4 2 100 47 19 17 66 152 +446 4 2 100 47 3 129 91 103 +447 4 2 100 47 105 116 4 130 +448 4 2 100 47 118 77 145 5 +449 4 2 100 47 117 8 143 106 +450 4 2 100 47 90 2 78 131 +451 4 2 100 47 1 79 132 119 +452 4 2 100 47 144 6 80 92 +453 4 2 100 47 142 104 7 93 +454 4 2 100 47 139 146 112 147 +455 4 2 100 47 113 148 126 150 +456 4 2 100 47 127 152 86 153 +457 4 2 100 47 140 88 149 151 +458 4 2 100 47 23 65 10 150 +459 4 2 100 47 19 18 67 151 +460 4 2 100 47 65 23 10 153 +461 4 2 100 47 19 67 18 153 +462 4 2 100 47 21 60 11 62 +463 4 2 100 47 61 63 21 12 +464 4 2 100 47 11 21 62 66 +465 4 2 100 47 60 21 11 64 +466 4 2 100 47 65 61 21 12 +467 4 2 100 47 21 63 67 12 +468 4 2 100 47 8 143 106 32 +469 4 2 100 47 35 118 145 5 +470 4 2 100 47 53 105 4 130 +471 4 2 100 47 2 41 78 131 +472 4 2 100 47 47 3 129 91 +473 4 2 100 47 117 56 8 106 +474 4 2 100 47 104 142 7 30 +475 4 2 100 47 129 3 51 103 +476 4 2 100 47 8 117 143 33 +477 4 2 100 47 27 6 144 92 +478 4 2 100 47 77 118 36 5 +479 4 2 100 47 48 3 91 103 +480 4 2 100 47 4 116 57 130 +481 4 2 100 47 1 79 39 132 +482 4 2 100 47 116 54 105 4 +483 4 2 100 47 77 24 145 5 +484 4 2 100 47 1 79 119 38 +485 4 2 100 47 132 1 119 59 +486 4 2 100 47 42 90 2 78 +487 4 2 100 47 2 90 45 131 +488 4 2 100 47 29 142 7 93 +489 4 2 100 47 104 7 93 50 +490 4 2 100 47 6 44 80 92 +491 4 2 100 47 6 26 144 80 +492 4 2 100 47 11 21 66 64 +493 4 2 100 47 65 21 67 12 +494 4 2 100 47 133 146 13 137 +495 4 2 100 47 13 146 133 22 +496 4 2 100 47 146 107 15 110 +497 4 2 100 47 146 15 107 20 +498 4 2 100 47 147 133 14 135 +499 4 2 100 47 147 14 133 22 +500 4 2 100 47 107 147 16 109 +501 4 2 100 47 16 147 107 20 +502 4 2 100 47 120 153 10 23 +503 4 2 100 47 10 153 120 121 +504 4 2 100 47 150 120 10 23 +505 4 2 100 47 150 10 120 122 +506 4 2 100 47 81 153 18 83 +507 4 2 100 47 18 153 81 19 +508 4 2 100 47 151 81 18 85 +509 4 2 100 47 151 18 81 19 +510 4 2 100 47 151 133 14 22 +511 4 2 100 47 151 14 133 134 +512 4 2 100 47 150 107 16 108 +513 4 2 100 47 150 16 107 20 +514 4 2 100 47 149 133 13 136 +515 4 2 100 47 149 13 133 22 +516 4 2 100 47 148 107 15 20 +517 4 2 100 47 148 15 107 111 +518 4 2 100 47 120 148 9 23 +519 4 2 100 47 9 148 120 124 +520 4 2 100 47 152 120 9 23 +521 4 2 100 47 152 9 120 123 +522 4 2 100 47 81 149 17 84 +523 4 2 100 47 17 149 81 19 +524 4 2 100 47 152 81 17 82 +525 4 2 100 47 152 17 81 19 +$EndElements diff --git a/test/multidomain/facet/CMakeLists.txt b/test/multidomain/facet/CMakeLists.txt index c5cc498d9969002ce44d9e105cac8fe5ae7ce66f..39d194720f1b01845928f8e516f4cc47ae7850f7 100644 --- a/test/multidomain/facet/CMakeLists.txt +++ b/test/multidomain/facet/CMakeLists.txt @@ -1,4 +1,4 @@ -dune_symlink_to_source_files(FILES "grid.msh" "test_gridcreator.input") +dune_symlink_to_source_files(FILES "grid.msh" "grid2.msh" "test_gridcreator.input" "2d_grid.msh" "3d_grid.msh") dune_add_test(NAME test_facetgridcreator_alu CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )" @@ -14,7 +14,68 @@ dune_add_test(NAME test_facetgridcreator_ug COMMAND ./test_facetgridcreator_ug CMD_ARGS test_gridcreator.input) +dune_add_test(NAME test_facetcouplingmapper_tpfa_alu + CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )" + COMPILE_DEFINITIONS BULKGRIDTYPE=Dune::ALUGrid<3,3,Dune::simplex,Dune::conforming> + SOURCES test_facetcouplingmapper.cc + COMMAND ./test_facetcouplingmapper_tpfa_alu + CMD_ARGS test_gridcreator.input) + +dune_add_test(NAME test_facetcouplingmapper_tpfa_ug + CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-uggrid_FOUND )" + COMPILE_DEFINITIONS BULKGRIDTYPE=Dune::UGGrid<3> + SOURCES test_facetcouplingmapper.cc + COMMAND ./test_facetcouplingmapper_tpfa_ug + CMD_ARGS test_gridcreator.input) + +dune_add_test(NAME test_facetcouplingmapper_box_alu + CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )" + COMPILE_DEFINITIONS BULKGRIDTYPE=Dune::ALUGrid<3,3,Dune::simplex,Dune::conforming> + COMPILE_DEFINITIONS USEBOXINBULK=true + SOURCES test_facetcouplingmapper.cc + COMMAND ./test_facetcouplingmapper_box_alu + CMD_ARGS test_gridcreator.input) + +dune_add_test(NAME test_facetcouplingmapper_box_ug + CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-uggrid_FOUND )" + COMPILE_DEFINITIONS BULKGRIDTYPE=Dune::UGGrid<3> + COMPILE_DEFINITIONS USEBOXINBULK=true + SOURCES test_facetcouplingmapper.cc + COMMAND ./test_facetcouplingmapper_box_ug + CMD_ARGS test_gridcreator.input) + +dune_add_test(NAME test_facetcouplingmapper_tpfa_boundary_alu + CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )" + COMPILE_DEFINITIONS BULKGRIDTYPE=Dune::ALUGrid<2,2,Dune::simplex,Dune::conforming> + SOURCES test_facetcouplingmapper_boundary.cc + COMMAND ./test_facetcouplingmapper_tpfa_boundary_alu) + +dune_add_test(NAME test_facetcouplingmapper_tpfa_boundary_ug + CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-uggrid_FOUND )" + COMPILE_DEFINITIONS BULKGRIDTYPE=Dune::UGGrid<2> + SOURCES test_facetcouplingmapper_boundary.cc + COMMAND ./test_facetcouplingmapper_tpfa_boundary_ug) + +dune_add_test(NAME test_vertexmapper_alu_3d + CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )" + COMPILE_DEFINITIONS BULKGRIDTYPE=Dune::ALUGrid<3,3,Dune::simplex,Dune::conforming> + COMPILE_DEFINITIONS FACETGRIDTYPE=Dune::FoamGrid<2,3> + SOURCES test_vertexmapper.cc + COMMAND ./test_vertexmapper_alu_3d + CMD_ARGS 3d_grid.msh) + +dune_add_test(NAME test_vertexmapper_alu_2d + CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )" + COMPILE_DEFINITIONS BULKGRIDTYPE=Dune::ALUGrid<2,2,Dune::simplex,Dune::conforming> + COMPILE_DEFINITIONS FACETGRIDTYPE=Dune::FoamGrid<1,2> + SOURCES test_vertexmapper.cc + COMMAND ./test_vertexmapper_alu_2d + CMD_ARGS 2d_grid.msh) + #install sources install(FILES +test_facetcouplingmapper.cc +test_facetcouplingmapper_boundary.cc test_gridcreator.cc +test_vertexmapper.cc DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/multidomain/facet) diff --git a/test/multidomain/facet/grid2.msh b/test/multidomain/facet/grid2.msh new file mode 100644 index 0000000000000000000000000000000000000000..53681d5b4b3dd8257b936924ffc96b690db2751f --- /dev/null +++ b/test/multidomain/facet/grid2.msh @@ -0,0 +1,80 @@ +$MeshFormat +2.2 0 8 +$EndMeshFormat +$Nodes +29 +1 0 0 0 +2 1 0 0 +3 1 1 0 +4 0 1 0 +5 0 0.5 0 +6 0.2499999999994121 1 0 +7 0.499999999998694 1 0 +8 0.7499999999993416 1 0 +9 1 0.7500000000003465 0 +10 1 0.5000000000020591 0 +11 1 0.2500000000010404 0 +12 0.7500000000003465 0 0 +13 0.5000000000020591 0 0 +14 0.2500000000010404 0 0 +15 0 0.249999999999347 0 +16 0 0.75 0 +17 0.4999999999999621 0.5000000000000026 0 +18 0.7083333333334084 0.7083333333332408 0 +19 0.2916666666666993 0.7083333333333987 0 +20 0.7083333333331985 0.2916666666665703 0 +21 0.2916666666665363 0.2916666666668185 0 +22 0.779761904761896 0.4999999999998697 0 +23 0.4999999999998249 0.2202380952381005 0 +24 0.5000000000000809 0.7797619047618862 0 +25 0.2202380952380524 0.5000000000001364 0 +26 0.8385416666665232 0.8385416666668789 0 +27 0.8385416666669893 0.1614583333335019 0 +28 0.1614583333332946 0.8385416666664973 0 +29 0.1614583333335902 0.1614583333329904 0 +$EndNodes +$Elements +42 +1 1 2 1 5 5 16 +2 1 2 1 5 16 4 +3 2 2 1 7 9 22 18 +4 2 2 1 7 12 23 20 +5 2 2 1 7 6 24 19 +6 2 2 1 7 15 25 21 +7 2 2 1 7 16 19 25 +8 2 2 1 7 8 18 24 +9 2 2 1 7 11 20 22 +10 2 2 1 7 14 21 23 +11 2 2 1 7 9 10 22 +12 2 2 1 7 12 13 23 +13 2 2 1 7 6 7 24 +14 2 2 1 7 5 25 15 +15 2 2 1 7 5 16 25 +16 2 2 1 7 10 11 22 +17 2 2 1 7 7 8 24 +18 2 2 1 7 13 14 23 +19 2 2 1 7 17 18 22 +20 2 2 1 7 17 22 20 +21 2 2 1 7 17 24 18 +22 2 2 1 7 17 20 23 +23 2 2 1 7 17 19 24 +24 2 2 1 7 17 23 21 +25 2 2 1 7 17 25 19 +26 2 2 1 7 17 21 25 +27 2 2 1 7 9 18 26 +28 2 2 1 7 6 19 28 +29 2 2 1 7 12 20 27 +30 2 2 1 7 16 28 19 +31 2 2 1 7 15 21 29 +32 2 2 1 7 8 26 18 +33 2 2 1 7 11 27 20 +34 2 2 1 7 14 29 21 +35 2 2 1 7 3 9 26 +36 2 2 1 7 2 12 27 +37 2 2 1 7 2 27 11 +38 2 2 1 7 3 26 8 +39 2 2 1 7 1 29 14 +40 2 2 1 7 4 28 16 +41 2 2 1 7 4 6 28 +42 2 2 1 7 1 15 29 +$EndElements diff --git a/test/multidomain/facet/test_facetcouplingmapper.cc b/test/multidomain/facet/test_facetcouplingmapper.cc new file mode 100644 index 0000000000000000000000000000000000000000..5ac79e975b39b37d370c91d294a98906f753a688 --- /dev/null +++ b/test/multidomain/facet/test_facetcouplingmapper.cc @@ -0,0 +1,321 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * \brief Tests the grid creator class for models using facet coupling. + */ +#include <config.h> +#include <iostream> +#include <type_traits> + +#include <dune/common/exceptions.hh> +#include <dune/common/float_cmp.hh> + +#include <dune/grid/uggrid.hh> +#include <dune/alugrid/grid.hh> +#include <dune/foamgrid/foamgrid.hh> + +#include <dumux/common/parameters.hh> +#include <dumux/discretization/methods.hh> +#include <dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh> +#include <dumux/multidomain/facet/box/fvgridgeometry.hh> +#include <dumux/multidomain/facet/gridcreator.hh> +#include <dumux/multidomain/facet/couplingmapper.hh> +#include <dumux/multidomain/facet/codimonegridadapter.hh> + +#ifndef BULKGRIDTYPE // default to ug grid if not provided by CMake +#define BULKGRIDTYPE Dune::UGGrid<3> +#endif + +#ifndef USEBOXINBULK // default to tpfa if not specified otherwise +#define USEBOXINBULK 0 +#endif + +//! computes the average distance of corners to the center of a geometry +template<class Geometry> +typename Geometry::ctype averageCornerDistance(const Geometry& geometry) +{ + const auto center = geometry.center(); + typename Geometry::ctype avgDistance = 0.0; + for (int i = 0; i < geometry.corners(); ++i) + avgDistance += (geometry.corner(i) - center).two_norm(); + avgDistance /= double(geometry.corners()); + return avgDistance; +} + +//! checks if an scvf lies on a low dim element geometry +template<class Scvf, class LowDimGeom> +void checkScvfEmbedment(const Scvf& scvf, const LowDimGeom& lowDimGeom) +{ + // scalar product of scvf center minus low dim element center and normal should be zero! + const auto d = lowDimGeom.center()-scvf.center(); + const auto sp = d*scvf.unitOuterNormal(); + + using std::abs; + if ( !(abs(sp) < lowDimGeom.volume()*1e-15) || d.two_norm() > averageCornerDistance(lowDimGeom) ) + DUNE_THROW(Dune::InvalidStateException, "Scvf does not coincide with low dim element"); +} + +// update a tpfa finite volume grid geometry +template< class BulkFVG, class FacetFVG, class GridCreator, + std::enable_if_t<BulkFVG::discMethod == Dumux::DiscretizationMethod::cctpfa, int> = 0 > +void updateBulkFvGeometry(BulkFVG& bulkFVG, const FacetFVG& facetFVG, const GridCreator& gc) +{ + bulkFVG.update(); +} + +// update a box finite volume grid geometry +template< class BulkFVG, class FacetFVG, class GridCreator, + std::enable_if_t<BulkFVG::discMethod == Dumux::DiscretizationMethod::box, int> = 0 > +void updateBulkFvGeometry(BulkFVG& bulkFVG, const FacetFVG& facetFVG, const GridCreator& gc) +{ + using FacetGridAdapter = Dumux::CodimOneGridAdapter<GridCreator, 0, 1>; + bulkFVG.update(facetFVG.gridView(), FacetGridAdapter{gc}, true); +} + +// main program +int main (int argc, char *argv[]) try +{ + // maybe initialize mpi + Dune::MPIHelper::instance(argc, argv); + + // parse command line argument parameters + Dumux::Parameters::init(argc, argv); + + using BulkGrid = BULKGRIDTYPE; + using FacetGrid = Dune::FoamGrid<2, 3>; + using EdgeGrid = Dune::FoamGrid<1, 3>; + + using GridCreator = Dumux::FacetCouplingGridCreator<BulkGrid, FacetGrid, EdgeGrid>; + GridCreator gridCreator; + gridCreator.makeGrids("grid.msh"); + + // instantiate the grid geometries with caching + using BulkGridView = typename BulkGrid::LeafGridView; + using BulkFVGridGeometry = typename std::conditional< USEBOXINBULK, + Dumux::BoxFacetCouplingFVGridGeometry<double, BulkGridView, true>, + Dumux::CCTpfaFVGridGeometry<BulkGridView, /*caching*/true> >::type; + BulkFVGridGeometry bulkFvGeometry( gridCreator.grid<0>().leafGridView() ); + + using FacetGridView = typename FacetGrid::LeafGridView; + using FacetFVGridGeometry = Dumux::CCTpfaFVGridGeometry<FacetGridView, true>; + FacetFVGridGeometry facetFvGeometry( gridCreator.grid<1>().leafGridView() ); + facetFvGeometry.update(); + + using EdgeGridView = typename EdgeGrid::LeafGridView; + using EdgeFVGridGeometry = Dumux::CCTpfaFVGridGeometry<EdgeGridView, true>; + EdgeFVGridGeometry edgeFvGeometry( gridCreator.grid<2>().leafGridView() ); + + // update grid geometries + edgeFvGeometry.update(); + facetFvGeometry.update(); + updateBulkFvGeometry(bulkFvGeometry, facetFvGeometry, gridCreator); + + // instantiate and update mappers for all domain combinations + Dumux::FacetCouplingMapper<BulkFVGridGeometry, FacetFVGridGeometry> bulkFacetMapper; + Dumux::FacetCouplingMapper<FacetFVGridGeometry, EdgeFVGridGeometry, /*bulkDomainId*/1, /*edgeDomainId*/2> facetEdgeMapper; + Dumux::FacetCouplingThreeDomainMapper<BulkFVGridGeometry, FacetFVGridGeometry, EdgeFVGridGeometry> hierarchyMapper; + + bulkFacetMapper.update(bulkFvGeometry, facetFvGeometry, gridCreator); + facetEdgeMapper.update(facetFvGeometry, edgeFvGeometry, gridCreator); + hierarchyMapper.update(bulkFvGeometry, facetFvGeometry, edgeFvGeometry, gridCreator); + + constexpr auto bulkDomainId = Dune::index_constant<0>(); + constexpr auto facetDomainId = Dune::index_constant<1>(); + constexpr auto edgeDomainId = Dune::index_constant<2>(); + + // check correctness of bulk-facet map + for (unsigned int i = 0; i < 2; ++i) + { + // check both the map from the bulk facet as well as from the hierarchy mapper + const auto& bulkFacetMap = i == 0 ? bulkFacetMapper.couplingMap(bulkDomainId, facetDomainId) + : hierarchyMapper.couplingMap(bulkDomainId, facetDomainId); + if (bulkFacetMap.size() != 56) + DUNE_THROW(Dune::InvalidStateException, "BulkFacetMap has " << bulkFacetMap.size() << " instead of 56 entries"); + else + std::cout << "Found 56 entries in bulk-facet map" << std::endl; + + std::size_t singleCouplings = 0; + std::size_t doubleCouplings = 0; + for (const auto& entry : bulkFacetMap) + { + const auto cStencilSize = entry.second.couplingStencil.size(); + + if (cStencilSize == 1) singleCouplings++; + else if (cStencilSize == 2) doubleCouplings++; + else DUNE_THROW(Dune::InvalidStateException, "Coupling stencil size is " << cStencilSize << " instead of 1 or 2"); + + const auto bulkElement = bulkFvGeometry.element(entry.first); + auto fvElementGeometry = localView(bulkFvGeometry); + fvElementGeometry.bind(bulkElement); + + // check scvf conformity with low dim elements + for (const auto& elemToScvfs : entry.second.elementToScvfMap) + { + const auto lowDimElemIdx = elemToScvfs.first; + const auto lowDimElement = facetFvGeometry.element(lowDimElemIdx); + const auto lowDimGeom = lowDimElement.geometry(); + + // check correctness of the map + for (auto scvfIdx : elemToScvfs.second) + checkScvfEmbedment(fvElementGeometry.scvf(scvfIdx), lowDimGeom); + + // check correctness of the map using dof indices + const auto lowDimElemDofIndices = [&] () + { + std::vector< typename FacetGridView::IndexSet::IndexType > dofIndices; + if (FacetFVGridGeometry::discMethod == Dumux::DiscretizationMethod::cctpfa) + dofIndices.push_back(lowDimElemIdx); + else + for (int i = 0; i < lowDimGeom.corners(); ++i) + dofIndices.push_back( facetFvGeometry.vertexMapper().subIndex(lowDimElement, i, FacetGridView::dimension) ); + return dofIndices; + } (); + + for (auto lowDimDofIdx : lowDimElemDofIndices) + for (auto scvfIdx : entry.second.dofToCouplingScvfMap.at(lowDimDofIdx)) + checkScvfEmbedment(fvElementGeometry.scvf(scvfIdx), lowDimGeom); + } + } + + if (singleCouplings != 48) DUNE_THROW(Dune::InvalidStateException, "Found " << singleCouplings << " instead of 48 bulk coupling entries with size 1"); + if (doubleCouplings != 8) DUNE_THROW(Dune::InvalidStateException, "Found " << doubleCouplings << " instead of 8 bulk coupling entries with size 2"); + } + + // check correctness of facet-bulk map + for (unsigned int i = 0; i < 2; ++i) + { + const auto& facetBulkMap = i == 0 ? bulkFacetMapper.couplingMap(facetDomainId, bulkDomainId) + : hierarchyMapper.couplingMap(facetDomainId, bulkDomainId); + if (facetBulkMap.size() != 32) + DUNE_THROW(Dune::InvalidStateException, "FacetBulkMap has " << facetBulkMap.size() << " instead of 32 entries"); + else + std::cout << "Found 32 entries in facet-bulk map" << std::endl; + + for (const auto& entry : facetBulkMap) + { + const auto lowDimGeom = facetFvGeometry.element(entry.first).geometry(); + + const auto cStencilSize = entry.second.couplingStencil.size(); + const std::vector<unsigned int> possibleStencilSizes = USEBOXINBULK ? std::vector<unsigned int>{6, 7, 8} + : std::vector<unsigned int>{2}; + if ( !std::count(possibleStencilSizes.begin(), possibleStencilSizes.end(), cStencilSize) ) + DUNE_THROW(Dune::InvalidStateException, "Coupling stencil size of " << cStencilSize << " is invalid"); + + for (const auto& embedment : entry.second.embedments) + { + const auto bulkElement = bulkFvGeometry.element(embedment.first); + auto fvElementGeometry = localView(bulkFvGeometry); + fvElementGeometry.bind(bulkElement); + + // check if the scvfs of the embedment coincide with low dim element + for (auto scvfIdx : embedment.second) + { + const auto& bulkScvf = fvElementGeometry.scvf(scvfIdx); + if (fvElementGeometry.scv(bulkScvf.insideScvIdx()).elementIndex() != embedment.first) + DUNE_THROW(Dune::InvalidStateException, "Element index in which the scvf is embedded in does not match with bulk element idx."); + checkScvfEmbedment(fvElementGeometry.scvf(scvfIdx), lowDimGeom); + } + } + } + } + + // check correctness of facet-edge map + for (unsigned int i = 0; i < 2; ++i) + { + const auto& facetEdgeMap = i == 0 ? facetEdgeMapper.couplingMap(facetDomainId, edgeDomainId) + : hierarchyMapper.couplingMap(facetDomainId, edgeDomainId); + if (facetEdgeMap.size() != 8) + DUNE_THROW(Dune::InvalidStateException, "FacetEdgeMap has " << facetEdgeMap.size() << " instead of 8 entries"); + else + std::cout << "Found 8 entries in facet-edge map" << std::endl; + + for (const auto& entry : facetEdgeMap) + { + const auto bulkElement = facetFvGeometry.element(entry.first); + auto fvElementGeometry = localView(facetFvGeometry); + fvElementGeometry.bind(bulkElement); + + const auto cStencilSize = entry.second.couplingStencil.size(); + if (cStencilSize != 1) + DUNE_THROW(Dune::InvalidStateException, "Coupling stencil size is " << cStencilSize << " instead of 1"); + + // we know the edge domain uses tpfa, so coupling stencil = element stencil + for (unsigned int i = 0; i < cStencilSize; ++i) + { + const auto lowDimIdx = entry.second.couplingStencil[i]; + const auto lowDimGeom = edgeFvGeometry.element(lowDimIdx).geometry(); + + for (auto scvfIdx : entry.second.dofToCouplingScvfMap.at(lowDimIdx)) + checkScvfEmbedment(fvElementGeometry.scvf(scvfIdx), lowDimGeom); + } + } + } + + // check correctness of edge-facet map + for (unsigned int i = 0; i < 2; ++i) + { + const auto& edgeFacetMap = i == 0 ? facetEdgeMapper.couplingMap(edgeDomainId, facetDomainId) + : hierarchyMapper.couplingMap(edgeDomainId, facetDomainId); + if (edgeFacetMap.size() != 2) + DUNE_THROW(Dune::InvalidStateException, "EdgeFacetMap has " << edgeFacetMap.size() << " instead of 2 entries"); + else + std::cout << "Found 2 entries in edge-facet map" << std::endl; + + for (const auto& entry : edgeFacetMap) + { + const auto lowDimGeom = edgeFvGeometry.element(entry.first).geometry(); + const auto cStencilSize = entry.second.couplingStencil.size(); + + if (cStencilSize != 4) + DUNE_THROW(Dune::InvalidStateException, "Coupling stencil size is " << cStencilSize << " instead of 4"); + + for (unsigned int i = 0; i < cStencilSize; ++i) + { + const auto& embedment = entry.second.embedments[i]; + const auto facetElement = facetFvGeometry.element(embedment.first); + auto fvElementGeometry = localView(facetFvGeometry); + fvElementGeometry.bind(facetElement); + + // check if the scvfs of the embedment coincide with low dim element + for (auto scvfIdx : embedment.second) + { + const auto& facetScvf = fvElementGeometry.scvf(scvfIdx); + if (facetScvf.insideScvIdx() != embedment.first) + DUNE_THROW(Dune::InvalidStateException, "Scvf insideScvIdx() does not match with bulk idx from embedment"); + checkScvfEmbedment(facetScvf, lowDimGeom); + } + } + } + } + + // everything is ok + std::cout << "\n... test passed!" << std::endl; +} +//////////////////////////////////// +// Error handler +//////////////////////////////////// +catch (Dune::Exception e) { + std::cout << e << std::endl; + return 1; +} +catch (...) { + std::cout << "Unknown exception thrown" << std::endl; + return 1; +} diff --git a/test/multidomain/facet/test_facetcouplingmapper_boundary.cc b/test/multidomain/facet/test_facetcouplingmapper_boundary.cc new file mode 100644 index 0000000000000000000000000000000000000000..e5a4c50a6489ef257a3da75677602fb38960212f --- /dev/null +++ b/test/multidomain/facet/test_facetcouplingmapper_boundary.cc @@ -0,0 +1,140 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * \brief Tests the grid creator class for models using facet coupling. + */ +#include <config.h> +#include <iostream> + +#include <dune/common/exceptions.hh> +#include <dune/common/float_cmp.hh> + +#include <dune/grid/uggrid.hh> +#include <dune/alugrid/grid.hh> +#include <dune/foamgrid/foamgrid.hh> + +#include <dumux/common/parameters.hh> +#include <dumux/discretization/cellcentered/tpfa/fvgridgeometry.hh> +#include <dumux/multidomain/facet/gridcreator.hh> +#include <dumux/multidomain/facet/couplingmapper.hh> + +#ifndef BULKGRIDTYPE // default to ug grid if not provided by CMake +#define BULKGRIDTYPE Dune::UGGrid<2> +#endif + +//! tests whether two positions are equal +template<typename Pos1, typename Pos2> +bool checkEquality(const Pos1& p1, const Pos2& p2, typename Pos1::value_type eps) +{ + const auto d = p1-p2; + using std::abs; + return std::all_of(d.begin(), d.end(), [eps] (auto coord) { return abs(coord) < eps; }); +} + +int main (int argc, char *argv[]) try +{ + // maybe initialize mpi + Dune::MPIHelper::instance(argc, argv); + + using BulkGrid = BULKGRIDTYPE; + using FacetGrid = Dune::FoamGrid<1, 2>; + + using GridCreator = Dumux::FacetCouplingGridCreator<BulkGrid, FacetGrid>; + GridCreator gridCreator; + gridCreator.makeGrids("grid2.msh"); + + // instantiate the grid geometries with caching + using BulkGridView = typename BulkGrid::LeafGridView; + using BulkFVGridGeometry = Dumux::CCTpfaFVGridGeometry<BulkGridView, true>; + BulkFVGridGeometry bulkFvGeometry( gridCreator.grid<0>().leafGridView() ); + bulkFvGeometry.update(); + + using FacetGridView = typename FacetGrid::LeafGridView; + using FacetFVGridGeometry = Dumux::CCTpfaFVGridGeometry<FacetGridView, true>; + FacetFVGridGeometry facetFvGeometry( gridCreator.grid<1>().leafGridView() ); + facetFvGeometry.update(); + + // instantiate and update mapper for all domain combinations + Dumux::FacetCouplingMapper<BulkFVGridGeometry, FacetFVGridGeometry> mapper; + mapper.update(bulkFvGeometry, facetFvGeometry, gridCreator); + + constexpr auto bulkDomainId = Dune::index_constant<0>(); + constexpr auto facetDomainId = Dune::index_constant<1>(); + + // check correctness of bulk-facet map + const auto& bulkFacetMap = mapper.couplingMap(bulkDomainId, facetDomainId); + if (bulkFacetMap.size() != 2) + DUNE_THROW(Dune::InvalidStateException, "BulkFacetMap has " << bulkFacetMap.size() << " instead of 2 entries"); + else + std::cout << "Found 2 entries in bulk-facet map" << std::endl; + + for (const auto& entry : bulkFacetMap) + { + const auto cStencilSize = entry.second.couplingStencil.size(); + + if (cStencilSize != 1) + DUNE_THROW(Dune::InvalidStateException, "Coupling stencil size is " << cStencilSize << " instead of 1"); + + const auto lowDimIdx = entry.second.couplingStencil[0]; + const auto bulkScvfIdx = entry.second.dofToCouplingScvfMap.at(lowDimIdx)[0]; + const auto lowDimGeom = facetFvGeometry.element(lowDimIdx).geometry(); + const auto& bulkScvf = bulkFvGeometry.scvf(bulkScvfIdx); + if (!checkEquality(lowDimGeom.center(), bulkScvf.center(), lowDimGeom.volume()*1e-8)) + DUNE_THROW(Dune::InvalidStateException, "Scvf does not coincide with low dim element"); + } + + // check correctness of facet-bulk map + const auto& facetBulkMap = mapper.couplingMap(facetDomainId, bulkDomainId); + if (facetBulkMap.size() != 2) + DUNE_THROW(Dune::InvalidStateException, "FacetBulkMap has " << facetBulkMap.size() << " instead of 2 entries"); + else + std::cout << "Found 2 entries in facet-bulk map" << std::endl; + + for (const auto& entry : facetBulkMap) + { + const auto cStencilSize = entry.second.couplingStencil.size(); + + if (cStencilSize != 1) + DUNE_THROW(Dune::InvalidStateException, "Coupling stencil size is " << cStencilSize << " instead of 1"); + + const auto bulkIdx = entry.second.couplingStencil[0]; + const auto& embedment = entry.second.embedments[0]; + const auto lowDimGeom = facetFvGeometry.element(entry.first).geometry(); + const auto& bulkScvf = bulkFvGeometry.scvf(embedment.second[0]); + if (bulkScvf.insideScvIdx() != bulkIdx) + DUNE_THROW(Dune::InvalidStateException, "Scvf insideScvIdx() does not match with bulk idx from embedment"); + if (!checkEquality(lowDimGeom.center(), bulkScvf.center(), lowDimGeom.volume()*1e-8)) + DUNE_THROW(Dune::InvalidStateException, "Scvf does not coincide with low dim element"); + } + + // everything is ok + std::cout << "\n... test passed!" << std::endl; +} +// ////////////////////////////////// +// Error handler +// ///////////////////////////////// +catch (Dune::Exception e) { + std::cout << e << std::endl; + return 1; +} +catch (...) { + std::cout << "Unknown exception thrown" << std::endl; + return 1; +} diff --git a/test/multidomain/facet/test_vertexmapper.cc b/test/multidomain/facet/test_vertexmapper.cc new file mode 100644 index 0000000000000000000000000000000000000000..a568235182cea01b95f917e1b75be7193fd9fd1e --- /dev/null +++ b/test/multidomain/facet/test_vertexmapper.cc @@ -0,0 +1,179 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/***************************************************************************** + * See the file COPYING for full copying permissions. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see <http://www.gnu.org/licenses/>. * + *****************************************************************************/ +/*! + * \file + * \brief Tests the grid creator class for models using facet coupling. + */ +#include <config.h> +#include <iostream> + +#include <dune/common/exceptions.hh> +#include <dune/alugrid/grid.hh> +#include <dune/foamgrid/foamgrid.hh> +#include <dune/grid/io/file/vtk/vtkwriter.hh> + +#include <dumux/io/vtkfunction.hh> +#include <dumux/multidomain/facet/gridcreator.hh> +#include <dumux/multidomain/facet/codimonegridadapter.hh> +#include <dumux/multidomain/facet/vertexmapper.hh> + +#ifndef BULKGRIDTYPE // default to alu grid if not provided by CMake +#define BULKGRIDTYPE Dune::ALUGrid<3, 3, Dune::simplex, Dune::nonconforming> +#endif + +#ifndef FACETGRIDTYPE // default to foam grid if not provided by CMake +#define FACETGRIDTYPE Dune::FoamGrid<2, 3> +#endif + +// returns a ficticious displacement for a given position +template<class GlobalPosition> +GlobalPosition getDisplacement(const GlobalPosition& pos) +{ + static const auto dim = GlobalPosition::size(); + + GlobalPosition d(1.0); + + if (pos[0] < 0.5 && pos[1] < 0.5) + { + d *= -1.0; + if (dim == 3 && pos[2] > 0.5) + d[2] = 1.0; + d /= d.two_norm(); + return d; + } + else if (pos[0] > 0.5 && pos[1] < 0.5) + { + d *= -1.0; + d[0] = 1.0; + if (dim == 3 && pos[2] > 0.5) + { + d[0] = 1.0; + d[2] = 1.0; + } + d /= d.two_norm(); + return d; + } + else if (pos[0] > 0.5 && pos[1] > 0.5) + { + if (dim == 3 && pos[2] < 0.5) + d[2] = -1.0; + d /= d.two_norm(); + return d; + } + else if (pos[0] < 0.5 && pos[1] > 0.5) + { + d *= -1.0; + d[1] = 1.0; + if (dim == 3 && pos[2] > 0.5) + d[2] = 1.0; + d /= d.two_norm(); + return d; + } + else + DUNE_THROW(Dune::InvalidStateException, "Invalid position provided: " << pos); +} + +//! main function +int main (int argc, char *argv[]) try +{ + // initialize mpi + Dune::MPIHelper::instance(argc, argv); + + // we must have one single command line argument + if (argc != 2) + DUNE_THROW(Dune::IOError, "You must provide one command line argument, which is the grid file"); + + using BulkGrid = BULKGRIDTYPE; + using FacetGrid = FACETGRIDTYPE; + using GridCreator = Dumux::FacetCouplingGridCreator<BulkGrid, FacetGrid>; + GridCreator gridCreator; + gridCreator.makeGrids(argv[1]); + + // dimension of the bulk grid + static constexpr int bulkDim = BulkGrid::dimension; + + // check grid sizes + const auto& bulkGridView = gridCreator.grid<0>().leafGridView(); + const auto& facetGridView = gridCreator.grid<1>().leafGridView(); + + // data converter + Dumux::CodimOneGridAdapter<GridCreator, 0, 1> facetGridAdapter(gridCreator); + + // enriched vertex dof mapper + Dumux::EnrichedVertexDofMapper<typename BulkGrid::LeafGridView> mapper(bulkGridView); + + // print out number of dofs managed by the mapper before enrichment + const auto numDofsBefore = mapper.size(); + std::cout << "Number of dofs before enrichment: " << numDofsBefore << std::endl; + if (bulkDim == 3 && numDofsBefore != 153) + DUNE_THROW(Dune::InvalidStateException, "3d test: Number of dofs before enrichment is expected to be 153 but is " << numDofsBefore); + if (bulkDim == 2 && numDofsBefore != 169) + DUNE_THROW(Dune::InvalidStateException, "2d test: Number of dofs before enrichment is expected to be 169 but is " << numDofsBefore); + + // enrich nodes subject to facet grid + mapper.enrich(facetGridView, facetGridAdapter, true); + const auto numDofsAfter = mapper.size(); + std::cout << "Number of dofs after enrichment: " << numDofsAfter << std::endl; + if (bulkDim == 3 && numDofsAfter != 164) + DUNE_THROW(Dune::InvalidStateException, "3d test: Number of dofs after enrichment is expected to be 164 but is " << numDofsAfter); + if (bulkDim == 2 && numDofsAfter != 180) + DUNE_THROW(Dune::InvalidStateException, "2d test: Number of dofs after enrichment is expected to be 180 but is " << numDofsAfter); + + // vector for output of ficticious displacement + static constexpr int bulkDimWorld = BulkGrid::dimensionworld; + using Displacement = Dune::FieldVector<double, bulkDimWorld>; + std::vector< Displacement > displacement(mapper.size(), Displacement(0.0)); + for (const auto& e : elements(bulkGridView)) + { + for (int i = 0; i < e.geometry().corners(); ++i) + { + if ( mapper.isEnriched(e.template subEntity<bulkDim>(i)) ) + displacement[ mapper.subIndex(e, i, BulkGrid::dimension) ] = getDisplacement(e.geometry().center()); + else + displacement[ mapper.subIndex(e, i, BulkGrid::dimension) ] = 0.0; + } + } + + // nonconforming vectorial vtk function + using VTKFunction = Dumux::Vtk::VectorP1VTKFunction< typename BulkGrid::LeafGridView, + Dumux::EnrichedVertexDofMapper<typename BulkGrid::LeafGridView>, + std::vector< Displacement > >; + auto displacementFunction = std::make_shared< VTKFunction >(bulkGridView, mapper, displacement, "displacement", BulkGrid::dimensionworld); + + // write .vtk file for the bulk grid + using BulkWriter = Dune::VTKWriter<typename BulkGrid::LeafGridView>; + BulkWriter bulkWriter(bulkGridView, Dune::VTK::nonconforming); + bulkWriter.addVertexData(displacementFunction); + bulkWriter.write("displacement_" + std::to_string(BulkGrid::dimension) + "d"); + + return 0; +} +// ////////////////////////////////// +// Error handler +// ///////////////////////////////// +catch (Dune::Exception e) +{ + std::cout << e << std::endl; + return 1; +} +catch (...) +{ + std::cout << "Unknown exception thrown" << std::endl; + return 1; +}