Skip to content

Commit

Permalink
Merge Pull Request #13742 from cgcgcg/Trilinos/refmaxwell-async
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: b'MueLu: Async comm in RefMaxwell'
PR Author: cgcgcg
  • Loading branch information
trilinos-autotester authored Feb 11, 2025
2 parents 164cc4f + 005d41b commit 0c01a67
Show file tree
Hide file tree
Showing 3 changed files with 254 additions and 130 deletions.
9 changes: 5 additions & 4 deletions packages/muelu/src/Operators/MueLu_Maxwell1_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include "MueLu_ConfigDefs.hpp"

#include "Xpetra_CrsMatrixWrap_decl.hpp"
#include "Xpetra_Map.hpp"
#include "Xpetra_CrsMatrixUtils.hpp"
#include "Xpetra_MatrixUtils.hpp"
Expand Down Expand Up @@ -805,11 +806,11 @@ void Maxwell1<Scalar, LocalOrdinal, GlobalOrdinal, Node>::
// We cannot use the Tpetra copy constructor, since it does not copy the graph.

RCP<Matrix> D0copy = MatrixFactory::Build(D0_Matrix->getRowMap(), D0_Matrix->getColMap(), 0);
RCP<CrsMatrix> D0copyCrs = rcp_dynamic_cast<CrsMatrixWrap>(D0copy, true)->getCrsMatrix();
RCP<CrsMatrix> D0copyCrs = toCrsMatrix(D0copy);
ArrayRCP<const size_t> D0rowptr_RCP;
ArrayRCP<const LO> D0colind_RCP;
ArrayRCP<const SC> D0vals_RCP;
rcp_dynamic_cast<CrsMatrixWrap>(D0_Matrix, true)->getCrsMatrix()->getAllValues(D0rowptr_RCP, D0colind_RCP, D0vals_RCP);
toCrsMatrix(D0_Matrix)->getAllValues(D0rowptr_RCP, D0colind_RCP, D0vals_RCP);

ArrayRCP<size_t> D0copyrowptr_RCP;
ArrayRCP<LO> D0copycolind_RCP;
Expand All @@ -822,8 +823,8 @@ void Maxwell1<Scalar, LocalOrdinal, GlobalOrdinal, Node>::
D0copycolind_RCP,
D0copyvals_RCP);
D0copyCrs->expertStaticFillComplete(D0_Matrix->getDomainMap(), D0_Matrix->getRangeMap(),
rcp_dynamic_cast<CrsMatrixWrap>(D0_Matrix, true)->getCrsMatrix()->getCrsGraph()->getImporter(),
rcp_dynamic_cast<CrsMatrixWrap>(D0_Matrix, true)->getCrsMatrix()->getCrsGraph()->getExporter());
toCrsMatrix(D0_Matrix)->getCrsGraph()->getImporter(),
toCrsMatrix(D0_Matrix)->getCrsGraph()->getExporter());
D0_Matrix_ = D0copy;
} else
D0_Matrix_ = MatrixFactory::BuildCopy(D0_Matrix);
Expand Down
4 changes: 2 additions & 2 deletions packages/muelu/src/Operators/MueLu_RefMaxwell_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ class RefMaxwell : public VerboseObject, public Xpetra::Operator<Scalar, LocalOr
Teuchos::RCP<MultiVector> CoarseNullspace22_;
//! Importer to coarse (1,1) hierarchy
Teuchos::RCP<const Import> ImporterCoarse11_, Importer22_;
bool Dk_1_T_R11_colMapsMatch_;
bool Dk_1_T_R11_colMapsMatch_, asyncTransfers_;
bool onlyBoundary11_, onlyBoundary22_;
//! Parameter lists
Teuchos::ParameterList parameterList_, precList11_, precList22_;
Expand All @@ -700,7 +700,7 @@ class RefMaxwell : public VerboseObject, public Xpetra::Operator<Scalar, LocalOr
std::string mode_;

//! Temporary memory
mutable Teuchos::RCP<MultiVector> P11res_, P11x_, P11resSubComm_, P11xSubComm_, DresIntermediate_, Dres_, DxIntermediate_, Dx_, DresSubComm_, DxSubComm_, residual_, P11resTmp_, DresTmp_, DTR11Tmp_;
mutable Teuchos::RCP<MultiVector> P11res_, P11x_, P11resSubComm_, P11xSubComm_, DresIntermediate_, Dres_, DxIntermediate_, Dx_, DresSubComm_, DxSubComm_, residual_, P11resTmp_, DresTmp_, DTR11Tmp_, P11x_colmap_, Dx_colmap_;
};

} // namespace MueLu
Expand Down
Loading

0 comments on commit 0c01a67

Please sign in to comment.