10 #ifndef XPETRA_MAPFACTORY_DECL_HPP
11 #define XPETRA_MAPFACTORY_DECL_HPP
25 template <
class LocalOrdinal,
27 class Node =
typename Map<LocalOrdinal, GlobalOrdinal>::node_type>
36 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
39 GlobalOrdinal indexBase,
40 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm,
45 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
48 size_t numLocalElements,
49 GlobalOrdinal indexBase,
50 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
54 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
57 const Teuchos::ArrayView<const GlobalOrdinal>& elementList,
58 GlobalOrdinal indexBase,
59 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
71 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
73 const LocalOrdinal numDofPerNode,
74 const GlobalOrdinal gidOffset = Teuchos::ScalarTraits<GlobalOrdinal>::zero());
76 #ifdef HAVE_XPETRA_TPETRA
77 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
80 const Kokkos::View<const GlobalOrdinal*, typename Node::device_type>& indexList,
81 GlobalOrdinal indexBase,
82 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
86 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
89 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
93 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
96 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
100 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
103 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
106 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
109 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
112 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
115 size_t localNumElements,
116 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
120 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
123 size_t localNumElements,
124 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
128 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
130 const Teuchos::RCP<
const Teuchos::Comm<int>>& newComm);
138 #if defined(HAVE_XPETRA_EPETRA)
140 #if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES)
153 static RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
157 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm,
160 static RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
163 size_t numLocalElements,
165 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
167 static RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
170 const Teuchos::ArrayView<const GlobalOrdinal>& elementList,
172 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
184 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
187 const GlobalOrdinal gidOffset = Teuchos::ScalarTraits<GlobalOrdinal>::zero());
189 #ifdef HAVE_XPETRA_TPETRA
190 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
193 const Kokkos::View<const GlobalOrdinal*, typename Node::device_type>& indexList,
195 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
198 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
201 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
205 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
208 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
212 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
214 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
216 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
219 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
221 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
224 size_t localNumElements,
225 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
227 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
230 size_t localNumElements,
231 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
233 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
235 const Teuchos::RCP<
const Teuchos::Comm<int>>& newComm);
239 #endif // #if !defined(XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES)
242 #if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES)
255 static RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
259 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm,
262 static RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
265 size_t numLocalElements,
267 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
269 static RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
272 const Teuchos::ArrayView<const GlobalOrdinal>& elementList,
274 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
278 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
282 #ifdef HAVE_XPETRA_TPETRA
283 static Teuchos::RCP<Map<LocalOrdinal, GlobalOrdinal, Node>>
286 const Kokkos::View<const GlobalOrdinal*, typename Node::device_type>& indexList,
288 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
291 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
294 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
296 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
299 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
301 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
303 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
305 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
308 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
310 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
313 size_t localNumElements,
314 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
316 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
319 size_t localNumElements,
320 const Teuchos::RCP<
const Teuchos::Comm<int>>& comm);
322 static Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
324 const Teuchos::RCP<
const Teuchos::Comm<int>>& newComm);
328 #endif // #if !defined(XPETRA_EPETRA_NO_64BIT_GLOBAL_INDICES)
330 #endif // #if defined(HAVE_XPETRA_EPETRA)
334 #define XPETRA_MAPFACTORY_SHORT
336 #endif // XPETRA_MAPFACTORY_DECL_HPP
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.
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.
Tpetra::KokkosCompat::KokkosSerialWrapperNode EpetraNode
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.