From: guido Date: Mon, 28 May 2001 11:26:07 +0000 (+0000) Subject: test for Legendre polynomials X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d44c303791422382d41e546c5f86fdb58c888793;p=dealii-svn.git test for Legendre polynomials git-svn-id: https://svn.dealii.org/trunk@4732 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/base/Makefile.in b/tests/base/Makefile.in index f60060d754..869df74278 100644 --- a/tests/base/Makefile.in +++ b/tests/base/Makefile.in @@ -19,8 +19,9 @@ default: run-tests ############################################################ -logtest.exe : logtest.go $(libraries) -polynomial_test.exe: polynomial_test.go $(libraries) +logtest.exe : logtest.go $(lib-base.g) +polynomial_test.exe: polynomial_test.go $(lib-base.g) +polynomial1d.exe : polynomial1d.go $(lib-base.g) quadrature_test.exe: quadrature_test.go $(libraries) reference.exe : reference.go abort.go $(libraries) tensor.exe : tensor.go $(libraries) @@ -28,7 +29,7 @@ timer.exe : timer.go $(libraries) auto_derivative_function.exe : auto_derivative_function.go $(libraries) -tests = logtest quadrature_test reference tensor timer polynomial_test auto_derivative_function +tests = logtest reference quadrature_test tensor timer polynomial1d polynomial_test auto_derivative_function ############################################################ diff --git a/tests/base/polynomial1d.cc b/tests/base/polynomial1d.cc new file mode 100644 index 0000000000..98f7a5eb3f --- /dev/null +++ b/tests/base/polynomial1d.cc @@ -0,0 +1,55 @@ +//----------------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2000, 2001 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 +#include +#include + +#include +#include +#include + + +double scalar_product (const Polynomial& p1, + const Polynomial& p2) +{ + unsigned int degree = (p1.degree() + p2.degree())/2 + 1; + QGauss<1> gauss(degree); + + double sum = 0.; + for (unsigned int i=0;i > p (15); + for (unsigned int i=0;i(i); + + for (unsigned int i=0;i