Xpetra Version of the Day
Loading...
Searching...
No Matches
Xpetra_UseShortNamesOrdinal.hpp
Go to the documentation of this file.
1// @HEADER
2//
3// ***********************************************************************
4//
5// Xpetra: A linear algebra interface package
6// Copyright 2012 Sandia Corporation
7//
8// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9// the U.S. Government retains certain rights in this software.
10//
11// Redistribution and use in source and binary forms, with or without
12// modification, are permitted provided that the following conditions are
13// met:
14//
15// 1. Redistributions of source code must retain the above copyright
16// notice, this list of conditions and the following disclaimer.
17//
18// 2. Redistributions in binary form must reproduce the above copyright
19// notice, this list of conditions and the following disclaimer in the
20// documentation and/or other materials provided with the distribution.
21//
22// 3. Neither the name of the Corporation nor the names of the
23// contributors may be used to endorse or promote products derived from
24// this software without specific prior written permission.
25//
26// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37//
38// Questions? Contact
39// Jonathan Hu (jhu@sandia.gov)
40// Andrey Prokopenko (aprokop@sandia.gov)
41// Ray Tuminaro (rstumin@sandia.gov)
42//
43// ***********************************************************************
44//
45// @HEADER
46// Get rid of template parameters
47
48// New definition of types using the types LocalOrdinal, GlobalOrdinal, Node of the current context.
49#ifdef XPETRA_MAP_SHORT
50using Map [[maybe_unused]] = Xpetra::Map<LocalOrdinal, GlobalOrdinal, Node>;
51#endif
52
53#ifdef XPETRA_MAPUTILS_SHORT
54using MapUtils [[maybe_unused]] = Xpetra::MapUtils<LocalOrdinal, GlobalOrdinal, Node>;
55#endif
56
57#ifdef XPETRA_MAPFACTORY_SHORT
58using MapFactory [[maybe_unused]] = Xpetra::MapFactory<LocalOrdinal, GlobalOrdinal, Node>;
59#endif
60
61#ifdef XPETRA_BLOCKEDMAP_SHORT
62using BlockedMap [[maybe_unused]] = Xpetra::BlockedMap<LocalOrdinal, GlobalOrdinal, Node>;
63#endif
64
65#ifdef XPETRA_CRSGRAPH_SHORT
66using CrsGraph [[maybe_unused]] = Xpetra::CrsGraph<LocalOrdinal, GlobalOrdinal, Node>;
67#endif
68
69#ifdef XPETRA_CRSGRAPHFACTORY_SHORT
70using CrsGraphFactory [[maybe_unused]] = Xpetra::CrsGraphFactory<LocalOrdinal, GlobalOrdinal, Node>;
71#endif
72
73#ifdef XPETRA_VECTOR_SHORT
74using LocalOrdinalVector [[maybe_unused]] = Xpetra::Vector<LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node>;
75using GlobalOrdinalVector [[maybe_unused]] = Xpetra::Vector<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node>;
76using LOVector [[maybe_unused]] = LocalOrdinalVector ;
77using GOVector [[maybe_unused]] = GlobalOrdinalVector;
78#endif
79
80#ifdef XPETRA_MULTIVECTOR_SHORT
81using LocalOrdinalMultiVector [[maybe_unused]] = Xpetra::MultiVector<LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node>;
82using GlobalOrdinalMultiVector [[maybe_unused]] = Xpetra::MultiVector<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node>;
83using LOMultiVector [[maybe_unused]] = LocalOrdinalMultiVector ;
84using GOMultiVector [[maybe_unused]] = GlobalOrdinalMultiVector;
85#endif
86
87#ifdef XPETRA_VECTORFACTORY_SHORT
88using LocalOrdinalVectorFactory [[maybe_unused]] = Xpetra::VectorFactory<LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node>;
89using GlobalOrdinalVectorFactory [[maybe_unused]] = Xpetra::VectorFactory<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node>;
90using LOVectorFactory [[maybe_unused]] = LocalOrdinalVectorFactory ;
91using GOVectorFactory [[maybe_unused]] = GlobalOrdinalVectorFactory;
92#endif
93
94#ifdef XPETRA_MULTIVECTORFACTORY_SHORT
95using LocalOrdinalMultiVectorFactory [[maybe_unused]] = Xpetra::MultiVectorFactory<LocalOrdinal, LocalOrdinal, GlobalOrdinal, Node>;
96using GlobalOrdinalMultiVectorFactory [[maybe_unused]] = Xpetra::MultiVectorFactory<GlobalOrdinal, LocalOrdinal, GlobalOrdinal, Node>;
97using LOMultiVectorFactory [[maybe_unused]] = LocalOrdinalMultiVectorFactory ;
98using GOMultiVectorFactory [[maybe_unused]] = GlobalOrdinalMultiVectorFactory;
99#endif
100
101#ifdef XPETRA_IMPORT_SHORT
102using Import [[maybe_unused]] = Xpetra::Import<LocalOrdinal, GlobalOrdinal, Node>;
103#endif
104
105#ifdef XPETRA_EXPORT_SHORT
106using Export [[maybe_unused]] = Xpetra::Export<LocalOrdinal, GlobalOrdinal, Node>;
107#endif
108
109#ifdef XPETRA_IMPORTFACTORY_SHORT
110using ImportFactory [[maybe_unused]] = Xpetra::ImportFactory<LocalOrdinal, GlobalOrdinal, Node>;
111#endif
112
113#ifdef XPETRA_EXPORTFACTORY_SHORT
114using ExportFactory [[maybe_unused]] = Xpetra::ExportFactory<LocalOrdinal, GlobalOrdinal, Node>;
115#endif
116
117#ifdef XPETRA_TPETRAMAP_SHORT
118using TpetraMap [[maybe_unused]] = Xpetra::TpetraMap<LocalOrdinal, GlobalOrdinal, Node>;
119#endif
120
121#ifdef XPETRA_TPETRACRSGRAPH_SHORT
122using TpetraCrsGraph [[maybe_unused]] = Xpetra::TpetraCrsGraph<LocalOrdinal, GlobalOrdinal, Node>;
123#endif
124
125#ifdef XPETRA_STRIDEDMAP_SHORT
126using StridedMap [[maybe_unused]] = Xpetra::StridedMap<LocalOrdinal, GlobalOrdinal, Node>;
127#endif
128
129#ifdef XPETRA_STRIDEDMAPFACTORY_SHORT
130using StridedMapFactory [[maybe_unused]] = Xpetra::StridedMapFactory<LocalOrdinal, GlobalOrdinal, Node>;
131#endif
132
133// 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).
134
135// TODO: add namespace {} for shortcut types
136
137// Define convenient shortcut for data types
138using LO [[maybe_unused]] = LocalOrdinal ;
139using GO [[maybe_unused]] = GlobalOrdinal;
140using NO [[maybe_unused]] = Node ;
141
142// TODO: do the same for Epetra object (problem of namespace)
Create an Xpetra::Map instance.
Xpetra utility class for common map-related routines.
Factory for any type of Xpetra::MultiVector and its derived classes.
This factory creates a Xpetra::StridedMap .
Class that stores a strided map.