MueLu
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
MueLu_CoalesceDropFactory_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_COALESCEDROPFACTORY_DECL_HPP
11
#define MUELU_COALESCEDROPFACTORY_DECL_HPP
12
13
#include <Xpetra_Matrix_fwd.hpp>
14
#include <Xpetra_MultiVector_fwd.hpp>
15
#include <Xpetra_VectorFactory_fwd.hpp>
16
#include <Xpetra_Vector_fwd.hpp>
17
#include <Xpetra_ImportFactory_fwd.hpp>
18
#include <Xpetra_CrsGraph_fwd.hpp>
19
#include <Xpetra_CrsGraphFactory_fwd.hpp>
//TODO
20
#include <Xpetra_StridedMap_fwd.hpp>
21
#include <Xpetra_Map_fwd.hpp>
22
23
#include "
MueLu_ConfigDefs.hpp
"
24
#include "
MueLu_SingleLevelFactoryBase.hpp
"
25
#include "
MueLu_CoalesceDropFactory_fwd.hpp
"
26
#include "
MueLu_Utilities_fwd.hpp
"
27
28
#include "
MueLu_Level_fwd.hpp
"
29
#include "MueLu_LWGraph.hpp"
30
31
#include "
MueLu_LWGraph_fwd.hpp
"
32
#include "
MueLu_AmalgamationInfo_fwd.hpp
"
33
#include "
MueLu_AmalgamationFactory_fwd.hpp
"
34
#include "
MueLu_PreDropFunctionBaseClass_fwd.hpp
"
35
#include "
MueLu_PreDropFunctionConstVal_fwd.hpp
"
36
37
namespace
MueLu
{
38
93
94
template
<
class
Scalar
=
DefaultScalar
,
95
class
LocalOrdinal
=
DefaultLocalOrdinal
,
96
class
GlobalOrdinal
=
DefaultGlobalOrdinal
,
97
class
Node
=
DefaultNode
>
98
class
CoalesceDropFactory
:
public
SingleLevelFactoryBase
{
99
#undef MUELU_COALESCEDROPFACTORY_SHORT
100
#include "
MueLu_UseShortNames.hpp
"
101
102
public
:
104
105
107
CoalesceDropFactory
();
108
110
virtual
~CoalesceDropFactory
() {}
111
112
RCP<const ParameterList>
GetValidParameterList
()
const
;
113
115
117
118
119
void
DeclareInput
(
Level
& currentLevel)
const
;
120
122
void
SetPreDropFunction
(
const
RCP<
MueLu::PreDropFunctionBaseClass<Scalar, LocalOrdinal, GlobalOrdinal, Node>
>& predrop) {
predrop_
= predrop; }
123
125
126
void
Build
(
Level
& currentLevel)
const
;
// Build
127
128
private
:
129
// pre-drop function
130
mutable
RCP<PreDropFunctionBaseClass>
predrop_
;
131
133
void
MergeRows
(
const
Matrix& A,
const
LO row, Array<LO>& cols,
const
Array<LO>& translation)
const
;
134
void
MergeRowsWithDropping
(
const
Matrix& A,
const
LO row,
const
ArrayRCP<const SC>& ghostedDiagVals, SC threshold, Array<LO>& cols,
const
Array<LO>& translation)
const
;
135
136
// When we want to decouple a block diagonal system (returns Teuchos::null if generate_matrix is false)
137
Teuchos::RCP<Xpetra::Matrix<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
BlockDiagonalize
(
Level
& currentLevel,
const
RCP<Matrix>& A,
bool
generate_matrix)
const
;
138
139
// When we want to decouple a block diagonal system via a *graph*
140
void
BlockDiagonalizeGraph
(
const
RCP<LWGraph>& inputGraph,
const
RCP<LocalOrdinalVector>& ghostedBlockNumber, RCP<LWGraph>& outputGraph, RCP<const Import>& importer)
const
;
141
142
};
// class CoalesceDropFactory
143
144
}
// namespace MueLu
145
146
#define MUELU_COALESCEDROPFACTORY_SHORT
147
#endif
// MUELU_COALESCEDROPFACTORY_DECL_HPP
MueLu_AmalgamationFactory_fwd.hpp
MueLu_AmalgamationInfo_fwd.hpp
MueLu_CoalesceDropFactory_fwd.hpp
MueLu_ConfigDefs.hpp
MueLu_LWGraph_fwd.hpp
MueLu_Level_fwd.hpp
MueLu_PreDropFunctionBaseClass_fwd.hpp
MueLu_PreDropFunctionConstVal_fwd.hpp
MueLu_SingleLevelFactoryBase.hpp
LocalOrdinal
MueLu::DefaultLocalOrdinal LocalOrdinal
Definition
MueLu_UseDefaultTypes.hpp:13
Scalar
MueLu::DefaultScalar Scalar
Definition
MueLu_UseDefaultTypes.hpp:12
GlobalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Definition
MueLu_UseDefaultTypes.hpp:14
Node
MueLu::DefaultNode Node
Definition
MueLu_UseDefaultTypes.hpp:15
MueLu_UseShortNames.hpp
MueLu_Utilities_fwd.hpp
MueLu::CoalesceDropFactory::MergeRows
void MergeRows(const Matrix &A, const LO row, Array< LO > &cols, const Array< LO > &translation) const
Method to merge rows of matrix for systems of PDEs.
Definition
MueLu_CoalesceDropFactory_def.hpp:1660
MueLu::CoalesceDropFactory::BlockDiagonalize
Teuchos::RCP< Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > > BlockDiagonalize(Level ¤tLevel, const RCP< Matrix > &A, bool generate_matrix) const
Definition
MueLu_CoalesceDropFactory_def.hpp:1794
MueLu::CoalesceDropFactory::DeclareInput
void DeclareInput(Level ¤tLevel) const
Input.
Definition
MueLu_CoalesceDropFactory_def.hpp:125
MueLu::CoalesceDropFactory::BlockDiagonalizeGraph
void BlockDiagonalizeGraph(const RCP< LWGraph > &inputGraph, const RCP< LocalOrdinalVector > &ghostedBlockNumber, RCP< LWGraph > &outputGraph, RCP< const Import > &importer) const
Definition
MueLu_CoalesceDropFactory_def.hpp:1917
MueLu::CoalesceDropFactory::MergeRowsWithDropping
void MergeRowsWithDropping(const Matrix &A, const LO row, const ArrayRCP< const SC > &ghostedDiagVals, SC threshold, Array< LO > &cols, const Array< LO > &translation) const
Definition
MueLu_CoalesceDropFactory_def.hpp:1719
MueLu::CoalesceDropFactory::GetValidParameterList
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
Definition
MueLu_CoalesceDropFactory_def.hpp:88
MueLu::CoalesceDropFactory::CoalesceDropFactory
CoalesceDropFactory()
Constructor.
Definition
MueLu_CoalesceDropFactory_def.hpp:121
MueLu::CoalesceDropFactory::~CoalesceDropFactory
virtual ~CoalesceDropFactory()
Destructor.
Definition
MueLu_CoalesceDropFactory_decl.hpp:110
MueLu::CoalesceDropFactory::Build
void Build(Level ¤tLevel) const
Build an object with this factory.
Definition
MueLu_CoalesceDropFactory_def.hpp:144
MueLu::CoalesceDropFactory::SetPreDropFunction
void SetPreDropFunction(const RCP< MueLu::PreDropFunctionBaseClass< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &predrop)
set predrop function
Definition
MueLu_CoalesceDropFactory_decl.hpp:122
MueLu::CoalesceDropFactory::predrop_
RCP< PreDropFunctionBaseClass > predrop_
Definition
MueLu_CoalesceDropFactory_decl.hpp:130
MueLu::Level
Class that holds all level-specific information.
Definition
MueLu_Level.hpp:63
MueLu::PreDropFunctionBaseClass
Definition
MueLu_PreDropFunctionBaseClass_decl.hpp:27
MueLu::SingleLevelFactoryBase::SingleLevelFactoryBase
SingleLevelFactoryBase()
Constructor.
MueLu
Namespace for MueLu classes and methods.
Definition
MueLu_BrickAggregationFactory_decl.hpp:42
MueLu::DefaultNode
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Definition
MueLu_Details_DefaultTypes.hpp:32
MueLu::DefaultGlobalOrdinal
int DefaultGlobalOrdinal
Definition
MueLu_Details_DefaultTypes.hpp:29
MueLu::DefaultLocalOrdinal
int DefaultLocalOrdinal
Definition
MueLu_Details_DefaultTypes.hpp:22
MueLu::DefaultScalar
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar
Definition
MueLu_Details_DefaultTypes.hpp:20
src
Graph
MatrixTransformation
MueLu_CoalesceDropFactory_decl.hpp
Generated by
1.17.0