VelocityInterpolation.hpp
Go to the documentation of this file.
1/*
2 Copyright 2012 SINTEF ICT, Applied Mathematics.
3
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef OPM_VELOCITYINTERPOLATION_HEADER_INCLUDED
21#define OPM_VELOCITYINTERPOLATION_HEADER_INCLUDED
22
24#include <vector>
25
26struct UnstructuredGrid;
27
28namespace Opm
29{
30
33 {
34 public:
36
39 virtual void setupFluxes(const double* flux) = 0;
40
47 virtual void interpolate(const int cell,
48 const double* x,
49 double* v) const = 0;
50 };
51
52
53
54
58 {
59 public:
63
66 virtual void setupFluxes(const double* flux);
67
74 virtual void interpolate(const int cell,
75 const double* x,
76 double* v) const;
77 private:
78 const UnstructuredGrid& grid_;
79 const double* flux_;
80 };
81
82
83
84
85
91 {
92 public:
96
99 virtual void setupFluxes(const double* flux);
100
107 virtual void interpolate(const int cell,
108 const double* x,
109 double* v) const;
110 private:
111 WachspressCoord bcmethod_;
112 const UnstructuredGrid& grid_;
113 mutable std::vector<double> bary_coord_;
114 std::vector<double> corner_velocity_; // size = dim * #corners
115 };
116
117
118
119
120} // namespace Opm
121
122#endif // OPM_VELOCITYINTERPOLATION_HEADER_INCLUDED
Definition: VelocityInterpolation.hpp:58
virtual void interpolate(const int cell, const double *x, double *v) const
virtual void setupFluxes(const double *flux)
VelocityInterpolationConstant(const UnstructuredGrid &grid)
Definition: VelocityInterpolation.hpp:91
virtual void interpolate(const int cell, const double *x, double *v) const
VelocityInterpolationECVI(const UnstructuredGrid &grid)
virtual void setupFluxes(const double *flux)
Abstract interface for velocity interpolation method classes.
Definition: VelocityInterpolation.hpp:33
virtual void setupFluxes(const double *flux)=0
virtual void interpolate(const int cell, const double *x, double *v) const =0
Definition: WachspressCoord.hpp:37
Holds the implementation of the CpGrid as a pimple.
Definition: CellQuadrature.hpp:26
Definition: UnstructuredGrid.h:99