From 504f91f120cd4f39810aa42f45ead37c8fb41cbd Mon Sep 17 00:00:00 2001 From: kanschat Date: Thu, 19 May 2011 20:35:43 +0000 Subject: [PATCH] new classes git-svn-id: https://svn.dealii.org/trunk@23723 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/fe/cell_similarity_crash_01.cc | 80 ------------------- tests/fe/cell_similarity_crash_01/cmp/generic | 4 - tests/fe/fe_data_test.cc | 12 +-- tests/fe/fe_data_test/cmp/generic | 40 +++++----- 4 files changed, 26 insertions(+), 110 deletions(-) delete mode 100644 tests/fe/cell_similarity_crash_01.cc delete mode 100644 tests/fe/cell_similarity_crash_01/cmp/generic diff --git a/tests/fe/cell_similarity_crash_01.cc b/tests/fe/cell_similarity_crash_01.cc deleted file mode 100644 index 4765f26276..0000000000 --- a/tests/fe/cell_similarity_crash_01.cc +++ /dev/null @@ -1,80 +0,0 @@ -//---------------------------------------------------------------------- -// $Id$ -// Version: $Name$ -// -// Copyright (C) 2009, 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. -// -//---------------------------------------------------------------------- - - -// The FEValues class stores a copy of the current cell so that when we move -// on to the next cell we can compare the two for shape similarity and decide -// which parts of the data we need to re-compute. But this runs into trouble -// if the lifetime of FEValues object extends beyond a refinement or -// coarsening step in the triangulation since in that case the stored copy of -// the cell previously worked on may no longer be valid. The solution is to -// invalidate the stored cell once mesh refinement happens. - -#include "../tests.h" -#include -#include -#include -#include -#include -#include - -#include - - - -template -void test() -{ - Triangulation tr; - GridGenerator::hyper_cube(tr); - tr.refine_global (2); - - FE_Q fe(1); - DoFHandler dof(tr); - dof.distribute_dofs(fe); - - const QGauss quadrature(2); - FEValues fe_values (fe, quadrature, update_values); - - // initialize FEValues with the first cell - fe_values.reinit (dof.begin_active()); - - // then make this first cell invalid by - // coarsening it away - for (unsigned int c=0; c::max_children_per_cell; ++c) - tr.begin(1)->child(c)->set_coarsen_flag(); - tr.execute_coarsening_and_refinement (); - dof.distribute_dofs(fe); - - // initialize FEValues with what is now the - // first cell. this used to fail (see the - // reason given at the top) - fe_values.reinit (dof.begin_active()); - - deallog << "OK" << std::endl; -} - - -int main() -{ - std::ofstream logfile ("cell_similarity_01/output"); - deallog << std::setprecision (4); - - deallog.attach(logfile); - deallog.depth_console (0); - deallog.threshold_double(1.e-7); - - test<1>(); - test<2>(); - test<3>(); -} diff --git a/tests/fe/cell_similarity_crash_01/cmp/generic b/tests/fe/cell_similarity_crash_01/cmp/generic deleted file mode 100644 index fb71de2867..0000000000 --- a/tests/fe/cell_similarity_crash_01/cmp/generic +++ /dev/null @@ -1,4 +0,0 @@ - -DEAL::OK -DEAL::OK -DEAL::OK diff --git a/tests/fe/fe_data_test.cc b/tests/fe/fe_data_test.cc index a42080e3c6..2ca63ab5a6 100644 --- a/tests/fe/fe_data_test.cc +++ b/tests/fe/fe_data_test.cc @@ -75,16 +75,16 @@ void test_fe_datas() { // Vector DG elements fe_datas.push_back( - new FE_DGVector,dim>(0, mapping_raviart_thomas)); + new FE_DGRaviartThomas(0)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; fe_datas.push_back( - new FE_DGVector,dim>(1, mapping_raviart_thomas)); + new FE_DGRaviartThomas(1)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; fe_datas.push_back( - new FE_DGVector,dim>(0, mapping_nedelec)); + new FE_DGNedelec(0)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; fe_datas.push_back( - new FE_DGVector,dim>(1, mapping_nedelec)); + new FE_DGNedelec(1)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; // Hdiv elements @@ -113,10 +113,10 @@ void test_fe_datas() if (dim==2) { fe_datas.push_back( - new FE_DGVector,dim>(1, mapping_bdm)); + new FE_DGBDM(1)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; fe_datas.push_back( - new FE_DGVector,dim>(2, mapping_bdm)); + new FE_DGBDM(2)); deallog << (*fe_datas.rbegin())->get_name() << std::endl; fe_datas.push_back(new FE_BDM(1)); diff --git a/tests/fe/fe_data_test/cmp/generic b/tests/fe/fe_data_test/cmp/generic index 215ebaf34c..6e903c473e 100644 --- a/tests/fe/fe_data_test/cmp/generic +++ b/tests/fe/fe_data_test/cmp/generic @@ -603,18 +603,18 @@ DEAL::FE_DGP<2>(2) DEAL::FE_DGP<2>(4) DEAL::FESystem<2>[FE_Q<2>(2)^2] DEAL::FESystem<2>[FE_Q<2>(1)^2-FE_Q<2>(2)] -DEAL::FE_DGVector_RaviartThomas<2>(0) -DEAL::FE_DGVector_RaviartThomas<2>(1) -DEAL::FE_DGVector_Nedelec<2>(0) -DEAL::FE_DGVector_Nedelec<2>(1) +DEAL::FE_DGRaviartThomas<2,2>(0) +DEAL::FE_DGRaviartThomas<2,2>(1) +DEAL::FE_DGNedelec<2,2>(0) +DEAL::FE_DGNedelec<2,2>(1) DEAL::FE_RaviartThomas<2>(0) DEAL::FE_RaviartThomas<2>(1) DEAL::FE_RaviartThomas<2>(2) DEAL::FESystem<2>[FE_RaviartThomas<2>(1)-FE_DGQ<2>(1)] DEAL::FE_Nedelec<2>(0) DEAL::FE_Nedelec<2>(1) -DEAL::FE_DGVector_BDM<2>(1) -DEAL::FE_DGVector_BDM<2>(2) +DEAL::FE_DGBDM<2,2>(1) +DEAL::FE_DGBDM<2,2>(2) DEAL::FE_BDM<2>(1) DEAL::FE_BDM<2>(2) DEAL::FE_RaviartThomasNodal<2>(0) @@ -1063,7 +1063,7 @@ DEAL::support on face 1: 3 4 5 9 10 11 13 DEAL::support on face 2: 0 1 2 3 4 5 14 DEAL::support on face 3: 6 7 8 9 10 11 15 DEAL:: -DEAL::fe_data[14]:FE_DGVector_RaviartThomas<2>(0) +DEAL::fe_data[14]:FE_DGRaviartThomas<2,2>(0) DEAL::dofs_per_vertex=0 DEAL::dofs_per_line=0 DEAL::dofs_per_quad=4 @@ -1094,7 +1094,7 @@ DEAL::support on face 1: 0 1 2 3 DEAL::support on face 2: 0 1 2 3 DEAL::support on face 3: 0 1 2 3 DEAL:: -DEAL::fe_data[15]:FE_DGVector_RaviartThomas<2>(1) +DEAL::fe_data[15]:FE_DGRaviartThomas<2,2>(1) DEAL::dofs_per_vertex=0 DEAL::dofs_per_line=0 DEAL::dofs_per_quad=12 @@ -1125,7 +1125,7 @@ DEAL::support on face 1: 0 1 2 3 4 5 6 7 8 9 10 11 DEAL::support on face 2: 0 1 2 3 4 5 6 7 8 9 10 11 DEAL::support on face 3: 0 1 2 3 4 5 6 7 8 9 10 11 DEAL:: -DEAL::fe_data[16]:FE_DGVector_Nedelec<2>(0) +DEAL::fe_data[16]:FE_DGNedelec<2,2>(0) DEAL::dofs_per_vertex=0 DEAL::dofs_per_line=0 DEAL::dofs_per_quad=4 @@ -1156,7 +1156,7 @@ DEAL::support on face 1: 0 1 2 3 DEAL::support on face 2: 0 1 2 3 DEAL::support on face 3: 0 1 2 3 DEAL:: -DEAL::fe_data[17]:FE_DGVector_Nedelec<2>(1) +DEAL::fe_data[17]:FE_DGNedelec<2,2>(1) DEAL::dofs_per_vertex=0 DEAL::dofs_per_line=0 DEAL::dofs_per_quad=12 @@ -1373,7 +1373,7 @@ DEAL::support on face 1: 2 3 4 5 6 7 DEAL::support on face 2: 0 1 2 3 4 5 DEAL::support on face 3: 0 1 2 3 6 7 8 9 10 11 DEAL:: -DEAL::fe_data[24]:FE_DGVector_BDM<2>(1) +DEAL::fe_data[24]:FE_DGBDM<2,2>(1) DEAL::dofs_per_vertex=0 DEAL::dofs_per_line=0 DEAL::dofs_per_quad=8 @@ -1404,7 +1404,7 @@ DEAL::support on face 1: 0 1 2 3 4 5 6 7 DEAL::support on face 2: 0 1 2 3 4 5 6 7 DEAL::support on face 3: 0 1 2 3 4 5 6 7 DEAL:: -DEAL::fe_data[25]:FE_DGVector_BDM<2>(2) +DEAL::fe_data[25]:FE_DGBDM<2,2>(2) DEAL::dofs_per_vertex=0 DEAL::dofs_per_line=0 DEAL::dofs_per_quad=14 @@ -1821,10 +1821,10 @@ DEAL::FE_DGP<3>(2) DEAL::FE_DGP<3>(4) DEAL::FESystem<3>[FE_Q<3>(2)^2] DEAL::FESystem<3>[FE_Q<3>(1)^2-FE_Q<3>(2)] -DEAL::FE_DGVector_RaviartThomas<3>(0) -DEAL::FE_DGVector_RaviartThomas<3>(1) -DEAL::FE_DGVector_Nedelec<3>(0) -DEAL::FE_DGVector_Nedelec<3>(1) +DEAL::FE_DGRaviartThomas<3,3>(0) +DEAL::FE_DGRaviartThomas<3,3>(1) +DEAL::FE_DGNedelec<3,3>(0) +DEAL::FE_DGNedelec<3,3>(1) DEAL::FE_RaviartThomas<3>(0) DEAL::FE_RaviartThomas<3>(1) DEAL::FE_RaviartThomas<3>(2) @@ -2330,7 +2330,7 @@ DEAL::support on face 3: 6 7 8 9 10 11 18 19 20 21 22 23 27 31 34 35 39 DEAL::support on face 4: 0 1 2 3 4 5 6 7 8 9 10 11 24 25 26 27 40 DEAL::support on face 5: 12 13 14 15 16 17 18 19 20 21 22 23 28 29 30 31 41 DEAL:: -DEAL::fe_data[14]:FE_DGVector_RaviartThomas<3>(0) +DEAL::fe_data[14]:FE_DGRaviartThomas<3,3>(0) DEAL::dofs_per_vertex=0 DEAL::dofs_per_line=0 DEAL::dofs_per_quad=0 @@ -2365,7 +2365,7 @@ DEAL::support on face 3: 0 1 2 3 4 5 DEAL::support on face 4: 0 1 2 3 4 5 DEAL::support on face 5: 0 1 2 3 4 5 DEAL:: -DEAL::fe_data[15]:FE_DGVector_RaviartThomas<3>(1) +DEAL::fe_data[15]:FE_DGRaviartThomas<3,3>(1) DEAL::dofs_per_vertex=0 DEAL::dofs_per_line=0 DEAL::dofs_per_quad=0 @@ -2400,7 +2400,7 @@ DEAL::support on face 3: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 DEAL::support on face 4: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 DEAL::support on face 5: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 DEAL:: -DEAL::fe_data[16]:FE_DGVector_Nedelec<3>(0) +DEAL::fe_data[16]:FE_DGNedelec<3,3>(0) DEAL::dofs_per_vertex=0 DEAL::dofs_per_line=0 DEAL::dofs_per_quad=0 @@ -2435,7 +2435,7 @@ DEAL::support on face 3: 0 1 2 3 4 5 6 7 8 9 10 11 DEAL::support on face 4: 0 1 2 3 4 5 6 7 8 9 10 11 DEAL::support on face 5: 0 1 2 3 4 5 6 7 8 9 10 11 DEAL:: -DEAL::fe_data[17]:FE_DGVector_Nedelec<3>(1) +DEAL::fe_data[17]:FE_DGNedelec<3,3>(1) DEAL::dofs_per_vertex=0 DEAL::dofs_per_line=0 DEAL::dofs_per_quad=0 -- 2.39.5