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 class for constructing and using sparse compressed graphs with row access. More...
class  CrsMatrix
 A class for constructing and using sparse compressed matrices with row access. 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
 A base class for distributed objects that support import and export operations. More...
class  Distributor
 Class that sets up gathers and scatters for Tpetra communication. 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
 A class for partitioning distributed objects. More...
class  MpiPlatform
 Implementation of the Platform concept for MPI-based platforms. More...
class  MultiVector
 A class for constructing and using dense, distributors multivectors. 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 >
RCP< CrsMatrix< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
createCrsMatrix (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t maxNumEntriesPerRow=0)
 Non-member function to create an empty CrsMatrix given a row map and a non-zero profile.
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.
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 LO , class GO , class Node >
RCP< const Import< LO, GO,
Node > > TPETRA_DEPRECATED 
makeImport (const RCP< const Map< LO, GO, Node > > &src, const RCP< const Map< LO, GO, Node > > &tgt)
 Deprecated. Use createImport().
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 function to create a locally replicated Map with the default 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 function to create a locally replicated Map with a specified 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 function to create a uniform, contiguous Map with the default 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 function to create a uniform, contiguous Map with a user-specified 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 function to create a (potentially) non-uniform, contiguous Map with the default 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 function to create a (potentially) non-uniform, contiguous Map with a user-specified 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 function to create a non-contiguous Map with the default 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 function to create a non-contiguous Map with a user-specified 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 function to create a contiguous Map with user-defined weights and a user-specified node.
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< MultiVector< Scalar,
LocalOrdinal, GlobalOrdinal,
Node > > 
createMultiVector (const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t numVectors)
 Non-member function to create a MultiVector from a specified Map.
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.

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 150 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 153 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 159 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 165 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 171 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 187 of file Tpetra_ConfigDefs.hpp.


Function Documentation

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

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 non-zeros per row (defaults to zero).

Definition at line 704 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.

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 533 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 548 of file Tpetra_Import.hpp.

template<class LO , class GO , class Node >
RCP< const Import<LO,GO,Node> > TPETRA_DEPRECATED Tpetra::makeImport ( const RCP< const Map< LO, GO, Node > > &  src,
const RCP< const Map< LO, GO, Node > > &  tgt 
)

Deprecated. Use createImport().

Definition at line 563 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 function to create a locally replicated Map with the default 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 function to create a locally replicated Map with a specified 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 function to create a uniform, contiguous Map with the default 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 function to create a uniform, contiguous Map with a user-specified 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 function to create a (potentially) non-uniform, contiguous Map with the default 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 function to create a (potentially) non-uniform, contiguous Map with a user-specified 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 function to create a non-contiguous Map with the default 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 function to create a non-contiguous Map with a user-specified 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 function to create a contiguous Map with user-defined weights and a user-specified node.

The Map is configured to use zero-based indexing.

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

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

Definition at line 381 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 171 of file Tpetra_Vector_decl.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines