From: bangerth Date: Tue, 29 May 2012 14:10:35 +0000 (+0000) Subject: Adjust function names. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e38e85e10279deb0d752264c57210e5e01f56af0;p=dealii-svn.git Adjust function names. git-svn-id: https://svn.dealii.org/branches/branch_higher_derivatives@25557 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/base/anisotropic_1.cc b/tests/base/anisotropic_1.cc index f75ef5a19a..c4bf2df049 100644 --- a/tests/base/anisotropic_1.cc +++ b/tests/base/anisotropic_1.cc @@ -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 &x, const POLY2 &q) { const unsigned int n = p.n(); - + std::vector values1 (n), values2 (n); std::vector > gradients1(n), gradients2(n); std::vector > second1(n), second2(n); - + p.compute (x, values1, gradients1, second1); q.compute (x, values2, gradients2, second2); - + for (unsigned int k=0; k &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 &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 >& v, std::vector > > pols (dim, v); AnisotropicPolynomials 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)); diff --git a/tests/base/polynomial_test.cc b/tests/base/polynomial_test.cc index d55c419100..6ae8d5113d 100644 --- a/tests/base/polynomial_test.cc +++ b/tests/base/polynomial_test.cc @@ -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& x, std::vector values (n); std::vector > gradients(n); std::vector > second(n); - + p.compute (x, values, gradients, second); - + for (unsigned int k=0;k 5.0E-15) @@ -58,9 +58,9 @@ void check_poly(const Point& 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& 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