Xpetra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

Create an Xpetra::Map instance. More...

#include <Xpetra_MapFactory_decl.hpp>

Static Public Member Functions

static Teuchos::RCP< Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
Build (UnderlyingLib lib, global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int >> &comm, LocalGlobal lg=Xpetra::GloballyDistributed)
 Map constructor with Xpetra-defined contiguous uniform distribution. More...
 
static Teuchos::RCP< Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
Build (UnderlyingLib lib, global_size_t numGlobalElements, size_t numLocalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int >> &comm)
 Map constructor with a user-defined contiguous distribution. More...
 
static Teuchos::RCP< Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
Build (UnderlyingLib lib, global_size_t numGlobalElements, const Teuchos::ArrayView< const GlobalOrdinal > &elementList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int >> &comm)
 Map constructor with user-defined non-contiguous (arbitrary) distribution. More...
 
static Teuchos::RCP< Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
Build (const Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >> &nodeMap, const LocalOrdinal numDofPerNode, const GlobalOrdinal gidOffset=Teuchos::ScalarTraits< GlobalOrdinal >::zero())
 Map constructor generating degrees of freedom with numDofPerNode for given nodeMap. More...
 
static Teuchos::RCP< Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
Build (UnderlyingLib lib, global_size_t numGlobalElements, const Kokkos::View< const GlobalOrdinal *, typename Node::device_type > &indexList, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int >> &comm)
 
static Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
createLocalMap (UnderlyingLib lib, size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int >> &comm)
 Create a locally replicated Map with the default node. More...
 
static Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
createLocalMapWithNode (UnderlyingLib lib, size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int >> &comm)
 Create a locally replicated Map with a specified node. More...
 
static Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
createUniformContigMapWithNode (UnderlyingLib lib, global_size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int >> &comm)
 Create a uniform, contiguous Map with a user-specified node. More...
 
static Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
createUniformContigMap (UnderlyingLib lib, global_size_t numElements, const Teuchos::RCP< const Teuchos::Comm< int >> &comm)
 Create a uniform, contiguous Map with the default node. More...
 
static Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
createContigMap (UnderlyingLib lib, global_size_t numElements, size_t localNumElements, const Teuchos::RCP< const Teuchos::Comm< int >> &comm)
 Create a (potentially) non-uniform, contiguous Map with the default node. More...
 
static Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
createContigMapWithNode (UnderlyingLib lib, global_size_t numElements, size_t localNumElements, const Teuchos::RCP< const Teuchos::Comm< int >> &comm)
 Create a (potentially) non-uniform, contiguous Map with a user-specified node. More...
 
static Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > 
copyMapWithNewComm (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &oldmap, const Teuchos::RCP< const Teuchos::Comm< int >> &newComm)
 Create a copy of the map, only using the new Comm object if the Comm would be valid. More...
 

Private Member Functions

 MapFactory ()
 Private constructor. This is a static class. More...
 

Detailed Description

template<class LocalOrdinal, class GlobalOrdinal, class Node = typename Map<LocalOrdinal, GlobalOrdinal>::node_type>
class Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >

Create an Xpetra::Map instance.

Users must specify the exact class of the object that they want to create (either an Xpetra::TpetraMap or an Xpetra::EpetraMap).

Definition at line 64 of file Xpetra_MapFactory_decl.hpp.

Constructor & Destructor Documentation

template<class LocalOrdinal, class GlobalOrdinal, class Node = typename Map<LocalOrdinal, GlobalOrdinal>::node_type>
Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >::MapFactory ( )
inlineprivate

Private constructor. This is a static class.

Definition at line 67 of file Xpetra_MapFactory_decl.hpp.

Member Function Documentation

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >::Build ( UnderlyingLib  lib,
global_size_t  numGlobalElements,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int >> &  comm,
LocalGlobal  lg = Xpetra::GloballyDistributed 
)
static

Map constructor with Xpetra-defined contiguous uniform distribution.

Definition at line 65 of file Xpetra_MapFactory_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >::Build ( UnderlyingLib  lib,
global_size_t  numGlobalElements,
size_t  numLocalElements,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int >> &  comm 
)
static

Map constructor with a user-defined contiguous distribution.

Definition at line 84 of file Xpetra_MapFactory_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >::Build ( UnderlyingLib  lib,
global_size_t  numGlobalElements,
const Teuchos::ArrayView< const GlobalOrdinal > &  elementList,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int >> &  comm 
)
static

Map constructor with user-defined non-contiguous (arbitrary) distribution.

Definition at line 103 of file Xpetra_MapFactory_def.hpp.

template<class LocalOrdinal, class GlobalOrdinal, class Node = typename Map<LocalOrdinal, GlobalOrdinal>::node_type>
static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node> > Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >::Build ( const Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >> &  nodeMap,
const LocalOrdinal  numDofPerNode,
const GlobalOrdinal  gidOffset = Teuchos::ScalarTraits< GlobalOrdinal >::zero() 
)
static

Map constructor generating degrees of freedom with numDofPerNode for given nodeMap.

Parameters
[in]nodeMapExisting (node) map
[in]numDofPerNodeNumber of DOFs per node for output map
[in]gidOffsetGID offset for output map
Returns
Map
Note
This acts like a deep copy.
template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >::Build ( UnderlyingLib  lib,
global_size_t  numGlobalElements,
const Kokkos::View< const GlobalOrdinal *, typename Node::device_type > &  indexList,
GlobalOrdinal  indexBase,
const Teuchos::RCP< const Teuchos::Comm< int >> &  comm 
)
static

Definition at line 158 of file Xpetra_MapFactory_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >::createLocalMap ( UnderlyingLib  lib,
size_t  numElements,
const Teuchos::RCP< const Teuchos::Comm< int >> &  comm 
)
static

Create a locally replicated Map with the default node.

Definition at line 174 of file Xpetra_MapFactory_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >::createLocalMapWithNode ( UnderlyingLib  lib,
size_t  numElements,
const Teuchos::RCP< const Teuchos::Comm< int >> &  comm 
)
static

Create a locally replicated Map with a specified node.

Definition at line 198 of file Xpetra_MapFactory_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >::createUniformContigMapWithNode ( UnderlyingLib  lib,
global_size_t  numElements,
const Teuchos::RCP< const Teuchos::Comm< int >> &  comm 
)
static

Create a uniform, contiguous Map with a user-specified node.

Definition at line 216 of file Xpetra_MapFactory_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >::createUniformContigMap ( UnderlyingLib  lib,
global_size_t  numElements,
const Teuchos::RCP< const Teuchos::Comm< int >> &  comm 
)
static

Create a uniform, contiguous Map with the default node.

Definition at line 234 of file Xpetra_MapFactory_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >::createContigMap ( UnderlyingLib  lib,
global_size_t  numElements,
size_t  localNumElements,
const Teuchos::RCP< const Teuchos::Comm< int >> &  comm 
)
static

Create a (potentially) non-uniform, contiguous Map with the default node.

Definition at line 252 of file Xpetra_MapFactory_def.hpp.

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

Create a (potentially) non-uniform, contiguous Map with a user-specified node.

Definition at line 271 of file Xpetra_MapFactory_def.hpp.

template<class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::MapFactory< LocalOrdinal, GlobalOrdinal, Node >::copyMapWithNewComm ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &  oldmap,
const Teuchos::RCP< const Teuchos::Comm< int >> &  newComm 
)
static

Create a copy of the map, only using the new Comm object if the Comm would be valid.

Definition at line 291 of file Xpetra_MapFactory_def.hpp.


The documentation for this class was generated from the following files: