]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Document and test the change to FESystem previously checked in.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 8 Mar 2011 04:48:38 +0000 (04:48 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 8 Mar 2011 04:48:38 +0000 (04:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@23468 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
tests/bits/unit_support_points_02.cc [new file with mode: 0644]
tests/bits/unit_support_points_02/cmp/generic [new file with mode: 0644]

index 441153d3d834b9ce9df8ac22cceecc8ade9c8f78..8c25ff432c94f9514e2034eac6c1b485febbea11 100644 (file)
@@ -84,6 +84,15 @@ should be fixed now.
 <h3>Specific improvements</h3>
 
 <ol>
+<li> 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.
+<br>
+(WB, 2011/03/07)
+</li>
+
 <li> 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 <code>FE_Nothing@<dim@>()</code> 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 (file)
index 0000000..159d929
--- /dev/null
@@ -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 <base/logstream.h>
+#include <fe/fe_system.h>
+#include <fe/fe_q.h>
+#include <fe/fe_dgp.h>
+#include <fe/fe_dgq.h>
+#include <fstream>
+
+
+template <int dim>
+void check2 (const FiniteElement<dim> &fe)
+{
+  deallog << fe.get_name() << std::endl;
+  const std::vector<Point<dim-1> > unit_f_s_p
+     = fe.get_unit_face_support_points ();
+  for (unsigned int i=0; i<unit_f_s_p.size(); ++i)
+    deallog << i << ' ' << unit_f_s_p[i] << std::endl;
+}
+
+
+template <int dim>
+void check ()
+{
+  check2 (FESystem<dim> (FE_Q<dim> (2), 1,
+                         FE_DGQ<dim> (2), 1));
+  check2 (FESystem<dim> (FE_Q<dim> (2), 1,
+                         FE_DGP<dim> (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 (file)
index 0000000..2eb60bb
--- /dev/null
@@ -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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.