Skip to content

Commit

Permalink
Merge Pull Request #7156 from cgcgcg/Trilinos/tpetraDistParams
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: Tpetra Distributor: add method to get reverse distributor
PR Author: cgcgcg
  • Loading branch information
trilinos-autotester authored Apr 13, 2020
2 parents 9a9f81c + e68542f commit be49977
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/tpetra/core/src/Tpetra_Distributor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,12 @@ namespace Tpetra {
}
}

Teuchos::RCP<Distributor>
Distributor::
getReverseDistributor() {
return reverseDistributor_;
}

Teuchos::RCP<const Teuchos::ParameterList>
Distributor::getValidParameters () const
{
Expand Down
2 changes: 2 additions & 0 deletions packages/tpetra/core/src/Tpetra_Distributor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ namespace Tpetra {
/// parameters and their default values.
void setParameterList (const Teuchos::RCP<Teuchos::ParameterList>& plist);

Teuchos::RCP<Distributor> getReverseDistributor();

/// \brief List of valid Distributor parameters.
///
/// Please see the class documentation for a list of all accepted
Expand Down
3 changes: 3 additions & 0 deletions packages/xpetra/src/Export/Xpetra_TpetraExport_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ TpetraExport<LocalOrdinal, GlobalOrdinal, Node>::
setDistributorParameters(const Teuchos::RCP<Teuchos::ParameterList> params) const {
XPETRA_MONITOR("TpetraExport::setDistributorParameters");
export_->getDistributor().setParameterList(params);
auto revDistor = export_->getDistributor().getReverseDistributor();
if (!revDistor.is_null())
revDistor->setParameterList(params);
}


Expand Down
7 changes: 6 additions & 1 deletion packages/xpetra/src/Import/Xpetra_TpetraImport_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ size_t TpetraImport<LocalOrdinal,GlobalOrdinal,Node>::getNumRemoteIDs() const

template<class LocalOrdinal, class GlobalOrdinal, class Node>
void TpetraImport<LocalOrdinal,GlobalOrdinal,Node>::setDistributorParameters(const Teuchos::RCP<Teuchos::ParameterList> params) const
{ XPETRA_MONITOR("TpetraImport::setDistributorParameters"); import_->getDistributor().setParameterList(params); }
{ XPETRA_MONITOR("TpetraImport::setDistributorParameters");
import_->getDistributor().setParameterList(params);
auto revDistor = import_->getDistributor().getReverseDistributor();
if (!revDistor.is_null())
revDistor->setParameterList(params);
}

template<class LocalOrdinal, class GlobalOrdinal, class Node>
ArrayView< const LocalOrdinal > TpetraImport<LocalOrdinal,GlobalOrdinal,Node>::getRemoteLIDs() const
Expand Down

0 comments on commit be49977

Please sign in to comment.