From: wolf Date: Sat, 19 Jun 2004 19:18:47 +0000 (+0000) Subject: New tests. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e7cee81b90d8d4a12400fd70c75b0f65a2941c0;p=dealii-svn.git New tests. git-svn-id: https://svn.dealii.org/trunk@9432 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/Makefile b/tests/bits/Makefile index e7978acc21..df99da89ef 100644 --- a/tests/bits/Makefile +++ b/tests/bits/Makefile @@ -60,7 +60,8 @@ tests_x = anna_? \ apply_boundary_values_* \ error_estimator_* \ cylinder_shell_* \ - grid_in_* + grid_in_* \ + compressed_sparsity_pattern_* # tests for the hp branch: # fe_collection_* diff --git a/tests/bits/compressed_sparsity_pattern_01.cc b/tests/bits/compressed_sparsity_pattern_01.cc new file mode 100644 index 0000000000..4cd673eca0 --- /dev/null +++ b/tests/bits/compressed_sparsity_pattern_01.cc @@ -0,0 +1,52 @@ +//---------------------------- compressed_sparsity_pattern_01.cc --------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2004 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. +// +//---------------------------- compressed_sparsity_pattern_01.cc --------------------------- + + +// check CompressedSparsityPattern::n_nonzero_elements. test n_rows() and +// n_cols() in passing + +#include "../tests.h" +#include +#include +#include +#include + + +void test () +{ + // set up a sparsity pattern. since + // CompressedSparsityPatterns are most + // often used for 3d, use a rather large + // number of entries per row + const unsigned int N = 1000; + CompressedSparsityPattern csp (N,N); + for (unsigned int i=0; i +#include +#include +#include + + +void test () +{ + // set up a sparsity pattern. since + // CompressedSparsityPatterns are most + // often used for 3d, use a rather large + // number of entries per row + const unsigned int N = 1000; + CompressedSparsityPattern csp (N,N); + for (unsigned int i=0; i +#include +#include +#include + + +void test () +{ + // set up a sparsity pattern. since + // CompressedSparsityPatterns are most + // often used for 3d, use a rather large + // number of entries per row + const unsigned int N = 1000; + CompressedSparsityPattern csp (N,N); + for (unsigned int i=0; i +#include +#include +#include + + +void test () +{ + const unsigned int N = 100; + CompressedSparsityPattern csp (N,N); + for (unsigned int i=0; i +#include +#include +#include + + +void test () +{ + const unsigned int N = 100; + CompressedSparsityPattern csp (N,N); + for (unsigned int i=0; i +#include +#include +#include + + +std::ofstream logfile("compressed_sparsity_pattern_06.output"); + +void test () +{ + const unsigned int N = 100; + CompressedSparsityPattern csp (N,N); + for (unsigned int i=0; i +#include +#include +#include + + +void test () +{ + const unsigned int N = 100; + CompressedSparsityPattern csp (N,N); + for (unsigned int i=0; i +#include +#include +#include + + +void test () +{ + // set up a sparsity pattern. since + // CompressedSparsityPatterns are most + // often used for 3d, use a rather large + // number of entries per row + const unsigned int N = 1000; + CompressedSparsityPattern csp (N,N); + for (unsigned int i=0; i +#include +#include +#include + + +void test () +{ + const unsigned int N = 1000; + CompressedSparsityPattern csp; + Assert (csp.empty() == true, ExcInternalError()); + + csp.reinit (N, N); + Assert (csp.empty() == false, ExcInternalError()); + + deallog << "OK" << std::endl; +} + + + +int main () +{ + std::ofstream logfile("compressed_sparsity_pattern_09.output"); + deallog.attach(logfile); + deallog.depth_console(0); + + test (); + return 0; +}