All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
IncompTpfaSinglePhase.hpp
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:
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_;
73  const IncompPropertiesSinglePhase& props_;
74  const LinearSolverInterface& linsolver_;
75  const Wells& wells_;
76  std::vector<double> htrans_;
77  std::vector<double> trans_ ;
78  std::vector<double> zeros_;
79  std::vector<double> totmob_;
80  struct ifs_tpfa_forces forces_;
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
IncompTpfaSinglePhase(const UnstructuredGrid &grid, const IncompPropertiesSinglePhase &props, const LinearSolverInterface &linsolver, const Wells &wells)
Construct solver for incompressible case.
Definition: IncompTpfaSinglePhase.cpp:51
void solve(std::vector< double > &press, std::vector< double > &flux, std::vector< double > &bhp, std::vector< double > &wellrates)
Solve the pressure equation.
Definition: IncompTpfaSinglePhase.cpp:83
Abstract interface for linear solvers.
Definition: LinearSolverInterface.hpp:32
Interfaces and data structures to assemble a system of simultaneous linear equations discretising a f...
Data structure aggregating static information about all wells in a scenario.
Definition: wells.h:50
Main data structure presenting a view of an assembled system of simultaneous linear equations which m...
Definition: ifs_tpfa.h:48
Driving forces pertaining to a particular model setup.
Definition: ifs_tpfa.h:70
Encapsulating a tpfa pressure solver for the incompressible-fluid case.
Definition: IncompTpfaSinglePhase.hpp:43
~IncompTpfaSinglePhase()
Destructor.
Definition: IncompTpfaSinglePhase.cpp:72
Concrete class implementing the incompressible property interface for a simplified single-phase setti...
Definition: IncompPropertiesSinglePhase.hpp:47