// $Id$
// Version: $Name$
//
-// Copyright (C) 2003, 2004, 2005 by the deal.II authors
+// Copyright (C) 2003, 2004, 2005, 2006 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
//---------------------------- geometry_info_2.cc ---------------------------
-// output most all static members of GeometryInfo
+// output all integer values and functions of GeometryInfo
#include "../tests.h"
#include <base/logstream.h>
template <int dim>
void test ()
{
- deallog << GeometryInfo<dim>::children_per_cell << std::endl;
- deallog << GeometryInfo<dim>::faces_per_cell << std::endl;
- deallog << GeometryInfo<dim>::subfaces_per_face << std::endl;
- deallog << GeometryInfo<dim>::vertices_per_cell << std::endl;
-
- deallog << GeometryInfo<dim>::vertices_per_face << std::endl;
- deallog << GeometryInfo<dim>::lines_per_face << std::endl;
- deallog << GeometryInfo<dim>::quads_per_face << std::endl;
+ deallog << "children_per_cell "
+ << GeometryInfo<dim>::children_per_cell << std::endl;
+ deallog << "faces_per_cell "
+ << GeometryInfo<dim>::faces_per_cell << std::endl;
+ deallog << "subfaces_per_cell "
+ << GeometryInfo<dim>::subfaces_per_face << std::endl;
+ deallog << "vertices_per_cell "
+ <<GeometryInfo<dim>::vertices_per_cell << std::endl;
+ deallog << "lines_per_cell "
+ << GeometryInfo<dim>::lines_per_cell << std::endl;
+ deallog << "quads_per_cell "
+ << GeometryInfo<dim>::quads_per_cell << std::endl;
+ deallog << "hexes_per_cell "
+ << GeometryInfo<dim>::hexes_per_cell << std::endl;
+
+ deallog << "vertices_per_face "
+ << GeometryInfo<dim>::vertices_per_face << std::endl;
+ deallog << "lines_per_face "
+ << GeometryInfo<dim>::lines_per_face << std::endl;
+ deallog << "quads_per_face "
+ << GeometryInfo<dim>::quads_per_face << std::endl;
+
+ for (unsigned int f=0;f<GeometryInfo<dim>::faces_per_cell;++f)
+ deallog << "face normal" << f << ' '
+ << (GeometryInfo<dim>::unit_normal_orientation[f] > 0.
+ ? '+' : '-')
+ << "x" << GeometryInfo<dim>::unit_normal_direction[f]
+ << std::endl;
+
+ for (unsigned int f=0;f<GeometryInfo<dim>::faces_per_cell;++f)
+ {
+ deallog << "face_children" << f << "[true ]";
+ for (unsigned int v=0;v < GeometryInfo<dim>::subfaces_per_face;++v)
+ deallog << ' '
+ << GeometryInfo<dim>::child_cell_on_face(f, v, true);
+ deallog << std::endl;
+ deallog << "face_children" << f << "[false]";
+ for (unsigned int v=0;v < GeometryInfo<dim>::subfaces_per_face;++v)
+ deallog << ' '
+ << GeometryInfo<dim>::child_cell_on_face(f, v, false);
+ deallog << std::endl;
+ }
- deallog << GeometryInfo<dim>::lines_per_cell << std::endl;
- deallog << GeometryInfo<dim>::quads_per_cell << std::endl;
- deallog << GeometryInfo<dim>::hexes_per_cell << std::endl;
+ for (unsigned int f=0;f<GeometryInfo<dim>::faces_per_cell;++f)
+ {
+ deallog << "face_vertices" << f << "[true ]";
+ for (unsigned int v=0;v < GeometryInfo<dim>::vertices_per_face;++v)
+ deallog << ' '
+ << GeometryInfo<dim>::face_to_cell_vertices(f, v, true);
+ deallog << std::endl;
+ deallog << "face_vertices" << f << "[false]";
+ for (unsigned int v=0;v < GeometryInfo<dim>::vertices_per_face;++v)
+ deallog << ' '
+ << GeometryInfo<dim>::face_to_cell_vertices(f, v, false);
+ deallog << std::endl;
+ }
+
+ for (unsigned int f=0;f<GeometryInfo<dim>::faces_per_cell;++f)
+ {
+ deallog << "face_lines" << f << "[true ]";
+ for (unsigned int v=1;v <= GeometryInfo<dim>::lines_per_face;++v)
+ deallog << ' '
+ << GeometryInfo<dim>::face_to_cell_lines(f, v-1, true);
+ deallog << std::endl;
+ deallog << "face_lines" << f << "[false]";
+ for (unsigned int v=1;v <= GeometryInfo<dim>::lines_per_face;++v)
+ deallog << ' '
+ << GeometryInfo<dim>::face_to_cell_lines(f, v-1, false);
+ deallog << std::endl;
+ }
+
+ for (unsigned int f=0;f<GeometryInfo<dim>::lines_per_cell;++f)
+ {
+ deallog << "line_vertices" << f;
+ for (unsigned int v=0;v < GeometryInfo<1>::vertices_per_cell;++v)
+ deallog << ' '
+ << GeometryInfo<dim>::line_to_cell_vertices(f, v);
+ deallog << std::endl;
+ }
}
deallog.depth_console(0);
deallog.threshold_double(1.e-10);
+ deallog.push("1d");
test<1> ();
+ deallog.pop();
+ deallog.push("2d");
test<2> ();
+ deallog.pop();
+ deallog.push("3d");
test<3> ();
-
+ deallog.pop();
return 0;
}
-DEAL::2
-DEAL::2
-DEAL::1
-DEAL::2
-DEAL::1
-DEAL::0
-DEAL::0
-DEAL::1
-DEAL::0
-DEAL::0
-DEAL::4
-DEAL::4
-DEAL::2
-DEAL::4
-DEAL::2
-DEAL::1
-DEAL::0
-DEAL::4
-DEAL::1
-DEAL::0
-DEAL::8
-DEAL::6
-DEAL::4
-DEAL::8
-DEAL::4
-DEAL::4
-DEAL::1
-DEAL::12
-DEAL::6
-DEAL::1
+DEAL:1d::children_per_cell 2
+DEAL:1d::faces_per_cell 2
+DEAL:1d::subfaces_per_cell 1
+DEAL:1d::vertices_per_cell 2
+DEAL:1d::lines_per_cell 1
+DEAL:1d::quads_per_cell 0
+DEAL:1d::hexes_per_cell 0
+DEAL:1d::vertices_per_face 1
+DEAL:1d::lines_per_face 0
+DEAL:1d::quads_per_face 0
+DEAL:1d::face normal0 -x0
+DEAL:1d::face normal1 +x0
+DEAL:1d::face_children0[true ] 0
+DEAL:1d::face_children0[false] 0
+DEAL:1d::face_children1[true ] 1
+DEAL:1d::face_children1[false] 1
+DEAL:1d::face_vertices0[true ] 0
+DEAL:1d::face_vertices0[false] 0
+DEAL:1d::face_vertices1[true ] 1
+DEAL:1d::face_vertices1[false] 1
+DEAL:1d::face_lines0[true ]
+DEAL:1d::face_lines0[false]
+DEAL:1d::face_lines1[true ]
+DEAL:1d::face_lines1[false]
+DEAL:1d::line_vertices0 0 1
+DEAL:2d::children_per_cell 4
+DEAL:2d::faces_per_cell 4
+DEAL:2d::subfaces_per_cell 2
+DEAL:2d::vertices_per_cell 4
+DEAL:2d::lines_per_cell 4
+DEAL:2d::quads_per_cell 1
+DEAL:2d::hexes_per_cell 0
+DEAL:2d::vertices_per_face 2
+DEAL:2d::lines_per_face 1
+DEAL:2d::quads_per_face 0
+DEAL:2d::face normal0 -x0
+DEAL:2d::face normal1 +x0
+DEAL:2d::face normal2 -x1
+DEAL:2d::face normal3 +x1
+DEAL:2d::face_children0[true ] 0 2
+DEAL:2d::face_children0[false] 0 2
+DEAL:2d::face_children1[true ] 1 3
+DEAL:2d::face_children1[false] 1 3
+DEAL:2d::face_children2[true ] 0 1
+DEAL:2d::face_children2[false] 0 1
+DEAL:2d::face_children3[true ] 2 3
+DEAL:2d::face_children3[false] 2 3
+DEAL:2d::face_vertices0[true ] 0 2
+DEAL:2d::face_vertices0[false] 0 2
+DEAL:2d::face_vertices1[true ] 1 3
+DEAL:2d::face_vertices1[false] 1 3
+DEAL:2d::face_vertices2[true ] 0 1
+DEAL:2d::face_vertices2[false] 0 1
+DEAL:2d::face_vertices3[true ] 2 3
+DEAL:2d::face_vertices3[false] 2 3
+DEAL:2d::face_lines0[true ] 0
+DEAL:2d::face_lines0[false] 0
+DEAL:2d::face_lines1[true ] 1
+DEAL:2d::face_lines1[false] 1
+DEAL:2d::face_lines2[true ] 2
+DEAL:2d::face_lines2[false] 2
+DEAL:2d::face_lines3[true ] 3
+DEAL:2d::face_lines3[false] 3
+DEAL:2d::line_vertices0 0 2
+DEAL:2d::line_vertices1 1 3
+DEAL:2d::line_vertices2 0 1
+DEAL:2d::line_vertices3 2 3
+DEAL:3d::children_per_cell 8
+DEAL:3d::faces_per_cell 6
+DEAL:3d::subfaces_per_cell 4
+DEAL:3d::vertices_per_cell 8
+DEAL:3d::lines_per_cell 12
+DEAL:3d::quads_per_cell 6
+DEAL:3d::hexes_per_cell 1
+DEAL:3d::vertices_per_face 4
+DEAL:3d::lines_per_face 4
+DEAL:3d::quads_per_face 1
+DEAL:3d::face normal0 -x0
+DEAL:3d::face normal1 +x0
+DEAL:3d::face normal2 -x1
+DEAL:3d::face normal3 +x1
+DEAL:3d::face normal4 -x2
+DEAL:3d::face normal5 +x2
+DEAL:3d::face_children0[true ] 0 2 4 6
+DEAL:3d::face_children0[false] 0 4 2 6
+DEAL:3d::face_children1[true ] 1 3 5 7
+DEAL:3d::face_children1[false] 1 5 3 7
+DEAL:3d::face_children2[true ] 0 4 1 5
+DEAL:3d::face_children2[false] 0 1 4 5
+DEAL:3d::face_children3[true ] 2 6 3 7
+DEAL:3d::face_children3[false] 2 3 6 7
+DEAL:3d::face_children4[true ] 0 1 2 3
+DEAL:3d::face_children4[false] 0 2 1 3
+DEAL:3d::face_children5[true ] 4 5 6 7
+DEAL:3d::face_children5[false] 4 6 5 7
+DEAL:3d::face_vertices0[true ] 0 2 4 6
+DEAL:3d::face_vertices0[false] 0 4 2 6
+DEAL:3d::face_vertices1[true ] 1 3 5 7
+DEAL:3d::face_vertices1[false] 1 5 3 7
+DEAL:3d::face_vertices2[true ] 0 4 1 5
+DEAL:3d::face_vertices2[false] 0 1 4 5
+DEAL:3d::face_vertices3[true ] 2 6 3 7
+DEAL:3d::face_vertices3[false] 2 3 6 7
+DEAL:3d::face_vertices4[true ] 0 1 2 3
+DEAL:3d::face_vertices4[false] 0 2 1 3
+DEAL:3d::face_vertices5[true ] 4 5 6 7
+DEAL:3d::face_vertices5[false] 4 6 5 7
+DEAL:3d::face_lines0[true ] 8 10 0 4
+DEAL:3d::face_lines0[false] 0 4 8 10
+DEAL:3d::face_lines1[true ] 9 11 1 5
+DEAL:3d::face_lines1[false] 1 5 9 11
+DEAL:3d::face_lines2[true ] 2 6 8 9
+DEAL:3d::face_lines2[false] 8 9 2 6
+DEAL:3d::face_lines3[true ] 3 7 10 11
+DEAL:3d::face_lines3[false] 10 11 3 7
+DEAL:3d::face_lines4[true ] 0 1 2 3
+DEAL:3d::face_lines4[false] 2 3 0 1
+DEAL:3d::face_lines5[true ] 4 5 6 7
+DEAL:3d::face_lines5[false] 6 7 4 5
+DEAL:3d::line_vertices0 0 2
+DEAL:3d::line_vertices1 1 3
+DEAL:3d::line_vertices2 0 1
+DEAL:3d::line_vertices3 2 3
+DEAL:3d::line_vertices4 4 6
+DEAL:3d::line_vertices5 5 7
+DEAL:3d::line_vertices6 4 5
+DEAL:3d::line_vertices7 6 7
+DEAL:3d::line_vertices8 0 4
+DEAL:3d::line_vertices9 1 5
+DEAL:3d::line_vertices10 2 6
+DEAL:3d::line_vertices11 3 7