From: Wolfgang Bangerth Date: Thu, 14 Sep 2017 22:04:59 +0000 (-0600) Subject: Add a test. X-Git-Tag: v9.0.0-rc1~1054^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5090%2Fhead;p=dealii.git Add a test. --- diff --git a/tests/fe/system_04.cc b/tests/fe/system_04.cc new file mode 100644 index 0000000000..35e508c7c4 --- /dev/null +++ b/tests/fe/system_04.cc @@ -0,0 +1,67 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2003 - 2015 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + +// like the _03 test, but use the variadic constructor with the +// promotion rule that converts individual elements into pairs of the +// element and multiplicity one + +#include "../tests.h" +#include +#include +#include +#include +#include + +#include + +template +void +check(FESystem &fe) +{ + deallog << fe.get_name() << std::endl; + deallog << "components: " << fe.n_components() << std::endl; + deallog << "blocks: " << fe.n_blocks() << std::endl; + deallog << "conforms H1: " << fe.conforms(FiniteElementData::H1) << std::endl; + deallog << "n_base_elements: " << fe.n_base_elements() << std::endl; +} + +int +main() +{ + initlog(); + + { + FESystem<2> fe (FE_Q<2>(1)^2, FE_Q<2>(1)); + check<2>(fe); + } + { + FESystem<2> fe (FE_Q<2>(1)^2, FE_DGQ<2>(2)^0, FE_Q<2>(1)); + check<2>(fe); + } + { + FESystem<2> fe (FESystem<2>(FE_Q<2>(1)^2), FE_Q<2>(1)); + check<2>(fe); + } + { + FESystem<2> fe (FESystem<2>(FE_Q<2>(1)^2)^1, FE_DGQ<2>(2)^0, FE_Q<2>(1)); + check<2>(fe); + } + + return 0; +} + + + diff --git a/tests/fe/system_04.output b/tests/fe/system_04.output new file mode 100644 index 0000000000..bad0cea6dd --- /dev/null +++ b/tests/fe/system_04.output @@ -0,0 +1,21 @@ + +DEAL::FESystem<2>[FE_Q<2>(1)^2-FE_Q<2>(1)] +DEAL::components: 3 +DEAL::blocks: 3 +DEAL::conforms H1: 1 +DEAL::n_base_elements: 2 +DEAL::FESystem<2>[FE_Q<2>(1)^2-FE_Q<2>(1)] +DEAL::components: 3 +DEAL::blocks: 3 +DEAL::conforms H1: 1 +DEAL::n_base_elements: 2 +DEAL::FESystem<2>[FESystem<2>[FE_Q<2>(1)^2]-FE_Q<2>(1)] +DEAL::components: 3 +DEAL::blocks: 2 +DEAL::conforms H1: 1 +DEAL::n_base_elements: 2 +DEAL::FESystem<2>[FESystem<2>[FE_Q<2>(1)^2]-FE_Q<2>(1)] +DEAL::components: 3 +DEAL::blocks: 2 +DEAL::conforms H1: 1 +DEAL::n_base_elements: 2