MueLu Version of the Day
Loading...
Searching...
No Matches
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
25namespace MueLu {
26
33template <class Scalar = DefaultScalar,
36 class Node = DefaultNode>
38#undef MUELU_THRESHOLDAFILTERFACTORY_SHORT
40
41 using magnitudeType = typename Teuchos::ScalarTraits<Scalar>::magnitudeType;
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
59
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
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Class that holds all level-specific information.
Base class for factories that use one level (currentLevel).
Factory for building a thresholded operator.
void Build(Level &currentLevel) const
Build an object with this factory.
void DeclareInput(Level &currentLevel) const
Input.
const magnitudeType threshold_
threshold parameter
std::string varName_
name of input and output variable
typename Teuchos::ScalarTraits< Scalar >::magnitudeType magnitudeType
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar