--- /dev/null
+//-----------------------------------------------------------------------------
+// $Id: polynomial_lagrange_product.cc 23959 2011-07-26 12:58:28Z kronbichler $
+//
+// Copyright (C) 2012 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 "../tests.h"
+#include <iomanip>
+#include <fstream>
+#include <cmath>
+
+#include <deal.II/base/logstream.h>
+#include <deal.II/base/polynomial.h>
+
+using namespace Polynomials;
+
+void plot(const std::vector<Polynomial<double> >& polynomials)
+{
+ LogStream::Prefix("plot");
+ const unsigned int n=8;
+ for (unsigned int i=0;i<=n;++i)
+ {
+ const double x = 1.*i/n;
+ deallog << x;
+ for (unsigned int p=0;p<polynomials.size();++p)
+ deallog << '\t' << polynomials[p].value(x);
+ deallog << std::endl;
+ }
+}
+
+void interpolation_conditions(const std::vector<Polynomial<double> >& polynomials)
+{
+ std::vector<double> values(2);
+ for (unsigned int i=0;i<polynomials.size();++i)
+ {
+ polynomials[i].value(0., values);
+ deallog << i << "\t 0:\t" << values[0] << '\t' << values[1] << std::endl;
+ polynomials[i].value(1., values);
+ deallog << i << "\t 1:\t" << values[0] << '\t' << values[1] << std::endl;
+ }
+}
+
+
+int main()
+{
+ std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+ std::ofstream logfile(logname.c_str());
+ deallog.attach(logfile);
+ deallog.depth_console(0);
+ deallog.threshold_double(1.e-12);
+
+ interpolation_conditions(HermiteInterpolation::generate_complete_basis(6));
+ plot(HermiteInterpolation::generate_complete_basis(6));
+}
--- /dev/null
+
+DEAL::0 0: 1.00000 0
+DEAL::0 1: 0 0
+DEAL::1 0: 0 0
+DEAL::1 1: 1.00000 0
+DEAL::2 0: 0 1.00000
+DEAL::2 1: 0 0
+DEAL::3 0: 0 0
+DEAL::3 1: 0 1.00000
+DEAL::4 0: 0 0
+DEAL::4 1: 0 0
+DEAL::5 0: 0 0
+DEAL::5 1: 0 0
+DEAL::6 0: 0 0
+DEAL::6 1: 0 0
+DEAL::0 1.00000 0 0 0 0 0 0
+DEAL::0.125000 0.957031 0.0429688 0.0957031 -0.0136719 0.191406 -0.248644 0.147124
+DEAL::0.250000 0.843750 0.156250 0.140625 -0.0468750 0.562500 -0.487139 -0.157224
+DEAL::0.375000 0.683594 0.316406 0.146484 -0.0878906 0.878906 -0.380578 -0.798401
+DEAL::0.500000 0.500000 0.500000 0.125000 -0.125000 1.00000 0 -1.11803
+DEAL::0.625000 0.316406 0.683594 0.0878906 -0.146484 0.878906 0.380578 -0.798401
+DEAL::0.750000 0.156250 0.843750 0.0468750 -0.140625 0.562500 0.487139 -0.157224
+DEAL::0.875000 0.0429688 0.957031 0.0136719 -0.0957031 0.191406 0.248644 0.147124
+DEAL::1.00000 0 1.00000 0 0 0 0 0