From: bangerth Date: Wed, 25 Oct 2006 00:16:06 +0000 (+0000) Subject: One more test X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07f53887330b2363275dc544521c6ebacece5e51;p=dealii-svn.git One more test git-svn-id: https://svn.dealii.org/trunk@14078 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/umfpack/umfpack_06.cc b/tests/umfpack/umfpack_06.cc new file mode 100644 index 0000000000..48e12db13f --- /dev/null +++ b/tests/umfpack/umfpack_06.cc @@ -0,0 +1,78 @@ +//---------------------------------------------------------------------- +// $Id: umfpack_03.cc 13855 2006-09-08 14:42:11Z heltai $ +// Version: $Name$ +// +// Copyright (C) 2002, 2003, 2004, 2005, 2006 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. +// +//---------------------------------------------------------------------- + +// test the umfpack sparse direct solver on a simple 2x2 block matrix +// that equals the unit matrix. same as umfpack_05, but with the +// difference that there, the matrix is partitioned into 2+2 rows and +// columns. here, do it as 3+1 + +#include "../tests.h" +#include +#include +#include + +#include +#include +#include +#include + + +void test () +{ + std::vector size (2); + size[0] = 3; + size[1] = 1; + + BlockSparsityPattern b_sparsity_pattern; + b_sparsity_pattern.reinit(size.size(),size.size()); + for (unsigned int k=0; k Bb (b_sparsity_pattern); + for (unsigned int i=0; i<4; ++i) + Bb.add (i,i,1); + + SparseDirectUMFPACK umfpackb; + umfpackb.factorize(Bb); + + Vector ubb(4); + for (unsigned int i=0; i<4; ++i) + ubb(i) = i; + + umfpackb.solve(ubb); + + for (unsigned int i=0; i<4; ++i) + Assert (std::fabs (ubb(i) - i) < 1e-12, + ExcInternalError()); + + deallog << "OK" << std::endl; +} + + +int main () +{ + std::ofstream logfile("umfpack_06/output"); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.threshold_double(1.e-10); + + test (); +} diff --git a/tests/umfpack/umfpack_06/cmp/generic b/tests/umfpack/umfpack_06/cmp/generic new file mode 100644 index 0000000000..0fd8fc12f0 --- /dev/null +++ b/tests/umfpack/umfpack_06/cmp/generic @@ -0,0 +1,2 @@ + +DEAL::OK