From: Matthias Maier Date: Mon, 15 Apr 2019 16:30:30 +0000 (-0500) Subject: add a test X-Git-Tag: v9.1.0-rc1~190^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09e3944c6e653dbed77210ec8842dba96de27f1a;p=dealii.git add a test --- diff --git a/tests/sparsity/dynamic_sparsity_pattern_21.cc b/tests/sparsity/dynamic_sparsity_pattern_21.cc new file mode 100644 index 0000000000..cd217ae249 --- /dev/null +++ b/tests/sparsity/dynamic_sparsity_pattern_21.cc @@ -0,0 +1,40 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2004 - 2019 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE.md at +// the top level directory of deal.II. +// +// --------------------------------------------------------------------- + +// Check DynamicSparsityPattern::exists() with supplied rowindex by copying +// to a static SparsityPattern. + +#include +#include + +#include "../tests.h" + +int +main() +{ + initlog(); + + const unsigned int n_dofs = 2; + IndexSet index_set(n_dofs); + index_set.add_index(1); + + DynamicSparsityPattern dsp(n_dofs, n_dofs, index_set); + SparsityPattern sp; + sp.copy_from(dsp); + + deallog << "OK" << std::endl; + + return 0; +} diff --git a/tests/sparsity/dynamic_sparsity_pattern_21.output b/tests/sparsity/dynamic_sparsity_pattern_21.output new file mode 100644 index 0000000000..0fd8fc12f0 --- /dev/null +++ b/tests/sparsity/dynamic_sparsity_pattern_21.output @@ -0,0 +1,2 @@ + +DEAL::OK