]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Added non-zero evaluation points to test
authorRoss Kynch <rosskynch@gmail.com>
Wed, 7 Jun 2017 21:26:29 +0000 (22:26 +0100)
committerRoss Kynch <rosskynch@gmail.com>
Wed, 7 Jun 2017 21:26:29 +0000 (22:26 +0100)
tests/base/polynomials_integrated_legendre_sz.cc
tests/base/polynomials_integrated_legendre_sz.output

index b027bfea72203725c9d176aab8b26efcc0c45bbf..61061da59f7674c96ea6c7e1f1f4892da159091c 100644 (file)
@@ -48,13 +48,30 @@ void check_at_one (const std::vector<Polynomial<double> > &p)
 
 
 
+void check_at_half (const std::vector<Polynomial<double> > &p)
+{
+  // Ignore first two polynomials as the integrated Legendre polynomials are only defined
+  // for degree > 1, it is only added to maintain the recursive relation.
+
+  deallog << "Function value of polynomial at -0.5 | 0.5:" << std::endl;
+  for (unsigned int i=2; i<p.size(); ++i)
+    {
+      const double y = p[i].value(0.5);
+      const double z = p[i].value(-0.5);
+      deallog << y << " | " << z << std::endl;
+    }
+  deallog << std::endl;
+}
+
+
+
 void
 check_poly (const unsigned int n)
 {
   deallog << "Degree: " << n+1 << std::endl;
   std::vector<Polynomial<double> > p = IntegratedLegendreSZ::generate_complete_basis(n);
   check_at_one (p);
-  deallog << std::endl;
+  check_at_half (p);
 }
 
 
index 8bc294c7bd0cf2d3f8ed71cd2cb3490d5b0d748d..3b45c2bf593269c563ca6e9330abfb9919bc7f59 100644 (file)
@@ -1,4 +1,29 @@
 
 DEAL::Degree: 26
 DEAL::Function value of polynomial at right end point: ........................
+DEAL::Function value of polynomial at -0.5 | 0.5:
+DEAL::-0.375 | -0.375
+DEAL::-0.188 | 0.188
+DEAL::-0.0234 | -0.0234
+DEAL::0.0586 | -0.0586
+DEAL::0.0557 | 0.0557
+DEAL::0.0103 | -0.0103
+DEAL::-0.0265 | -0.0265
+DEAL::-0.0289 | 0.0289
+DEAL::-0.00603 | -0.00603
+DEAL::0.0158 | -0.0158
+DEAL::0.0183 | 0.0183
+DEAL::0.00408 | -0.00408
+DEAL::-0.0108 | -0.0108
+DEAL::-0.0130 | 0.0130
+DEAL::-0.00299 | -0.00299
+DEAL::0.00795 | -0.00795
+DEAL::0.00978 | 0.00978
+DEAL::0.00231 | -0.00231
+DEAL::-0.00617 | -0.00617
+DEAL::-0.00771 | 0.00771
+DEAL::-0.00186 | -0.00186
+DEAL::0.00497 | -0.00497
+DEAL::0.00628 | 0.00628
+DEAL::0.00153 | -0.00153
 DEAL::

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.