Tpetra Matrix/Vector Services Version of the Day
Namespaces | Classes | Typedefs | Enumerations | Functions
Tpetra Namespace Reference

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

Namespaces

namespace  RTI
 

Namespace for Tpetra Reduction/Tranformation Interface.


namespace  Ext
 

Namespace for external Tpetra functionality.


namespace  MatrixMatrix
 

Collection of matrix-matrix operations.


namespace  VbrUtils

Classes

class  BlockCrsGraph
 Block-entry counterpart to Tpetra::CrsGraph. More...
class  BlockMap
 Block-entry counterpart to Tpetra::Map. More...
class  BlockMultiVector
 Block-entry specialization of Tpetra::MultiVector. More...
class  CrsGraph
 A graph accessed by rows and stored sparsely. More...
class  CrsMatrix
 Sparse matrix that presents a compressed sparse row interface. More...
class  CrsMatrixMultiplyOp
 A class for wrapping a CrsMatrix multiply in a Operator. More...
class  CrsMatrixSolveOp
 A class for wrapping a Tpetra::CrsMatrix solve in a Tpetra::Operator. More...
class  DefaultPlatform
 Returns a default platform appropriate for the enviroment. More...
class  Directory
 Implement mapping from global ID to process ID and local ID. More...
class  DistObject
 Base class for distributed Tpetra objects that support data redistribution. More...
class  Distributor
 Sets up and executes a communication plan for a Tpetra DistObject. More...
class  Export
 Communication plan for data redistribution from a (possibly) multiply-owned to a uniquely-owned distribution. More...
class  HybridPlatform
 A platform class for hybrid nodes. More...
class  Import
 Communication plan for data redistribution from a uniquely-owned to a (possibly) multiply-owned distribution. More...
class  Map
 Describes a parallel distribution of objects over processes. More...
class  MpiPlatform
 Implementation of the Platform concept for MPI-based platforms. More...
class  MultiVector
 One or more distributed dense vectors. More...
class  MultiVectorFiller
 Adds nonlocal sum-into functionality to Tpetra::MultiVector. More...
class  Operator
 Abstract interface for linear operators accepting Tpetra MultiVector objects. More...
class  RowGraph
 A pure virtual interface for row-partitioned graphs. More...
class  RowMatrix
 A pure virtual interface for row-partitioned matrices. More...
class  RowMatrixTransposer
class  SerialPlatform
 Implementation of the Platform concept for MPI-based platforms. More...
class  VbrMatrix
 VbrMatrix: Variable block row matrix. More...
class  Vector
 A class for constructing and using dense, distributors vectors. More...

Typedefs

typedef Teuchos_Ordinal Array_size_type
 Size type for Teuchos Array objects.
typedef size_t global_size_t
 Global size_t object.

Enumerations

enum  LocalGlobal { LocallyReplicated, GloballyDistributed }
enum  LookupStatus { AllIDsPresent, IDNotPresent }
enum  ProfileType { StaticProfile, DynamicProfile }
enum  OptimizeOption { DoOptimizeStorage, DoNotOptimizeStorage }
enum  CombineMode { ADD, INSERT, REPLACE, ABSMAX }
 Tpetra::Combine Mode enumerable type. More...

Functions

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< CrsMatrix
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > > 
createCrsMatrix (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t maxNumEntriesPerRow=0, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Non-member function to create an empty CrsMatrix given a row map and a non-zero profile.
template<class CrsMatrixType >
Teuchos::RCP< CrsMatrixType > importAndFillCompleteCrsMatrix (const Teuchos::RCP< const CrsMatrixType > &sourceMatrix, const Import< typename CrsMatrixType::local_ordinal_type, typename CrsMatrixType::global_ordinal_type, typename CrsMatrixType::node_type > &importer, const Teuchos::RCP< const Map< typename CrsMatrixType::local_ordinal_type, typename CrsMatrixType::global_ordinal_type, typename CrsMatrixType::node_type > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< typename CrsMatrixType::local_ordinal_type, typename CrsMatrixType::global_ordinal_type, typename CrsMatrixType::node_type > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Nonmember CrsMatrix constructor that fuses Import and fillComplete().
template<class CrsMatrixType >
Teuchos::RCP< CrsMatrixType > exportAndFillCompleteCrsMatrix (const Teuchos::RCP< const CrsMatrixType > &sourceMatrix, const Export< typename CrsMatrixType::local_ordinal_type, typename CrsMatrixType::global_ordinal_type, typename CrsMatrixType::node_type > &exporter, const Teuchos::RCP< const Map< typename CrsMatrixType::local_ordinal_type, typename CrsMatrixType::global_ordinal_type, typename CrsMatrixType::node_type > > &domainMap=Teuchos::null, const Teuchos::RCP< const Map< typename CrsMatrixType::local_ordinal_type, typename CrsMatrixType::global_ordinal_type, typename CrsMatrixType::node_type > > &rangeMap=Teuchos::null, const Teuchos::RCP< Teuchos::ParameterList > &params=Teuchos::null)
 Nonmember CrsMatrix constructor that fuses Export and fillComplete().
template<class Scalar , class MatScalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Teuchos::RCP
< CrsMatrixMultiplyOp< Scalar,
MatScalar, LocalOrdinal,
GlobalOrdinal, Node,
LocalMatOps > > 
createCrsMatrixMultiplyOp (const Teuchos::RCP< const CrsMatrix< MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > &A)
 Non-member function to create CrsMatrixMultiplyOp.
template<class Scalar , class MatScalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Teuchos::RCP< CrsMatrixSolveOp
< Scalar, MatScalar,
LocalOrdinal, GlobalOrdinal,
Node, LocalMatOps > > 
createCrsMatrixSolveOp (const Teuchos::RCP< const CrsMatrix< MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > &A)
 Non-member function to create CrsMatrixSolveOp.
Array< std::string > distributorSendTypes ()
 Valid values for Distributor's "Send type" parameter.
template<class LO , class GO , class Node >
RCP< const Export< LO, GO, Node > > createExport (const RCP< const Map< LO, GO, Node > > &src, const RCP< const Map< LO, GO, Node > > &tgt)
 Non-member constructor for Export objects.
template<class LO , class GO , class Node >
RCP< const Import< LO, GO, Node > > createImport (const RCP< const Map< LO, GO, Node > > &src, const RCP< const Map< LO, GO, Node > > &tgt)
 Non-member constructor for Import objects.
template<class LocalOrdinal , class GlobalOrdinal >
Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Kokkos::DefaultNode::DefaultNodeType > > 
createLocalMap (size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
 Non-member constructor for a locally replicated Map with the default Kokkos Node.
template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
createLocalMapWithNode (size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node)
 Non-member constructor for a locally replicated Map with a specified Kokkos Node.
template<class LocalOrdinal , class GlobalOrdinal >
Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Kokkos::DefaultNode::DefaultNodeType > > 
createUniformContigMap (global_size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
 Non-member constructor for a uniformly distributed, contiguous Map with the default Kokkos Node.
template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
createUniformContigMapWithNode (global_size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node)
 Non-member constructor for a uniformly distributed, contiguous Map with a user-specified Kokkos Node.
template<class LocalOrdinal , class GlobalOrdinal >
Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Kokkos::DefaultNode::DefaultNodeType > > 
createContigMap (global_size_t numElements, size_t localNumElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
 Non-member constructor for a (potentially) non-uniformly distributed, contiguous Map with the default Kokkos Node.
template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
createContigMapWithNode (global_size_t numElements, size_t localNumElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node)
 Non-member constructor for a (potentially) non-uniformly distributed, contiguous Map with a user-specified Kokkos Node.
template<class LocalOrdinal , class GlobalOrdinal >
Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Kokkos::DefaultNode::DefaultNodeType > > 
createNonContigMap (const ArrayView< const GlobalOrdinal > &elementList, const RCP< const Teuchos::Comm< int > > &comm)
 Non-member constructor for a non-contiguous Map with the default Kokkos Node.
template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
createNonContigMapWithNode (const ArrayView< const GlobalOrdinal > &elementList, const RCP< const Teuchos::Comm< int > > &comm, const RCP< Node > &node)
 Non-member constructor for a non-contiguous Map with a user-specified Kokkos Node.
template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
createWeightedContigMapWithNode (int thisNodeWeight, global_size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int > > &comm, const Teuchos::RCP< Node > &node)
 Non-member constructor for a contiguous Map with user-defined weights and a user-specified Kokkos Node.
template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
createOneToOne (Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &M)
 Creates a one-to-one version of the given Map where each GID is owned by only one process.
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< MultiVector
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > > 
createMultiVector (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t numVectors)
 Nonmember MultiVector constructor: make a MultiVector from a given Map.
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< MultiVector
< Scalar, LocalOrdinal,
GlobalOrdinal, Node > > 
createMultiVectorFromView (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const Teuchos::ArrayRCP< Scalar > &view, size_t LDA, size_t numVectors)
 Nonmember MultiVector constructor with view semantics using user-allocated data.
template<typename MapType , typename KeyArgType , typename ValueArgType >
MapType::iterator efficientAddOrUpdate (MapType &m, const KeyArgType &k, const ValueArgType &v)
template<class IT1 , class IT2 >
void sort2 (const IT1 &first1, const IT1 &last1, const IT2 &first2)
 Sort the first array, and apply the resulting permutation to the second array.
template<class IT1 , class IT2 , class IT3 >
void sort3 (const IT1 &first1, const IT1 &last1, const IT2 &first2, const IT3 &first3)
 Sort the first array, and apply the same permutation to the second and third arrays.
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Vector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
createVector (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
 Non-member function to create a Vector from a specified Map.
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Vector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
createVectorFromView (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const ArrayRCP< Scalar > &view)
 Non-member function to create a Vector with view semantics using user-allocated data.

Detailed Description

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

Tpetra_CrsMatrixTransposer: A class for transposing an Tpetra_CrsMatrix object.

Namespace for Tpetra classes and methods.

Tpetra namespace


Typedef Documentation

typedef Teuchos_Ordinal Tpetra::Array_size_type

Size type for Teuchos Array objects.

Definition at line 91 of file Tpetra_ConfigDefs.hpp.

typedef size_t Tpetra::global_size_t

Global size_t object.

Set at configure time, this type is intended to support scenarios where the global memory allocation is larger than that of a single node.

Currently, it is typedefed to size_t.

Examples:
CrsMatrix_BlockExtraction.cpp.

Definition at line 152 of file Tpetra_ConfigDefs.hpp.


Enumeration Type Documentation

Local versus global allocation of Map elements

Enumerator:
LocallyReplicated 

Indicates that map elements are locally replicated across all nodes

GloballyDistributed 

Indicates that map elements are globally distributed across all nodes

Definition at line 155 of file Tpetra_ConfigDefs.hpp.

Return status of Map lookup

Enumerator:
AllIDsPresent 

Indicates that all queried IDs were present in the Map

IDNotPresent 

Indicates that at least one of the specified IDs was not present in the Map

Definition at line 161 of file Tpetra_ConfigDefs.hpp.

Allocation profile for matrix/graph entries

Enumerator:
StaticProfile 

Indicates a single, static allocation (strict and more efficient)

DynamicProfile 

Indicates multiple, dynamic allocations (flexibile, but less efficient)

Definition at line 167 of file Tpetra_ConfigDefs.hpp.

Optimize storage option

Enumerator:
DoOptimizeStorage 

Indicates that storage should be optimized

DoNotOptimizeStorage 

Indicates that storage should not be optimized

Definition at line 173 of file Tpetra_ConfigDefs.hpp.

Tpetra::Combine Mode enumerable type.

If set to Add, existing values will be summed with new values. If set to Insert, new values will be inserted that don't currently exist. If set to Replace, existing values will be replaced with new values.

NOTE: Add and Replace are intended for modifying values that already exist, but it will function correctly if those values don't already exist. (i.e. zero will be inserted, and then summed with or replaced by the new value.) However, performance may suffer. (The same goes for Insert.)

Enumerator:
ADD 

Existing values will be summed with new values.

INSERT 

Insert new values that don't currently exist.

REPLACE 

Existing values will be replaced with new values.

ABSMAX 

Replacment is max( abs(old_value), abs(new_value) )

Definition at line 189 of file Tpetra_ConfigDefs.hpp.


Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > createCrsMatrix ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  map,
size_t  maxNumEntriesPerRow = 0,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::null 
)

Non-member function to create an empty CrsMatrix given a row map and a non-zero profile.

Returns:
A dynamically allocated (DynamicProfile) matrix with specified number of nonzeros per row (defaults to zero).

Definition at line 1018 of file Tpetra_CrsMatrix_decl.hpp.

template<class CrsMatrixType >
Teuchos::RCP< CrsMatrixType > importAndFillCompleteCrsMatrix ( const Teuchos::RCP< const CrsMatrixType > &  sourceMatrix,
const Import< typename CrsMatrixType::local_ordinal_type, typename CrsMatrixType::global_ordinal_type, typename CrsMatrixType::node_type > &  importer,
const Teuchos::RCP< const Map< typename CrsMatrixType::local_ordinal_type, typename CrsMatrixType::global_ordinal_type, typename CrsMatrixType::node_type > > &  domainMap = Teuchos::null,
const Teuchos::RCP< const Map< typename CrsMatrixType::local_ordinal_type, typename CrsMatrixType::global_ordinal_type, typename CrsMatrixType::node_type > > &  rangeMap = Teuchos::null,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::null 
)

Nonmember CrsMatrix constructor that fuses Import and fillComplete().

Template Parameters:
CrsMatrixTypeA specialization of CrsMatrix.

A common use case is to create an empty destination CrsMatrix, redistribute from a source CrsMatrix (by an Import or Export operation), then call fillComplete() on the destination CrsMatrix. This constructor fuses these three cases, for an Import redistribution.

Fusing redistribution and fillComplete() exposes potential optimizations. For example, it may make constructing the column Map faster, and it may avoid intermediate unoptimized storage in the destination CrsMatrix. These optimizations may improve performance for specialized kernels like sparse matrix-matrix multiply, as well as for redistributing data after doing load balancing.

The resulting matrix is fill complete (in the sense of isFillComplete()) and has optimized storage (in the sense of isStorageOptimized()). By default, its domain Map is the domain Map of the source matrix, and its range Map is the range Map of the source matrix.

Warning:
If the target Map of the Import is a subset of the source Map of the Import, then you cannot use the default range Map. You should instead construct a nonoverlapping version of the target Map and supply that as the nondefault value of the range Map.
Parameters:
sourceMatrix[in] The source matrix from which to import. The source of an Import must have a nonoverlapping distribution.
importer[in] The Import instance containing a precomputed redistribution plan. The source Map of the Import must be the same as the row Map of sourceMatrix.
domainMap[in] Domain Map of the returned matrix. If null, we use the default, which is the domain Map of the source matrix.
rangeMap[in] Range Map of the returned matrix. If null, we use the default, which is the range Map of the source matrix.
params[in/out] Optional list of parameters. If not null, any missing parameters will be filled in with their default values.

Definition at line 1079 of file Tpetra_CrsMatrix_decl.hpp.

template<class CrsMatrixType >
Teuchos::RCP< CrsMatrixType > exportAndFillCompleteCrsMatrix ( const Teuchos::RCP< const CrsMatrixType > &  sourceMatrix,
const Export< typename CrsMatrixType::local_ordinal_type, typename CrsMatrixType::global_ordinal_type, typename CrsMatrixType::node_type > &  exporter,
const Teuchos::RCP< const Map< typename CrsMatrixType::local_ordinal_type, typename CrsMatrixType::global_ordinal_type, typename CrsMatrixType::node_type > > &  domainMap = Teuchos::null,
const Teuchos::RCP< const Map< typename CrsMatrixType::local_ordinal_type, typename CrsMatrixType::global_ordinal_type, typename CrsMatrixType::node_type > > &  rangeMap = Teuchos::null,
const Teuchos::RCP< Teuchos::ParameterList > &  params = Teuchos::null 
)

Nonmember CrsMatrix constructor that fuses Export and fillComplete().

Template Parameters:
CrsMatrixTypeA specialization of CrsMatrix.

For justification, see the documentation of importAndFillCompleteCrsMatrix() (which is the Import analog of this function).

The resulting matrix is fill complete (in the sense of isFillComplete()) and has optimized storage (in the sense of isStorageOptimized()). By default, its domain Map is the domain Map of the source matrix, and its range Map is the range Map of the source matrix.

Parameters:
sourceMatrix[in] The source matrix from which to export. Its row Map may be overlapping, since the source of an Export may be overlapping.
exporter[in] The Export instance containing a precomputed redistribution plan. The source Map of the Export must be the same as the row Map of sourceMatrix.
domainMap[in] Domain Map of the returned matrix. If null, we use the default, which is the domain Map of the source matrix.
rangeMap[in] Range Map of the returned matrix. If null, we use the default, which is the range Map of the source matrix.
params[in/out] Optional list of parameters. If not null, any missing parameters will be filled in with their default values.

Definition at line 1154 of file Tpetra_CrsMatrix_decl.hpp.

template<class Scalar , class MatScalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Teuchos::RCP< CrsMatrixMultiplyOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > createCrsMatrixMultiplyOp ( const Teuchos::RCP< const CrsMatrix< MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > &  A)

Non-member function to create CrsMatrixMultiplyOp.

template<class Scalar , class MatScalar , class LocalOrdinal , class GlobalOrdinal , class Node , class LocalMatOps >
Teuchos::RCP< CrsMatrixSolveOp< Scalar, MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > createCrsMatrixSolveOp ( const Teuchos::RCP< const CrsMatrix< MatScalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps > > &  A)

Non-member function to create CrsMatrixSolveOp.

Array< std::string > Tpetra::distributorSendTypes ( )

Valid values for Distributor's "Send type" parameter.

Definition at line 49 of file Tpetra_Distributor.cpp.

template<class LO , class GO , class Node >
RCP< const Export< LO, GO, Node > > createExport ( const RCP< const Map< LO, GO, Node > > &  src,
const RCP< const Map< LO, GO, Node > > &  tgt 
)

Non-member constructor for Export objects.

Creates a Export object from the given source and target maps.

Precondition:
src != null
tgt != null
Returns:
Returns the Export object. If src == tgt, returns null. (Debug mode: throws std::runtime_error if one of src or tgt is null.)

Definition at line 621 of file Tpetra_Export.hpp.

template<class LO , class GO , class Node >
RCP< const Import< LO, GO, Node > > createImport ( const RCP< const Map< LO, GO, Node > > &  src,
const RCP< const Map< LO, GO, Node > > &  tgt 
)

Non-member constructor for Import objects.

Creates a Import object from the given source and target maps.

Precondition:
src != null
tgt != null
Returns:
Returns the Import object. If src == tgt, returns null. (Debug mode: throws std::runtime_error if one of src or tgt is null.)

Definition at line 667 of file Tpetra_Import.hpp.

template<class LocalOrdinal , class GlobalOrdinal >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Kokkos::DefaultNode::DefaultNodeType > > createLocalMap ( size_t  numElements,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm 
)

Non-member constructor for a locally replicated Map with the default Kokkos Node.

This method returns a Map instantiated on the Kokkos default node type, Kokkos::DefaultNode::DefaultNodeType.

The Map is configured to use zero-based indexing.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > createLocalMapWithNode ( size_t  numElements,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
const Teuchos::RCP< Node > &  node 
)

Non-member constructor for a locally replicated Map with a specified Kokkos Node.

The Map is configured to use zero-based indexing.

template<class LocalOrdinal , class GlobalOrdinal >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Kokkos::DefaultNode::DefaultNodeType > > createUniformContigMap ( global_size_t  numElements,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm 
)

Non-member constructor for a uniformly distributed, contiguous Map with the default Kokkos Node.

This method returns a Map instantiated on the Kokkos default node type, Kokkos::DefaultNode::DefaultNodeType.

The Map is configured to use zero-based indexing.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > createUniformContigMapWithNode ( global_size_t  numElements,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
const Teuchos::RCP< Node > &  node 
)

Non-member constructor for a uniformly distributed, contiguous Map with a user-specified Kokkos Node.

The Map is configured to use zero-based indexing.

template<class LocalOrdinal , class GlobalOrdinal >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Kokkos::DefaultNode::DefaultNodeType > > createContigMap ( global_size_t  numElements,
size_t  localNumElements,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm 
)

Non-member constructor for a (potentially) non-uniformly distributed, contiguous Map with the default Kokkos Node.

This method returns a Map instantiated on the Kokkos default node type, Kokkos::DefaultNode::DefaultNodeType.

The Map is configured to use zero-based indexing.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > createContigMapWithNode ( global_size_t  numElements,
size_t  localNumElements,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
const Teuchos::RCP< Node > &  node 
)

Non-member constructor for a (potentially) non-uniformly distributed, contiguous Map with a user-specified Kokkos Node.

The Map is configured to use zero-based indexing.

template<class LocalOrdinal , class GlobalOrdinal >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Kokkos::DefaultNode::DefaultNodeType > > createNonContigMap ( const ArrayView< const GlobalOrdinal > &  elementList,
const RCP< const Teuchos::Comm< int > > &  comm 
)

Non-member constructor for a non-contiguous Map with the default Kokkos Node.

This method returns a Map instantiated on the Kokkos default node type, Kokkos::DefaultNode::DefaultNodeType.

The Map is configured to use zero-based indexing.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > createNonContigMapWithNode ( const ArrayView< const GlobalOrdinal > &  elementList,
const RCP< const Teuchos::Comm< int > > &  comm,
const RCP< Node > &  node 
)

Non-member constructor for a non-contiguous Map with a user-specified Kokkos Node.

The Map is configured to use zero-based indexing.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > createWeightedContigMapWithNode ( int  thisNodeWeight,
global_size_t  numElements,
const Teuchos::RCP< const Teuchos::Comm< int > > &  comm,
const Teuchos::RCP< Node > &  node 
)

Non-member constructor for a contiguous Map with user-defined weights and a user-specified Kokkos Node.

The Map is configured to use zero-based indexing.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > createOneToOne ( Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  M)

Creates a one-to-one version of the given Map where each GID is owned by only one process.

The user must guarantee there are no duplicate GID on the same processor. Unexepected behavior may result.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > createMultiVector ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  map,
size_t  numVectors 
)

Nonmember MultiVector constructor: make a MultiVector from a given Map.

Parameters:
map[in] Map describing the distribution of rows of the resulting MultiVector.
numVectors[in] Number of columns of the resulting MultiVector.

Definition at line 922 of file Tpetra_MultiVector_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > createMultiVectorFromView ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  map,
const Teuchos::ArrayRCP< Scalar > &  view,
size_t  LDA,
size_t  numVectors 
)

Nonmember MultiVector constructor with view semantics using user-allocated data.

Warning:
This function is not supported for all Kokkos Node types. Specifically, it is not typically supported for GPU accelerator-based nodes like Kokkos::ThrustGPUNode.
Parameters:
map[in] The Map describing the distribution of rows of the multivector.
view[in/out] A pointer to column-major dense matrix data. This will be the multivector's data on the calling process. The multivector will use the pointer directly, without copying.
LDA[in] The leading dimension (a.k.a. "stride") of the column-major input data.
numVectors[in] The number of columns in the input data. This will be the number of vectors in the returned multivector.

To Kokkos and Tpetra developers: If you add a new Kokkos Node type that is a host Node type (where memory lives in user space, not in a different space as on a GPU), you will need to add a specialization of Tpetra::details::ViewAccepter for your new Node type.

Definition at line 959 of file Tpetra_MultiVector_decl.hpp.

template<typename MapType , typename KeyArgType , typename ValueArgType >
MapType::iterator Tpetra::efficientAddOrUpdate ( MapType &  m,
const KeyArgType &  k,
const ValueArgType &  v 
)

efficientAddOrUpdate is taken from Scott Meyers' "Effective STL", Item 24. if m already contains an entry with key k, use operator []. if it doesn't, insert is used.

Definition at line 145 of file Tpetra_Util.hpp.

template<class IT1 , class IT2 >
void Tpetra::sort2 ( const IT1 &  first1,
const IT1 &  last1,
const IT2 &  first2 
)

Sort the first array, and apply the resulting permutation to the second array.

Sort the values in the first array (represented by the exclusive iterator range first1,last1) in ascending order. Apply the permutation resulting from the sort to the second array (represented by a starting iterator first2).

Parameters:
first1A random access iterator pointing to the beginning of the first array.
last1A random access iterator pointing to the end (exclusive) of the first array.
first2A random access iterator pointing to the beginning of the second array. The second array must have no fewer elements than the first array. If the first array has N elements, then the permutation will only be applied to the first N elements of the second array.

Definition at line 371 of file Tpetra_Util.hpp.

template<class IT1 , class IT2 , class IT3 >
void Tpetra::sort3 ( const IT1 &  first1,
const IT1 &  last1,
const IT2 &  first2,
const IT3 &  first3 
)

Sort the first array, and apply the same permutation to the second and third arrays.

Sort the values in the first array (represented by the exclusive iterator range first1,last1) in ascending order. Apply the permutation resulting from the sort to the second array (represented by a starting iterator first2) and third array (represented by a starting iterator first3).

Parameters:
first1A random access iterator pointing to the beginning of the first array.
last1A random access iterator pointing to the end (exclusive) of the first array.
first2A random access iterator pointing to the beginning of the second array.
first3A random access iterator pointing to the beginning of the third array.

Definition at line 398 of file Tpetra_Util.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > createVector ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  map)

Non-member function to create a Vector from a specified Map.

Definition at line 182 of file Tpetra_Vector_decl.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > createVectorFromView ( const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  map,
const ArrayRCP< Scalar > &  view 
)

Non-member function to create a Vector with view semantics using user-allocated data.

This use case is not supported for all nodes. Specifically, it is not typically supported for accelerator-based nodes like Kokkos::ThrustGPUNode.

Definition at line 194 of file Tpetra_Vector_decl.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines