MueLu
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
MueLu_GeoInterpFactory_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
//
11
// Note 1: This implementation assumes the following:
12
// 1. The mesh is square and regular.
13
// 2. The number of ELEMENTS on the fine grid is even.
14
// 3. Coarsening by a factor of two.
15
//
16
// This should be general enough for 1-3 dimensions, but is originally
17
// implemented to work with two, so deal with it if there are bugs
18
// initially.
19
//
20
// ASSUMPTIONS TO ELIMINATE:
21
// 1. none that i can think of currently
22
//
23
// Note 2: This factory also generates the coarse grid coordinates.
24
// TODO: More elegant solution - MueLu_MultiVectorTransferFactory.cpp
25
// in $MUELU_HOME/src/MueCentral/ perhaps...
26
//
27
28
#ifndef MUELU_GEOINTERPFACTORY_DECL_HPP
29
#define MUELU_GEOINTERPFACTORY_DECL_HPP
30
31
#include "
MueLu_ConfigDefs.hpp
"
32
//#include "MueLu_SingleLevelFactoryBase.hpp"
33
//#include "MueLu_GeoInterpFactory_fwd.hpp"
34
35
#include <Xpetra_Matrix_fwd.hpp>
36
#include <Xpetra_Map_fwd.hpp>
37
#include <Xpetra_MapFactory_fwd.hpp>
38
#include <Xpetra_CrsMatrixWrap_fwd.hpp>
39
#include <Xpetra_MultiVector_fwd.hpp>
40
41
#include "
MueLu_Level_fwd.hpp
"
42
#include "MueLu_PFactory.hpp"
43
44
namespace
MueLu
{
45
51
52
template
<
class
Scalar
=
DefaultScalar
,
53
class
LocalOrdinal
=
DefaultLocalOrdinal
,
54
class
GlobalOrdinal
=
DefaultGlobalOrdinal
,
55
class
Node
=
DefaultNode
>
56
class
GeoInterpFactory
:
public
PFactory
{
57
#undef MUELU_GEOINTERPFACTORY_SHORT
58
#include "
MueLu_UseShortNames.hpp
"
59
60
public
:
62
63
65
GeoInterpFactory
();
66
68
virtual
~GeoInterpFactory
();
69
71
73
74
81
void
DeclareInput
(
Level
&fineLevel,
Level
&coarseLevel)
const
;
82
84
86
87
89
void
Build
(
Level
&fineLevel,
Level
&coarseLevel)
const
;
90
91
void
BuildP
(
Level
&fineLevel,
Level
&coarseLevel)
const
;
92
93
// void BuildCoarseGrid(Level &fineLevel, Level &coarseLevel) const;
94
95
/* For our geometric multigrid needs, we will explicitly build the
96
coarse grid here and store it as level data. There are two
97
things we care about here: coordinates of the dofs and
98
element-dof lists.
99
100
We will assume only that the elements are numbered
101
lexicographically, left-to-right, bottom-to-top. The order of
102
the degrees of freedom will only be assumed on coarse grids. It
103
can be anything on the finest grid (fineLevel.GetLevelID()==1).
104
105
We further assume that the x- and y-components of velocity are
106
zippered together: UX1 UY1 UX2 UY2 ETC...
107
*/
108
110
111
private
:
112
// No parameters need to be stored... To save "P", use
113
// coarseLevel.Set("P", finalP, this);
114
115
};
// class GeoInterpFactory
116
117
}
// namespace MueLu
118
119
#define MUELU_GEOINTERPFACTORY_SHORT
120
#endif
// MUELU_GEOINTERPFACTORY_DECL_HPP
MueLu_ConfigDefs.hpp
MueLu_Level_fwd.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::GeoInterpFactory::GeoInterpFactory
GeoInterpFactory()
Constructor.
Definition
MueLu_GeoInterpFactory_def.hpp:32
MueLu::GeoInterpFactory::BuildP
void BuildP(Level &fineLevel, Level &coarseLevel) const
Abstract Build method.
Definition
MueLu_GeoInterpFactory_def.hpp:83
MueLu::GeoInterpFactory::~GeoInterpFactory
virtual ~GeoInterpFactory()
Destructor.
Definition
MueLu_GeoInterpFactory_def.hpp:37
MueLu::GeoInterpFactory::DeclareInput
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Specifies the data that this class needs, and the factories that generate that data.
Definition
MueLu_GeoInterpFactory_def.hpp:42
MueLu::GeoInterpFactory::Build
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
Definition
MueLu_GeoInterpFactory_def.hpp:70
MueLu::Level
Class that holds all level-specific information.
Definition
MueLu_Level.hpp:63
MueLu::PFactory::PFactory
PFactory()
Constructor.
Definition
MueLu_PFactory_decl.hpp:37
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
Transfers
Geometric-Interpolation
MueLu_GeoInterpFactory_decl.hpp
Generated by
1.17.0