MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_PFactory_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 #ifndef MUELU_PFACTORY_DEF_HPP
11 #define MUELU_PFACTORY_DEF_HPP
12 
13 #include "MueLu_ConfigDefs.hpp"
15 #include "MueLu_PFactory_fwd.hpp"
16 
17 #include "MueLu_Level_fwd.hpp"
18 
19 namespace MueLu {
20 
28 class PFactory : public TwoLevelFactoryBase {
29  protected:
30  bool restrictionMode_; //< true, if PFactory is used for generating the restriction operator
31 
32  public:
34 
35 
38  : restrictionMode_(false) {}
39 
41  virtual ~PFactory() {}
43 
45 
46 
50  virtual void BuildP(Level &fineLevel, Level &coarseLevel) const = 0;
52 
54 
55 
58  void setRestrictionMode(bool bRestrictionMode = false) {
59  restrictionMode_ = bRestrictionMode;
60  }
61 
64 
66 
67 }; // class PFactory
68 
69 } // namespace MueLu
70 
71 #define MUELU_PFACTORY_SHORT
72 #endif // MUELU_PFACTORY_DEF_HPP
virtual ~PFactory()
Destructor.
void setRestrictionMode(bool bRestrictionMode=false)
Base class for factories that use two levels (fineLevel and coarseLevel).
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
bool isRestrictionModeSet()
returns restrictionMode flag
PFactory()
Constructor.
Factory that provides an interface for a concrete implementation of a prolongation operator...
virtual void BuildP(Level &fineLevel, Level &coarseLevel) const =0
Abstract Build method.