From 712b1cc6354dcd25914c370ad3bc0b070479a693 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 9 Aug 2017 16:58:10 -0500 Subject: [PATCH] Bugfix: Actually delete the right test... --- tests/opencascade/arclength_boundary_01.cc | 57 +++++++++++++ .../opencascade/arclength_boundary_01.output | 39 +++++++++ tests/opencascade/arclength_boundary_02.cc | 79 ------------------- .../opencascade/arclength_boundary_02.output | 48 ----------- 4 files changed, 96 insertions(+), 127 deletions(-) create mode 100644 tests/opencascade/arclength_boundary_01.cc create mode 100644 tests/opencascade/arclength_boundary_01.output delete mode 100644 tests/opencascade/arclength_boundary_02.cc delete mode 100644 tests/opencascade/arclength_boundary_02.output diff --git a/tests/opencascade/arclength_boundary_01.cc b/tests/opencascade/arclength_boundary_01.cc new file mode 100644 index 0000000000..bdcbe98a6c --- /dev/null +++ b/tests/opencascade/arclength_boundary_01.cc @@ -0,0 +1,57 @@ +//----------------------------------------------------------- +// +// Copyright (C) 2014 - 2015 by the deal.II authors +// +// This file is subject to LGPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//----------------------------------------------------------- + +#include "../tests.h" +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +// Create a Triangulation, interpolate its boundary points to a smooth +// BSpline, and use that as an arlength Boundary Descriptor. + +using namespace OpenCASCADE; + +int main () +{ + std::ofstream logfile("output"); + + // Create a bspline passign through the points + std::vector > pts; + pts.push_back(Point<3>(0,0,0)); + pts.push_back(Point<3>(0,1,0)); + pts.push_back(Point<3>(1,1,0)); + pts.push_back(Point<3>(1,0,0)); + + TopoDS_Edge edge = interpolation_curve(pts); + ArclengthProjectionLineManifold<1,3> manifold(edge); + + Triangulation<1,3> tria; + GridGenerator::hyper_cube(tria); + + tria.begin_active()->set_all_manifold_ids(1); + tria.set_manifold(1, manifold); + + tria.refine_global(4); + GridOut gridout; + gridout.write_msh(tria, logfile); + + return 0; +} + diff --git a/tests/opencascade/arclength_boundary_01.output b/tests/opencascade/arclength_boundary_01.output new file mode 100644 index 0000000000..94fa0fec06 --- /dev/null +++ b/tests/opencascade/arclength_boundary_01.output @@ -0,0 +1,39 @@ +$NOD +17 +1 0 0 0 +2 1 0 0 +3 0.5 1.125 0 +4 -0.213053 0.770812 0 +5 1.21305 0.770812 0 +6 -0.209733 0.361552 0 +7 0.090632 1.04613 0 +8 0.909368 1.04613 0 +9 1.20973 0.361552 0 +10 -0.118931 0.172725 0 +11 -0.251438 0.566341 0 +12 -0.0875601 0.936891 0 +13 0.291313 1.106 0 +14 0.708687 1.106 0 +15 1.08756 0.936891 0 +16 1.25144 0.566341 0 +17 1.11893 0.172725 0 +$ENDNOD +$ELM +16 +1 1 0 0 2 1 10 +2 1 0 0 2 10 6 +3 1 0 0 2 6 11 +4 1 0 0 2 11 4 +5 1 0 0 2 4 12 +6 1 0 0 2 12 7 +7 1 0 0 2 7 13 +8 1 0 0 2 13 3 +9 1 0 0 2 3 14 +10 1 0 0 2 14 8 +11 1 0 0 2 8 15 +12 1 0 0 2 15 5 +13 1 0 0 2 5 16 +14 1 0 0 2 16 9 +15 1 0 0 2 9 17 +16 1 0 0 2 17 2 +$ENDELM diff --git a/tests/opencascade/arclength_boundary_02.cc b/tests/opencascade/arclength_boundary_02.cc deleted file mode 100644 index fff211527c..0000000000 --- a/tests/opencascade/arclength_boundary_02.cc +++ /dev/null @@ -1,79 +0,0 @@ -//----------------------------------------------------------- -// -// Copyright (C) 2014 - 2015 by the deal.II authors -// -// This file is subject to LGPL and may not be distributed -// without copyright and license information. Please refer -// to the file deal.II/doc/license.html for the text and -// further information on this license. -//----------------------------------------------------------- - -// Create a Triangulation, interpolate its boundary points to a close -// smooth BSpline, and use that as a Boundary Descriptor. - -#include "../tests.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace OpenCASCADE; - -int main() -{ - std::ofstream logfile("output"); - deallog.attach(logfile); - - // A curve passing through the vertices of the unit square. - std::vector > vertices; - vertices.push_back(Point<3>(0.5,.5-std::sqrt(2.0)/2.0,0)); - vertices.push_back(Point<3>(1,0,0)); - vertices.push_back(Point<3>(1,1,0)); - vertices.push_back(Point<3>(0,1,0)); - vertices.push_back(Point<3>(0,0,0)); - TopoDS_Edge edge = interpolation_curve(vertices, Point<3>(), true); - - // Create a boundary projector. - ArclengthProjectionLineManifold<2,3> boundary_line(edge); - - // The unit square. - Triangulation<2,3> tria; - GridGenerator::hyper_cube(tria); - - // Set the exterior boundary - tria.set_manifold(1, boundary_line); - - // This is here to ignore the points created in the interior of the - // face. - tria.begin()->set_all_manifold_ids(1); - tria.begin()->set_manifold_id(0); - - // We refine twice, and expect the outer points to end up on a - // smooth curve interpolating the square vertices. - tria.refine_global(2); - - - // You can open the generated file with gmsh - GridOut gridout; - gridout.write_msh (tria, logfile); - return 0; -} diff --git a/tests/opencascade/arclength_boundary_02.output b/tests/opencascade/arclength_boundary_02.output deleted file mode 100644 index d736f650bc..0000000000 --- a/tests/opencascade/arclength_boundary_02.output +++ /dev/null @@ -1,48 +0,0 @@ - -$NOD -25 -1 0.00000 0.00000 0.00000 -2 1.00000 0.00000 0.00000 -3 0.00000 1.00000 0.00000 -4 1.00000 1.00000 0.00000 -5 0.506410 -0.207730 0.00000 -6 -0.166677 0.501960 0.00000 -7 1.16638 0.503363 0.00000 -8 0.499605 1.18595 0.00000 -9 0.500715 0.497943 0.00000 -10 0.231188 -0.153665 0.00000 -11 0.782598 -0.172689 0.00000 -12 -0.124206 0.236965 0.00000 -13 -0.131434 0.767789 0.00000 -14 1.12068 0.239092 0.00000 -15 1.13309 0.769132 0.00000 -16 0.230639 1.14264 0.00000 -17 0.768406 1.14135 0.00000 -18 0.503562 0.145107 0.00000 -19 0.500160 0.841948 0.00000 -20 0.167019 0.499952 0.00000 -21 0.833548 0.500653 0.00000 -22 0.202251 0.190066 0.00000 -23 0.801737 0.188217 0.00000 -24 0.200003 0.804773 0.00000 -25 0.800238 0.805043 0.00000 -$ENDNOD -$ELM -16 -1 3 0 0 4 1 10 22 12 -2 3 0 0 4 10 5 18 22 -3 3 0 0 4 12 22 20 6 -4 3 0 0 4 22 18 9 20 -5 3 0 0 4 5 11 23 18 -6 3 0 0 4 11 2 14 23 -7 3 0 0 4 18 23 21 9 -8 3 0 0 4 23 14 7 21 -9 3 0 0 4 6 20 24 13 -10 3 0 0 4 20 9 19 24 -11 3 0 0 4 13 24 16 3 -12 3 0 0 4 24 19 8 16 -13 3 0 0 4 9 21 25 19 -14 3 0 0 4 21 7 15 25 -15 3 0 0 4 19 25 17 8 -16 3 0 0 4 25 15 4 17 -$ENDELM -- 2.39.5