MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_UseShortNames.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // MueLu: A package for multigrid based preconditioning
4 //
5 // Copyright 2012 NTESS and the MueLu contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 // Helper to get ride of template parameters
11 
12 // This file can be use for two purpose:
13 // 1) As an header of a user program.
14 // In this case, this file must be included *after* other headers
15 // and the types Scalar, LocalOrdinal, GlobalOrdinal, Node must be defined.
16 // Note also that there is no #ifndef/#endif to protect again the multiple inclusion of this file.
17 // User should create is own header file including this one:
18 //
19 // Example:
20 // #ifndef MY_HEADER
21 // #define MY_HEADER
22 // #include <MueLu_UseDefaultTypes.hpp>
23 // #include <MueLu_UseShortNames.hpp>
24 // #endif
25 //
26 // 2) Inside of MueLu to enhance the readability.
27 //
28 // template <class Scalar = Xpetra::MultiVector<>::scalar_type,
29 // class LocalOrdinal = typename Xpetra::MultiVector<Scalar>::local_ordinal_type,
30 // class GlobalOrdinal = typename Xpetra::MultiVector<Scalar, LocalOrdinal>::global_ordinal_type,
31 // class Node = typename Xpetra::MultiVector<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
32 // class TpetraMultiVector : public virtual Xpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> {
33 //
34 // #include <MueLu_UseShortNames.hpp>
35 //
36 // myMethod(RCP<const Map> & map) { [...] } // instead of myMethod(RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > &map)
37 //
38 // [...]
39 //
40 // }
41 //
42 
45 
47 
48 // TODO / NOTE: This file should not be included at the global scope (to avoid name collision)