From: Daniel Arndt Date: Tue, 30 Jan 2024 20:48:39 +0000 (-0500) Subject: Prefer trilinos_vector over trilinos_rcp X-Git-Tag: relicensing~96^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0494d709a3174ec22d2b6f3c62cda5cf2f9ee992;p=dealii.git Prefer trilinos_vector over trilinos_rcp --- diff --git a/include/deal.II/lac/affine_constraints.templates.h b/include/deal.II/lac/affine_constraints.templates.h index 588d076ae5..0d1c1042b2 100644 --- a/include/deal.II/lac/affine_constraints.templates.h +++ b/include/deal.II/lac/affine_constraints.templates.h @@ -2671,7 +2671,7 @@ namespace internal parallel_partitioner.add_indices(needed_elements); const MPI_Comm mpi_comm = Utilities::Trilinos::teuchos_comm_to_mpi_comm( - vec.trilinos_rcp()->getMap()->getComm()); + vec.trilinos_vector().getMap()->getComm()); output.reinit(locally_owned_elements, needed_elements, mpi_comm); diff --git a/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h b/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h index d13fdac5ff..b4fe9fb261 100644 --- a/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h +++ b/include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h @@ -590,11 +590,11 @@ namespace LinearAlgebra { Assert(&src != &dst, ExcSourceEqualsDestination()); Assert(matrix->isFillComplete(), ExcMatrixNotCompressed()); - Assert(src.trilinos_rcp()->getMap()->isSameAs(*matrix->getDomainMap()), + Assert(src.trilinos_vector().getMap()->isSameAs(*matrix->getDomainMap()), ExcColMapMissmatch()); - Assert(dst.trilinos_rcp()->getMap()->isSameAs(*matrix->getRangeMap()), + Assert(dst.trilinos_vector().getMap()->isSameAs(*matrix->getRangeMap()), ExcDomainMapMissmatch()); - matrix->apply(*src.trilinos_rcp(), *dst.trilinos_rcp()); + matrix->apply(src.trilinos_vector(), dst.trilinos_vector()); } @@ -606,11 +606,13 @@ namespace LinearAlgebra { Assert(&src != &dst, ExcSourceEqualsDestination()); Assert(matrix->isFillComplete(), ExcMatrixNotCompressed()); - Assert(dst.trilinos_rcp()->getMap()->isSameAs(*matrix->getDomainMap()), + Assert(dst.trilinos_vector().getMap()->isSameAs(*matrix->getDomainMap()), ExcColMapMissmatch()); - Assert(src.trilinos_rcp()->getMap()->isSameAs(*matrix->getRangeMap()), + Assert(src.trilinos_vector().getMap()->isSameAs(*matrix->getRangeMap()), ExcDomainMapMissmatch()); - matrix->apply(*src.trilinos_rcp(), *dst.trilinos_rcp(), Teuchos::TRANS); + matrix->apply(src.trilinos_vector(), + dst.trilinos_vector(), + Teuchos::TRANS); } @@ -623,12 +625,12 @@ namespace LinearAlgebra { Assert(&src != &dst, ExcSourceEqualsDestination()); Assert(matrix->isFillComplete(), ExcMatrixNotCompressed()); - Assert(src.trilinos_rcp()->getMap()->isSameAs(*matrix->getDomainMap()), + Assert(src.trilinos_vector().getMap()->isSameAs(*matrix->getDomainMap()), ExcColMapMissmatch()); - Assert(dst.trilinos_rcp()->getMap()->isSameAs(*matrix->getRangeMap()), + Assert(dst.trilinos_vector().getMap()->isSameAs(*matrix->getRangeMap()), ExcDomainMapMissmatch()); - matrix->apply(*src.trilinos_rcp(), - *dst.trilinos_rcp(), + matrix->apply(src.trilinos_vector(), + dst.trilinos_vector(), Teuchos::NO_TRANS, Teuchos::ScalarTraits::one(), Teuchos::ScalarTraits::one()); @@ -644,12 +646,12 @@ namespace LinearAlgebra { Assert(&src != &dst, ExcSourceEqualsDestination()); Assert(matrix->isFillComplete(), ExcMatrixNotCompressed()); - Assert(dst.trilinos_rcp()->getMap()->isSameAs(*matrix->getDomainMap()), + Assert(dst.trilinos_vector().getMap()->isSameAs(*matrix->getDomainMap()), ExcColMapMissmatch()); - Assert(src.trilinos_rcp()->getMap()->isSameAs(*matrix->getRangeMap()), + Assert(src.trilinos_vector().getMap()->isSameAs(*matrix->getRangeMap()), ExcDomainMapMissmatch()); - matrix->apply(*src.trilinos_rcp(), - *dst.trilinos_rcp(), + matrix->apply(src.trilinos_vector(), + dst.trilinos_vector(), Teuchos::TRANS, Teuchos::ScalarTraits::one(), Teuchos::ScalarTraits::one());