From: Luca Heltai Date: Tue, 10 Nov 2015 23:22:26 +0000 (+0100) Subject: Added test for BlockDiagonalOperator bug. X-Git-Tag: v8.4.0-rc2~231^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=569ecd1ea5acc262bb23bb97bf4b9c1512d1a870;p=dealii.git Added test for BlockDiagonalOperator bug. --- diff --git a/tests/lac/block_linear_operator_05.cc b/tests/lac/block_linear_operator_05.cc new file mode 100644 index 0000000000..9a9df6db42 --- /dev/null +++ b/tests/lac/block_linear_operator_05.cc @@ -0,0 +1,53 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2015 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 at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + +// Test that it is possible to create a block diagonal linear operator +// from other linear operators involving Trilinos matrices. + +#include "../tests.h" + +#include +#include +#include +#include +#include +#include + +using namespace dealii; + +int main(int argc, char *argv[]) +{ + Utilities::MPI::MPI_InitFinalize mpi_initialization (argc, argv, 1); + + initlog(); + deallog << std::setprecision(10); + + TrilinosWrappers::SparseMatrix a; + + auto op_a = linear_operator(a); + auto op_a2 = linear_operator(a); + + TrilinosWrappers::BlockSparseMatrix b; + + auto op_b = linear_operator(b); + auto op_b3 = linear_operator(b); + + auto op_c = block_diagonal_operator<2, TrilinosWrappers::MPI::BlockVector >({{ op_a, op_a}}); + auto op_c2 = block_diagonal_operator<2, TrilinosWrappers::BlockVector >({{ op_a2, op_a2}}); + + deallog << "OK" << std::endl; + + return 0; +} diff --git a/tests/lac/block_linear_operator_05.with_cxx11=on.with_trilinos=on.output b/tests/lac/block_linear_operator_05.with_cxx11=on.with_trilinos=on.output new file mode 100644 index 0000000000..0fd8fc12f0 --- /dev/null +++ b/tests/lac/block_linear_operator_05.with_cxx11=on.with_trilinos=on.output @@ -0,0 +1,2 @@ + +DEAL::OK