From: Wolfgang Bangerth Date: Tue, 8 Mar 2011 04:48:38 +0000 (+0000) Subject: Document and test the change to FESystem previously checked in. X-Git-Tag: v8.0.0~4234 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34892bd13272efd045c51ea4893c114b7c171b49;p=dealii.git Document and test the change to FESystem previously checked in. git-svn-id: https://svn.dealii.org/trunk@23468 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 441153d3d8..8c25ff432c 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -84,6 +84,15 @@ should be fixed now.

Specific improvements

    +
  1. Fixed: FESystem::get_unit_face_support_points would refuse to return +anything if one of the base elements did not have support points. This +condition has been relaxed: it now only doesn't return anything if this +base element has no support points and also has degrees of freedom on +the face. +
    +(WB, 2011/03/07) +
  2. +
  3. Fixed: Objects of type FE_Nothing could be generated with multiple vector components by passing an argument to the constructor. Yet, the FE_Nothing::get_name() function always just returned the string FE_Nothing@() independently of the diff --git a/tests/bits/unit_support_points_02.cc b/tests/bits/unit_support_points_02.cc new file mode 100644 index 0000000000..159d92981f --- /dev/null +++ b/tests/bits/unit_support_points_02.cc @@ -0,0 +1,68 @@ +//---------------------------- unit_support_points_02.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2003, 2004, 2005, 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. +// +//---------------------------- unit_support_points_02.cc --------------------------- + + +// FESystem::get_unit_support_points would return an empty array if +// one base element had no support points. but that's not necessary +// that way: it should still return something useful if the element +// has no support points but in fact also has no degrees of freedom on +// faces at all. in that case we would simply not care +// +// check this by comparing +// FESystem(FE_Q, 1, FE_DGQ, 1) +// with +// FESystem(FE_Q, 1, FE_DGP, 1) +// (the latter not having any support points for the second component). + +#include "../tests.h" +#include +#include +#include +#include +#include +#include + + +template +void check2 (const FiniteElement &fe) +{ + deallog << fe.get_name() << std::endl; + const std::vector > unit_f_s_p + = fe.get_unit_face_support_points (); + for (unsigned int i=0; i +void check () +{ + check2 (FESystem (FE_Q (2), 1, + FE_DGQ (2), 1)); + check2 (FESystem (FE_Q (2), 1, + FE_DGP (2), 1)); +} + + + +int main () +{ + std::ofstream logfile("unit_support_points_02/output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + check<2> (); + check<3> (); + return 0; +} diff --git a/tests/bits/unit_support_points_02/cmp/generic b/tests/bits/unit_support_points_02/cmp/generic new file mode 100644 index 0000000000..2eb60bb2fd --- /dev/null +++ b/tests/bits/unit_support_points_02/cmp/generic @@ -0,0 +1,29 @@ + +DEAL::FESystem<2>[FE_Q<2>(2)-FE_DGQ<2>(2)] +DEAL::0 0.00000 +DEAL::1 1.00000 +DEAL::2 0.500000 +DEAL::FESystem<2>[FE_Q<2>(2)-FE_DGP<2>(2)] +DEAL::0 0.00000 +DEAL::1 1.00000 +DEAL::2 0.500000 +DEAL::FESystem<3>[FE_Q<3>(2)-FE_DGQ<3>(2)] +DEAL::0 0.00000 0.00000 +DEAL::1 1.00000 0.00000 +DEAL::2 0.00000 1.00000 +DEAL::3 1.00000 1.00000 +DEAL::4 0.00000 0.500000 +DEAL::5 1.00000 0.500000 +DEAL::6 0.500000 0.00000 +DEAL::7 0.500000 1.00000 +DEAL::8 0.500000 0.500000 +DEAL::FESystem<3>[FE_Q<3>(2)-FE_DGP<3>(2)] +DEAL::0 0.00000 0.00000 +DEAL::1 1.00000 0.00000 +DEAL::2 0.00000 1.00000 +DEAL::3 1.00000 1.00000 +DEAL::4 0.00000 0.500000 +DEAL::5 1.00000 0.500000 +DEAL::6 0.500000 0.00000 +DEAL::7 0.500000 1.00000 +DEAL::8 0.500000 0.500000