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 /*
2  * MueLu_LocalPermutationStrategy_decl.hpp
3  *
4  * Created on: Feb 19, 2013
5  * Author: tobias
6  */
7 
8 #ifndef MUELU_LOCALPERMUTATIONSTRATEGY_DECL_HPP_
9 #define MUELU_LOCALPERMUTATIONSTRATEGY_DECL_HPP_
10 
11 #include <Xpetra_MultiVector_fwd.hpp>
12 #include <Xpetra_Matrix_fwd.hpp>
13 #include <Xpetra_CrsGraph_fwd.hpp>
14 #include <Xpetra_Vector_fwd.hpp>
15 #include <Xpetra_VectorFactory_fwd.hpp>
16 #include <Xpetra_CrsMatrixWrap_fwd.hpp>
17 
18 #include "MueLu_ConfigDefs.hpp"
19 #include "MueLu_Level.hpp"
20 #include "MueLu_BaseClass.hpp"
21 
22 namespace MueLu {
23 
25 
30  template <class Scalar = DefaultScalar,
33  class Node = DefaultNode>
34  class LocalPermutationStrategy : public BaseClass {
35 #undef MUELU_LOCALPERMUTATIONSTRATEGY_SHORT
36 #include "MueLu_UseShortNames.hpp"
37  public:
38 
44 
58  void BuildPermutation(const Teuchos::RCP<Matrix> & A, const Teuchos::RCP<const Map> permRowMap, Level & currentLevel, const FactoryBase* genFactory) const;
59 
60 
61 
62  private:
63 
64  void BuildPermutations(size_t nDofsPerNode) const;
65 
66  mutable std::vector<std::vector<int> > result_permvecs_;
67  mutable size_t permWidth_;
68 
69  GlobalOrdinal getGlobalDofId(const Teuchos::RCP<Matrix> & A, LocalOrdinal localNodeId, LocalOrdinal localDof) const;
71  };
72 
73 } // namespace MueLu
74 
75 #define MUELU_LOCALPERMUTATIONSTRATEGY_SHORT
76 
77 #endif /* MUELU_LOCALPERMUTATIONSTRATEGY_DECL_HPP_ */
MueLu::DefaultLocalOrdinal LocalOrdinal
KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Class which defines local permutations of matrix columns which correspond to DOFs of the same node...
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
MueLu::DefaultGlobalOrdinal GlobalOrdinal
void BuildPermutations(size_t nDofsPerNode) const
GlobalOrdinal globalDofId2globalNodeId(const Teuchos::RCP< Matrix > &A, GlobalOrdinal grid) const