]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Adjust function names.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 29 May 2012 14:10:35 +0000 (14:10 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 29 May 2012 14:10:35 +0000 (14:10 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_higher_derivatives@25557 0785d39b-7218-0410-832d-ea1e28bc413d

tests/base/anisotropic_1.cc
tests/base/polynomial_test.cc

index f75ef5a19a15d591c63a4979f9f6dbc90e980158..c4bf2df049a8fc4b32f35cce715aa72c74efa2a8 100644 (file)
@@ -1,8 +1,8 @@
 //----------------------------  anisotropic_1.cc  ---------------------------
 //    $Id$
-//    Version: $Name$ 
+//    Version: $Name$
 //
-//    Copyright (C) 2003, 2004, 2005, 2008 by the deal.II authors
+//    Copyright (C) 2003, 2004, 2005, 2008, 2012 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -35,14 +35,14 @@ void check_poly(const Point<dim> &x,
                 const POLY2      &q)
 {
   const unsigned int n = p.n();
-  
+
   std::vector<double> values1 (n), values2 (n);
   std::vector<Tensor<1,dim> > gradients1(n), gradients2(n);
   std::vector<Tensor<2,dim> > second1(n), second2(n);
-  
+
   p.compute (x, values1, gradients1, second1);
   q.compute (x, values2, gradients2, second2);
-  
+
   for (unsigned int k=0; k<n; ++k)
     {
                                       // Check if compute_value is ok
@@ -70,19 +70,19 @@ void check_poly(const Point<dim> &x,
       if (grad2 != grad1)
        deallog << "PQ" << k << ": gradients differ " << grad1 << " != "
                << grad2 << std::endl;
-      
-                                      // Check if compute_grad_grad is ok
-      Tensor<2,dim> grad_grad1 = p.compute_grad_grad(k,x);
-      if (grad_grad1 != second1[k])
-       deallog << 'P' << k << ": second derivatives differ " << grad_grad1 << " != "
+
+                                      // Check if compute_hessian is ok
+      Tensor<2,dim> hessian1 = p.compute_hessian(k,x);
+      if (hessian1 != second1[k])
+       deallog << 'P' << k << ": second derivatives differ " << hessian1 << " != "
                << second1[k] << std::endl;
-      Tensor<2,dim> grad_grad2 = q.compute_grad_grad(k,x);
-      if (grad_grad2 != second2[k])
-       deallog << 'Q' << k << ": second derivatives differ " << grad_grad2 << " != "
+      Tensor<2,dim> hessian2 = q.compute_hessian(k,x);
+      if (hessian2 != second2[k])
+       deallog << 'Q' << k << ": second derivatives differ " << hessian2 << " != "
                << second2[k] << std::endl;
-      if (grad_grad2 != grad_grad1)
-       deallog << "PQ" << k << ": second derivatives differ " << grad_grad1 << " != "
-               << grad_grad2 << std::endl;
+      if (hessian2 != hessian1)
+       deallog << "PQ" << k << ": second derivatives differ " << hessian1 << " != "
+               << hessian2 << std::endl;
 
 
                                        // finally output values,
@@ -95,7 +95,7 @@ void check_poly(const Point<dim> &x,
                                        // two-post-dot-digits limit
       values1[k] *= std::pow(10., dim);
       gradients1[k] *= std::pow(10., dim);
-      
+
       deallog << 'P' << k << "\t= " << values1[k]
              << "\tgradient\t";
       for (unsigned int d=0;d<dim;++d)
@@ -119,7 +119,7 @@ check_tensor (const std::vector<Polynomial<double> >& v,
 
   std::vector<std::vector<Polynomial<double> > > pols (dim, v);
   AnisotropicPolynomials<dim> q(pols);
-  
+
   check_poly (x, p, q);
 }
 
@@ -157,7 +157,7 @@ int main()
 
   deallog.pop();
   deallog.push("Legendre");
-  
+
   p.clear ();
   for (unsigned int i=0;i<3;++i)
     p.push_back (Legendre(i));
index d55c419100dac9357af3fc13e8f52f769154b322..6ae8d5113d34374731faedd7f45d95cc8b534132 100644 (file)
@@ -1,8 +1,8 @@
 //----------------------------  polynomial_test.cc  ---------------------------
 //    $Id$
-//    Version: $Name$ 
+//    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2012 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -38,15 +38,15 @@ void check_poly(const Point<dim>& x,
   std::vector<double> values (n);
   std::vector<Tensor<1,dim> > gradients(n);
   std::vector<Tensor<2,dim> > second(n);
-  
+
   p.compute (x, values, gradients, second);
-  
+
   for (unsigned int k=0;k<n;++k)
     {
                                        // first make sure the
                                        // individual functions work in
                                        // a consistent way
-      
+
                                       // Check if compute_value is ok
       double val = p.compute_value(k,x);
       if (std::fabs(val - values[k]) > 5.0E-15)
@@ -58,9 +58,9 @@ void check_poly(const Point<dim>& x,
       if ((grad-gradients[k]) * (grad-gradients[k]) > 5e-15*5e-15)
        deallog << 'P' << k << ": gradients differ " << grad << " != "
                << gradients[k] << std::endl;
-      
-                                      // Check if compute_grad_grad is ok
-      Tensor<2,dim> grad2 = p.compute_grad_grad(k,x);
+
+                                      // Check if compute_hessian is ok
+      Tensor<2,dim> grad2 = p.compute_hessian(k,x);
       Tensor<2,dim> diff = grad2-second[k];
       double s = 0;
       for (unsigned int i=0; i<dim; ++i)
@@ -81,7 +81,7 @@ void check_poly(const Point<dim>& x,
                                        // two-post-dot-digits limit
       values[k] *= std::pow(10., dim);
       gradients[k] *= std::pow(10., dim);
-      
+
       deallog << 'P' << k << "\t= " << values[k]
              << "\tgradient\t";
       for (unsigned int d=0;d<dim;++d)
@@ -155,7 +155,7 @@ int main()
 
   deallog.pop();
   deallog.push("Legendre");
-  
+
   p.clear ();
   for (unsigned int i=0;i<3;++i)
     p.push_back (Legendre(i));

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.