From: Guido Kanschat Date: Tue, 23 Oct 2007 15:19:09 +0000 (+0000) Subject: add testing of face values X-Git-Tag: v8.0.0~9717 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f74756d71d5680b399fa13e96ccd97e9b0b4976;p=dealii.git add testing of face values git-svn-id: https://svn.dealii.org/trunk@15373 0785d39b-7218-0410-832d-ea1e28bc413d --- 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(); }