From: kronbichler Date: Wed, 27 Jul 2011 14:11:20 +0000 (+0000) Subject: Test serialization of polynomial based on product form. Fix output in other polynomia... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b0267bfa1cf3fa5c02e8a7ebe005936d97019aa;p=dealii-svn.git Test serialization of polynomial based on product form. Fix output in other polynomial tests. git-svn-id: https://svn.dealii.org/trunk@23975 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/serialization/polynomial/cmp/generic b/tests/serialization/polynomial/cmp/generic index 04e490ffe5..2cf6544371 100644 --- a/tests/serialization/polynomial/cmp/generic +++ b/tests/serialization/polynomial/cmp/generic @@ -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 diff --git a/tests/serialization/polynomial_hierarchical/cmp/generic b/tests/serialization/polynomial_hierarchical/cmp/generic index 201e3e608c..b1ac208ed9 100644 --- a/tests/serialization/polynomial_hierarchical/cmp/generic +++ b/tests/serialization/polynomial_hierarchical/cmp/generic @@ -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 diff --git a/tests/serialization/polynomial_lagrange_equidistant.cc b/tests/serialization/polynomial_lagrange_equidistant.cc index 83f438e494..a5c9aba68a 100644 --- a/tests/serialization/polynomial_lagrange_equidistant.cc +++ b/tests/serialization/polynomial_lagrange_equidistant.cc @@ -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); diff --git a/tests/serialization/polynomial_lagrange_equidistant/cmp/generic b/tests/serialization/polynomial_lagrange_equidistant/cmp/generic index f762aca2e2..7f3774d8dd 100644 --- a/tests/serialization/polynomial_lagrange_equidistant/cmp/generic +++ b/tests/serialization/polynomial_lagrange_equidistant/cmp/generic @@ -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 index 0000000000..00a7a72ff5 --- /dev/null +++ b/tests/serialization/polynomial_lagrange_gl.cc @@ -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 +#include +#include + +void test () +{ + unsigned int n1 = 3; + unsigned int support_point1 = 1; + QGaussLobatto<1> quad1 (n1+1); + Polynomials::Polynomial 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 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 index 0000000000..9b5cce17a4 --- /dev/null +++ b/tests/serialization/polynomial_lagrange_gl/cmp/generic @@ -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 diff --git a/tests/serialization/polynomial_legendre/cmp/generic b/tests/serialization/polynomial_legendre/cmp/generic index e629de205f..a7a702230e 100644 --- a/tests/serialization/polynomial_legendre/cmp/generic +++ b/tests/serialization/polynomial_legendre/cmp/generic @@ -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 diff --git a/tests/serialization/polynomial_lobatto/cmp/generic b/tests/serialization/polynomial_lobatto/cmp/generic index 8f02d93252..d48e0dbbd4 100644 --- a/tests/serialization/polynomial_lobatto/cmp/generic +++ b/tests/serialization/polynomial_lobatto/cmp/generic @@ -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 diff --git a/tests/serialization/polynomial_monomial/cmp/generic b/tests/serialization/polynomial_monomial/cmp/generic index c07c3fffef..488905087b 100644 --- a/tests/serialization/polynomial_monomial/cmp/generic +++ b/tests/serialization/polynomial_monomial/cmp/generic @@ -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