LifeV
RBFInterpolation.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  @file
29  @brief FSIData - File containing the implementation of Radial Basis Functions suited for interpolation
30  between non-matching grids
31 
32  @author Davide Forti <davide.forti@epfl.ch>
33  @date 01-31-2010
34 
35  @maintainer Davide Forti <davide.Forti@epfl.ch>
36  */
37 
38 #ifndef RBF_INTERPOLATION_HPP
39 #define RBF_INTERPOLATION_HPP
40 
41 #include <lifev/core/LifeV.hpp>
42 #include <lifev/core/array/MatrixEpetra.hpp>
43 #include <lifev/core/array/GhostHandler.hpp>
44 #include <lifev/core/algorithm/PreconditionerIfpack.hpp>
45 #include <lifev/core/algorithm/LinearSolver.hpp>
46 #include <Teuchos_ParameterList.hpp>
47 #include <Teuchos_XMLParameterListHelpers.hpp>
48 #include <Teuchos_RCP.hpp>
49 
50 namespace LifeV
51 {
52 template <typename mesh_Type>
54 {
55 public:
56 
58 
59  typedef VectorEpetra vector_Type;
61 
62  typedef MatrixEpetra<double> matrix_Type;
64 
65  typedef std::vector<int> flagContainer_Type;
66 
68 
71 
72  typedef GhostHandler<mesh_Type> neighbors_Type;
74 
75  typedef LifeV::Preconditioner basePrec_Type;
77 
78  typedef LifeV::PreconditionerIfpack prec_Type;
80 
82 
84 
86 
87  virtual ~RBFInterpolation() {}
88 
89  virtual void setup( meshPtr_Type fullMeshKnown, meshPtr_Type localMeshKnown, meshPtr_Type fullMeshUnknown, meshPtr_Type localMeshUnknown, flagContainer_Type flags ) {};
90 
91  virtual void setupRBFData (vectorPtr_Type KnownField, vectorPtr_Type UnknownField, GetPot datafile, parameterList_Type belosList) {};
92 
93  virtual void setupRBFData (vectorPtr_Type KnownField, vectorPtr_Type UnknownField) {};
94 
95  virtual void buildOperators() {};
96 
97  virtual void interpolationOperator() {};
98 
99  virtual void projectionOperator() {};
100 
101  virtual void buildRhs() {};
102 
103  virtual void interpolateCostantField() {};
104 
105  virtual void identifyNodes (meshPtr_Type LocalMesh, std::set<ID>& GID_nodes, vectorPtr_Type CheckVector) {};
106 
107  virtual bool isInside (ID pointMarker, flagContainer_Type Flags) {RETURN_UNDEFINED};
108 
110 
111  virtual void setBasis (const std::string &) {};
112 
113  virtual double rbf (double x1, double y1, double z1, double x2, double y2, double z2, double radius) {RETURN_UNDEFINED;};
114 
115  virtual void interpolate() {};
116 
117  virtual void solution (vectorPtr_Type& Solution) {};
118 
119  virtual void solutionrbf (vectorPtr_Type & ) {};
120 
121  virtual void updateRhs(const vectorPtr_Type& ) {};
122 
123  virtual void setRadius ( double ){};
124 
125  virtual void approximateInverse ( ) {};
126 
128 
130 
132 
133  // Methods added after changing the maps
134 
135  virtual void buildKnownInterfaceMap(){};
136 
137  virtual void buildUnknownInterfaceMap(){};
138 
140 
141  virtual void buildProjectionOperatorMap(){};
142 
143  virtual void getKnownInterfaceMap(mapPtr_Type& map){};
144 
146 
147  virtual void getSolutionOnGamma(vectorPtr_Type& ) { };
148 
150 
152 
154 
155 private:
156 
157 };
158 
159 template <typename mesh_Type>
161 {}
162 
163 
164 } // namespace LifeV
165 
166 #endif // RBF_INTERPOLATION_HPP
virtual void solutionrbf(vectorPtr_Type &)
virtual void getSolutionOnGamma(vectorPtr_Type &)
virtual void interpolationOperator()
virtual void interpolateCostantField()
virtual void buildProjectionOperatorMap()
#define RETURN_UNDEFINED
Definition: LifeAssert.hpp:70
virtual void getprojectionOperatorMap(mapPtr_Type &)
virtual double computeRBFradius(meshPtr_Type, meshPtr_Type, idContainer_Type, ID)
std::shared_ptr< prec_Type > precPtr_Type
virtual void expandGammaToOmega_Known(const vectorPtr_Type &, vectorPtr_Type &)
std::shared_ptr< neighbors_Type > neighborsPtr_Type
std::shared_ptr< vector_Type > vectorPtr_Type
virtual void setupRBFData(vectorPtr_Type KnownField, vectorPtr_Type UnknownField)
virtual void identifyNodes(meshPtr_Type LocalMesh, std::set< ID > &GID_nodes, vectorPtr_Type CheckVector)
std::shared_ptr< matrix_Type > matrixPtr_Type
LifeV::PreconditionerIfpack prec_Type
virtual void getInterpolationOperatorMap(mapPtr_Type &)
virtual void approximateInverse()
GhostHandler< mesh_Type > neighbors_Type
virtual void setupRBFData(vectorPtr_Type KnownField, vectorPtr_Type UnknownField, GetPot datafile, parameterList_Type belosList)
virtual void buildKnownInterfaceMap()
Teuchos::RCP< Teuchos::ParameterList > parameterList_Type
Epetra_Import const & importer()
Getter for the Epetra_Import.
Definition: MapEpetra.cpp:394
virtual void updateRhs(const vectorPtr_Type &)
uint32_type ID
IDs.
Definition: LifeV.hpp:194
std::shared_ptr< MapEpetra > mapPtr_Type
std::shared_ptr< basePrec_Type > basePrecPtr_Type
virtual void setup(meshPtr_Type fullMeshKnown, meshPtr_Type localMeshKnown, meshPtr_Type fullMeshUnknown, meshPtr_Type localMeshUnknown, flagContainer_Type flags)
virtual void buildUnknownInterfaceMap()
virtual void buildUnknownVectorialInterfaceMap()
LifeV::Preconditioner basePrec_Type
MatrixEpetra< double > matrix_Type
virtual void projectionOperator()
virtual void getNumerationInterfaceKnown(vectorPtr_Type &vector)
std::unordered_set< ID > idContainer_Type
virtual bool isInside(ID pointMarker, flagContainer_Type Flags)
virtual void getVectorialInterpolationMap(mapPtr_Type &)
virtual void setRadius(double)
virtual void setBasis(const std::string &)
virtual double rbf(double x1, double y1, double z1, double x2, double y2, double z2, double radius)
virtual void solution(vectorPtr_Type &Solution)
virtual void getKnownInterfaceMap(mapPtr_Type &map)
std::shared_ptr< mesh_Type > meshPtr_Type
virtual void restrictOmegaToGamma_Known(const vectorPtr_Type &, vectorPtr_Type &)
std::vector< int > flagContainer_Type
FactorySingleton< Factory< RBFInterpolation< mesh_Type >, std::string > > InterpolationFactory
void importFromHDF5(std::string const &fileName="ghostmap")
Import neighbor lists to an hdf5 file.
virtual void buildInterpolationOperatorMap()