From 179f65d980f199976455d1e4a7ce2977308c6c81 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Mon, 26 Sep 2011 20:44:32 +0000 Subject: [PATCH] test vertex patches git-svn-id: https://svn.dealii.org/trunk@24442 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/deal.II/block_list_02.cc | 99 ++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 tests/deal.II/block_list_02.cc diff --git a/tests/deal.II/block_list_02.cc b/tests/deal.II/block_list_02.cc new file mode 100644 index 0000000000..736cfcb4ab --- /dev/null +++ b/tests/deal.II/block_list_02.cc @@ -0,0 +1,99 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2009, 2010, 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 +// further information on this license. +// +//---------------------------------------------------------------------- + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +using namespace dealii; + + +template +void +test_block_list(const Triangulation& tr, const FiniteElement& fe) +{ + deallog << fe.get_name() << std::endl; + + MGDoFHandler dof; + dof.initialize(tr, fe); + + BlockList bl; + + const unsigned int level = tr.n_levels()-1; + const unsigned int n = bl.count_vertex_patches<2>(dof.begin(level), dof.end(level), true); + bl.initialize_vertex_patches_mg(n, dof.begin(level), dof.end(level)); + + for (unsigned int i=0;i entries; + for (BlockList::const_iterator b = bl.begin(i);b != bl.end(i);++b) + entries.push_back(*b); + + std::sort(entries.begin(), entries.end()); + + for (unsigned int i=0;i trc, trl; + GridGenerator::hyper_cube(trc); + trc.refine_global(2); + GridGenerator::hyper_L(trl); + trl.refine_global(2); + + FE_DGQ<2> fe1(0); + FE_DGQ<2> fe2(1); + FE_RaviartThomas<2> fe3(0); + FE_RaviartThomas<2> fe4(1); + FE_Nedelec<2> fe5(0); + FE_Nedelec<2> fe6(1); + + deallog.push("Square"); + test_block_list(trc, fe1); + test_block_list(trc, fe2); + test_block_list(trc, fe3); + test_block_list(trc, fe4); + test_block_list(trc, fe5); + test_block_list(trc, fe6); + deallog.pop(); + deallog.push("L"); + test_block_list(trl, fe1); + test_block_list(trl, fe2); + test_block_list(trl, fe3); + test_block_list(trl, fe4); + test_block_list(trl, fe5); + test_block_list(trl, fe6); + deallog.pop(); +} -- 2.39.5