<commit_before>// ---------------------------------------------------------------------
//
// 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 <deal.II/lac/linear_operator.h>
#include <deal.II/lac/block_linear_operator.h>
#include <deal.II/lac/trilinos_block_sparse_matrix.h>
#include <deal.II/lac/trilinos_sparse_matrix.h>
#include <deal.II/lac/trilinos_vector.h>
#include <deal.II/lac/trilinos_block_vector.h>

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<TrilinosWrappers::MPI::Vector>(a);
  auto op_a2  = linear_operator<TrilinosWrappers::Vector>(a);

  TrilinosWrappers::BlockSparseMatrix b;

  auto op_b = linear_operator<TrilinosWrappers::MPI::BlockVector>(b);
  auto op_b3 = linear_operator<TrilinosWrappers::BlockVector>(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;<commit_msg>Work around a bug in gcc 4.6.<commit_after>// ---------------------------------------------------------------------
//
// 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 <deal.II/lac/linear_operator.h>
#include <deal.II/lac/block_linear_operator.h>
#include <deal.II/lac/trilinos_block_sparse_matrix.h>
#include <deal.II/lac/trilinos_sparse_matrix.h>
#include <deal.II/lac/trilinos_vector.h>
#include <deal.II/lac/trilinos_block_vector.h>

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<TrilinosWrappers::MPI::Vector>(a);
  auto op_a2  = linear_operator<TrilinosWrappers::Vector>(a);

  TrilinosWrappers::BlockSparseMatrix b;

  auto op_b = linear_operator<TrilinosWrappers::MPI::BlockVector>(b);
  auto op_b3 = linear_operator<TrilinosWrappers::BlockVector>(b);

  typedef LinearOperator<TrilinosWrappers::MPI::Vector,TrilinosWrappers::MPI::Vector> Op_MPI;
  typedef LinearOperator<TrilinosWrappers::Vector,TrilinosWrappers::Vector> Op;

  auto op_c = block_diagonal_operator<2, TrilinosWrappers::MPI::BlockVector >(std::array<Op_MPI,2> ({{ op_a, op_a}}));
  auto op_c2 = block_diagonal_operator<2, TrilinosWrappers::BlockVector >(std::array<Op,2> ({{ op_a2, op_a2}}));

  deallog << "OK" << std::endl;

  return 0;
{'fraction_non_alphanumeric': 0.18590553169992421, 'fraction_numerical': 0.00959838343015913, 'mean_word_length': 3.3805309734513274, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '114613', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1263, 'n_words': 341}