IncompTpfaSinglePhase.hpp
Go to the documentation of this file.
1/*
2 Copyright 2015 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_INCOMPTPFASINGLEPHASE_HEADER_INCLUDED
21#define OPM_INCOMPTPFASINGLEPHASE_HEADER_INCLUDED
22
23
25#include <vector>
26
27struct UnstructuredGrid;
28struct Wells;
29
30namespace Opm
31{
32
33 class IncompPropertiesSinglePhase;
34 class LinearSolverInterface;
35
44 {
45 public:
51 IncompTpfaSinglePhase(const UnstructuredGrid& grid,
52 const IncompPropertiesSinglePhase& props,
53 const LinearSolverInterface& linsolver,
54 const Wells& wells);
55
58
60 void solve(std::vector<double>& press,
61 std::vector<double>& flux,
62 std::vector<double>& bhp,
63 std::vector<double>& wellrates);
64
65 private:
66 // Helper functions.
67 void computeStaticData();
68 void computePerSolveDynamicData();
69
70 protected:
71 // ------ Data that will remain unmodified after construction. ------
72 const UnstructuredGrid& grid_;
75 const Wells& wells_;
76 std::vector<double> htrans_;
77 std::vector<double> trans_ ;
78 std::vector<double> zeros_;
79 std::vector<double> totmob_;
81
82 // ------ Internal data for the ifs_tpfa solver. ------
84 };
85
86} // namespace Opm
87
88#endif // OPM_INCOMPTPFASINGLEPHASE_HEADER_INCLUDED
Definition: IncompPropertiesSinglePhase.hpp:48
Definition: IncompTpfaSinglePhase.hpp:44
const LinearSolverInterface & linsolver_
Definition: IncompTpfaSinglePhase.hpp:74
~IncompTpfaSinglePhase()
Destructor.
std::vector< double > htrans_
Definition: IncompTpfaSinglePhase.hpp:76
std::vector< double > trans_
Definition: IncompTpfaSinglePhase.hpp:77
struct ifs_tpfa_forces forces_
Definition: IncompTpfaSinglePhase.hpp:80
const Wells & wells_
Definition: IncompTpfaSinglePhase.hpp:75
struct ifs_tpfa_data * h_
Definition: IncompTpfaSinglePhase.hpp:83
const UnstructuredGrid & grid_
Definition: IncompTpfaSinglePhase.hpp:72
IncompTpfaSinglePhase(const UnstructuredGrid &grid, const IncompPropertiesSinglePhase &props, const LinearSolverInterface &linsolver, const Wells &wells)
const IncompPropertiesSinglePhase & props_
Definition: IncompTpfaSinglePhase.hpp:73
std::vector< double > totmob_
Definition: IncompTpfaSinglePhase.hpp:79
std::vector< double > zeros_
Definition: IncompTpfaSinglePhase.hpp:78
void solve(std::vector< double > &press, std::vector< double > &flux, std::vector< double > &bhp, std::vector< double > &wellrates)
Solve the pressure equation.
Abstract interface for linear solvers.
Definition: LinearSolverInterface.hpp:33
Definition: AnisotropicEikonal.hpp:44
Definition: wells.h:51
Definition: ifs_tpfa.h:48
Definition: ifs_tpfa.h:70