DoFHandler<3> dof_handler (tria);
dof_handler.distribute_dofs (fe);
+
+ unsigned int global_face = 0;
// look at all faces, not only
// active ones
fe_face_values1.reinit (cell, f);
fe_face_values2.reinit (cell->neighbor(f), nn);
- deallog << "Cell " << cell << ", face " << f
- << " << n=" << fe_face_values1.normal_vector(0)
- << " << nx=" << fe_face_values2.normal_vector(0)
- << std::endl;
-
- Assert (fe_face_values1.normal_vector(0) ==
- - fe_face_values2.normal_vector(0),
+ // in order to reduce
+ // output file size, only
+ // write every seventeenth
+ // normal vector. if the
+ // normals differ anyway,
+ // then the assertion below
+ // will catch this, and if
+ // we compute _all_ normals
+ // wrongly, then outputting
+ // some will be ok, I guess
+ if (global_face++ % 17 == 0)
+ deallog << "Cell " << cell << ", face " << f
+ << " n=" << fe_face_values1.normal_vector(0)
+ << std::endl;
+
+ // normal vectors should be
+ // in opposite directions,
+ // so their sum should be
+ // close to zero
+ Assert ((fe_face_values1.normal_vector(0) +
+ fe_face_values2.normal_vector(0)).square()
+ < 1e-20,
ExcInternalError());
}
}
DoFHandler<3> dof_handler (tria);
dof_handler.distribute_dofs (fe);
+ unsigned int global_datum = 0;
+
// look at all faces, not only
// active ones
for (DoFHandler<3>::cell_iterator cell=dof_handler.begin();
for (unsigned int q=0; q<quadrature.n_quadrature_points; ++q)
{
- deallog << " " << fe_face_values1.quadrature_point(q)
- << ", " << fe_face_values1.JxW(q)
- << std::endl;
+ // in order to reduce
+ // output file size,
+ // only write every
+ // 289th datum. if the
+ // values differ
+ // anyway, then the
+ // assertion below will
+ // catch this, and if
+ // we compute _all_
+ // values wrongly, then
+ // outputting some will
+ // be ok, I guess
+ if (global_datum++ % 17*17 == 0)
+ deallog << " " << fe_face_values1.quadrature_point(q)
+ << ", " << fe_face_values1.JxW(q)
+ << std::endl;
- Assert (fe_face_values1.quadrature_point(q) ==
- fe_face_values2.quadrature_point(q),
+ Assert ((fe_face_values1.quadrature_point(q)-
+ fe_face_values2.quadrature_point(q)).square()
+ < 1e-20,
ExcInternalError());
- Assert (fe_face_values1.JxW(q) ==
- fe_face_values2.JxW(q),
+ Assert (std::fabs(fe_face_values1.JxW(q)-
+ fe_face_values2.JxW(q)) < 1e-15,
ExcInternalError());
}
}
for (Triangulation<3>::cell_iterator cell=tria.begin();
cell != tria.end(); ++cell)
{
- deallog << " Cell=" << cell << std::endl;
-
std::set<Triangulation<3>::line_iterator> lines;
for (unsigned int l=0; l<GeometryInfo<3>::lines_per_cell; ++l)
{
Assert (lines.find (cell->line(l)) == lines.end(),
ExcInternalError());
lines.insert (cell->line(l));
- deallog << " line(" << l << ")=" << cell->line(l) << std::endl;
}
}
+ deallog << " ok." << std::endl;
}