From: Wolfgang Bangerth Date: Tue, 10 Jun 2008 20:48:46 +0000 (+0000) Subject: Finish test. It doesn't work right now, of course... X-Git-Tag: v8.0.0~9021 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25380032cf3e2e657f5459dfd4cf91b77b379fd8;p=dealii.git Finish test. It doesn't work right now, of course... git-svn-id: https://svn.dealii.org/trunk@16288 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/fail/mesh_3d_22.cc b/tests/fail/mesh_3d_22.cc index e0cdfd3ee4..a6b0be6654 100644 --- a/tests/fail/mesh_3d_22.cc +++ b/tests/fail/mesh_3d_22.cc @@ -104,10 +104,9 @@ void test (Triangulation& triangulation) error, QGauss(q+2), VectorTools::L2_norm); - std::cout << fe.get_name() << ", P_" << q - << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() - << " " << (((q<=p)&&!(error.l2_norm() < 1e-12*interpolant.l2_norm()))?"ASSERT":"") - << std::endl; + deallog << fe.get_name() << ", P_" << q + << ", rel. error=" << error.l2_norm() / interpolant.l2_norm() + << std::endl; if (q<=p) Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(), ExcInternalError()); @@ -120,27 +119,29 @@ void test (Triangulation& triangulation) int main () { + std::ofstream logfile ("mesh_3d_22/output"); + deallog.attach(logfile); deallog.depth_console(0); - deallog.threshold_double(1.e-10); + deallog.threshold_double(1.0e-10); Triangulation<3> triangulation; GridIn<3> grid_in; grid_in.attach_triangulation(triangulation); - std::ifstream inputStream("mesh_3d_22/mesh"); - grid_in.read(inputStream); + std::ifstream inputStream("mesh_3d_22/mesh.msh"); + grid_in.read_msh (inputStream); test<3>(triangulation); /* - MappingQ<3> mapping(3); + MappingQ<3> mapping(3); - FE_Q<3> fe(3); - DoFHandler<3> dofh(triangulation); + FE_Q<3> fe(3); + DoFHandler<3> dofh(triangulation); - dofh.distribute_dofs(fe); + dofh.distribute_dofs(fe); - { + { Vector x(dofh.n_dofs()); DataOut<3> data_out; @@ -150,17 +151,17 @@ int main () std::ofstream output("out.gpl"); data_out.write(output, data_out.parse_output_format("gnuplot")); - } + } - Point<3> p; - for (double x=0;x<=1;x+=1.0/3.0) + Point<3> p; + for (double x=0;x<=1;x+=1.0/3.0) { - p(0)=x; - p(1)=1.0/3.0; - p(2)=0.0; + p(0)=x; + p(1)=1.0/3.0; + p(2)=0.0; - Point<3> r=mapping.transform_unit_to_real_cell(++triangulation.begin_active(),p); - std::cout << p << " > " << r << std::endl; + Point<3> r=mapping.transform_unit_to_real_cell(++triangulation.begin_active(),p); + deallog << p << " > " << r << std::endl; } */ } diff --git a/tests/fail/mesh_3d_22/mesh.msh b/tests/fail/mesh_3d_22/mesh.msh new file mode 100644 index 0000000000..1720c7a637 --- /dev/null +++ b/tests/fail/mesh_3d_22/mesh.msh @@ -0,0 +1,20 @@ +$NOD +12 +1 1.5 0.2 0 +2 1.5 0.4 0 +3 1.5 0.6 0 +4 2.0 0.2 0 +5 2.0 0.4 0 +6 2.0 0.6 0 +7 1.5 0.2 0.205 +8 1.5 0.4 0.205 +9 1.5 0.6 0.205 +10 2.0 0.2 0.205 +11 2.0 0.4 0.205 +12 2.0 0.6 0.205 +$ENDNOD +$ELM +2 +1 5 30 1 8 5 6 3 2 11 12 9 8 +2 5 30 1 8 5 2 1 4 11 8 7 10 +$ENDELM