]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
better tests
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 24 May 2005 10:47:46 +0000 (10:47 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 24 May 2005 10:47:46 +0000 (10:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@10721 0785d39b-7218-0410-832d-ea1e28bc413d

tests/base/polynomials_tensor.cc

index 142de216a8869e41c514bf81ad60d906eeb666e0..ff96b936dfde7d2ca370d2b1ae273678340f2aff 100644 (file)
@@ -39,8 +39,13 @@ void check_point (const Point<dim>& x,
   deallog << "Point " << x << std::endl;
   for (unsigned int i=0;i<n;++i)
     {
-      deallog << "p[" << i << "] value " << values[i];
-      deallog << " first " << gradients[i];
+      deallog << "p[" << i << "] value ";
+      for (unsigned int d=0;d<dim;++d)
+       deallog << (int) (values[i][d]+.5) << ' ';
+      deallog << " first ";
+      for (unsigned int d1=0;d1<dim;++d1)
+       for (unsigned int d2=0;d2<dim;++d2)
+         deallog << (int) (gradients[i][d1][d2]+.5) << ' ';
       deallog << std::endl;
     }
 }
@@ -50,10 +55,16 @@ void check_bdm2 ()
 {
   Point<2> x;
   
-  PolynomialsBDM<2> p21(1);
+  PolynomialsBDM<2> p1(1);
+  PolynomialsBDM<2> p2(2);
   
-  x(0) = 1.;
-  check_point(x, p21);
+  x(0) = 2.;
+  x(1) = 3.;
+//   if (dim>2)
+//     x(2) = 4;
+  
+  check_point(x, p1);
+  check_point(x, p2);
 }
 
 template<int dim>

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.