46 #ifndef XPETRA_MAPFACTORY_DECL_HPP
47 #define XPETRA_MAPFACTORY_DECL_HPP
61 template<
class LocalOrdinal,
63 class Node =
typename Map<LocalOrdinal, GlobalOrdinal>::node_type>
81 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
84 GlobalOrdinal indexBase,
85 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm,
92 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
95 size_t numLocalElements,
96 GlobalOrdinal indexBase,
97 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
103 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
106 const Teuchos::ArrayView<const GlobalOrdinal>& elementList,
107 GlobalOrdinal indexBase,
108 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
113 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
115 LocalOrdinal numDofPerNode);
118 #ifdef HAVE_XPETRA_KOKKOS_REFACTOR
119 #ifdef HAVE_XPETRA_TPETRA
120 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
123 const Kokkos::View<const GlobalOrdinal*, typename Node::device_type>& indexList,
124 GlobalOrdinal indexBase,
125 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
127 #endif // HAVE_XPETRA_KOKKOS_REFACTOR
131 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
134 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
140 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
143 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
149 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
152 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
156 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
159 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
163 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
166 size_t localNumElements,
167 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
173 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
176 size_t localNumElements,
177 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
189 #if defined(HAVE_XPETRA_EPETRA)
192 #if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES)
213 static RCP<Map<LocalOrdinal,GlobalOrdinal, Node> >
217 const Teuchos::RCP<
const Teuchos::Comm<int> > &comm,
223 static RCP<Map<LocalOrdinal,GlobalOrdinal, Node> >
226 size_t numLocalElements,
228 const Teuchos::RCP<
const Teuchos::Comm<int> > &comm);
233 static RCP<Map<LocalOrdinal,GlobalOrdinal, Node> >
236 const Teuchos::ArrayView<const GlobalOrdinal> &elementList,
238 const Teuchos::RCP<
const Teuchos::Comm<int> > &comm);
242 static Teuchos::RCP<Map<LocalOrdinal,GlobalOrdinal, Node> >
247 static Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal, Node> >
250 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm);
256 static Teuchos::RCP< const Map<LocalOrdinal,GlobalOrdinal, Node> >
259 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm);
266 static Teuchos::RCP< const Map<LocalOrdinal,GlobalOrdinal, Node> >
268 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm);
271 static Teuchos::RCP< const Map<LocalOrdinal,GlobalOrdinal, Node> >
274 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm);
277 static Teuchos::RCP< const Map<LocalOrdinal,GlobalOrdinal, Node> >
280 size_t localNumElements,
281 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm);
286 static Teuchos::RCP< const Map<LocalOrdinal,GlobalOrdinal, Node> >
289 size_t localNumElements,
290 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm);
295 #endif // #if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES)
303 #if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES)
323 static RCP<Map<LocalOrdinal,GlobalOrdinal, Node> >
327 const Teuchos::RCP<
const Teuchos::Comm<int> > &comm,
333 static RCP<Map<LocalOrdinal,GlobalOrdinal, Node> >
336 size_t numLocalElements,
338 const Teuchos::RCP<
const Teuchos::Comm<int> > &comm);
343 static RCP<Map<LocalOrdinal,GlobalOrdinal, Node> >
346 const Teuchos::ArrayView<const GlobalOrdinal> &elementList,
348 const Teuchos::RCP<
const Teuchos::Comm<int> > &comm);
353 static Teuchos::RCP<Map<LocalOrdinal,GlobalOrdinal, Node> >
358 static Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal, Node> >
361 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm);
366 static Teuchos::RCP< const Map<LocalOrdinal,GlobalOrdinal, Node> >
369 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm);
374 static Teuchos::RCP< const Map<LocalOrdinal,GlobalOrdinal, Node> >
376 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm);
379 static Teuchos::RCP< const Map<LocalOrdinal,GlobalOrdinal, Node> >
382 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm);
385 static Teuchos::RCP< const Map<LocalOrdinal,GlobalOrdinal, Node> >
388 size_t localNumElements,
389 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm);
394 static Teuchos::RCP< const Map<LocalOrdinal,GlobalOrdinal, Node> >
397 size_t localNumElements,
398 const Teuchos::RCP<
const Teuchos::Comm< int > > &comm);
403 #endif // #if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES)
406 #endif // #if defined(HAVE_XPETRA_EPETRA)
412 #define XPETRA_MAPFACTORY_SHORT
414 #endif // XPETRA_MAPFACTORY_DECL_HPP
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.
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.
MapFactory()
Private constructor. This is a static class.
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.
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.
size_t global_size_t
Global size_t object.
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.
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.
Create an Xpetra::Map instance.
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.