MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_LocalPermutationStrategy_decl.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 /*
11  * MueLu_LocalPermutationStrategy_decl.hpp
12  *
13  * Created on: Feb 19, 2013
14  * Author: tobias
15  */
16 
17 #ifndef MUELU_LOCALPERMUTATIONSTRATEGY_DECL_HPP_
18 #define MUELU_LOCALPERMUTATIONSTRATEGY_DECL_HPP_
19 
20 #include <Xpetra_Matrix_fwd.hpp>
21 #include <Xpetra_Vector_fwd.hpp>
24 
25 #include "MueLu_ConfigDefs.hpp"
26 #include "MueLu_Level.hpp"
27 #include "MueLu_BaseClass.hpp"
28 
29 namespace MueLu {
30 
32 
37 template <class Scalar = DefaultScalar,
40  class Node = DefaultNode>
41 class LocalPermutationStrategy : public BaseClass {
42 #undef MUELU_LOCALPERMUTATIONSTRATEGY_SHORT
43 #include "MueLu_UseShortNames.hpp"
44  public:
50 
64  void BuildPermutation(const Teuchos::RCP<Matrix>& A, const Teuchos::RCP<const Map> permRowMap, Level& currentLevel, const FactoryBase* genFactory) const;
65 
66  private:
67  void BuildPermutations(size_t nDofsPerNode) const;
68 
69  mutable std::vector<std::vector<int> > result_permvecs_;
70  mutable size_t permWidth_;
71 
72  GlobalOrdinal getGlobalDofId(const Teuchos::RCP<Matrix>& A, LocalOrdinal localNodeId, LocalOrdinal localDof) const;
74 };
75 
76 } // namespace MueLu
77 
78 #define MUELU_LOCALPERMUTATIONSTRATEGY_SHORT
79 
80 #endif /* MUELU_LOCALPERMUTATIONSTRATEGY_DECL_HPP_ */
MueLu::DefaultLocalOrdinal LocalOrdinal
Class which defines local permutations of matrix columns which correspond to DOFs of the same node...
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
void BuildPermutation(const Teuchos::RCP< Matrix > &A, const Teuchos::RCP< const Map > permRowMap, Level &currentLevel, const FactoryBase *genFactory) const
build permutation operators
MueLu::DefaultNode Node
std::vector< std::vector< int > > result_permvecs_
GlobalOrdinal getGlobalDofId(const Teuchos::RCP< Matrix > &A, LocalOrdinal localNodeId, LocalOrdinal localDof) const
MueLu::DefaultScalar Scalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
void BuildPermutations(size_t nDofsPerNode) const
GlobalOrdinal globalDofId2globalNodeId(const Teuchos::RCP< Matrix > &A, GlobalOrdinal grid) const