From: heltai Date: Tue, 17 May 2011 16:42:40 +0000 (+0000) Subject: Added failing tests for mapping q eulerian and mapping q1 eulerian. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cce439e0f630a486ef61a67cceb64f9fabe243f2;p=dealii-svn.git Added failing tests for mapping q eulerian and mapping q1 eulerian. git-svn-id: https://svn.dealii.org/trunk@23713 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/mapping_q_eulerian_04.cc b/tests/bits/mapping_q_eulerian_04.cc new file mode 100644 index 0000000000..7bc6a2e6d5 --- /dev/null +++ b/tests/bits/mapping_q_eulerian_04.cc @@ -0,0 +1,93 @@ + +//---------------------------- template.cc --------------------------- +// $Id: mapping_q1_eulerian.cc 23710 2011-05-17 04:50:10Z bangerth $ +// Version: $Name$ +// +// 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 +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------- template.cc --------------------------- + + +// computes points in real space starting from some quadrature points on the unit element + +#include "../tests.h" +#include +#include + +// all include files you need here + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +std::ofstream logfile("mapping_q_eulerian_04/output"); + +template +void test() { + Triangulation tria; + GridGenerator::hyper_cube(tria); + FE_Q base_fe(1); + FESystem fe(base_fe, spacedim); + + DoFHandler shift_dh(tria); + + shift_dh.distribute_dofs(fe); + + Vector shift(shift_dh.n_dofs()); + + shift.add(+1); + + GridOut grid_out; + grid_out.set_flags (GridOutFlags::Ucd(true)); + grid_out.write_ucd (tria, logfile); + + QTrapez quad; + MappingQ1Eulerian,spacedim> mapping(shift, shift_dh); + + typename Triangulation::active_cell_iterator cell=tria.begin_active(), + 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< +#include + +// all include files you need here + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +std::ofstream logfile("mapping_q_eulerian_05/output"); + +template +void test(unsigned int degree) { + Triangulation tria; + GridGenerator::hyper_cube(tria); + FE_Q base_fe(degree); + FESystem fe(base_fe, spacedim); + + DoFHandler shift_dh(tria); + + shift_dh.distribute_dofs(fe); + + Vector shift(shift_dh.n_dofs()); + + shift.add(+1); + + GridOut grid_out; + grid_out.set_flags (GridOutFlags::Ucd(true)); + grid_out.write_ucd (tria, logfile); + + QTrapez quad; + MappingQEulerian,spacedim> mapping(degree,shift, shift_dh); + + typename Triangulation::active_cell_iterator cell=tria.begin_active(), + 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<