From ca6136ad71d124e6ac9d276ee71e980b5b91fcd6 Mon Sep 17 00:00:00 2001 From: heltai Date: Thu, 23 Jan 2014 16:24:11 +0000 Subject: [PATCH] Fixed trivial tests. git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@32288 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/bits/distorted_cells_03.cc | 54 ++++++++++--------- tests/bits/find_cell_2.cc | 2 +- tests/bits/find_cell_2.output | 4 +- tests/bits/find_cell_3.cc | 2 +- tests/bits/find_cell_3.output | 6 +-- tests/bits/find_cell_4.cc | 2 +- ...cell_4.compiler=Intel=false.release.output | 2 +- ..._cell_4.compiler=Intel=true.release.output | 2 +- tests/bits/find_cell_4.debug.output | 2 +- tests/bits/find_cell_alt_2.cc | 2 +- tests/bits/find_cell_alt_2.output | 32 +++++------ tests/bits/find_cell_alt_3.cc | 2 +- tests/bits/find_cell_alt_3.output | 6 +-- 13 files changed, 60 insertions(+), 58 deletions(-) diff --git a/tests/bits/distorted_cells_03.cc b/tests/bits/distorted_cells_03.cc index 0e16552ed8..4d32febe71 100644 --- a/tests/bits/distorted_cells_03.cc +++ b/tests/bits/distorted_cells_03.cc @@ -40,35 +40,37 @@ template -class MyBoundary : public Boundary +class MyBoundary : public Manifold { virtual Point - get_new_point_on_line (const typename Triangulation::line_iterator &line) const + get_new_point (const std::vector > &v, + const std::vector &ws) const { - deallog << "Finding point between " - << line->vertex(0) << " and " - << line->vertex(1) << std::endl; - - // in 2d, find a point that - // lies on the opposite side - // of the quad. in 3d, choose - // the midpoint of the edge - if (dim == 2) - return Point(0,0.75); - else - return (line->vertex(0) + line->vertex(1)) / 2; - } - - virtual Point - get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const - { - deallog << "Finding point between " - << quad->vertex(0) << " and " - << quad->vertex(1) << " and " - << quad->vertex(2) << " and " - << quad->vertex(3) << std::endl; - - return Point(0,0,.75); + switch(v.size()) { + case 2: + deallog << "Finding point between " + << v[0] << " and " + << v[1] << std::endl; + + // in 2d, find a point that + // lies on the opposite side + // of the quad. in 3d, choose + // the midpoint of the edge + if (dim == 2) + return Point(0,0.75); + else + return (v[0] + v[1]) / 2; + break; + default: + deallog << "Finding point between " + << v[0] << " and " + << v[1] << " and " + << v[2] << " and " + << v[3] << std::endl; + + return Point(0,0,.75); + break; + } } }; diff --git a/tests/bits/find_cell_2.cc b/tests/bits/find_cell_2.cc index 612e8bd8f5..601001c239 100644 --- a/tests/bits/find_cell_2.cc +++ b/tests/bits/find_cell_2.cc @@ -41,7 +41,7 @@ void check (Triangulation<3> &tria) deallog << cell << std::endl; for (unsigned int v=0; v::vertices_per_cell; ++v) - deallog << "<" << cell->vertex(v) << "> "; + deallog << "< " << cell->vertex(v) << " > "; deallog << std::endl; Assert (p.distance (cell->center()) < cell->diameter()/2, diff --git a/tests/bits/find_cell_2.output b/tests/bits/find_cell_2.output index 2cd0564b41..daa34f13c0 100644 --- a/tests/bits/find_cell_2.output +++ b/tests/bits/find_cell_2.output @@ -1,5 +1,5 @@ DEAL::2.3 -DEAL::<0.250000 0.250000 0.00000> <0.500000 0.250000 0.00000> <0.250000 0.500000 0.00000> <0.500000 0.500000 0.00000> <0.250000 0.250000 0.250000> <0.500000 0.250000 0.250000> <0.250000 0.500000 0.250000> <0.500000 0.500000 0.250000> +DEAL::< 0.250000 0.250000 0.00000 > < 0.500000 0.250000 0.00000 > < 0.250000 0.500000 0.00000 > < 0.500000 0.500000 0.00000 > < 0.250000 0.250000 0.250000 > < 0.500000 0.250000 0.250000 > < 0.250000 0.500000 0.250000 > < 0.500000 0.500000 0.250000 > DEAL::2.435 -DEAL::<0.286905 0.658777 4.33681e-19> <0.209333 0.437629 8.67362e-19> <0.562887 0.562887 8.67362e-19> <0.418667 0.418667 1.73472e-18> <0.269808 0.604598 0.269808> <0.203251 0.422066 0.203251> <0.530301 0.530301 0.245590> <0.406502 0.406502 0.197169> +DEAL::< 0.286905 0.658777 4.33681e-19 > < 0.209333 0.437629 8.67362e-19 > < 0.562887 0.562887 8.67362e-19 > < 0.418667 0.418667 1.73472e-18 > < 0.269808 0.604598 0.269808 > < 0.203251 0.422066 0.203251 > < 0.530301 0.530301 0.245590 > < 0.406502 0.406502 0.197169 > diff --git a/tests/bits/find_cell_3.cc b/tests/bits/find_cell_3.cc index d2d7551303..f9b4a23bd7 100644 --- a/tests/bits/find_cell_3.cc +++ b/tests/bits/find_cell_3.cc @@ -41,7 +41,7 @@ void check (Triangulation<3> &tria) deallog << cell << std::endl; for (unsigned int v=0; v::vertices_per_cell; ++v) - deallog << "<" << cell->vertex(v) << "> "; + deallog << "< " << cell->vertex(v) << " > "; deallog << std::endl; Assert (p.distance (cell->center()) < cell->diameter()/2, diff --git a/tests/bits/find_cell_3.output b/tests/bits/find_cell_3.output index 32e2345e21..cb809c7377 100644 --- a/tests/bits/find_cell_3.output +++ b/tests/bits/find_cell_3.output @@ -1,7 +1,7 @@ DEAL::1.0 -DEAL::<0.00000 0.00000 0.00000> <0.500000 0.00000 0.00000> <0.00000 0.00000 -0.500000> <0.500000 0.00000 -0.500000> <0.00000 0.500000 0.00000> <0.500000 0.500000 0.00000> <0.00000 0.500000 -0.500000> <0.500000 0.500000 -0.500000> +DEAL::< 0.00000 0.00000 0.00000 > < 0.500000 0.00000 0.00000 > < 0.00000 0.00000 -0.500000 > < 0.500000 0.00000 -0.500000 > < 0.00000 0.500000 0.00000 > < 0.500000 0.500000 0.00000 > < 0.00000 0.500000 -0.500000 > < 0.500000 0.500000 -0.500000 > DEAL::1.16 -DEAL::<0.00000 0.00000 0.00000> <0.500000 0.00000 0.00000> <0.00000 0.00000 -0.500000> <0.500000 0.00000 -0.500000> <0.00000 0.500000 0.00000> <0.500000 0.500000 0.00000> <0.00000 0.500000 -0.500000> <0.500000 0.500000 -0.500000> +DEAL::< 0.00000 0.00000 0.00000 > < 0.500000 0.00000 0.00000 > < 0.00000 0.00000 -0.500000 > < 0.500000 0.00000 -0.500000 > < 0.00000 0.500000 0.00000 > < 0.500000 0.500000 0.00000 > < 0.00000 0.500000 -0.500000 > < 0.500000 0.500000 -0.500000 > DEAL::1.50 -DEAL::<0.00000 0.577350 -0.577350> <1.73472e-18 0.394338 -0.394338> <0.577350 0.577350 -0.577350> <0.394338 0.394338 -0.394338> <0.00000 0.577350 0.00000> <1.44560e-19 0.394338 0.00000> <0.577350 0.577350 0.00000> <0.394338 0.394338 1.73472e-18> +DEAL::< 0.00000 0.577350 -0.577350 > < 1.73472e-18 0.394338 -0.394338 > < 0.577350 0.577350 -0.577350 > < 0.394338 0.394338 -0.394338 > < 0.00000 0.577350 0.00000 > < 1.44560e-19 0.394338 0.00000 > < 0.577350 0.577350 0.00000 > < 0.394338 0.394338 1.73472e-18 > diff --git a/tests/bits/find_cell_4.cc b/tests/bits/find_cell_4.cc index ebf68899f7..fc826fcbe9 100644 --- a/tests/bits/find_cell_4.cc +++ b/tests/bits/find_cell_4.cc @@ -42,7 +42,7 @@ void check (Triangulation<3> &tria) deallog << cell << std::endl; for (unsigned int v=0; v::vertices_per_cell; ++v) - deallog << "<" << cell->vertex(v) << "> "; + deallog << "< " << cell->vertex(v) << " > "; deallog << std::endl; // Transform back and forth diff --git a/tests/bits/find_cell_4.compiler=Intel=false.release.output b/tests/bits/find_cell_4.compiler=Intel=false.release.output index 7bdc5e949d..02138e3239 100644 --- a/tests/bits/find_cell_4.compiler=Intel=false.release.output +++ b/tests/bits/find_cell_4.compiler=Intel=false.release.output @@ -1,3 +1,3 @@ DEAL::3.72 -DEAL::<0.750000 0.00000 0.00000> <0.875000 0.00000 0.00000> <0.750000 0.125000 0.00000> <0.875000 0.125000 0.00000> <0.750000 0.00000 0.125000> <0.875000 0.00000 0.125000> <0.750000 0.125000 0.125000> <0.875000 0.125000 0.125000> +DEAL::< 0.750000 0.00000 0.00000 > < 0.875000 0.00000 0.00000 > < 0.750000 0.125000 0.00000 > < 0.875000 0.125000 0.00000 > < 0.750000 0.00000 0.125000 > < 0.875000 0.00000 0.125000 > < 0.750000 0.125000 0.125000 > < 0.875000 0.125000 0.125000 > diff --git a/tests/bits/find_cell_4.compiler=Intel=true.release.output b/tests/bits/find_cell_4.compiler=Intel=true.release.output index c6432b503a..52539b98c8 100644 --- a/tests/bits/find_cell_4.compiler=Intel=true.release.output +++ b/tests/bits/find_cell_4.compiler=Intel=true.release.output @@ -1,3 +1,3 @@ DEAL::3.65 -DEAL::<0.625000 0.00000 0.00000> <0.750000 0.00000 0.00000> <0.625000 0.125000 0.00000> <0.750000 0.125000 0.00000> <0.625000 0.00000 0.125000> <0.750000 0.00000 0.125000> <0.625000 0.125000 0.125000> <0.750000 0.125000 0.125000> +DEAL::< 0.625000 0.00000 0.00000 > < 0.750000 0.00000 0.00000 > < 0.625000 0.125000 0.00000 > < 0.750000 0.125000 0.00000 > < 0.625000 0.00000 0.125000 > < 0.750000 0.00000 0.125000 > < 0.625000 0.125000 0.125000 > < 0.750000 0.125000 0.125000 > diff --git a/tests/bits/find_cell_4.debug.output b/tests/bits/find_cell_4.debug.output index 7bdc5e949d..02138e3239 100644 --- a/tests/bits/find_cell_4.debug.output +++ b/tests/bits/find_cell_4.debug.output @@ -1,3 +1,3 @@ DEAL::3.72 -DEAL::<0.750000 0.00000 0.00000> <0.875000 0.00000 0.00000> <0.750000 0.125000 0.00000> <0.875000 0.125000 0.00000> <0.750000 0.00000 0.125000> <0.875000 0.00000 0.125000> <0.750000 0.125000 0.125000> <0.875000 0.125000 0.125000> +DEAL::< 0.750000 0.00000 0.00000 > < 0.875000 0.00000 0.00000 > < 0.750000 0.125000 0.00000 > < 0.875000 0.125000 0.00000 > < 0.750000 0.00000 0.125000 > < 0.875000 0.00000 0.125000 > < 0.750000 0.125000 0.125000 > < 0.875000 0.125000 0.125000 > diff --git a/tests/bits/find_cell_alt_2.cc b/tests/bits/find_cell_alt_2.cc index bd23f66979..96562d9de2 100644 --- a/tests/bits/find_cell_alt_2.cc +++ b/tests/bits/find_cell_alt_2.cc @@ -45,7 +45,7 @@ void check (Triangulation<3> &tria) deallog << cell.first << std::endl; for (unsigned int v=0; v::vertices_per_cell; ++v) - deallog << "<" << cell.first->vertex(v) << "> "<< std::endl; + deallog << "< " << cell.first->vertex(v) << " > "<< std::endl; deallog << "[ " << cell.second << "] "; deallog << std::endl << std::endl; diff --git a/tests/bits/find_cell_alt_2.output b/tests/bits/find_cell_alt_2.output index e5e204bb78..2bfa6db789 100644 --- a/tests/bits/find_cell_alt_2.output +++ b/tests/bits/find_cell_alt_2.output @@ -1,23 +1,23 @@ DEAL::2.3 -DEAL::<0.250000 0.250000 0.00000> -DEAL::<0.500000 0.250000 0.00000> -DEAL::<0.250000 0.500000 0.00000> -DEAL::<0.500000 0.500000 0.00000> -DEAL::<0.250000 0.250000 0.250000> -DEAL::<0.500000 0.250000 0.250000> -DEAL::<0.250000 0.500000 0.250000> -DEAL::<0.500000 0.500000 0.250000> +DEAL::< 0.250000 0.250000 0.00000 > +DEAL::< 0.500000 0.250000 0.00000 > +DEAL::< 0.250000 0.500000 0.00000 > +DEAL::< 0.500000 0.500000 0.00000 > +DEAL::< 0.250000 0.250000 0.250000 > +DEAL::< 0.500000 0.250000 0.250000 > +DEAL::< 0.250000 0.500000 0.250000 > +DEAL::< 0.500000 0.500000 0.250000 > DEAL::[ 0.333333 1.00000 0.800000] DEAL:: DEAL::2.435 -DEAL::<0.286905 0.658777 4.33681e-19> -DEAL::<0.209333 0.437629 8.67362e-19> -DEAL::<0.562887 0.562887 8.67362e-19> -DEAL::<0.418667 0.418667 1.73472e-18> -DEAL::<0.269808 0.604598 0.269808> -DEAL::<0.203251 0.422066 0.203251> -DEAL::<0.530301 0.530301 0.245590> -DEAL::<0.406502 0.406502 0.197169> +DEAL::< 0.286905 0.658777 4.33681e-19 > +DEAL::< 0.209333 0.437629 8.67362e-19 > +DEAL::< 0.562887 0.562887 8.67362e-19 > +DEAL::< 0.418667 0.418667 1.73472e-18 > +DEAL::< 0.269808 0.604598 0.269808 > +DEAL::< 0.203251 0.422066 0.203251 > +DEAL::< 0.530301 0.530301 0.245590 > +DEAL::< 0.406502 0.406502 0.197169 > DEAL::[ 0.494208 0.406025 0.866848] DEAL:: diff --git a/tests/bits/find_cell_alt_3.cc b/tests/bits/find_cell_alt_3.cc index bd0d261a79..06463881ef 100644 --- a/tests/bits/find_cell_alt_3.cc +++ b/tests/bits/find_cell_alt_3.cc @@ -45,7 +45,7 @@ void check (Triangulation<3> &tria) deallog << cell.first << std::endl; for (unsigned int v=0; v::vertices_per_cell; ++v) - deallog << "<" << cell.first->vertex(v) << "> "; + deallog << "< " << cell.first->vertex(v) << " > "; deallog << "[ " << cell.second << "] "; deallog << std::endl; diff --git a/tests/bits/find_cell_alt_3.output b/tests/bits/find_cell_alt_3.output index 0c1fe08bab..a66f43f36c 100644 --- a/tests/bits/find_cell_alt_3.output +++ b/tests/bits/find_cell_alt_3.output @@ -1,7 +1,7 @@ DEAL::1.0 -DEAL::<0.00000 0.00000 0.00000> <0.500000 0.00000 0.00000> <0.00000 0.00000 -0.500000> <0.500000 0.00000 -0.500000> <0.00000 0.500000 0.00000> <0.500000 0.500000 0.00000> <0.00000 0.500000 -0.500000> <0.500000 0.500000 -0.500000> [ 0.666667 0.400000 1.00000] +DEAL::< 0.00000 0.00000 0.00000 > < 0.500000 0.00000 0.00000 > < 0.00000 0.00000 -0.500000 > < 0.500000 0.00000 -0.500000 > < 0.00000 0.500000 0.00000 > < 0.500000 0.500000 0.00000 > < 0.00000 0.500000 -0.500000 > < 0.500000 0.500000 -0.500000 > [ 0.666667 0.400000 1.00000] DEAL::1.16 -DEAL::<0.00000 0.00000 0.00000> <0.500000 0.00000 0.00000> <0.00000 0.00000 -0.500000> <0.500000 0.00000 -0.500000> <0.00000 0.500000 0.00000> <0.500000 0.500000 0.00000> <0.00000 0.500000 -0.500000> <0.500000 0.500000 -0.500000> [ 0.666667 0.400000 1.00000] +DEAL::< 0.00000 0.00000 0.00000 > < 0.500000 0.00000 0.00000 > < 0.00000 0.00000 -0.500000 > < 0.500000 0.00000 -0.500000 > < 0.00000 0.500000 0.00000 > < 0.500000 0.500000 0.00000 > < 0.00000 0.500000 -0.500000 > < 0.500000 0.500000 -0.500000 > [ 0.666667 0.400000 1.00000] DEAL::1.50 -DEAL::<0.00000 0.577350 -0.577350> <1.73472e-18 0.394338 -0.394338> <0.577350 0.577350 -0.577350> <0.394338 0.394338 -0.394338> <0.00000 0.577350 0.00000> <1.44560e-19 0.394338 0.00000> <0.577350 0.577350 0.00000> <0.394338 0.394338 1.73472e-18> [ 0.422650 0.666667 0.600000] +DEAL::< 0.00000 0.577350 -0.577350 > < 1.73472e-18 0.394338 -0.394338 > < 0.577350 0.577350 -0.577350 > < 0.394338 0.394338 -0.394338 > < 0.00000 0.577350 0.00000 > < 1.44560e-19 0.394338 0.00000 > < 0.577350 0.577350 0.00000 > < 0.394338 0.394338 1.73472e-18 > [ 0.422650 0.666667 0.600000] -- 2.39.5