MueLu Version of the Day
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
44namespace MueLu {
45
52template <class Scalar = DefaultScalar,
55 class Node = DefaultNode>
56class GeoInterpFactory : public PFactory {
57#undef MUELU_GEOINTERPFACTORY_SHORT
59
60 public:
62
63
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::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
MueLu::DefaultNode Node
Factory for GMG Q2-Q1-Q2 interpolation.
void BuildP(Level &fineLevel, Level &coarseLevel) const
Abstract Build method.
void DeclareInput(Level &fineLevel, Level &coarseLevel) const
Specifies the data that this class needs, and the factories that generate that data.
void Build(Level &fineLevel, Level &coarseLevel) const
Build an object with this factory.
Class that holds all level-specific information.
Factory that provides an interface for a concrete implementation of a prolongation operator.
Namespace for MueLu classes and methods.
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
Tpetra::Details::DefaultTypes::scalar_type DefaultScalar