From: Daniel Arndt Date: Mon, 27 May 2019 13:27:35 +0000 (-0400) Subject: Add tests X-Git-Tag: v9.2.0-rc1~1444^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7f114eda21211c5895c86f61b937b43a05cbd78;p=dealii.git Add tests --- diff --git a/tests/trilinos/sparsity_pattern_07.cc b/tests/trilinos/sparsity_pattern_07.cc new file mode 100644 index 0000000000..0d68aa125a --- /dev/null +++ b/tests/trilinos/sparsity_pattern_07.cc @@ -0,0 +1,49 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 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 TrilinosWrappers::SparsityPattern::row_length +#include +#include + +#include + +#include "../tests.h" + +int +main(int argc, char **argv) +{ + Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1); + + MPILogInitAll mpi_log; + + const unsigned int n = Utilities::MPI::n_mpi_processes(MPI_COMM_WORLD); + IndexSet owned_set(n); + owned_set.add_index(Utilities::MPI::this_mpi_process(MPI_COMM_WORLD)); + IndexSet relevant_set(n); + relevant_set.add_range(0, n); + IndexSet empty_set; + TrilinosWrappers::SparsityPattern sparsity(owned_set, + empty_set, + relevant_set, + MPI_COMM_WORLD); + + deallog << "\nBefore compressing sparsity pattern..." << std::endl; + sparsity.compress(); + deallog << "Compressing sparsity pattern worked!\n\n" << std::endl; + + return 0; +} diff --git a/tests/trilinos/sparsity_pattern_07.mpirun=1.output b/tests/trilinos/sparsity_pattern_07.mpirun=1.output new file mode 100644 index 0000000000..f907400e86 --- /dev/null +++ b/tests/trilinos/sparsity_pattern_07.mpirun=1.output @@ -0,0 +1,6 @@ + +DEAL:0:: +Before compressing sparsity pattern... +DEAL:0::Compressing sparsity pattern worked! + + diff --git a/tests/trilinos/sparsity_pattern_07.mpirun=2.output b/tests/trilinos/sparsity_pattern_07.mpirun=2.output new file mode 100644 index 0000000000..fb2f89d478 --- /dev/null +++ b/tests/trilinos/sparsity_pattern_07.mpirun=2.output @@ -0,0 +1,13 @@ + +DEAL:0:: +Before compressing sparsity pattern... +DEAL:0::Compressing sparsity pattern worked! + + + +DEAL:1:: +Before compressing sparsity pattern... +DEAL:1::Compressing sparsity pattern worked! + + +