From: willems Date: Mon, 19 Mar 2012 13:57:10 +0000 (+0000) Subject: test for lapack eigenvalue solver for symmetric matrices with additional options... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6071cf7e66037a7ccb0e1378c6e14ef2172823d5;p=dealii-svn.git test for lapack eigenvalue solver for symmetric matrices with additional options included git-svn-id: https://svn.dealii.org/trunk@25301 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/lapack/full_matrix_05/exe b/tests/lapack/full_matrix_05/exe index cbb9b4c329..0c5a9e59e3 100755 Binary files a/tests/lapack/full_matrix_05/exe and b/tests/lapack/full_matrix_05/exe differ diff --git a/tests/lapack/full_matrix_06/exe b/tests/lapack/full_matrix_06/exe index 87afd3a584..80ece70cc3 100755 Binary files a/tests/lapack/full_matrix_06/exe and b/tests/lapack/full_matrix_06/exe differ diff --git a/tests/lapack/full_matrix_07.cc b/tests/lapack/full_matrix_07.cc new file mode 100644 index 0000000000..da3686102c --- /dev/null +++ b/tests/lapack/full_matrix_07.cc @@ -0,0 +1,70 @@ +//-------------------------------------------------------------------- +// $Id: full_matrix_05.cc 23710 2011-05-17 04:50:10Z bangerth $ +// Version: $Name$ +// +// Copyright (C) 2005, 2006, 2010 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. +// +//-------------------------------------------------------------------- + +// Tests eigenvalues of FullMatrix + +#include "../tests.h" +#include +#include +#include +#include + +#include +#include +#include +#include + +const double left[] = +{ + + 1.75, -0.433012701892219, 0.0, 0.0, + -0.433012701892219, 1.25, 0.0, 0.0, + 0.0, 0.0, 3.5, -0.5, + 0.0, 0.0, -0.5, 3.5 +}; + + + +int main() +{ + const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output"); + std::ofstream logfile(logname.c_str()); + logfile.precision(1); + deallog.attach(logfile); + deallog.depth_console(0); + + FullMatrix A(4,4,left); + LAPACKFullMatrix LA(4,4); + LA = A; + FullMatrix eigenvectors; + Vector eigenvalues(0); + + LA.compute_eigenvalues_symmetric (0.5, 2.5, + 2.0*DBL_MIN, + eigenvalues, + eigenvectors); + + for (unsigned int i=0;i