19#ifdef DEAL_II_WITH_TRILINOS
31# include <boost/container/small_vector.hpp>
33# ifdef DEAL_II_TRILINOS_WITH_EPETRAEXT
34# include <EpetraExt_MatrixMatrix.h>
36# include <Epetra_Export.h>
37# include <Teuchos_RCP.hpp>
38# include <ml_epetra_utils.h>
39# include <ml_struct.h>
49 template <
typename VectorType>
50 typename VectorType::value_type *
56 template <
typename VectorType>
57 const typename VectorType::value_type *
63 template <
typename VectorType>
64 typename VectorType::value_type *
70 template <
typename VectorType>
71 const typename VectorType::value_type *
72 end(
const VectorType &V)
105# ifdef DEAL_II_TRILINOS_WITH_TPETRA
106 template <
typename Number>
113 template <
typename Number>
120 template <
typename Number>
128 template <
typename Number>
165 std::make_shared<std::vector<TrilinosScalar>>(
matrix->
n());
207 : column_space_map(
new Epetra_Map(0, 0,
Utilities::Trilinos::comm_self()))
209 new Epetra_FECrsMatrix(View, *column_space_map, *column_space_map, 0))
235 matrix(
new Epetra_FECrsMatrix(
256 , matrix(
new Epetra_FECrsMatrix(
274 : column_space_map(
new Epetra_Map(
276 , matrix(
new Epetra_FECrsMatrix(
Copy,
289 : column_space_map(
new Epetra_Map(
291 , matrix(
new Epetra_FECrsMatrix(
Copy,
307 : column_space_map(
new Epetra_Map(
309 , matrix(
new Epetra_FECrsMatrix(
324 : column_space_map(
new Epetra_Map(
326 , matrix(
new Epetra_FECrsMatrix(
339 : column_space_map(
new Epetra_Map(sparsity_pattern.domain_partitioner()))
342 sparsity_pattern.trilinos_sparsity_pattern(),
349 "The Trilinos sparsity pattern has not been compressed."));
356 : column_space_map(std::move(
other.column_space_map))
357 , matrix(std::move(
other.matrix))
358 , nonlocal_matrix(std::move(
other.nonlocal_matrix))
359 , nonlocal_matrix_exporter(std::move(
other.nonlocal_matrix_exporter))
360 , last_action(
other.last_action)
361 , compressed(
other.compressed)
364 other.compressed =
false;
382 !
matrix->RowMap().SameAs(
rhs.matrix->RowMap()) ||
383 !
matrix->ColMap().SameAs(
rhs.matrix->ColMap()) ||
384 !
matrix->DomainMap().SameAs(
rhs.matrix->DomainMap()) ||
414 std::memcmp(
static_cast<void *
>(
index_ptr),
430 std::make_unique<Epetra_Map>(
rhs.trilinos_matrix().DomainMap());
433 matrix = std::make_unique<Epetra_FECrsMatrix>(*
rhs.matrix);
438 if (
rhs.nonlocal_matrix.get() !=
nullptr)
440 std::make_unique<Epetra_CrsMatrix>(
Copy,
rhs.nonlocal_matrix->Graph());
449 template <
typename SparsityPatternType>
456 std::unique_ptr<Epetra_Map> &column_space_map,
457 std::unique_ptr<Epetra_FECrsMatrix> &matrix,
458 std::unique_ptr<Epetra_CrsMatrix> & nonlocal_matrix,
459 std::unique_ptr<Epetra_Export> & nonlocal_matrix_exporter)
463 nonlocal_matrix.reset();
464 nonlocal_matrix_exporter.reset();
466 column_space_map = std::make_unique<Epetra_Map>(
469 if (column_space_map->Comm().MyPID() == 0)
492 matrix = std::make_unique<Epetra_FECrsMatrix>(
520 std::unique_ptr<Epetra_CrsGraph> graph;
522 graph = std::make_unique<Epetra_CrsGraph>(
Copy,
527 graph = std::make_unique<Epetra_CrsGraph>(
Copy,
538 std::vector<TrilinosWrappers::types::int_type> row_indices;
542 const int row_length = sparsity_pattern.row_length(row);
546 row_indices.resize(row_length, -1);
549 sparsity_pattern.
begin(row);
550 for (size_type col = 0; p != sparsity_pattern.
end(row); ++p, ++col)
551 row_indices[col] = p->column();
553 graph->Epetra_CrsGraph::InsertGlobalIndices(row,
563 graph->OptimizeStorage();
571 matrix = std::make_unique<Epetra_FECrsMatrix>(
Copy, *graph,
false);
583 class Epetra_CrsGraphMod :
public Epetra_CrsGraph
586 Epetra_CrsGraphMod(
const Epetra_Map &
row_map,
594 this->Epetra_CrsGraph::SetIndicesAreGlobal(
true);
609 std::unique_ptr<Epetra_Map> & column_space_map,
610 std::unique_ptr<Epetra_FECrsMatrix> &matrix,
611 std::unique_ptr<Epetra_CrsMatrix> & nonlocal_matrix,
612 std::unique_ptr<Epetra_Export> & nonlocal_matrix_exporter)
615 nonlocal_matrix.reset();
616 nonlocal_matrix_exporter.reset();
618 column_space_map = std::make_unique<Epetra_Map>(
642 "Locally relevant rows of sparsity pattern must contain "
643 "all locally owned rows"));
649 const std::vector<::types::global_dof_index> indices =
664 std::vector<TrilinosWrappers::types::int_type>
ghost_rows;
667 for (
unsigned int i = 0,
own = 0; i < n_rows; ++i)
673 else if (sparsity_pattern.
row_length(global_row) > 0)
689 std::unique_ptr<Epetra_CrsGraph> graph;
690 std::unique_ptr<Epetra_CrsGraphMod> nonlocal_graph;
694 std::make_unique<Epetra_CrsGraph>(
Copy,
701 nonlocal_graph = std::make_unique<Epetra_CrsGraphMod>(
706 std::make_unique<Epetra_CrsGraph>(
Copy,
715 std::vector<TrilinosWrappers::types::int_type> row_indices;
717 for (
unsigned int i = 0; i < n_rows; ++i)
721 const int row_length = sparsity_pattern.
row_length(global_row);
725 row_indices.resize(row_length, -1);
726 for (
int col = 0; col < row_length; ++col)
727 row_indices[col] = sparsity_pattern.
column_number(global_row, col);
730 graph->InsertGlobalIndices(global_row,
736 nonlocal_graph->InsertGlobalIndices(global_row,
743 if (nonlocal_graph.get() !=
nullptr)
749 nonlocal_graph->SetIndicesAreGlobal();
750 Assert(nonlocal_graph->IndicesAreGlobal() ==
true,
752 nonlocal_graph->FillComplete(*column_space_map,
row_space_map);
753 nonlocal_graph->OptimizeStorage();
765 std::make_unique<Epetra_CrsMatrix>(
Copy, *nonlocal_graph);
769 graph->OptimizeStorage();
774 matrix = std::make_unique<Epetra_FECrsMatrix>(
Copy, *graph,
false);
780 template <
typename SparsityPatternType>
797 template <
typename SparsityPatternType>
798 inline std::enable_if_t<
799 !std::is_same<SparsityPatternType, ::SparseMatrix<double>>::value>
833 matrix = std::make_unique<Epetra_FECrsMatrix>(
838 std::make_unique<Epetra_CrsMatrix>(
Copy,
856 std::make_unique<Epetra_Map>(
sparse_matrix.trilinos_matrix().DomainMap());
859 matrix = std::make_unique<Epetra_FECrsMatrix>(
874 template <
typename number>
883 const ::SparsityPattern * use_this_sparsity)
889 if (use_this_sparsity ==
nullptr)
909 const ::SparsityPattern &sparsity_pattern =
910 (use_this_sparsity !=
nullptr) ?
914 if (
matrix.get() ==
nullptr ||
m() != n_rows ||
933 for (
size_type row = 0; row < n_rows; ++row)
938 sparsity_pattern.
begin(row);
939 typename ::SparseMatrix<number>::const_iterator
it =
942 if (sparsity_pattern.n_rows() == sparsity_pattern.n_cols())
948 values[col] =
it->value();
949 row_indices[col++] =
it->column();
969 values[col] =
it->value();
970 row_indices[col++] =
it->column();
977 reinterpret_cast<size_type *
>(row_indices.data()),
986 template <
typename number>
992 const ::SparsityPattern * use_this_sparsity)
1010 ExcMessage(
"Input CrsMatrix has not called FillComplete()!"));
1019 matrix = std::make_unique<Epetra_FECrsMatrix>(
Copy, *graph,
false);
1054 "compress() can only be called with VectorOperation add, insert, or unknown"));
1061 ExcMessage(
"Operation and argument to compress() do not match"));
1156 for (
const auto row : rows)
1355 return static_cast<unsigned int>(
ncols);
1366 Assert(row_indices.size() == values.m(),
1371 for (
size_type i = 0; i < row_indices.size(); ++i)
1384 const std::vector<TrilinosScalar> &values,
1401 SparseMatrix::set<TrilinosScalar>(
const size_type row,
1427 boost::container::small_vector<TrilinosWrappers::types::int_type, 200>
1451 const double value = values[
j];
1473 if (
matrix->RowMap().MyGID(
1476 if (
matrix->Filled() ==
false)
1478 ierr =
matrix->Epetra_CrsMatrix::InsertGlobalValues(
1488 ierr =
matrix->Epetra_CrsMatrix::ReplaceGlobalValues(row,
1503 if (
matrix->Filled() ==
false)
1510 Epetra_FECrsMatrix::ROW_MAJOR);
1520 Epetra_FECrsMatrix::ROW_MAJOR);
1539 Assert(indices.size() == values.m(),
1543 for (
size_type i = 0; i < indices.size(); ++i)
1559 Assert(row_indices.size() == values.m(),
1564 for (
size_type i = 0; i < row_indices.size(); ++i)
1577 const std::vector<TrilinosScalar> &values,
1621 boost::container::small_vector<TrilinosWrappers::types::int_type, 100>
1649 const double value = values[
j];
1671 if (
matrix->RowMap().MyGID(
1674 ierr =
matrix->Epetra_CrsMatrix::SumIntoGlobalValues(row,
1688 ExcMessage(
"Attempted to write into off-processor matrix row "
1689 "that has not be specified as being writable upon "
1712 Epetra_FECrsMatrix::ROW_MAJOR);
1719 std::cout <<
"------------------------------------------" << std::endl;
1720 std::cout <<
"Got error " <<
ierr <<
" in row " << row <<
" of proc "
1721 <<
matrix->RowMap().Comm().MyPID()
1722 <<
" when trying to add the columns:" << std::endl;
1725 std::cout << std::endl << std::endl;
1726 std::cout <<
"Matrix row "
1727 << (
matrix->RowMap().MyGID(
1732 <<
" has the following indices:" << std::endl;
1733 std::vector<TrilinosWrappers::types::int_type> indices;
1734 const Epetra_CrsGraph * graph =
1741 indices.resize(graph->NumGlobalIndices(row));
1743 graph->ExtractGlobalRowCopy(row,
1750 std::cout << indices[i] <<
" ";
1751 std::cout << std::endl << std::endl;
1785 ExcMessage(
"Can only add matrices with same distribution of rows"));
1787 ExcMessage(
"Addition of matrices only allowed if matrices are "
1788 "filled, i.e., compress() has been called"));
1846 "Adding the entries from the other matrix "
1847 "failed, because the sparsity pattern "
1848 "of that matrix includes more elements than the "
1849 "calling matrix, which is not allowed."));
1868 if (!
matrix->UseTranspose())
1914 return matrix->NormOne();
1923 return matrix->NormInf();
1932 return matrix->NormFrobenius();
1939 namespace SparseMatrixImplementation
1941 template <
typename VectorType>
1954 ExcMessage(
"The column partitioning of a matrix does not match "
1955 "the partitioning of a vector you are trying to "
1956 "multiply it with. Are you multiplying the "
1957 "matrix with a vector that has ghost elements?"));
1959 ExcMessage(
"The row partitioning of a matrix does not match "
1960 "the partitioning of a vector you are trying to "
1961 "put the result of a matrix-vector product in. "
1962 "Are you trying to put the product of the "
1963 "matrix with a vector into a vector that has "
1964 "ghost elements?"));
1973 template <
typename VectorType>
1975 std::is_same<typename VectorType::value_type, TrilinosScalar>::value>
2007 template <
typename VectorType>
2009 !std::is_same<typename VectorType::value_type, TrilinosScalar>::value>
2017 template <
typename VectorType>
2019 std::is_same<typename VectorType::value_type, TrilinosScalar>::value>
2048 template <
typename VectorType>
2050 !std::is_same<typename VectorType::value_type, TrilinosScalar>::value>
2058 template <
typename VectorType>
2074 template <
typename VectorType>
2151 ExcMessage(
"Parallel partitioning of A and B does not fit."));
2159 ExcMessage(
"Parallel partitioning of A and B does not fit."));
2171 if (use_vector ==
false)
2180 new Epetra_CrsMatrix(
Copy,
inputright.trilinos_sparsity_pattern()),
2185 ExcMessage(
"Parallel distribution of matrix B and vector V "
2186 "does not match."));
2189 for (
int i = 0; i <
local_N; ++i)
2194 inputright.trilinos_matrix().ExtractMyRowView(i,
2205 inputleft.locally_owned_domain_indices() :
2206 inputleft.locally_owned_range_indices(),
2210# ifdef DEAL_II_TRILINOS_WITH_EPETRAEXT
2211 EpetraExt::MatrixMatrix::Multiply(
inputleft.trilinos_matrix(),
2215 const_cast<Epetra_CrsMatrix &
>(
2219 ExcMessage(
"This function requires that the Trilinos "
2220 "installation found while running the deal.II "
2221 "CMake scripts contains the optional Trilinos "
2222 "package 'EpetraExt'. However, this optional "
2223 "part of Trilinos was not found."));
2273 for (
int i = 0; i <
matrix->NumMyRows(); ++i)
2284 <<
") " << values[
j] << std::endl;
2297 sizeof(*this) +
sizeof(*matrix) +
sizeof(*
matrix->Graph().DataPtr());
2300 matrix->NumMyNonzeros() +
2310 dynamic_cast<const Epetra_MpiComm *
>(&
matrix->RangeMap().Comm());
2321 namespace LinearOperatorImplementation
2324 : use_transpose(
false)
2326 , domain_map(
IndexSet().make_trilinos_map(communicator.Comm()))
2327 , range_map(
IndexSet().make_trilinos_map(communicator.Comm()))
2331 ExcMessage(
"Uninitialized TrilinosPayload::vmult called "
2332 "(Default constructor)"));
2337 ExcMessage(
"Uninitialized TrilinosPayload::Tvmult called "
2338 "(Default constructor)"));
2343 ExcMessage(
"Uninitialized TrilinosPayload::inv_vmult called "
2344 "(Default constructor)"));
2349 ExcMessage(
"Uninitialized TrilinosPayload::inv_Tvmult called "
2350 "(Default constructor)"));
2360 matrix.trilinos_matrix()),
2375 matrix.trilinos_matrix()),
2402 preconditioner.trilinos_operator(),
2428 , inv_vmult(
payload.inv_vmult)
2429 , inv_Tvmult(
payload.inv_Tvmult)
2430 , use_transpose(
payload.use_transpose)
2431 , communicator(
payload.communicator)
2432 , domain_map(
payload.domain_map)
2433 , range_map(
payload.range_map)
2442 : use_transpose(
false)
2445 communicator(
first_op.communicator)
2497 ExcMessage(
"Cannot compute inverse of null operator"));
2506 ExcMessage(
"Cannot compute inverse of null operator"));
2608 return "TrilinosPayload";
2664 second_op.locally_owned_domain_indices(),
2666 "Operators are set to work on incompatible IndexSets."));
2668 second_op.locally_owned_range_indices(),
2670 "Operators are set to work on incompatible IndexSets."));
2844 second_op.locally_owned_range_indices(),
2846 "Operators are set to work on incompatible IndexSets."));
3008# include "trilinos_sparse_matrix.inst"
3023 const ::SparsityPattern &,
3039 const ::Vector<double> &)
const;
3044 const ::LinearAlgebra::distributed::Vector<double> &)
const;
3046# ifdef DEAL_II_TRILINOS_WITH_TPETRA
3047# if defined(HAVE_TPETRA_INST_DOUBLE)
3051 const ::LinearAlgebra::TpetraWrappers::Vector<double> &)
const;
3054# if defined(HAVE_TPETRA_INST_FLOAT)
3058 const ::LinearAlgebra::TpetraWrappers::Vector<float> &)
const;
3065 const ::LinearAlgebra::EpetraWrappers::Vector &)
const;
3072 const ::Vector<double> &)
const;
3077 const ::LinearAlgebra::distributed::Vector<double> &)
const;
3079# ifdef DEAL_II_TRILINOS_WITH_TPETRA
3080# if defined(HAVE_TPETRA_INST_DOUBLE)
3084 const ::LinearAlgebra::TpetraWrappers::Vector<double> &)
const;
3087# if defined(HAVE_TPETRA_INST_FLOAT)
3091 const ::LinearAlgebra::TpetraWrappers::Vector<float> &)
const;
3098 const ::LinearAlgebra::EpetraWrappers::Vector &)
const;
3105 const ::Vector<double> &)
const;
3110 const ::LinearAlgebra::distributed::Vector<double> &)
const;
3112# ifdef DEAL_II_TRILINOS_WITH_TPETRA
3113# if defined(HAVE_TPETRA_INST_DOUBLE)
3117 const ::LinearAlgebra::TpetraWrappers::Vector<double> &)
const;
3120# if defined(HAVE_TPETRA_INST_FLOAT)
3124 const ::LinearAlgebra::TpetraWrappers::Vector<float> &)
const;
3131 const ::LinearAlgebra::EpetraWrappers::Vector &)
const;
3138 const ::Vector<double> &)
const;
3143 const ::LinearAlgebra::distributed::Vector<double> &)
const;
3145# ifdef DEAL_II_TRILINOS_WITH_TPETRA
3146# if defined(HAVE_TPETRA_INST_DOUBLE)
3150 const ::LinearAlgebra::TpetraWrappers::Vector<double> &)
const;
3153# if defined(HAVE_TPETRA_INST_FLOAT)
3157 const ::LinearAlgebra::TpetraWrappers::Vector<float> &)
const;
3164 const ::LinearAlgebra::EpetraWrappers::Vector &)
const;
value_type * data() const noexcept
void reinit(value_type *starting_element, const std::size_t n_elements)
const IndexSet & row_index_set() const
size_type row_length(const size_type row) const
size_type column_number(const size_type row, const size_type index) const
const Epetra_FEVector & trilinos_vector() const
const Tpetra::Vector< Number, int, types::signed_global_dof_index > & trilinos_vector() const
const Epetra_BlockMap & trilinos_partitioner() const
real_type l2_norm() const
const Epetra_MultiVector & trilinos_vector() const
std::pair< size_type, size_type > local_range() const
std::shared_ptr< std::vector< TrilinosScalar > > value_cache
std::shared_ptr< std::vector< size_type > > colnum_cache
void set(const size_type i, const size_type j, const TrilinosScalar value)
std::unique_ptr< Epetra_Map > column_space_map
MPI_Comm get_mpi_communicator() const
SparseMatrix & operator*=(const TrilinosScalar factor)
void mmult(SparseMatrix &C, const SparseMatrix &B, const MPI::Vector &V=MPI::Vector()) const
std::unique_ptr< Epetra_Export > nonlocal_matrix_exporter
TrilinosScalar l1_norm() const
void compress(VectorOperation::values operation)
std::unique_ptr< Epetra_FECrsMatrix > matrix
::types::global_dof_index size_type
TrilinosScalar linfty_norm() const
const Epetra_CrsMatrix & trilinos_matrix() const
size_type memory_consumption() const
TrilinosScalar matrix_norm_square(const MPI::Vector &v) const
Epetra_CombineMode last_action
IndexSet locally_owned_range_indices() const
void print(std::ostream &out, const bool write_extended_trilinos_info=false) const
void Tmmult(SparseMatrix &C, const SparseMatrix &B, const MPI::Vector &V=MPI::Vector()) const
void clear_row(const size_type row, const TrilinosScalar new_diag_value=0)
void reinit(const SparsityPatternType &sparsity_pattern)
std::enable_if_t< std::is_same< typename VectorType::value_type, TrilinosScalar >::value > Tvmult(VectorType &dst, const VectorType &src) const
void vmult_add(VectorType &dst, const VectorType &src) const
SparseMatrix & operator=(const SparseMatrix &)=delete
SparseMatrix & operator/=(const TrilinosScalar factor)
void Tvmult_add(VectorType &dst, const VectorType &src) const
void clear_rows(const std::vector< size_type > &rows, const TrilinosScalar new_diag_value=0)
TrilinosScalar el(const size_type i, const size_type j) const
TrilinosScalar residual(MPI::Vector &dst, const MPI::Vector &x, const MPI::Vector &b) const
bool in_local_range(const size_type index) const
void copy_from(const SparseMatrix &source)
unsigned int row_length(const size_type row) const
TrilinosScalar frobenius_norm() const
std::uint64_t n_nonzero_elements() const
TrilinosScalar diag_element(const size_type i) const
void add(const size_type i, const size_type j, const TrilinosScalar value)
unsigned int local_size() const
TrilinosScalar operator()(const size_type i, const size_type j) const
TrilinosScalar matrix_scalar_product(const MPI::Vector &u, const MPI::Vector &v) const
std::pair< size_type, size_type > local_range() const
std::enable_if_t< std::is_same< typename VectorType::value_type, TrilinosScalar >::value > vmult(VectorType &dst, const VectorType &src) const
std::unique_ptr< Epetra_CrsMatrix > nonlocal_matrix
std::unique_ptr< Epetra_CrsGraph > nonlocal_graph
const Epetra_Map & domain_partitioner() const
const Epetra_FECrsGraph & trilinos_sparsity_pattern() const
Epetra_MpiComm communicator
std::function< void(VectorType &, const VectorType &)> inv_Tvmult
virtual int SetUseTranspose(bool UseTranspose) override
virtual bool UseTranspose() const override
virtual const Epetra_Map & OperatorDomainMap() const override
IndexSet locally_owned_range_indices() const
TrilinosPayload transpose_payload() const
Epetra_MultiVector VectorType
MPI_Comm get_mpi_communicator() const
virtual int ApplyInverse(const VectorType &Y, VectorType &X) const override
std::function< void(VectorType &, const VectorType &)> Tvmult
virtual int Apply(const VectorType &X, VectorType &Y) const override
std::function< void(VectorType &, const VectorType &)> vmult
virtual const Epetra_Map & OperatorRangeMap() const override
std::function< void(VectorType &, const VectorType &)> inv_vmult
virtual const char * Label() const override
IndexSet locally_owned_domain_indices() const
virtual const Epetra_Comm & Comm() const override
virtual bool HasNormInf() const override
TrilinosPayload identity_payload() const
virtual double NormInf() const override
TrilinosPayload null_payload() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcIO()
static ::ExceptionBase & ExcNotImplemented()
static ::ExceptionBase & ExcScalarAssignmentOnlyForZeroValue()
static ::ExceptionBase & ExcInvalidIndex(size_type arg1, size_type arg2)
#define Assert(cond, exc)
static ::ExceptionBase & ExcAccessToNonPresentElement(size_type arg1, size_type arg2)
#define AssertIsFinite(number)
static ::ExceptionBase & ExcAccessToNonlocalRow(std::size_t arg1)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDivideByZero()
static ::ExceptionBase & ExcSourceEqualsDestination()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcNotQuadratic()
static ::ExceptionBase & ExcMatrixNotCompressed()
static ::ExceptionBase & ExcTrilinosError(int arg1)
static ::ExceptionBase & ExcAccessToNonLocalElement(size_type arg1, size_type arg2, size_type arg3, size_type arg4)
static ::ExceptionBase & ExcMessage(std::string arg1)
static ::ExceptionBase & ExcTrilinosError(int arg1)
#define AssertThrow(cond, exc)
IndexSet complete_index_set(const IndexSet::size_type N)
@ matrix
Contents is actually a matrix.
types::global_dof_index size_type
TrilinosPayload operator+(const TrilinosPayload &first_op, const TrilinosPayload &second_op)
TrilinosPayload operator*(const TrilinosPayload &first_op, const TrilinosPayload &second_op)
void check_vector_map_equality(const Epetra_CrsMatrix &, const VectorType &, const VectorType &)
VectorType::value_type * end(VectorType &V)
VectorType::value_type * begin(VectorType &V)
void perform_mmult(const SparseMatrix &inputleft, const SparseMatrix &inputright, SparseMatrix &result, const MPI::Vector &V, const bool transpose_left)
TrilinosWrappers::types::int_type min_my_gid(const Epetra_BlockMap &map)
TrilinosWrappers::types::int64_type n_global_elements(const Epetra_BlockMap &map)
TrilinosWrappers::types::int_type global_column_index(const Epetra_CrsMatrix &matrix, const ::types::global_dof_index i)
TrilinosWrappers::types::int_type max_my_gid(const Epetra_BlockMap &map)
TrilinosWrappers::types::int_type global_row_index(const Epetra_CrsMatrix &matrix, const ::types::global_dof_index i)
TrilinosWrappers::types::int_type n_global_cols(const Epetra_CrsGraph &graph)
const Epetra_Comm & comm_self()
Iterator lower_bound(Iterator first, Iterator last, const T &val)
unsigned int global_dof_index