From: Timo Heister Date: Fri, 28 Sep 2012 19:32:59 +0000 (+0000) Subject: update tests for FESystem X-Git-Tag: v8.0.0~1992 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87bdf474004e6ae89547d2df750d974b1ea5b240;p=dealii.git update tests for FESystem git-svn-id: https://svn.dealii.org/trunk@26863 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/fe/system_1.cc b/tests/fe/system_01.cc similarity index 98% rename from tests/fe/system_1.cc rename to tests/fe/system_01.cc index b67f13d938..eb4c89fff0 100644 --- a/tests/fe/system_1.cc +++ b/tests/fe/system_01.cc @@ -74,7 +74,7 @@ check(const FiniteElement &fe1, int main() { - std::ofstream logfile ("system_1/output"); + std::ofstream logfile ("system_01/output"); deallog << std::setprecision(PRECISION); deallog << std::fixed; deallog.attach(logfile); diff --git a/tests/fe/system_1/cmp/generic b/tests/fe/system_01/cmp/generic similarity index 100% rename from tests/fe/system_1/cmp/generic rename to tests/fe/system_01/cmp/generic diff --git a/tests/fe/system_02.cc b/tests/fe/system_02.cc new file mode 100644 index 0000000000..4c835c25b7 --- /dev/null +++ b/tests/fe/system_02.cc @@ -0,0 +1,74 @@ +//---------------------------- system_1.cc --------------------------- +// system_1.cc,v 1.3 2003/06/09 21:55:00 wolf Exp +// Version: +// +// Copyright (C) 2003, 2005 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. +// +//---------------------------- system_1.cc --------------------------- + + +// check what happens with an FE_System if we hand it 0 components + +#include "../tests.h" +#include +#include +#include +#include +#include +#include + +#include +#include + +#define PRECISION 5 + + + +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() +{ + std::ofstream logfile ("system_02/output"); + deallog << std::setprecision(PRECISION); + deallog << std::fixed; + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + { + FESystem<2> fe(FE_Q<2>(1), 2, FE_Q<2>(1), 1); + check<2>(fe); + } + { + FESystem<2> fe(FE_Q<2>(1), 2, FE_DGQ<2>(2),0, FE_Q<2>(1), 1); + check<2>(fe); + } + { + FESystem<2> fe(FESystem<2>(FE_Q<2>(1), 2), 1, FE_Q<2>(1), 1); + check<2>(fe); + } + { + FESystem<2> fe(FESystem<2>(FE_Q<2>(1), 2), 1, FE_DGQ<2>(2),0, FE_Q<2>(1), 1); + check<2>(fe); + } + + return 0; +} + + + diff --git a/tests/fe/system_02/cmp/generic b/tests/fe/system_02/cmp/generic new file mode 100644 index 0000000000..bad0cea6dd --- /dev/null +++ b/tests/fe/system_02/cmp/generic @@ -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