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 
27 struct UnstructuredGrid;
28 struct Wells;
29 
30 namespace Opm
31 {
32 
33  class IncompPropertiesSinglePhase;
34  class LinearSolverInterface;
35 
44  {
45  public:
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. ------
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. ------
83  struct ifs_tpfa_data* h_;
84  };
85 
86 } // namespace Opm
87 
88 #endif // OPM_INCOMPTPFASINGLEPHASE_HEADER_INCLUDED
Definition: wells.h:50
Definition: grid.h:98
const UnstructuredGrid & grid_
Definition: IncompTpfaSinglePhase.hpp:72
Definition: AnisotropicEikonal.hpp:43
struct ifs_tpfa_forces forces_
Definition: IncompTpfaSinglePhase.hpp:80
Definition: ifs_tpfa.h:48
const LinearSolverInterface & linsolver_
Definition: IncompTpfaSinglePhase.hpp:74
IncompTpfaSinglePhase(const UnstructuredGrid &grid, const IncompPropertiesSinglePhase &props, const LinearSolverInterface &linsolver, const Wells &wells)
~IncompTpfaSinglePhase()
Destructor.
const IncompPropertiesSinglePhase & props_
Definition: IncompTpfaSinglePhase.hpp:73
std::vector< double > htrans_
Definition: IncompTpfaSinglePhase.hpp:76
std::vector< double > totmob_
Definition: IncompTpfaSinglePhase.hpp:79
struct ifs_tpfa_data * h_
Definition: IncompTpfaSinglePhase.hpp:83
const double flux
Definition: Units.hpp:150
std::vector< double > zeros_
Definition: IncompTpfaSinglePhase.hpp:78
const UnstructuredGrid & grid
Definition: ColumnExtract.hpp:31
Definition: ifs_tpfa.h:70
const Wells & wells_
Definition: IncompTpfaSinglePhase.hpp:75
void solve(std::vector< double > &press, std::vector< double > &flux, std::vector< double > &bhp, std::vector< double > &wellrates)
Solve the pressure equation.
std::vector< double > trans_
Definition: IncompTpfaSinglePhase.hpp:77
Abstract interface for linear solvers.
Definition: LinearSolverInterface.hpp:32
Definition: IncompTpfaSinglePhase.hpp:43
Definition: IncompPropertiesSinglePhase.hpp:47