From 09e3944c6e653dbed77210ec8842dba96de27f1a Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Mon, 15 Apr 2019 11:30:30 -0500 Subject: [PATCH] add a test --- tests/sparsity/dynamic_sparsity_pattern_21.cc | 40 +++++++++++++++++++ .../dynamic_sparsity_pattern_21.output | 2 + 2 files changed, 42 insertions(+) create mode 100644 tests/sparsity/dynamic_sparsity_pattern_21.cc create mode 100644 tests/sparsity/dynamic_sparsity_pattern_21.output 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 -- 2.39.5