From 7da1cb67e0d69d164a69b51c6c396d7d403aae6d Mon Sep 17 00:00:00 2001 From: wolf Date: Fri, 17 May 2002 09:44:35 +0000 Subject: [PATCH] Check primitivity and other features of FEs. git-svn-id: https://svn.dealii.org/trunk@5847 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/fe/fe_traits.cc | 112 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 tests/fe/fe_traits.cc diff --git a/tests/fe/fe_traits.cc b/tests/fe/fe_traits.cc new file mode 100644 index 0000000000..9f4d878b56 --- /dev/null +++ b/tests/fe/fe_traits.cc @@ -0,0 +1,112 @@ +//---------------------------- fe_traits_test.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2002 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. +// +//---------------------------- fe_traits_test.cc --------------------------- + + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + + +template +void check (const FiniteElement &fe) +{ + const unsigned int dofs_per_cell = fe.dofs_per_cell; + + // first check whether shape + // functions are primitive: + deallog << " Primitivity: "; + for (unsigned int i=0; i +void check () +{ + // check usual Lagrange elements + for (unsigned int p=1; p<3; ++p) + { + deallog << "Checking FE_Q<" << dim << ">(" << p << "): " + << std::endl; + check (FE_Q(p)); + }; + + // check DG Lagrange elements + for (unsigned int p=0; p<3; ++p) + { + deallog << "Checking FE_DGQ<" << dim << ">(" << p << "): " + << std::endl; + check (FE_DGQ(p)); + }; + + // check DG-P elements + for (unsigned int p=0; p<3; ++p) + { + deallog << "Checking FE_DGP<" << dim << ">(" << p << "): " + << std::endl; + check (FE_DGP(p)); + }; + + // check systems of Q-elements + for (unsigned int p=1; p<3; ++p) + { + deallog << "Checking FE_Q<" << dim << ">(" << p << ")^2: " + << std::endl; + check (FESystem (FE_Q(p),2)); + }; +}; + + + + +int main () +{ + std::ofstream logfile("fe_traits.output"); + deallog.attach(logfile); +// deallog.depth_console(0); + + check<1> (); + check<2> (); + check<3> (); +}; -- 2.39.5