From 2575ad7eea80d646c0a280fb40cdb6706d3027a9 Mon Sep 17 00:00:00 2001 From: kanschat Date: Tue, 23 Oct 2007 15:19:09 +0000 Subject: [PATCH] add testing of face values git-svn-id: https://svn.dealii.org/trunk@15373 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/benchmarks/dof_handler_timing.cc | 52 +++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/tests/benchmarks/dof_handler_timing.cc b/tests/benchmarks/dof_handler_timing.cc index e099c5fdb7..4b2ee4fb82 100644 --- a/tests/benchmarks/dof_handler_timing.cc +++ b/tests/benchmarks/dof_handler_timing.cc @@ -66,15 +66,46 @@ void fevalues (const DoFHandler& dof, } +template +void fefacevalues (const DoFHandler& dof, + UpdateFlags updates) +{ + typedef typename DoFHandler::active_cell_iterator I; + const I end = dof.end(); + + QGauss quadrature(5); + MappingQ1 mapping; + FEFaceValues fe(mapping, dof.get_fe(), quadrature, updates); + + for (I i=dof.begin_active(); i!=end;++i) + for (unsigned int f=0;f::faces_per_cell;++f) + fe.reinit(i, f); +} + + template void check_mapping (const DoFHandler& dof) { + deallog.push("cell"); fevalues(dof, update_q_points); deallog << "qpoints" << std::endl; fevalues(dof, update_JxW_values); deallog << "JxW" << std::endl; fevalues(dof, update_q_points | update_JxW_values); - deallog << "qpoints|JxW" << std::endl; + deallog << "qpoints|JxW" << std::endl; + deallog.pop(); + + deallog.push("face"); + fefacevalues(dof, update_quadrature_points); + deallog << "qpoints" << std::endl; + fefacevalues(dof, update_JxW_values); + deallog << "JxW" << std::endl; + fefacevalues(dof, update_normal_vectors); + deallog << "normals" << std::endl; + fefacevalues(dof, update_q_points | update_JxW_values | update_normal_vectors); + deallog << "qpoints|JxW|normals" << std::endl; + deallog.pop(); + } @@ -83,8 +114,11 @@ void check_values (const DoFHandler& dof) { indices(dof, 100); deallog << "Index*100" << std::endl; + deallog.push("cell"); fevalues(dof, update_values); deallog << "values" << std::endl; + fevalues(dof, update_gradients); + deallog << "gradients" << std::endl; fevalues(dof, update_values | update_JxW_values); deallog << "values|JxW" << std::endl; fevalues(dof, update_values | update_gradients @@ -93,6 +127,22 @@ void check_values (const DoFHandler& dof) // fevalues(dof, update_values | update_gradients | update_second_derivatives // | update_q_points | update_JxW_values); // deallog << "values|gradients|2nds|qpoints|JxW" << std::endl; + deallog.pop(); + + deallog.push("face"); + fefacevalues(dof, update_values); + deallog << "values" << std::endl; + fefacevalues(dof, update_gradients); + deallog << "gradients" << std::endl; + fefacevalues(dof, update_values | update_JxW_values); + deallog << "values|JxW" << std::endl; + fefacevalues(dof, update_values | update_gradients + | update_q_points | update_JxW_values | update_normal_vectors); + deallog << "values|gradients|qpoints|JxW|normals" << std::endl; +// fefacevalues(dof, update_values | update_gradients | update_second_derivatives +// | update_q_points | update_JxW_values); +// deallog << "values|gradients|2nds|qpoints|JxW" << std::endl; + deallog.pop(); } -- 2.39.5