From: Wolfgang Bangerth Date: Tue, 1 Feb 2005 13:49:06 +0000 (+0000) Subject: Fix a few more things in the RT element. X-Git-Tag: v8.0.0~14606 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=918df835613c5c5589ad8a60e36817d88ed885a3;p=dealii.git Fix a few more things in the RT element. git-svn-id: https://svn.dealii.org/trunk@9884 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/fe/fe_raviart_thomas.cc b/deal.II/deal.II/source/fe/fe_raviart_thomas.cc index 2fb51bee2f..2de27e5ff3 100644 --- a/deal.II/deal.II/source/fe/fe_raviart_thomas.cc +++ b/deal.II/deal.II/source/fe/fe_raviart_thomas.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2003, 2004 by the deal.II authors +// Copyright (C) 2003, 2004, 2005 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -1658,6 +1658,8 @@ FE_RaviartThomas::fill_fe_face_values (const Mapping // number of conversions if (flags & update_values) { + Assert (fe_data.shape_values.size() == dofs_per_cell, + ExcInternalError()); Assert (fe_data.shape_values[0].size() == GeometryInfo::faces_per_cell * n_q_points * (dim == 3 ? 2 : 1), @@ -1688,8 +1690,11 @@ FE_RaviartThomas::fill_fe_face_values (const Mapping if (flags & update_gradients) { - Assert (fe_data.shape_gradients.size() == - GeometryInfo::faces_per_cell * n_q_points, + Assert (fe_data.shape_values.size() == dofs_per_cell, + ExcInternalError()); + Assert (fe_data.shape_gradients[0].size() == + GeometryInfo::faces_per_cell * n_q_points * + (dim == 3 ? 2 : 1), ExcInternalError()); std::vector > shape_grads1 (n_q_points); diff --git a/deal.II/doc/news/changes.html b/deal.II/doc/news/changes.html index a6fa8b31b5..6d2014b9ee 100644 --- a/deal.II/doc/news/changes.html +++ b/deal.II/doc/news/changes.html @@ -57,10 +57,11 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
  1. - Fixed: A wrong assertion in the Raviart-Thomas finite element class has - been fixed, that was triggered when integrating face terms. + Fixed: Several wrong assertions in the Raviart-Thomas finite element + class have been fixed, that were triggered when integrating face terms.
    - (Oliver Kayser-Herold, 2005/01/24) + (Oliver Kayser-Herold, 2005/01/24; + WB, 2005/01/31)

diff --git a/tests/bits/Makefile b/tests/bits/Makefile index 10f7e393e2..77e694e862 100644 --- a/tests/bits/Makefile +++ b/tests/bits/Makefile @@ -65,7 +65,8 @@ tests_x = anna_? \ point_difference_* \ umfpack_* \ fe_q_3d* \ - rt_* + rt_* \ + nedelec_* # tests for the hp branch: # fe_collection_* diff --git a/tests/bits/nedelec_1.cc b/tests/bits/nedelec_1.cc new file mode 100644 index 0000000000..d290e7d918 --- /dev/null +++ b/tests/bits/nedelec_1.cc @@ -0,0 +1,63 @@ +//---------------------------- nedelec_1.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2005 by the deal.II authors and +// +// 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. +// +//---------------------------- nedelec_1.cc --------------------------- + + +// this test is modeled after after the nedelec_1 test, since that one failed. I +// just wanted to check that the nedelec element that has much of the same +// code also works. turns out, all was fine + +#include "../tests.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +template +void test () +{ + Triangulation triangulation; + GridGenerator::hyper_cube (triangulation, -1, 1); + + FE_Nedelec fe (1); + DoFHandler dof_handler (triangulation); + dof_handler.distribute_dofs (fe); + + QGauss q(2); + FEFaceValues fe_values (fe, q, update_values|update_gradients); + fe_values.reinit (dof_handler.begin_active(), 0); + + deallog << "OK" << std::endl; +} + + +int main () +{ + std::ofstream logfile("nedelec_1.output"); + deallog.attach(logfile); + deallog.depth_console(0); + + test<2> (); + test<3> (); + + return 0; +} diff --git a/tests/bits/rt_1.cc b/tests/bits/rt_1.cc index 319dff8c41..a1d5130b3d 100644 --- a/tests/bits/rt_1.cc +++ b/tests/bits/rt_1.cc @@ -32,17 +32,23 @@ template -void test () +void test (const unsigned int degree, + const unsigned int q_order) { Triangulation triangulation; GridGenerator::hyper_cube (triangulation, -1, 1); + FE_RaviartThomas fe (degree); DoFHandler dof_handler (triangulation); - FE_RaviartThomas fe (1); dof_handler.distribute_dofs (fe); - QGauss q(2); - FEFaceValues fe_values (fe, q, update_values|update_gradients); + QGauss q(q_order); + FEFaceValues fe_values (fe, q, + update_values | + update_gradients | + update_second_derivatives | + update_q_points | + update_jacobians); fe_values.reinit (dof_handler.begin_active(), 0); deallog << "OK" << std::endl; @@ -55,7 +61,9 @@ int main () deallog.attach(logfile); deallog.depth_console(0); - test<2> (); - test<3> (); + for (unsigned int degree=0; degree<3; ++degree) + for (unsigned int q_order=1; q_order<=3; ++q_order) + test<2> (degree, q_order); + return 0; }