From: kanschat Date: Wed, 6 Sep 2006 20:27:51 +0000 (+0000) Subject: add lapack tests and produce eigenvalue data for tridiagonal matrix X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84d71f4333c8c6a0b3d6592c86d6407305c61942;p=dealii-svn.git add lapack tests and produce eigenvalue data for tridiagonal matrix git-svn-id: https://svn.dealii.org/trunk@13839 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/Makefile b/tests/Makefile index 1fc7e8a8df..1ef1b6d2bc 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -3,6 +3,9 @@ # Common Makefile for all test directories all: base lac fe deal.II multigrid bits hp + @if grep 'define HAVE_LIBLAPACK' $D/base/include/base/config.h ; then \ + cd lapack ; $(MAKE) ; cd .. ; \ + fi base: cd base ; $(MAKE) @@ -30,17 +33,28 @@ report: echo =======Report: $$i ======= ; \ cd $$i ; $(MAKE) report ; cd .. ; \ done + @if grep 'define HAVE_LIBLAPACK' $D/base/include/base/config.h ; then \ + echo =======Report: lapack ======= ; \ + cd lapack ; $(MAKE) report ; cd .. ; \ + fi report+mail: @for i in base lac fe deal.II multigrid bits hp all-headers ; do \ echo =======Report: $$i ======= ; \ cd $$i ; $(MAKE) report+mail ; cd .. ; \ done + @if grep 'define HAVE_LIBLAPACK' $D/base/include/base/config.h ; then \ + echo =======Report: lapack ======= ; \ + cd lapack ; $(MAKE) report+mail ; cd .. ; \ + fi # compilation of tests only, no execution of tests build: build-base build-lac build-fe build-deal.II build-multigrid build-bits build-hp + @if grep 'define HAVE_LIBLAPACK' $D/base/include/base/config.h ; then \ + cd lapack ; $(MAKE) build ; cd .. ; \ + fi build-base: cd base ; $(MAKE) build @@ -68,6 +82,9 @@ build-hp: # reference values output: output-base output-lac output-fe output-deal.II output-bits output-hp + @if grep 'define HAVE_LIBLAPACK' $D/base/include/base/config.h ; then \ + cd lapack ; $(MAKE) output ; cd .. ; \ + fi output-base: cd base ; $(MAKE) output @@ -95,6 +112,9 @@ output-hp: # update/generate references refs: refs-base refs-lac refs-fe refs-deal.II refs-bits refs-hp + @if grep 'define HAVE_LIBLAPACK' $D/base/include/base/config.h ; then \ + cd lapack ; $(MAKE) refs ; cd .. ; \ + fi refs-base: cd base ; $(MAKE) refs @@ -122,9 +142,9 @@ refs-hp: resultname: @echo $(TARGET)+$(GXX-VERSION) -clean: clean-base clean-lac clean-deal.II clean-fe clean-bits clean-hp +clean: clean-base clean-lac clean-deal.II clean-fe clean-bits clean-hp clean-lapack -distclean: distclean-base distclean-lac distclean-deal.II distclean-fe distclean-bits distclean-hp +distclean: distclean-base distclean-lac distclean-deal.II distclean-fe distclean-bits distclean-hp distclean-lapack clean-base: cd base ; $(MAKE) clean @@ -168,6 +188,12 @@ clean-hp: distclean-hp: cd hp ; $(MAKE) distclean +clean-lapack: + cd lapack ; $(MAKE) clean + +distclean-lapack: + cd lapack ; $(MAKE) distclean + .PHONY : all base lac fe deal.II multigrid bits \ clean clean-base clean-lac clean-fe \ clean-deal.II clean-multigrid clean-bits clean-hp \ diff --git a/tests/lapack/tridiagonal_ev1.cc b/tests/lapack/tridiagonal_ev1.cc index 00724939b6..3066355804 100644 --- a/tests/lapack/tridiagonal_ev1.cc +++ b/tests/lapack/tridiagonal_ev1.cc @@ -22,20 +22,22 @@ #include +// Build the one dimensional discrete Laplacian for n intervals template void test_laplacian(unsigned int n) { - TridiagonalMatrix M(n, true); - for (unsigned int i=0;i M(n-1, true); + for (unsigned int i=0;i(50); + test_laplacian(10); + test_laplacian(20); + test_laplacian(40); + test_laplacian(80); } diff --git a/tests/lapack/tridiagonal_ev1/cmp/generic b/tests/lapack/tridiagonal_ev1/cmp/generic index c8eede55a5..eca9a04032 100644 --- a/tests/lapack/tridiagonal_ev1/cmp/generic +++ b/tests/lapack/tridiagonal_ev1/cmp/generic @@ -1,10 +1,5 @@ -DEAL:Rect::operator= (const FullMatrix&) ok -DEAL:Rect::vmult ok -DEAL:Rect::vmult_add ok -DEAL:Rect::Tvmult ok -DEAL:Rect::Tvmult_add ok -DEAL::Eigenvalues 5 0 -DEAL::Eigenvalues 1 0 -DEAL::Eigenvalues 5 0 -DEAL::Eigenvalues 5 0 +DEAL:: 9.78870 38.1966 82.4429 138.197 200.000 cond 39.8635 +DEAL:: 9.84933 39.1548 87.1948 152.786 234.315 cond 161.448 +DEAL:: 9.86453 39.3973 88.4163 156.619 243.585 cond 647.789 +DEAL:: 9.86834 39.4581 88.7238 157.589 245.948 cond 2593.16