From 5553510d7aad0bc5aaa76ad1d8b98db59ea26828 Mon Sep 17 00:00:00 2001 From: bangerth Date: Thu, 20 Sep 2012 13:36:06 +0000 Subject: [PATCH] New test. git-svn-id: https://svn.dealii.org/trunk@26563 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/hp/fe_collection_02.cc | 71 +++++++++++++++++++++++++++ tests/hp/fe_collection_02/cmp/generic | 5 ++ 2 files changed, 76 insertions(+) create mode 100644 tests/hp/fe_collection_02.cc create mode 100644 tests/hp/fe_collection_02/cmp/generic diff --git a/tests/hp/fe_collection_02.cc b/tests/hp/fe_collection_02.cc new file mode 100644 index 0000000000..b2abb2ebf7 --- /dev/null +++ b/tests/hp/fe_collection_02.cc @@ -0,0 +1,71 @@ +//---------------------------- fe_collection_02.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2005, 2006, 2012 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_collection_02.cc --------------------------- + + +// test the results of FECollection::n_components() + + +#include "../tests.h" +#include +#include +#include +#include +#include + +#include + + +template +void test () +{ + // test things with a collection of + // primitive elements + { + hp::FECollection fe_collection; + fe_collection.push_back (FESystem(FE_Q(2),dim)); + fe_collection.push_back (FESystem(FE_Q(2),dim)); + Assert (fe_collection.n_components() == dim, + ExcInternalError()); + } + + // now the same with one of the elements + // being non-primitive + if (dim > 1) + { + hp::FECollection fe_collection; + fe_collection.push_back (FESystem(FE_Q(2),dim)); + fe_collection.push_back (FE_RaviartThomas(1)); + Assert (fe_collection.n_components() == dim, + ExcInternalError()); + } + + deallog << "OK" << std::endl; +} + + + +int main () +{ + std::ofstream logfile("fe_collection_02/output"); + logfile.precision(2); + + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test<1> (); + test<2> (); + test<3> (); + + deallog << "OK" << std::endl; +} diff --git a/tests/hp/fe_collection_02/cmp/generic b/tests/hp/fe_collection_02/cmp/generic new file mode 100644 index 0000000000..5f42bb230f --- /dev/null +++ b/tests/hp/fe_collection_02/cmp/generic @@ -0,0 +1,5 @@ + +DEAL::OK +DEAL::OK +DEAL::OK +DEAL::OK -- 2.39.5