| 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 |
// Get rid of template parameters |
| 11 |
|
| 12 |
// New definition of types using the types LocalOrdinal, GlobalOrdinal, Node of the current context. |
| 13 |
#ifdef XPETRA_MAP_SHORT |
| 14 |
using Map [[maybe_unused]] = Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>; |
| 15 |
#endif |
| 16 |
|
| 17 |
#ifdef XPETRA_MAPUTILS_SHORT |
| 18 |
using MapUtils [[maybe_unused]] = Xpetra::MapUtils<LocalOrdinal, GlobalOrdinal, Node>; |
| 19 |
#endif |
| 20 |
|
| 21 |
#ifdef XPETRA_MAPFACTORY_SHORT |
| 22 |
using MapFactory [[maybe_unused]] = Xpetra::MapFactory<LocalOrdinal, GlobalOrdinal, Node>; |
| 23 |
#endif |
| 24 |
|
| 25 |
#ifdef XPETRA_BLOCKEDMAP_SHORT |
| 26 |
using BlockedMap [[maybe_unused]] = Xpetra::BlockedMap<LocalOrdinal, GlobalOrdinal, Node>; |
| 27 |
#endif |
| 28 |
|
| 29 |
#ifdef XPETRA_CRSGRAPH_SHORT |
| 30 |
using CrsGraph [[maybe_unused]] = Xpetra::CrsGraph<LocalOrdinal, GlobalOrdinal, Node>; |
| 31 |
#endif |
| 32 |
|
| 33 |
#ifdef XPETRA_CRSGRAPHFACTORY_SHORT |
| 34 |
using CrsGraphFactory [[maybe_unused]] = Xpetra::CrsGraphFactory<LocalOrdinal, GlobalOrdinal, Node>; |
| 35 |
#endif |
| 36 |
|
| 37 |
#ifdef XPETRA_VECTOR_SHORT |
| 38 |
using LocalOrdinalVector [[maybe_unused]] = Xpetra::Vector<LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node>; |
| 39 |
using GlobalOrdinalVector [[maybe_unused]] = Xpetra::Vector<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node>; |
| 40 |
using LOVector [[maybe_unused]] = LocalOrdinalVector; |
| 41 |
using GOVector [[maybe_unused]] = GlobalOrdinalVector; |
| 42 |
#endif |
| 43 |
|
| 44 |
#ifdef XPETRA_MULTIVECTOR_SHORT |
| 45 |
using LocalOrdinalMultiVector [[maybe_unused]] = Xpetra::MultiVector<LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node>; |
| 46 |
using GlobalOrdinalMultiVector [[maybe_unused]] = Xpetra::MultiVector<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node>; |
| 47 |
using LOMultiVector [[maybe_unused]] = LocalOrdinalMultiVector; |
| 48 |
using GOMultiVector [[maybe_unused]] = GlobalOrdinalMultiVector; |
| 49 |
#endif |
| 50 |
|
| 51 |
#ifdef XPETRA_VECTORFACTORY_SHORT |
| 52 |
using LocalOrdinalVectorFactory [[maybe_unused]] = Xpetra::VectorFactory<LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node>; |
| 53 |
using GlobalOrdinalVectorFactory [[maybe_unused]] = Xpetra::VectorFactory<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node>; |
| 54 |
using LOVectorFactory [[maybe_unused]] = LocalOrdinalVectorFactory; |
| 55 |
using GOVectorFactory [[maybe_unused]] = GlobalOrdinalVectorFactory; |
| 56 |
#endif |
| 57 |
|
| 58 |
#ifdef XPETRA_MULTIVECTORFACTORY_SHORT |
| 59 |
using LocalOrdinalMultiVectorFactory [[maybe_unused]] = Xpetra::MultiVectorFactory<LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node>; |
| 60 |
using GlobalOrdinalMultiVectorFactory [[maybe_unused]] = Xpetra::MultiVectorFactory<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node>; |
| 61 |
using LOMultiVectorFactory [[maybe_unused]] = LocalOrdinalMultiVectorFactory; |
| 62 |
using GOMultiVectorFactory [[maybe_unused]] = GlobalOrdinalMultiVectorFactory; |
| 63 |
#endif |
| 64 |
|
| 65 |
#ifdef XPETRA_IMPORT_SHORT |
| 66 |
using Import [[maybe_unused]] = Xpetra::Import<LocalOrdinal, GlobalOrdinal, Node>; |
| 67 |
#endif |
| 68 |
|
| 69 |
#ifdef XPETRA_EXPORT_SHORT |
| 70 |
using Export [[maybe_unused]] = Xpetra::Export<LocalOrdinal, GlobalOrdinal, Node>; |
| 71 |
#endif |
| 72 |
|
| 73 |
#ifdef XPETRA_IMPORTFACTORY_SHORT |
| 74 |
using ImportFactory [[maybe_unused]] = Xpetra::ImportFactory<LocalOrdinal, GlobalOrdinal, Node>; |
| 75 |
#endif |
| 76 |
|
| 77 |
#ifdef XPETRA_EXPORTFACTORY_SHORT |
| 78 |
using ExportFactory [[maybe_unused]] = Xpetra::ExportFactory<LocalOrdinal, GlobalOrdinal, Node>; |
| 79 |
#endif |
| 80 |
|
| 81 |
#ifdef XPETRA_TPETRAMAP_SHORT |
| 82 |
using TpetraMap [[maybe_unused]] = Xpetra::TpetraMap<LocalOrdinal, GlobalOrdinal, Node>; |
| 83 |
#endif |
| 84 |
|
| 85 |
#ifdef XPETRA_TPETRACRSGRAPH_SHORT |
| 86 |
using TpetraCrsGraph [[maybe_unused]] = Xpetra::TpetraCrsGraph<LocalOrdinal, GlobalOrdinal, Node>; |
| 87 |
#endif |
| 88 |
|
| 89 |
#ifdef XPETRA_STRIDEDMAP_SHORT |
| 90 |
using StridedMap [[maybe_unused]] = Xpetra::StridedMap<LocalOrdinal, GlobalOrdinal, Node>; |
| 91 |
#endif |
| 92 |
|
| 93 |
#ifdef XPETRA_STRIDEDMAPFACTORY_SHORT |
| 94 |
using StridedMapFactory [[maybe_unused]] = Xpetra::StridedMapFactory<LocalOrdinal, GlobalOrdinal, Node>; |
| 95 |
#endif |
| 96 |
|
| 97 |
// Note: There is no #ifndef/#define/#end in this header file because it can be included more than once (it can be included in methods templated by Scalar, LocalOrdinal, GlobalOrdinal, Node). |
| 98 |
|
| 99 |
// TODO: add namespace {} for shortcut types |
| 100 |
|
| 101 |
// Define convenient shortcut for data types |
| 102 |
using LO [[maybe_unused]] = LocalOrdinal; |
| 103 |
using GO [[maybe_unused]] = GlobalOrdinal; |
| 104 |
using NO [[maybe_unused]] = Node; |
| 105 |
|
| 106 |
// TODO: do the same for Epetra object (problem of namespace) |