Xpetra Version of the Day
Loading...
Searching...
No Matches
Xpetra_MapExtractorFactory.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_MAPEXTRACTORFACTORY_HPP_
11#define XPETRA_MAPEXTRACTORFACTORY_HPP_
12
13#include <Tpetra_KokkosCompat_DefaultNode.hpp>
14
15#include <Xpetra_MapExtractor.hpp>
16
17namespace Xpetra {
18
19// factory class
20template <class Scalar,
21 class LocalOrdinal,
22 class GlobalOrdinal,
23 class Node>
25#undef XPETRA_MAPEXTRACTORFACTORY_SHORT
27
28 private:
31
32 public:
40 const std::vector<Teuchos::RCP<const Map>>& maps,
41 bool bThyraMode = false) {
42 return rcp(new Xpetra::MapExtractor<Scalar, LocalOrdinal, GlobalOrdinal, Node>(fullmap, maps, bThyraMode));
43 }
44
52 return rcp(new MapExtractor(blockedMap));
53 }
54};
55
56} // namespace Xpetra
57
58#define XPETRA_MAPEXTRACTORFACTORY_SHORT
59#endif /* XPETRA_MAPEXTRACTORFACTORY_HPP_ */
MapExtractorFactory()=delete
Private construtor, since this is a static class.
static Teuchos::RCP< Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node > > &blockedMap)
Build MapExtrasctor from a given BlockedMap.
static Teuchos::RCP< Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map > &fullmap, const std::vector< Teuchos::RCP< const Map > > &maps, bool bThyraMode=false)
Build MapExtrasctor from a given set of partial maps.