From b5b28e05fa9783e4037dc8a4ee4de03f1a10e09f Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sat, 18 Apr 2020 23:37:18 +0200 Subject: [PATCH] Instantiate AffineConstraints::distribute_local_to_global for TrilinosWrappers::SparseMatrix and LinearAlgebra::distributed::Vector --- source/lac/affine_constraints.inst.in | 18 ++++++++++++++++++ tests/trilinos/direct_solver_3.cc | 9 +++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/source/lac/affine_constraints.inst.in b/source/lac/affine_constraints.inst.in index c5635d230b..a976cb5320 100644 --- a/source/lac/affine_constraints.inst.in +++ b/source/lac/affine_constraints.inst.in @@ -171,6 +171,24 @@ for (S : REAL_AND_COMPLEX_SCALARS; T : DEAL_II_VEC_TEMPLATES) std::integral_constant) const; } +// TrilinosWrappers::SparseMatrix: + +for (T : DEAL_II_VEC_TEMPLATES) + { +#ifdef DEAL_II_WITH_TRILINOS + template void AffineConstraints::distribute_local_to_global< + TrilinosWrappers::SparseMatrix, + LinearAlgebra::distributed::T>( + const FullMatrix &, + const Vector &, + const std::vector &, + TrilinosWrappers::SparseMatrix &, + LinearAlgebra::distributed::T &, + bool, + std::integral_constant) const; +#endif + } + // BlockSparseMatrix: for (S : REAL_AND_COMPLEX_SCALARS) diff --git a/tests/trilinos/direct_solver_3.cc b/tests/trilinos/direct_solver_3.cc index 458391f51f..71051f1c37 100644 --- a/tests/trilinos/direct_solver_3.cc +++ b/tests/trilinos/direct_solver_3.cc @@ -232,13 +232,10 @@ Step4::assemble_system() cell->get_dof_indices(local_dof_indices); constraints.distribute_local_to_global(cell_matrix, + cell_rhs, local_dof_indices, - system_matrix); - - constraints.distribute_local_to_global(cell_rhs, - local_dof_indices, - system_rhs, - cell_matrix); + system_matrix, + system_rhs); constraints.distribute_local_to_global(cell_rhs_two, local_dof_indices, system_rhs_two, -- 2.39.5