]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Test serialization of polynomial based on product form. Fix output in other polynomia...
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 27 Jul 2011 14:11:20 +0000 (14:11 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 27 Jul 2011 14:11:20 +0000 (14:11 +0000)
git-svn-id: https://svn.dealii.org/trunk@23975 0785d39b-7218-0410-832d-ea1e28bc413d

tests/serialization/polynomial/cmp/generic
tests/serialization/polynomial_hierarchical/cmp/generic
tests/serialization/polynomial_lagrange_equidistant.cc
tests/serialization/polynomial_lagrange_equidistant/cmp/generic
tests/serialization/polynomial_lagrange_gl.cc [new file with mode: 0644]
tests/serialization/polynomial_lagrange_gl/cmp/generic [new file with mode: 0644]
tests/serialization/polynomial_legendre/cmp/generic
tests/serialization/polynomial_lobatto/cmp/generic
tests/serialization/polynomial_monomial/cmp/generic

index 04e490ffe59904a6f7fa6af51936e9fd605dba8b..2cf65443716385403858f7d5403087fdac196a48 100644 (file)
@@ -1,6 +1,6 @@
 
-DEAL::22 serialization::archive 9 0 0 0 0 3 0 1 2 3
+DEAL::22 serialization::archive 9 0 0 0 0 3 0 1 2 3 0 0 0 1
 
-DEAL::22 serialization::archive 9 0 0 0 0 3 0 1 2 3
+DEAL::22 serialization::archive 9 0 0 0 0 3 0 1 2 3 0 0 0 1
 
 DEAL::OK
index 201e3e608ccbb83569c78738dae0278818adb1e2..b1ac208ed909e9bee0a57a26a7e97189c257cc81 100644 (file)
@@ -1,4 +1,4 @@
 
-DEAL::22 serialization::archive 9 0 0 0 0 4 0 -0 4 -12 8
+DEAL::22 serialization::archive 9 0 0 0 0 4 0 -0 4 -12 8 0 0 0 1
 
 DEAL::OK
index 83f438e49480f16f9d10af0737785b5586c201e6..a5c9aba68ae44e8b2a44874d933c651786cdf437 100644 (file)
@@ -21,12 +21,12 @@ void test ()
 {
   unsigned int n1 = 3;
   unsigned int support_point1 = 1;
-  
+
   Polynomials::LagrangeEquidistant p1(n1, support_point1);
 
   unsigned int n2 = 4;
   unsigned int support_point2 = 2;
-  
+
   Polynomials::LagrangeEquidistant p2(n2, support_point2);
 
   verify (p1, p2);
index f762aca2e25b91f05bffc73dcc7cd09d01b0951d..7f3774d8dd9865b94c477a9f4b5571dedfac5937 100644 (file)
@@ -1,4 +1,4 @@
 
-DEAL::22 serialization::archive 9 0 0 0 0 4 0 0 9 -22.5 13.5
+DEAL::22 serialization::archive 9 0 0 0 0 4 0 0 9 -22.5 13.5 0 0 0 1
 
 DEAL::OK
diff --git a/tests/serialization/polynomial_lagrange_gl.cc b/tests/serialization/polynomial_lagrange_gl.cc
new file mode 100644 (file)
index 0000000..00a7a72
--- /dev/null
@@ -0,0 +1,51 @@
+//----------------------------  polynomial_lagrange_gl.cc  ---------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2010, 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.
+//
+//----------------------------  polynomial_lagrange_gl.cc  ---------------
+
+// check serialization for Lagrange polynomial based on Gauss-Lobatto support
+// points
+
+#include "serialization.h"
+#include <deal.II/base/polynomial.h>
+#include <deal.II/base/quadrature_lib.h>
+#include <boost/serialization/vector.hpp>
+
+void test ()
+{
+  unsigned int n1 = 3;
+  unsigned int support_point1 = 1;
+  QGaussLobatto<1> quad1 (n1+1);
+  Polynomials::Polynomial<double> p1 = Polynomials::
+    generate_complete_Lagrange_basis (quad1.get_points())[support_point1];
+
+  unsigned int n2 = 4;
+  unsigned int support_point2 = 2;
+  QGaussLobatto<1> quad2 (n2+1);
+  Polynomials::Polynomial<double> p2 = Polynomials::
+    generate_complete_Lagrange_basis (quad2.get_points())[support_point2];
+
+  verify (p1, p2);
+}
+
+
+int main ()
+{
+  std::ofstream logfile("polynomial_lagrange_gl/output");
+  deallog << std::setprecision(3);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  test ();
+
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/serialization/polynomial_lagrange_gl/cmp/generic b/tests/serialization/polynomial_lagrange_gl/cmp/generic
new file mode 100644 (file)
index 0000000..9b5cce1
--- /dev/null
@@ -0,0 +1,4 @@
+
+DEAL::22 serialization::archive 9 0 0 0 0 0 0 1 3 0 0 0.72360679774997894 1 11.180339887498949
+
+DEAL::OK
index e629de205f55552c3fb997cc1ad03eea439855ce..a7a702230ece7f9c2f40df75a0089e642c213763 100644 (file)
@@ -1,4 +1,4 @@
 
-DEAL::22 serialization::archive 9 0 0 0 0 4 0 -2.6457513110645907 31.749015732775089 -79.372539331937716 52.915026221291811
+DEAL::22 serialization::archive 9 0 0 0 0 4 0 -2.6457513110645907 31.749015732775089 -79.372539331937716 52.915026221291811 0 0 0 1
 
 DEAL::OK
index 8f02d93252653c6222b9ce91f93e87e0d4f0ac1e..d48e0dbbd4a8df95b22a1e91eda92407b7b4e04f 100644 (file)
@@ -1,4 +1,4 @@
 
-DEAL::22 serialization::archive 9 0 0 0 0 4 0 0 2.2360679774997902 -6.7082039324993685 4.4721359549995787
+DEAL::22 serialization::archive 9 0 0 0 0 4 0 0 2.2360679774997902 -6.7082039324993685 4.4721359549995787 0 0 0 1
 
 DEAL::OK
index c07c3fffefcec6d769d777fc949d4d06a8056f68..488905087ba97566ad1f52c4336f4e75928bcf32 100644 (file)
@@ -1,4 +1,4 @@
 
-DEAL::22 serialization::archive 9 0 0 0 0 4 0 0 0 0 5
+DEAL::22 serialization::archive 9 0 0 0 0 4 0 0 0 0 5 0 0 0 1
 
 DEAL::OK

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.