MueLu Version of the Day
Loading...
Searching...
No Matches
MueLu_DenseConstraint_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_DENSECONSTRAINT_DECL_HPP
11#define MUELU_DENSECONSTRAINT_DECL_HPP
12
13#include "Teuchos_ScalarTraits.hpp"
14
15#include <Xpetra_MultiVector_fwd.hpp>
16#include <Xpetra_Matrix.hpp>
17#include <Xpetra_CrsGraph_fwd.hpp>
18#include <Xpetra_MapFactory_fwd.hpp>
19
20#include "MueLu_ConfigDefs.hpp"
21#include "MueLu_Constraint.hpp"
22
23namespace MueLu {
24
25template <class Scalar = DefaultScalar,
28 class Node = DefaultNode>
30 : public Constraint<Scalar, LocalOrdinal, GlobalOrdinal, Node> {
31#undef MUELU_DENSECONSTRAINT_SHORT
33 public:
39 using MagnitudeType = typename Teuchos::ScalarTraits<Scalar>::magnitudeType;
40
42
43
44 DenseConstraint() = default;
45
51 DenseConstraint(const RCP<MultiVector>& B, const RCP<MultiVector>& Bc, RCP<const CrsGraph> Ppattern, const std::string& solverType);
52
54
55 void Setup();
56
57 typename CrsGraph::local_graph_type FindBlocks(RCP<const CrsGraph>& /*XXt*/) override;
58
60 MagnitudeType ResidualNorm(RCP<const Matrix> P) const override;
61
62 private:
64 RCP<MultiVector> B_;
65
67 RCP<MultiVector> Bc_;
68};
69
70} // namespace MueLu
71
72#define MUELU_DENSECONSTRAINT_SHORT
73#endif
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Constraint space information for the potential prolongator.
CrsGraph::local_graph_type FindBlocks(RCP< const CrsGraph > &) override
MagnitudeType ResidualNorm(RCP< const Matrix > P) const override
Compute norm of residual B - P*Bc.
RCP< MultiVector > B_
Fine nullspace.
typename Teuchos::ScalarTraits< Scalar >::magnitudeType MagnitudeType
RCP< MultiVector > Bc_
Coarse nullspace.
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar