]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Prefer trilinos_vector over trilinos_rcp 16566/head
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 30 Jan 2024 20:48:39 +0000 (15:48 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Tue, 30 Jan 2024 20:48:39 +0000 (15:48 -0500)
include/deal.II/lac/affine_constraints.templates.h
include/deal.II/lac/trilinos_tpetra_sparse_matrix.templates.h

index 588d076ae5d46e7afd04c99c2ff2aa3ed6e7f971..0d1c1042b2afe2a567bcf88891d0f02dc8021e03 100644 (file)
@@ -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);
 
index d13fdac5ff2385fbd3386affc7b66fbe0ee70b60..b4fe9fb2616bbd0c939966ff333391eba3d4bd4d 100644 (file)
@@ -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<Number>::one(),
                     Teuchos::ScalarTraits<Number>::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<Number>::one(),
                     Teuchos::ScalarTraits<Number>::one());

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.