From: bangerth Date: Tue, 28 Jun 2011 03:21:07 +0000 (+0000) Subject: New test. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ffb7ce55492c7d306b511ffea4c0c5ce960c30e;p=dealii-svn.git New test. git-svn-id: https://svn.dealii.org/trunk@23873 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/fe/dgp_01.cc b/tests/fe/dgp_01.cc new file mode 100644 index 0000000000..4d60839c1a --- /dev/null +++ b/tests/fe/dgp_01.cc @@ -0,0 +1,86 @@ +//---------------------------- dgp_01.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2003, 2004, 2005, 2008, 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 +// fuqher information on this license. +// +//---------------------------- dgp_01.cc --------------------------- + + +// Check the documented property of the DGP element that the first shape +// function is constant in space + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define PRECISION 3 + + + +template +void +test(const unsigned int degree) +{ + FE_DGP fe(degree); + deallog << fe.get_name() << std::endl; + + Triangulation tr; + if (dim > 1) + GridGenerator::hyper_ball (tr); + else + GridGenerator::hyper_cube (tr); + + QGauss q(degree+1); + FEValues fe_values (fe, q, update_values); + for (typename Triangulation::active_cell_iterator + cell = tr.begin_active(); cell != tr.end(); ++cell) + { + fe_values.reinit (cell); + for (unsigned int q=0; q(degree); + + for (unsigned int degree=0; degree<=4; ++degree) + test<2>(degree); + + for (unsigned int degree=0; degree<=4; ++degree) + test<3>(degree); + + return 0; +} + + + diff --git a/tests/fe/dgp_01/cmp/generic b/tests/fe/dgp_01/cmp/generic new file mode 100644 index 0000000000..302317042d --- /dev/null +++ b/tests/fe/dgp_01/cmp/generic @@ -0,0 +1,31 @@ + +DEAL::FE_DGP<1>(0) +DEAL::OK +DEAL::FE_DGP<1>(1) +DEAL::OK +DEAL::FE_DGP<1>(2) +DEAL::OK +DEAL::FE_DGP<1>(3) +DEAL::OK +DEAL::FE_DGP<1>(4) +DEAL::OK +DEAL::FE_DGP<2>(0) +DEAL::OK +DEAL::FE_DGP<2>(1) +DEAL::OK +DEAL::FE_DGP<2>(2) +DEAL::OK +DEAL::FE_DGP<2>(3) +DEAL::OK +DEAL::FE_DGP<2>(4) +DEAL::OK +DEAL::FE_DGP<3>(0) +DEAL::OK +DEAL::FE_DGP<3>(1) +DEAL::OK +DEAL::FE_DGP<3>(2) +DEAL::OK +DEAL::FE_DGP<3>(3) +DEAL::OK +DEAL::FE_DGP<3>(4) +DEAL::OK