TransportSolverTwophaseAd.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2013 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_TRANSPORTSOLVERTWOPHASEAD_HEADER_INCLUDED
21 #define OPM_TRANSPORTSOLVERTWOPHASEAD_HEADER_INCLUDED
22 
25 #include <opm/core/transport/TransportSolverTwophaseInterface.hpp>
26 #include <vector>
27 
28 struct UnstructuredGrid;
29 
30 namespace Opm
31 {
32 
33  class IncompPropertiesInterface;
34  class LinearSolverInterface;
35  namespace parameter { class ParameterGroup; }
36 
39  class TransportSolverTwophaseAd : public TransportSolverTwophaseInterface
40  {
41  public:
48  TransportSolverTwophaseAd(const UnstructuredGrid& grid,
49  const IncompPropertiesInterface& props,
50  const LinearSolverInterface& linsolver,
51  const double* gravity,
52  const parameter::ParameterGroup& param);
53 
54  // Virtual destructor.
56 
65  virtual void solve(const double* porevolume,
66  const double* source,
67  const double dt,
68  TwophaseState& state);
69 
70  private:
71  typedef AutoDiffBlock<double> ADB;
72  typedef ADB::V V;
73  typedef ADB::M M;
74 
75  private:
76  const UnstructuredGrid& grid_;
77  const IncompPropertiesInterface& props_;
78  const LinearSolverInterface& linsolver_;
79  const HelperOps ops_;
80  double gravity_;
81  double tol_;
82  int maxit_;
83  std::vector<int> allcells_;
84  V transi_;
85  };
86 
87 } // namespace Opm
88 
89 #endif // OPM_TRANSPORTSOLVERTWOPHASEAD_HEADER_INCLUDED
Eigen::Array< Scalar, Eigen::Dynamic, 1 > V
Underlying type for values.
Definition: AutoDiffBlock.hpp:98
Definition: AdditionalObjectDeleter.hpp:22
TransportSolverTwophaseAd(const UnstructuredGrid &grid, const IncompPropertiesInterface &props, const LinearSolverInterface &linsolver, const double *gravity, const parameter::ParameterGroup &param)
Definition: AutoDiffMatrix.hpp:43
virtual void solve(const double *porevolume, const double *source, const double dt, TwophaseState &state)
Definition: AutoDiffHelpers.hpp:40
Definition: TransportSolverTwophaseAd.hpp:39