| 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 Scalar, LocalOrdinal, GlobalOrdinal, Node of the current context. |
| 13 |
|
| 14 |
// 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). |
| 15 |
|
| 16 |
#ifdef XPETRA_CRSMATRIX_SHORT |
| 17 |
using CrsMatrix [[maybe_unused]] = Xpetra::CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 18 |
#endif |
| 19 |
|
| 20 |
#ifdef XPETRA_IO_SHORT |
| 21 |
using IO [[maybe_unused]] = Xpetra::IO<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 22 |
#endif |
| 23 |
|
| 24 |
#ifdef XPETRA_ITERATOROPS_SHORT |
| 25 |
using IteratorOps [[maybe_unused]] = Xpetra::IteratorOps<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 26 |
#endif |
| 27 |
|
| 28 |
#ifdef XPETRA_VECTOR_SHORT |
| 29 |
using Vector [[maybe_unused]] = Xpetra::Vector<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 30 |
#endif |
| 31 |
|
| 32 |
#ifdef XPETRA_BLOCKEDVECTOR_SHORT |
| 33 |
using BlockedVector [[maybe_unused]] = Xpetra::BlockedVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 34 |
#endif |
| 35 |
|
| 36 |
#ifdef XPETRA_MULTIVECTOR_SHORT |
| 37 |
using MultiVector [[maybe_unused]] = Xpetra::MultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 38 |
#endif |
| 39 |
|
| 40 |
#ifdef XPETRA_MATRIX_SHORT |
| 41 |
using Matrix [[maybe_unused]] = Xpetra::Matrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 42 |
#endif |
| 43 |
|
| 44 |
#ifdef XPETRA_MATRIXMATRIX_SHORT |
| 45 |
using MatrixMatrix [[maybe_unused]] = Xpetra::MatrixMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 46 |
#endif |
| 47 |
|
| 48 |
#ifdef XPETRA_TRIPLEMATRIXMULTIPLY_SHORT |
| 49 |
using TripleMatrixMultiply [[maybe_unused]] = Xpetra::TripleMatrixMultiply<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 50 |
#endif |
| 51 |
|
| 52 |
#ifdef XPETRA_MATRIXUTILS_SHORT |
| 53 |
using MatrixUtils [[maybe_unused]] = Xpetra::MatrixUtils<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 54 |
#endif |
| 55 |
|
| 56 |
#ifdef XPETRA_OPERATOR_SHORT |
| 57 |
using Operator [[maybe_unused]] = Xpetra::Operator<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 58 |
#endif |
| 59 |
|
| 60 |
#ifdef XPETRA_TPETRAOPERATOR_SHORT |
| 61 |
using TpetraOperator [[maybe_unused]] = Xpetra::TpetraOperator<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 62 |
#endif |
| 63 |
|
| 64 |
#ifdef XPETRA_TPETRAHALFPRECISIONOPERATOR_SHORT |
| 65 |
using TpetraHalfPrecisionOperator [[maybe_unused]] = Xpetra::TpetraHalfPrecisionOperator<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 66 |
#endif |
| 67 |
|
| 68 |
#ifdef XPETRA_BLOCKEDCRSMATRIX_SHORT |
| 69 |
using BlockedCrsMatrix [[maybe_unused]] = Xpetra::BlockedCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 70 |
#endif |
| 71 |
|
| 72 |
#ifdef XPETRA_BLOCKEDMULTIVECTOR_SHORT |
| 73 |
using BlockedMultiVector [[maybe_unused]] = Xpetra::BlockedMultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 74 |
#endif |
| 75 |
|
| 76 |
#ifdef XPETRA_REORDEREDBLOCKEDMULTIVECTOR_SHORT |
| 77 |
using ReorderedBlockedMultiVector [[maybe_unused]] = Xpetra::ReorderedBlockedMultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 78 |
#endif |
| 79 |
|
| 80 |
#ifdef XPETRA_REORDEREDBLOCKEDCRSMATRIX_SHORT |
| 81 |
using ReorderedBlockedCrsMatrix [[maybe_unused]] = Xpetra::ReorderedBlockedCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 82 |
#endif |
| 83 |
|
| 84 |
#ifdef HAVE_XPETRA_THYRA |
| 85 |
#ifdef XPETRA_THYRAUTILS_SHORT |
| 86 |
using ThyraUtils [[maybe_unused]] = Xpetra::ThyraUtils<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 87 |
#endif |
| 88 |
#endif |
| 89 |
|
| 90 |
#ifdef XPETRA_CRSMATRIXWRAP_SHORT |
| 91 |
using CrsMatrixWrap [[maybe_unused]] = Xpetra::CrsMatrixWrap<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 92 |
#endif |
| 93 |
|
| 94 |
#ifdef XPETRA_VECTORFACTORY_SHORT |
| 95 |
using VectorFactory [[maybe_unused]] = Xpetra::VectorFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 96 |
#endif |
| 97 |
|
| 98 |
#ifdef XPETRA_CRSMATRIXFACTORY_SHORT |
| 99 |
using CrsMatrixFactory [[maybe_unused]] = Xpetra::CrsMatrixFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 100 |
#endif |
| 101 |
|
| 102 |
#ifdef XPETRA_MULTIVECTORFACTORY_SHORT |
| 103 |
using MultiVectorFactory [[maybe_unused]] = Xpetra::MultiVectorFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 104 |
#endif |
| 105 |
|
| 106 |
#ifdef XPETRA_MATRIXFACTORY_SHORT |
| 107 |
using MatrixFactory [[maybe_unused]] = Xpetra::MatrixFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 108 |
#endif |
| 109 |
|
| 110 |
#ifdef XPETRA_MATRIXFACTORY2_SHORT |
| 111 |
using MatrixFactory2 [[maybe_unused]] = Xpetra::MatrixFactory2<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 112 |
#endif |
| 113 |
|
| 114 |
#ifdef XPETRA_TPETRACRSMATRIX_SHORT |
| 115 |
using TpetraCrsMatrix [[maybe_unused]] = Xpetra::TpetraCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 116 |
#endif |
| 117 |
|
| 118 |
#ifdef XPETRA_TPETRABLOCKCRSMATRIX_SHORT |
| 119 |
using TpetraBlockCrsMatrix [[maybe_unused]] = Xpetra::TpetraBlockCrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 120 |
#endif |
| 121 |
|
| 122 |
// TODO remove this |
| 123 |
#ifdef XPETRA_EPETRACRSMATRIX_SHORT |
| 124 |
#ifndef XPETRA_EPETRA_NO_32BIT_GLOBAL_INDICES |
| 125 |
using EpetraCrsMatrix64 [[maybe_unused]] = Xpetra::EpetraCrsMatrixT<long long, Xpetra::EpetraNode>; |
| 126 |
#endif |
| 127 |
using EpetraCrsMatrix [[maybe_unused]] = Xpetra::EpetraCrsMatrixT<int, Xpetra::EpetraNode>; // do we need this??? |
| 128 |
#endif |
| 129 |
// TODO remove above entries |
| 130 |
|
| 131 |
#ifdef XPETRA_TPETRAMULTIVECTOR_SHORT |
| 132 |
using TpetraMultiVector [[maybe_unused]] = Xpetra::TpetraMultiVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 133 |
#endif |
| 134 |
|
| 135 |
#ifdef XPETRA_TPETRAVECTOR_SHORT |
| 136 |
using TpetraVector [[maybe_unused]] = Xpetra::TpetraVector<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 137 |
#endif |
| 138 |
|
| 139 |
#ifdef XPETRA_MAPEXTRACTOR_SHORT |
| 140 |
using MapExtractor [[maybe_unused]] = Xpetra::MapExtractor<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 141 |
#endif |
| 142 |
|
| 143 |
#ifdef XPETRA_MAPEXTRACTORFACTORY_SHORT |
| 144 |
using MapExtractorFactory [[maybe_unused]] = Xpetra::MapExtractorFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node>; |
| 145 |
#endif |
| 146 |
|
| 147 |
// TODO: add namespace {} for shortcut types |
| 148 |
|
| 149 |
// Define convenient shortcut for data types |
| 150 |
using SC [[maybe_unused]] = Scalar; |
| 151 |
// TODO: do the same for Epetra object (problem of namespace) |