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 
12 #include <Xpetra_Matrix_fwd.hpp>
13 #include <Xpetra_CrsGraph_fwd.hpp>
14 #include <Xpetra_Vector_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 = double,
31  class LocalOrdinal = int,
32  class GlobalOrdinal = LocalOrdinal,
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;
70  GlobalOrdinal globalDofId2globalNodeId( const Teuchos::RCP<Matrix> & A, GlobalOrdinal grid ) const;
71  };
72 
73 } // namespace MueLu
74 
75 #define MUELU_LOCALPERMUTATIONSTRATEGY_SHORT
76 
77 #endif /* MUELU_LOCALPERMUTATIONSTRATEGY_DECL_HPP_ */
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
std::vector< std::vector< int > > result_permvecs_
GlobalOrdinal getGlobalDofId(const Teuchos::RCP< Matrix > &A, LocalOrdinal localNodeId, LocalOrdinal localDof) const
void BuildPermutations(size_t nDofsPerNode) const
GlobalOrdinal globalDofId2globalNodeId(const Teuchos::RCP< Matrix > &A, GlobalOrdinal grid) const