GravityColumnSolverPolymer.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_GRAVITYCOLUMNSOLVERPOLYMER_HEADER_INCLUDED
21 #define OPM_GRAVITYCOLUMNSOLVERPOLYMER_HEADER_INCLUDED
22 
23 #include <opm/core/grid.h>
24 #include <vector>
25 #include <map>
26 
27 namespace Opm
28 {
29 
32  template <class FluxModel, class Model>
34  {
35  public:
38  GravityColumnSolverPolymer(FluxModel& fmodel,
39  const Model& model,
40  const UnstructuredGrid& grid,
41  const double tol,
42  const int maxit);
43 
49  void solve(const std::vector<std::vector<int> >& columns,
50  const double dt,
51  std::vector<double>& s,
52  std::vector<double>& c,
53  std::vector<double>& cmax);
54 
55  private:
56  void solveSingleColumn(const std::vector<int>& column_cells,
57  const double dt,
58  std::vector<double>& s,
59  std::vector<double>& c,
60  std::vector<double>& cmax,
61  std::vector<double>& sol_vec
62  );
63  FluxModel& fmodel_;
64  const Model& model_;
65  const UnstructuredGrid& grid_;
66  const double tol_;
67  const int maxit_;
68 };
69 
70 } // namespace Opm
71 
73 
74 #endif // OPM_GRAVITYCOLUMNSOLVERPOLYMER_HEADER_INCLUDED
Definition: CompressibleTpfaPolymer.hpp:32
std::vector< double > & cmax
Definition: GravityColumnSolverPolymer_impl.hpp:78
GravityColumnSolverPolymer(FluxModel &fmodel, const Model &model, const UnstructuredGrid &grid, const double tol, const int maxit)
Definition: GravityColumnSolverPolymer_impl.hpp:51
Definition: GravityColumnSolverPolymer.hpp:33
void solve(const std::vector< std::vector< int > > &columns, const double dt, std::vector< double > &s, std::vector< double > &c, std::vector< double > &cmax)
Definition: GravityColumnSolverPolymer_impl.hpp:125