MueLu  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MueLu_ThresholdAFilterFactory_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_THRESHOLDAFILTERFACTORY_DECL_HPP
11 #define MUELU_THRESHOLDAFILTERFACTORY_DECL_HPP
12 
13 /*
14  * MueLu_ThresholdAFilterFactory.hpp
15  *
16  * Created on: 14.10.2011
17  * Author: tobias
18  */
19 
20 #include "MueLu_ConfigDefs.hpp"
23 #include "Teuchos_ScalarTraits.hpp"
24 
25 namespace MueLu {
26 
33 template <class Scalar = DefaultScalar,
36  class Node = DefaultNode>
38 #undef MUELU_THRESHOLDAFILTERFACTORY_SHORT
39 #include "MueLu_UseShortNames.hpp"
40 
42 
43  public:
45 
46 
48  ThresholdAFilterFactory(const std::string& ename, const magnitudeType threshold, const bool keepDiagonal = true, const GlobalOrdinal expectedNNZperRow = -1);
49 
51 
52 
53  void DeclareInput(Level& currentLevel) const;
54 
56 
58 
61  void Build(Level& currentLevel) const;
62 
64 
65  private:
66  std::string varName_;
68  const bool keepDiagonal_;
70 
71 }; // class ThresholdAFilterFactory
72 
73 } // namespace MueLu
74 
75 #define MUELU_THRESHOLDAFILTERFACTORY_SHORT
76 #endif // MUELU_THRESHOLDAFILTERFACTORY_DECL_HPP
MueLu::DefaultLocalOrdinal LocalOrdinal
void DeclareInput(Level &currentLevel) const
Input.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
MueLu::DefaultNode Node
MueLu::DefaultScalar Scalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Definition: MueLu_Level.hpp:63
const magnitudeType threshold_
threshold parameter
std::string varName_
name of input and output variable
ThresholdAFilterFactory(const std::string &ename, const magnitudeType threshold, const bool keepDiagonal=true, const GlobalOrdinal expectedNNZperRow=-1)
Constructor.
void Build(Level &currentLevel) const
Build an object with this factory.
Base class for factories that use one level (currentLevel).
Factory for building a thresholded operator.
typename Teuchos::ScalarTraits< Scalar >::magnitudeType magnitudeType