From: heltai Date: Tue, 17 May 2011 17:26:59 +0000 (+0000) Subject: Added tests for mapping q eulerian and transform_real_to_unit X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50aa68eee0e704c247e50610ffb71940223576c8;p=dealii-svn.git Added tests for mapping q eulerian and transform_real_to_unit git-svn-id: https://svn.dealii.org/trunk@23716 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/codim_one/mapping_03.cc b/tests/codim_one/mapping_03.cc index 385f4069e8..dd64bda723 100644 --- a/tests/codim_one/mapping_03.cc +++ b/tests/codim_one/mapping_03.cc @@ -30,13 +30,13 @@ template -void test () +void test (unsigned int degree) { Triangulation mesh; GridGenerator::hyper_cube(mesh); QGauss quadrature(dim == 2 ? 3 : 2); - MappingQ mapping(1); + MappingQ mapping(degree); Point p; // Try to project a point on the @@ -47,7 +47,7 @@ void test () Point q = mapping.transform_real_to_unit_cell(mesh.begin_active(), p); - deallog << "P: " << p + deallog << "Mapping Q("<< degree<< "): P: " << p << ", on unit: " << q << endl; } @@ -60,8 +60,11 @@ int main () deallog.attach(logfile); deallog.depth_console(3); - test<2> (); - test<3> (); + test<2> (1); + test<2> (2); + + test<3> (1); + test<3> (2); return 0; } diff --git a/tests/codim_one/mapping_03/cmp/generic b/tests/codim_one/mapping_03/cmp/generic index 44eb1f435e..5df3a30607 100644 --- a/tests/codim_one/mapping_03/cmp/generic +++ b/tests/codim_one/mapping_03/cmp/generic @@ -1,3 +1,5 @@ -DEAL::P: 0.200000 0.200000, on unit: 0.200000 -DEAL::P: 0.200000 0.200000 0.200000, on unit: 0.200000 0.200000 +DEAL::Mapping Q(1): P: 0.200000 0.200000, on unit: 0.200000 +DEAL::Mapping Q(2): P: 0.200000 0.200000, on unit: 0.200000 +DEAL::Mapping Q(1): P: 0.200000 0.200000 0.200000, on unit: 0.200000 0.200000 +DEAL::Mapping Q(2): P: 0.200000 0.200000 0.200000, on unit: 0.200000 0.200000 diff --git a/tests/codim_one/mapping_q1.cc b/tests/codim_one/mapping_q1.cc index a3e6f6364b..5a37de4cda 100644 --- a/tests/codim_one/mapping_q1.cc +++ b/tests/codim_one/mapping_q1.cc @@ -3,7 +3,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2005, 2010 by the deal.II authors +// Copyright (C) 2005, 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -51,14 +51,17 @@ void test(std::string filename) { endc=tria.end() ; Point real; Point unit; + double eps = 1e-10; for(;cell!=endc;++cell) { - deallog< " << real << std::endl; + if( (unit-quad.point(q)).norm()>eps) + deallog<-> " << unit << std::endl; } } diff --git a/tests/codim_one/mapping_q1_eulerian.cc b/tests/codim_one/mapping_q1_eulerian.cc index 96eb2b51a2..c99ee613b2 100644 --- a/tests/codim_one/mapping_q1_eulerian.cc +++ b/tests/codim_one/mapping_q1_eulerian.cc @@ -3,7 +3,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2005, 2009, 2010 by the deal.II authors +// Copyright (C) 2005, 2009, 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -66,14 +66,17 @@ void test(std::string filename) { endc=tria.end() ; Point real; Point unit; + double eps = 1e-10; for(;cell!=endc;++cell) { deallog< " << real << std::endl; + if( (unit-quad.point(q)).norm()>eps) + deallog<-> " << unit << std::endl; } }