Xpetra Version of the Day
Loading...
Searching...
No Matches
Xpetra_MapFactory_decl.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Xpetra: A linear algebra interface package
4//
5// Copyright 2012 NTESS and the Xpetra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef XPETRA_MAPFACTORY_DECL_HPP
11#define XPETRA_MAPFACTORY_DECL_HPP
12
13#include "Xpetra_ConfigDefs.hpp"
14
15#include "Xpetra_Map_decl.hpp"
16#include "Xpetra_Exceptions.hpp"
17
18namespace Xpetra {
19
25template <class LocalOrdinal,
26 class GlobalOrdinal,
29 private:
32
33 public:
35
38 global_size_t numGlobalElements,
39 GlobalOrdinal indexBase,
40 const Teuchos::RCP<const Teuchos::Comm<int>>& comm,
42
44
47 global_size_t numGlobalElements,
48 size_t numLocalElements,
49 GlobalOrdinal indexBase,
50 const Teuchos::RCP<const Teuchos::Comm<int>>& comm);
51
53
56 global_size_t numGlobalElements,
58 GlobalOrdinal indexBase,
59 const Teuchos::RCP<const Teuchos::Comm<int>>& comm);
60
73 const LocalOrdinal numDofPerNode,
74 const GlobalOrdinal gidOffset = Teuchos::ScalarTraits<GlobalOrdinal>::zero());
75
78 global_size_t numGlobalElements,
79 const Kokkos::View<const GlobalOrdinal*, typename Node::device_type>& indexList,
80 GlobalOrdinal indexBase,
81 const Teuchos::RCP<const Teuchos::Comm<int>>& comm);
82
86 size_t numElements,
87 const Teuchos::RCP<const Teuchos::Comm<int>>& comm);
88
90
93 size_t numElements,
94 const Teuchos::RCP<const Teuchos::Comm<int>>& comm);
95
97
100 global_size_t numElements,
101 const Teuchos::RCP<const Teuchos::Comm<int>>& comm);
102
106 global_size_t numElements,
107 const Teuchos::RCP<const Teuchos::Comm<int>>& comm);
108
112 global_size_t numElements,
113 size_t localNumElements,
114 const Teuchos::RCP<const Teuchos::Comm<int>>& comm);
115
117
120 global_size_t numElements,
121 size_t localNumElements,
122 const Teuchos::RCP<const Teuchos::Comm<int>>& comm);
123
125 // for this map.
128 const Teuchos::RCP<const Teuchos::Comm<int>>& newComm);
129
130}; // class MapFactory
131
135
136} // namespace Xpetra
137
138#define XPETRA_MAPFACTORY_SHORT
139
140#endif // XPETRA_MAPFACTORY_DECL_HPP
141
142// TODO: removed unused methods
Create an Xpetra::Map instance.
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.
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 > > 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.
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.
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 > > 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< 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.
MapFactory()
Private constructor. This is a static class.
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.
size_t global_size_t
Global size_t object.