From: Daniel Arndt <daniel.arndt@iwr.uni-heidelberg.de> Date: Mon, 7 May 2018 09:20:10 +0000 (+0200) Subject: Only check for validity of the resulting Triangulation X-Git-Tag: v9.1.0-rc1~1196^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b73f1bd5d689eb54897718cb219d6c54fc5c735;p=dealii.git Only check for validity of the resulting Triangulation --- diff --git a/tests/gmsh/create_tria_02.cc b/tests/gmsh/create_tria_02.cc index 929bac328e..6b5595322b 100644 --- a/tests/gmsh/create_tria_02.cc +++ b/tests/gmsh/create_tria_02.cc @@ -30,7 +30,8 @@ int main () { initlog(); - Triangulation<2> tria; + Triangulation<2> tria (Triangulation<2>::MeshSmoothing::none, + /*check_for_distorted_cells*/ true); GridGenerator::hyper_ball(tria); tria.refine_global(4); @@ -40,10 +41,12 @@ int main () Gmsh::create_triangulation_from_boundary_curve(curves[0], tria); - GridOut go; - std::ofstream ofile("output.svg"); - go.write_svg(tria, ofile); - go.write_svg(tria, deallog.get_file_stream()); + // The grid created depends on the OpenCASCADE and Gmsh version used. + // Hence, only check that the resulting mesh is non-empty and the cells + // are not distorted. + AssertThrow(tria.n_cells()>0, ExcInternalError()); + + deallog << "OK" << std::endl; return 0; } diff --git a/tests/gmsh/create_tria_02.with_opencascade=true.output b/tests/gmsh/create_tria_02.with_opencascade=true.output index 679a28ca07..0fd8fc12f0 100644 --- a/tests/gmsh/create_tria_02.with_opencascade=true.output +++ b/tests/gmsh/create_tria_02.with_opencascade=true.output @@ -1,205 +1,2 @@ -<svg width="1400" height="1000" xmlns="http://www.w3.org/2000/svg" version="1.1"> - - -<!-- internal style sheet --> -<style type="text/css"><![CDATA[ - rect.background{fill:white} - rect{fill:none; stroke:rgb(25,25,25); stroke-width:2} - text{font-family:Helvetica; text-anchor:middle; fill:rgb(25,25,25)} - line{stroke:rgb(25,25,25); stroke-width:4} - path{fill:none; stroke:rgb(25,25,25); stroke-width:2} - - path.p0{fill:rgb(0,102,255); stroke:rgb(25,25,25); stroke-width:2} - path.ps0{fill:rgb(0,77,191); stroke:rgb(20,20,20); stroke-width:2} - rect.r0{fill:rgb(0,102,255); stroke:rgb(25,25,25); stroke-width:2} -]]></style> - - <rect class="background" width="1000" height="1000"/> - <!-- cells --> - <path class="p0" d="M 210 286 L 130 298 L 105 353 L 221 373 L 210 286"/> - <text x="167" y="335" style="font-size:15px">0,0</text> - <line x1="130" y1="298" x2="105" y2="353"/> - <path class="p0" d="M 292 278 L 210 286 L 221 373 L 336 392 L 292 278"/> - <text x="265" y="340" style="font-size:15px">0,1</text> - <path class="p0" d="M 248 163 L 202 202 L 210 286 L 292 278 L 248 163"/> - <text x="238" y="240" style="font-size:15px">0,2</text> - <line x1="248" y1="163" x2="202" y2="202"/> - <path class="p0" d="M 202 202 L 163 248 L 130 298 L 210 286 L 202 202"/> - <text x="176" y="266" style="font-size:15px">0,3</text> - <line x1="163" y1="248" x2="130" y2="298"/> - <line x1="202" y1="202" x2="163" y2="248"/> - <path class="p0" d="M 471 805 L 563 785 L 597 650 L 473 690 L 471 805"/> - <text x="526" y="740" style="font-size:15px">0,4</text> - <path class="p0" d="M 380 821 L 471 805 L 473 690 L 349 731 L 380 821"/> - <text x="418" y="769" style="font-size:15px">0,5</text> - <path class="p0" d="M 410 911 L 470 920 L 471 805 L 380 821 L 410 911"/> - <text x="433" y="872" style="font-size:15px">0,6</text> - <line x1="410" y1="911" x2="470" y2="920"/> - <path class="p0" d="M 470 920 L 530 920 L 563 785 L 471 805 L 470 920"/> - <text x="509" y="865" style="font-size:15px">0,7</text> - <line x1="470" y1="920" x2="530" y2="920"/> - <path class="p0" d="M 538 412 L 466 521 L 597 650 L 656 506 L 538 412"/> - <text x="564" y="530" style="font-size:16px">0,8</text> - <path class="p0" d="M 609 302 L 538 412 L 656 506 L 715 362 L 609 302"/> - <text x="629" y="403" style="font-size:15px">0,9</text> - <path class="p0" d="M 502 242 L 419 317 L 538 412 L 609 302 L 502 242"/> - <text x="517" y="326" style="font-size:15px">0,10</text> - <path class="p0" d="M 419 317 L 336 392 L 466 521 L 538 412 L 419 317"/> - <text x="440" y="418" style="font-size:15px">0,11</text> - <path class="p0" d="M 378 589 L 473 690 L 597 650 L 466 521 L 378 589"/> - <text x="479" y="620" style="font-size:15px">0,12</text> - <path class="p0" d="M 284 487 L 378 589 L 466 521 L 336 392 L 284 487"/> - <text x="366" y="505" style="font-size:15px">0,13</text> - <path class="p0" d="M 232 581 L 290 656 L 378 589 L 284 487 L 232 581"/> - <text x="296" y="586" style="font-size:15px">0,14</text> - <path class="p0" d="M 290 656 L 349 731 L 473 690 L 378 589 L 290 656"/> - <text x="373" y="674" style="font-size:15px">0,15</text> - <path class="p0" d="M 628 204 L 609 302 L 715 362 L 709 246 L 628 204"/> - <text x="665" y="286" style="font-size:15px">0,16</text> - <path class="p0" d="M 647 105 L 628 204 L 709 246 L 702 130 L 647 105"/> - <text x="671" y="179" style="font-size:15px">0,17</text> - <line x1="647" y1="105" x2="702" y2="130"/> - <path class="p0" d="M 590 89 L 546 165 L 628 204 L 647 105 L 590 89"/> - <text x="603" y="148" style="font-size:15px">0,18</text> - <line x1="590" y1="89" x2="647" y2="105"/> - <path class="p0" d="M 546 165 L 502 242 L 609 302 L 628 204 L 546 165"/> - <text x="571" y="236" style="font-size:15px">0,19</text> - <path class="p0" d="M 227 704 L 163 752 L 202 798 L 275 764 L 227 704"/> - <text x="217" y="762" style="font-size:15px">0,20</text> - <line x1="163" y1="752" x2="202" y2="798"/> - <path class="p0" d="M 290 656 L 227 704 L 275 764 L 349 731 L 290 656"/> - <text x="285" y="721" style="font-size:15px">0,21</text> - <path class="p0" d="M 232 581 L 181 642 L 227 704 L 290 656 L 232 581"/> - <text x="233" y="653" style="font-size:15px">0,22</text> - <path class="p0" d="M 181 642 L 130 702 L 163 752 L 227 704 L 181 642"/> - <text x="175" y="707" style="font-size:15px">0,23</text> - <line x1="130" y1="702" x2="163" y2="752"/> - <path class="p0" d="M 298 130 L 248 163 L 292 278 L 359 224 L 298 130"/> - <text x="299" y="206" style="font-size:15px">0,24</text> - <line x1="298" y1="130" x2="248" y2="163"/> - <path class="p0" d="M 359 224 L 292 278 L 336 392 L 419 317 L 359 224"/> - <text x="351" y="310" style="font-size:15px">0,25</text> - <path class="p0" d="M 427 174 L 359 224 L 419 317 L 502 242 L 427 174"/> - <text x="427" y="247" style="font-size:15px">0,26</text> - <path class="p0" d="M 353 105 L 298 130 L 359 224 L 427 174 L 353 105"/> - <text x="359" y="166" style="font-size:15px">0,27</text> - <line x1="353" y1="105" x2="298" y2="130"/> - <path class="p0" d="M 156 526 L 186 449 L 89 410 L 80 470 L 156 526"/> - <text x="128" y="471" style="font-size:15px">0,28</text> - <line x1="80" y1="470" x2="89" y2="410"/> - <path class="p0" d="M 232 581 L 284 487 L 186 449 L 156 526 L 232 581"/> - <text x="215" y="518" style="font-size:15px">0,29</text> - <path class="p0" d="M 284 487 L 336 392 L 221 373 L 186 449 L 284 487"/> - <text x="257" y="433" style="font-size:15px">0,30</text> - <path class="p0" d="M 186 449 L 221 373 L 105 353 L 89 410 L 186 449"/> - <text x="150" y="404" style="font-size:15px">0,31</text> - <line x1="89" y1="410" x2="105" y2="353"/> - <path class="p0" d="M 858 399 L 818 446 L 920 530 L 920 470 L 858 399"/> - <text x="879" y="469" style="font-size:15px">0,32</text> - <line x1="920" y1="470" x2="920" y2="530"/> - <path class="p0" d="M 895 353 L 858 399 L 920 470 L 911 410 L 895 353"/> - <text x="896" y="416" style="font-size:15px">0,33</text> - <line x1="895" y1="353" x2="911" y2="410"/> - <line x1="911" y1="410" x2="920" y2="470"/> - <path class="p0" d="M 870 298 L 792 330 L 858 399 L 895 353 L 870 298"/> - <text x="854" y="353" style="font-size:15px">0,34</text> - <line x1="870" y1="298" x2="895" y2="353"/> - <path class="p0" d="M 792 330 L 715 362 L 818 446 L 858 399 L 792 330"/> - <text x="796" y="392" style="font-size:15px">0,35</text> - <path class="p0" d="M 774 724 L 870 702 L 895 647 L 746 649 L 774 724"/> - <text x="821" y="688" style="font-size:15px">0,36</text> - <line x1="870" y1="702" x2="895" y2="647"/> - <path class="p0" d="M 675 744 L 774 724 L 746 649 L 597 650 L 675 744"/> - <text x="698" y="699" style="font-size:15px">0,37</text> - <path class="p0" d="M 752 837 L 798 798 L 774 724 L 675 744 L 752 837"/> - <text x="750" y="783" style="font-size:15px">0,38</text> - <line x1="752" y1="837" x2="798" y2="798"/> - <path class="p0" d="M 798 798 L 837 752 L 870 702 L 774 724 L 798 798"/> - <text x="820" y="752" style="font-size:15px">0,39</text> - <line x1="837" y1="752" x2="870" y2="702"/> - <line x1="798" y1="798" x2="837" y2="752"/> - <path class="p0" d="M 181 642 L 129 587 L 105 647 L 130 702 L 181 642"/> - <text x="136" y="652" style="font-size:15px">0,40</text> - <line x1="130" y1="702" x2="105" y2="647"/> - <path class="p0" d="M 232 581 L 156 526 L 129 587 L 181 642 L 232 581"/> - <text x="175" y="591" style="font-size:15px">0,41</text> - <path class="p0" d="M 156 526 L 80 470 L 80 530 L 129 587 L 156 526"/> - <text x="111" y="536" style="font-size:15px">0,42</text> - <line x1="80" y1="470" x2="80" y2="530"/> - <path class="p0" d="M 129 587 L 80 530 L 89 590 L 105 647 L 129 587"/> - <text x="101" y="595" style="font-size:14px">0,43</text> - <line x1="80" y1="530" x2="89" y2="590"/> - <line x1="105" y1="647" x2="89" y2="590"/> - <path class="p0" d="M 752 163 L 702 130 L 709 246 L 774 245 L 752 163"/> - <text x="734" y="204" style="font-size:15px">0,44</text> - <line x1="752" y1="163" x2="702" y2="130"/> - <path class="p0" d="M 774 245 L 709 246 L 715 362 L 792 330 L 774 245"/> - <text x="748" y="304" style="font-size:15px">0,45</text> - <path class="p0" d="M 837 248 L 774 245 L 792 330 L 870 298 L 837 248"/> - <text x="818" y="288" style="font-size:15px">0,46</text> - <line x1="837" y1="248" x2="870" y2="298"/> - <path class="p0" d="M 798 202 L 752 163 L 774 245 L 837 248 L 798 202"/> - <text x="790" y="222" style="font-size:15px">0,47</text> - <line x1="798" y1="202" x2="837" y2="248"/> - <line x1="798" y1="202" x2="752" y2="163"/> - <path class="p0" d="M 590 911 L 633 829 L 563 785 L 530 920 L 590 911"/> - <text x="579" y="869" style="font-size:15px">0,48</text> - <line x1="590" y1="911" x2="530" y2="920"/> - <path class="p0" d="M 647 895 L 702 870 L 633 829 L 590 911 L 647 895"/> - <text x="643" y="884" style="font-size:15px">0,49</text> - <line x1="647" y1="895" x2="590" y2="911"/> - <line x1="647" y1="895" x2="702" y2="870"/> - <path class="p0" d="M 702 870 L 752 837 L 675 744 L 633 829 L 702 870"/> - <text x="690" y="827" style="font-size:15px">0,50</text> - <line x1="702" y1="870" x2="752" y2="837"/> - <path class="p0" d="M 633 829 L 675 744 L 597 650 L 563 785 L 633 829"/> - <text x="617" y="760" style="font-size:15px">0,51</text> - <path class="p0" d="M 410 89 L 353 105 L 427 174 L 478 125 L 410 89"/> - <text x="417" y="131" style="font-size:15px">0,52</text> - <line x1="410" y1="89" x2="353" y2="105"/> - <path class="p0" d="M 478 125 L 427 174 L 502 242 L 546 165 L 478 125"/> - <text x="488" y="184" style="font-size:15px">0,53</text> - <path class="p0" d="M 530 80 L 478 125 L 546 165 L 590 89 L 530 80"/> - <text x="536" y="122" style="font-size:15px">0,54</text> - <line x1="530" y1="80" x2="590" y2="89"/> - <path class="p0" d="M 470 80 L 410 89 L 478 125 L 530 80 L 470 80"/> - <text x="472" y="100" style="font-size:14px">0,55</text> - <line x1="470" y1="80" x2="530" y2="80"/> - <line x1="470" y1="80" x2="410" y2="89"/> - <path class="p0" d="M 410 911 L 380 821 L 313 831 L 353 895 L 410 911"/> - <text x="364" y="872" style="font-size:15px">0,56</text> - <line x1="410" y1="911" x2="353" y2="895"/> - <path class="p0" d="M 380 821 L 349 731 L 275 764 L 313 831 L 380 821"/> - <text x="329" y="794" style="font-size:15px">0,57</text> - <path class="p0" d="M 313 831 L 275 764 L 202 798 L 248 837 L 313 831"/> - <text x="260" y="815" style="font-size:15px">0,58</text> - <line x1="248" y1="837" x2="202" y2="798"/> - <path class="p0" d="M 353 895 L 313 831 L 248 837 L 298 870 L 353 895"/> - <text x="303" y="865" style="font-size:14px">0,59</text> - <line x1="353" y1="895" x2="298" y2="870"/> - <line x1="298" y1="870" x2="248" y2="837"/> - <path class="p0" d="M 818 446 L 784 548 L 911 590 L 920 530 L 818 446"/> - <text x="858" y="536" style="font-size:15px">0,60</text> - <line x1="920" y1="530" x2="911" y2="590"/> - <path class="p0" d="M 715 362 L 656 506 L 784 548 L 818 446 L 715 362"/> - <text x="743" y="473" style="font-size:15px">0,61</text> - <path class="p0" d="M 656 506 L 597 650 L 746 649 L 784 548 L 656 506"/> - <text x="696" y="596" style="font-size:15px">0,62</text> - <path class="p0" d="M 784 548 L 746 649 L 895 647 L 911 590 L 784 548"/> - <text x="834" y="616" style="font-size:15px">0,63</text> - <line x1="911" y1="590" x2="895" y2="647"/> - - <!-- legend --> - <rect x="1000" y="80" width="320" height="165"/> - <text x="1013" y="107" style="text-anchor:start; font-weight:bold; font-size:18px">cell label</text> - <text x="1020" y="134" style="text-anchor:start; font-style:oblique; font-size:18px">level_number,</text> - <text x="1020" y="161" style="text-anchor:start; font-style:oblique; font-size:18px">cell_index</text> - <text x="1000" y="274" style="text-anchor:start; font-size:18px">azimuth: 0°, polar: 0°</text> - - <!-- colorbar --> - <text x="1000" y="356" style="text-anchor:start; font-weight:bold; font-size:18px">level_number</text> - <rect class="r0" x="1000" y="370" width="25" height="550"/> - <text x="1037.50" y="651.000" style="text-anchor:start; font-size:18px; font-weight:bold">0 max min</text> - -</svg> \ No newline at end of file +DEAL::OK diff --git a/tests/gmsh/create_tria_02.with_opencascade=true.output.2 b/tests/gmsh/create_tria_02.with_opencascade=true.output.2 deleted file mode 100644 index a4820a48fc..0000000000 --- a/tests/gmsh/create_tria_02.with_opencascade=true.output.2 +++ /dev/null @@ -1,105 +0,0 @@ - -<svg width="1400" height="1000" xmlns="http://www.w3.org/2000/svg" version="1.1"> - - -<!-- internal style sheet --> -<style type="text/css"><![CDATA[ - rect.background{fill:white} - rect{fill:none; stroke:rgb(25,25,25); stroke-width:2} - text{font-family:Helvetica; text-anchor:middle; fill:rgb(25,25,25)} - line{stroke:rgb(25,25,25); stroke-width:4} - path{fill:none; stroke:rgb(25,25,25); stroke-width:2} - - path.p0{fill:rgb(0,102,255); stroke:rgb(25,25,25); stroke-width:2} - path.ps0{fill:rgb(0,77,191); stroke:rgb(20,20,20); stroke-width:2} - rect.r0{fill:rgb(0,102,255); stroke:rgb(25,25,25); stroke-width:2} -]]></style> - - <rect class="background" width="1000" height="1000"/> - <!-- cells --> - <path class="p0" d="M 281 381 L 263 500 L 447 500 L 450 422 L 281 381"/> - <text x="360" y="470" style="font-size:38px">0,0</text> - <path class="p0" d="M 328 273 L 281 381 L 450 422 L 453 344 L 328 273"/> - <text x="378" y="374" style="font-size:38px">0,1</text> - <path class="p0" d="M 203 203 L 112 339 L 281 381 L 328 273 L 203 203"/> - <text x="231" y="317" style="font-size:36px">0,2</text> - <line x1="203" y1="203" x2="112" y2="339"/> - <path class="p0" d="M 112 339 L 80 500 L 263 500 L 281 381 L 112 339"/> - <text x="184" y="448" style="font-size:37px">0,3</text> - <line x1="112" y1="339" x2="80" y2="500"/> - <path class="p0" d="M 286 621 L 337 730 L 472 662 L 459 581 L 286 621"/> - <text x="388" y="667" style="font-size:38px">0,4</text> - <path class="p0" d="M 263 500 L 286 621 L 459 581 L 447 500 L 263 500"/> - <text x="364" y="570" style="font-size:38px">0,5</text> - <path class="p0" d="M 80 500 L 112 661 L 286 621 L 263 500 L 80 500"/> - <text x="185" y="589" style="font-size:37px">0,6</text> - <line x1="80" y1="500" x2="112" y2="661"/> - <path class="p0" d="M 112 661 L 203 797 L 337 730 L 286 621 L 112 661"/> - <text x="234" y="720" style="font-size:36px">0,7</text> - <line x1="112" y1="661" x2="203" y2="797"/> - <path class="p0" d="M 339 888 L 493 824 L 337 730 L 203 797 L 339 888"/> - <text x="343" y="828" style="font-size:36px">0,8</text> - <line x1="339" y1="888" x2="203" y2="797"/> - <path class="p0" d="M 500 920 L 661 888 L 493 824 L 339 888 L 500 920"/> - <text x="498" y="898" style="font-size:36px">0,9</text> - <line x1="500" y1="920" x2="339" y2="888"/> - <line x1="500" y1="920" x2="661" y2="888"/> - <path class="p0" d="M 661 888 L 797 797 L 634 730 L 493 824 L 661 888"/> - <text x="646" y="828" style="font-size:36px">0,10</text> - <line x1="661" y1="888" x2="797" y2="797"/> - <path class="p0" d="M 493 824 L 634 730 L 472 662 L 337 730 L 493 824"/> - <text x="484" y="755" style="font-size:37px">0,11</text> - <path class="p0" d="M 735 645 L 597 613 L 634 730 L 797 797 L 735 645"/> - <text x="691" y="715" style="font-size:37px">0,12</text> - <path class="p0" d="M 673 494 L 560 497 L 597 613 L 735 645 L 673 494"/> - <text x="641" y="581" style="font-size:38px">0,13</text> - <path class="p0" d="M 560 497 L 447 500 L 459 581 L 597 613 L 560 497"/> - <text x="516" y="567" style="font-size:38px">0,14</text> - <path class="p0" d="M 597 613 L 459 581 L 472 662 L 634 730 L 597 613"/> - <text x="541" y="666" style="font-size:38px">0,15</text> - <path class="p0" d="M 797 203 L 625 273 L 592 385 L 735 348 L 797 203"/> - <text x="687" y="321" style="font-size:37px">0,16</text> - <path class="p0" d="M 625 273 L 453 344 L 450 422 L 592 385 L 625 273"/> - <text x="530" y="375" style="font-size:38px">0,17</text> - <path class="p0" d="M 592 385 L 450 422 L 447 500 L 560 497 L 592 385"/> - <text x="512" y="470" style="font-size:38px">0,18</text> - <path class="p0" d="M 735 348 L 592 385 L 560 497 L 673 494 L 735 348"/> - <text x="640" y="450" style="font-size:38px">0,19</text> - <path class="p0" d="M 661 112 L 488 178 L 625 273 L 797 203 L 661 112"/> - <text x="643" y="210" style="font-size:36px">0,20</text> - <line x1="661" y1="112" x2="797" y2="203"/> - <path class="p0" d="M 500 80 L 339 112 L 488 178 L 661 112 L 500 80"/> - <text x="497" y="138" style="font-size:36px">0,21</text> - <line x1="500" y1="80" x2="661" y2="112"/> - <line x1="500" y1="80" x2="339" y2="112"/> - <path class="p0" d="M 339 112 L 203 203 L 328 273 L 488 178 L 339 112"/> - <text x="340" y="210" style="font-size:36px">0,22</text> - <line x1="339" y1="112" x2="203" y2="203"/> - <path class="p0" d="M 488 178 L 328 273 L 453 344 L 625 273 L 488 178"/> - <text x="473" y="286" style="font-size:37px">0,23</text> - <path class="p0" d="M 826 498 L 735 645 L 797 797 L 888 661 L 826 498"/> - <text x="812" y="668" style="font-size:36px">0,24</text> - <line x1="888" y1="661" x2="797" y2="797"/> - <path class="p0" d="M 888 339 L 826 498 L 888 661 L 920 500 L 888 339"/> - <text x="881" y="518" style="font-size:36px">0,25</text> - <line x1="888" y1="339" x2="920" y2="500"/> - <line x1="920" y1="500" x2="888" y2="661"/> - <path class="p0" d="M 797 203 L 735 348 L 826 498 L 888 339 L 797 203"/> - <text x="812" y="365" style="font-size:36px">0,26</text> - <line x1="797" y1="203" x2="888" y2="339"/> - <path class="p0" d="M 735 348 L 673 494 L 735 645 L 826 498 L 735 348"/> - <text x="742" y="515" style="font-size:37px">0,27</text> - - <!-- legend --> - <rect x="1000" y="80" width="320" height="165"/> - <text x="1013" y="107" style="text-anchor:start; font-weight:bold; font-size:18px">cell label</text> - <text x="1020" y="134" style="text-anchor:start; font-style:oblique; font-size:18px">level_number,</text> - <text x="1020" y="161" style="text-anchor:start; font-style:oblique; font-size:18px">cell_index</text> - <text x="1000" y="274" style="text-anchor:start; font-size:18px">azimuth: 0°, polar: 0°</text> - - <!-- colorbar --> - <text x="1000" y="356" style="text-anchor:start; font-weight:bold; font-size:18px">level_number</text> - <rect class="r0" x="1000" y="370" width="25" height="550"/> - <text x="1037.50" y="651.000" style="text-anchor:start; font-size:18px; font-weight:bold">0 max min</text> - -</svg> \ No newline at end of file