Tpetra parallel linear algebra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Functions
Tpetra_Import_Util2.hpp File Reference

Utility functions for packing and unpacking sparse matrix entries. More...

#include "Tpetra_ConfigDefs.hpp"
#include "Tpetra_Import.hpp"
#include "Tpetra_HashTable.hpp"
#include "Tpetra_Map.hpp"
#include "Tpetra_Util.hpp"
#include "Tpetra_Distributor.hpp"
#include "Tpetra_Details_reallocDualViewIfNeeded.hpp"
#include "Tpetra_Details_MpiTypeTraits.hpp"
#include "Tpetra_Vector.hpp"
#include "Kokkos_DualView.hpp"
#include <Teuchos_Array.hpp>
#include <utility>
#include <set>
#include "Tpetra_CrsMatrix_decl.hpp"

Go to the source code of this file.

Namespaces

 Tpetra
 Namespace Tpetra contains the class and methods constituting the Tpetra library.
 

Functions

template<typename Scalar , typename Ordinal >
void Tpetra::Import_Util::sortCrsEntries (const Teuchos::ArrayView< size_t > &CRS_rowptr, const Teuchos::ArrayView< Ordinal > &CRS_colind, const Teuchos::ArrayView< Scalar > &CRS_vals)
 Sort the entries of the (raw CSR) matrix by column index within each row. More...
 
template<typename Scalar , typename Ordinal >
void Tpetra::Import_Util::sortAndMergeCrsEntries (const Teuchos::ArrayView< size_t > &CRS_rowptr, const Teuchos::ArrayView< Ordinal > &CRS_colind, const Teuchos::ArrayView< Scalar > &CRS_vals)
 Sort and merge the entries of the (raw CSR) matrix by column index within each row. More...
 
template<typename LocalOrdinal , typename GlobalOrdinal , typename Node >
void Tpetra::Import_Util::lowCommunicationMakeColMapAndReindex (const Teuchos::ArrayView< const size_t > &rowPointers, const Teuchos::ArrayView< LocalOrdinal > &columnIndices_LID, const Teuchos::ArrayView< GlobalOrdinal > &columnIndices_GID, const Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &domainMap, const Teuchos::ArrayView< const int > &owningPids, Teuchos::Array< int > &remotePids, Teuchos::RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &colMap)
 lowCommunicationMakeColMapAndReindex More...
 
template<typename LocalOrdinal , typename GlobalOrdinal , typename Node >
void Tpetra::Import_Util::getTwoTransferOwnershipVector (const ::Tpetra::Details::Transfer< LocalOrdinal, GlobalOrdinal, Node > &transferThatDefinesOwnership, bool useReverseModeForOwnership, const ::Tpetra::Details::Transfer< LocalOrdinal, GlobalOrdinal, Node > &transferForMigratingData, bool useReverseModeForMigration, Tpetra::Vector< int, LocalOrdinal, GlobalOrdinal, Node > &owningPIDs)
 Generates an list of owning PIDs based on two transfer (aka import/export objects) Let: OwningMap = useReverseModeForOwnership ? transferThatDefinesOwnership.getTargetMap() : transferThatDefinesOwnership.getSourceMap(); MapAo = useReverseModeForOwnership ? transferThatDefinesOwnership.getSourceMap() : transferThatDefinesOwnership.getTargetMap(); MapAm = useReverseModeForMigration ? transferThatDefinesMigration.getTargetMap() : transferThatDefinesMigration.getSourceMap(); VectorMap = useReverseModeForMigration ? transferThatDefinesMigration.getSourceMap() : transferThatDefinesMigration.getTargetMap(); Precondition: 1) MapAo.isSameAs(*MapAm) - map compatibility between transfers 2) VectorMap->isSameAs(*owningPIDs->getMap()) - map compabibility between transfer & vector 3) OwningMap->isOneToOne() - owning map is 1-to-1 — Precondition 3 is only checked in DEBUG mode — Postcondition: owningPIDs[VectorMap->getLocalElement(GID i)] = j iff (OwningMap->isLocalElement(GID i) on rank j) More...
 

Detailed Description

Utility functions for packing and unpacking sparse matrix entries.

Definition in file Tpetra_Import_Util2.hpp.