]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
tests for RTN and RT
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 19 Oct 2005 04:56:45 +0000 (04:56 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 19 Oct 2005 04:56:45 +0000 (04:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@11622 0785d39b-7218-0410-832d-ea1e28bc413d

tests/fe/Makefile
tests/fe/interpolate_rt.cc [new file with mode: 0644]
tests/fe/interpolate_rtn.cc
tests/results/i686-pc-linux-gnu+gcc3.2/fe/fe_data_test.output
tests/results/i686-pc-linux-gnu+gcc3.2/fe/interpolate_rt.output [new file with mode: 0644]
tests/results/i686-pc-linux-gnu+gcc3.2/fe/interpolate_rtn.output

index 1ebe5c3f2fd70508d7eca8abcf614aa139d7bc39..5c6c3b1d2832a6125bb80e55fc450c75106d4f53 100644 (file)
@@ -30,7 +30,7 @@ tests = fe_data_test traits fe_tools fe_tools_test mapping \
         transfer internals \
        dgq_1 \
        q_1 q_2 q_3 q_4 interpolate_q1 \
-       rt_1 rt_2 rt_3 rt_4 rt_5 rt_6 rtdiff rtn_1 interpolate_rtn \
+       rt_1 rt_2 rt_3 rt_4 rt_5 rt_6 rtdiff rtn_1 interpolate_rt interpolate_rtn \
        dgp_monomial_1 dgp_monomial_2 \
        system_1 interpolate_system \
         non_primitive_1 non_primitive_2 \
diff --git a/tests/fe/interpolate_rt.cc b/tests/fe/interpolate_rt.cc
new file mode 100644 (file)
index 0000000..4d61217
--- /dev/null
@@ -0,0 +1,73 @@
+//----------------------------------------------------------------------
+//    $Id$
+//    Version: $Name$ 
+//
+//    Copyright (C) 2005 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 "interpolate_common.h"
+#include <base/logstream.h>
+#include <base/quadrature_lib.h>
+
+#include <fe/fe_raviart_thomas.h>
+
+#include <fstream>
+
+// FE_RaviartThomas<dim>::interpolate(...)
+
+template <int dim>
+void check1(const Function<dim>& f,
+           const unsigned int degree)
+{
+  FE_RaviartThomas<dim> fe(degree);
+  deallog << fe.get_name() << ' ';
+  deallog << fe.get_generalized_support_points().size() << ' ';
+  
+  std::vector<double> dofs(fe.dofs_per_cell);
+  
+  std::vector<std::vector<double> >
+    values(dim, std::vector<double>(fe.get_generalized_support_points().size()));
+  std::vector<Vector<double> >
+    vectors(fe.get_generalized_support_points().size(),
+           Vector<double>(dim));
+  f.vector_value_list(fe.get_generalized_support_points(), vectors);
+
+  for (unsigned int c=0;c<values.size();++c)
+    for (unsigned int k=0;k<values[c].size();++k)
+      values[c][k] = vectors[k](c);
+  
+  fe.interpolate(dofs, values);
+  deallog << " vector " << vector_difference(fe,dofs,f,0);
+  
+  fe.interpolate(dofs, vectors, 0);
+  deallog << " Vector " << vector_difference(fe,dofs,f,0) << std::endl;
+}
+
+int main()
+{
+  std::ofstream logfile ("interpolate_rt.output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-15);
+
+//   Q1WedgeFunction<1,1,2> w1;
+//   check1(w1,1,2);
+//   check1(w1,2,2);
+//   check1(w1,3,2);
+  Q1WedgeFunction<2,1,2> w21;
+  check1(w21,1);
+  check1(w21,2);
+  Q1WedgeFunction<2,2,2> w22;
+  check1(w22,2);
+  Q1WedgeFunction<2,3,2> w23;
+  check1(w23,3);
+//  Q1WedgeFunction<3,1,3> w3;
+//  check1(w3,1);
+//  check1(w3,2);
+}
index f22e6e52652757bb2bb617937b2807adfe6dad27..f18bf86caa36d48840142c4f87682e52d25d733c 100644 (file)
@@ -54,18 +54,20 @@ int main()
   std::ofstream logfile ("interpolate_rtn.output");
   deallog.attach(logfile);
   deallog.depth_console(0);
-  deallog.threshold_double(1.e-15);
+  deallog.threshold_double(1.e-13);
 
-//   Q1WedgeFunction<1,1,2> w1;
-//   check1(w1,1,2);
-//   check1(w1,2,2);
-//   check1(w1,3,2);
+//    Q1WedgeFunction<1,1,2> w1;
+//    check1(w1,1,2);
+//    check1(w1,2,2);
+//    check1(w1,3,2);
   Q1WedgeFunction<2,1,2> w2;
   check1(w2,1);
   check1(w2,2);
   Q1WedgeFunction<2,2,2> w22;
   check1(w22,2);
-//  Q1WedgeFunction<3,1,3> w3;
-//  check1(w3,1);
-//  check1(w3,2);
+  Q1WedgeFunction<2,3,2> w23;
+  check1(w23,3);
+  Q1WedgeFunction<3,1,3> w3;
+  check1(w3,1);
+  check1(w3,2);
 }
index bfd35bd79175bfa161ac6ce52c444839bed75f86..d933dccfd6985a09e1cf901a007dc2d1cf97475d 100644 (file)
@@ -865,7 +865,7 @@ DEAL::dofs_per_cell=4
 DEAL::components=2
 DEAL::degree=1
 DEAL::conformity=4
-DEAL::unit_support_points=4
+DEAL::unit_support_points=0
 DEAL::unit_face_support_points=1
 DEAL::generalized_support_points=4
 DEAL::generalized_face_support_points=1
@@ -889,7 +889,7 @@ DEAL::dofs_per_cell=12
 DEAL::components=2
 DEAL::degree=2
 DEAL::conformity=4
-DEAL::unit_support_points=12
+DEAL::unit_support_points=0
 DEAL::unit_face_support_points=2
 DEAL::generalized_support_points=12
 DEAL::generalized_face_support_points=2
@@ -913,9 +913,9 @@ DEAL::dofs_per_cell=24
 DEAL::components=2
 DEAL::degree=3
 DEAL::conformity=4
-DEAL::unit_support_points=24
+DEAL::unit_support_points=0
 DEAL::unit_face_support_points=3
-DEAL::generalized_support_points=24
+DEAL::generalized_support_points=21
 DEAL::generalized_face_support_points=3
 DEAL::support on face 0:       0       1       2       3       4       5       6       7       8       9       10      11      12      13      14      15      16      17      18      19      20      21      22      23
 DEAL::support on face 1:       0       1       2       3       4       5       6       7       8       9       10      11      12      13      14      15      16      17      18      19      20      21      22      23
@@ -937,10 +937,10 @@ DEAL::dofs_per_cell=16
 DEAL::components=3
 DEAL::degree=2
 DEAL::conformity=0
-DEAL::unit_support_points=16
-DEAL::unit_face_support_points=2
-DEAL::generalized_support_points=16
-DEAL::generalized_face_support_points=2
+DEAL::unit_support_points=0
+DEAL::unit_face_support_points=0
+DEAL::generalized_support_points=0
+DEAL::generalized_face_support_points=0
 DEAL::support on face 0:       0       1       2       3       4       5       6       7       8       9       10      11      12      13
 DEAL::support on face 1:       0       1       2       3       4       5       6       7       8       9       10      11      13      15
 DEAL::support on face 2:       0       1       2       3       4       5       6       7       8       9       10      11      14      15
diff --git a/tests/results/i686-pc-linux-gnu+gcc3.2/fe/interpolate_rt.output b/tests/results/i686-pc-linux-gnu+gcc3.2/fe/interpolate_rt.output
new file mode 100644 (file)
index 0000000..9a6c213
--- /dev/null
@@ -0,0 +1,5 @@
+
+DEAL::FE_RaviartThomas<2>(1) 12  vector 0.832332 Vector 0.832332
+DEAL::FE_RaviartThomas<2>(2) 21  vector 0.898440 Vector 0.898440
+DEAL::FE_RaviartThomas<2>(2) 21  vector 0.749882 Vector 0.749882
+DEAL::FE_RaviartThomas<2>(3) 32  vector 0.749555 Vector 0.749555
index 964cc11a3c3c87cf3d059e5ac6ac92ed8e5cd4cf..cb364a00e33cbde034afa1ab7a209bbf23499051 100644 (file)
@@ -2,3 +2,6 @@
 DEAL::FE_RaviartThomasNodal<2>(1) 12  vector 0 Vector 0
 DEAL::FE_RaviartThomasNodal<2>(2) 24  vector 0 Vector 0
 DEAL::FE_RaviartThomasNodal<2>(2) 24  vector 0 Vector 0
+DEAL::FE_RaviartThomasNodal<2>(3) 40  vector 0 Vector 0
+DEAL::FE_RaviartThomasNodal<3>(1) 36  vector 0 Vector 0
+DEAL::FE_RaviartThomasNodal<3>(2) 108  vector 0 Vector 0

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.