00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef OPM_TRANSPORTSOLVERTWOPHASEAD_HEADER_INCLUDED
00021 #define OPM_TRANSPORTSOLVERTWOPHASEAD_HEADER_INCLUDED
00022
00023 #include <opm/autodiff/AutoDiffBlock.hpp>
00024 #include <opm/autodiff/AutoDiffHelpers.hpp>
00025 #include <opm/core/transport/TransportSolverTwophaseInterface.hpp>
00026 #include <vector>
00027
00028 struct UnstructuredGrid;
00029
00030 namespace Opm
00031 {
00032
00033 class IncompPropertiesInterface;
00034 class LinearSolverInterface;
00035 class ParameterGroup;
00036
00039 class TransportSolverTwophaseAd : public TransportSolverTwophaseInterface
00040 {
00041 public:
00048 TransportSolverTwophaseAd(const UnstructuredGrid& grid,
00049 const IncompPropertiesInterface& props,
00050 const LinearSolverInterface& linsolver,
00051 const double* gravity,
00052 const ParameterGroup& param);
00053
00054
00055 virtual ~TransportSolverTwophaseAd();
00056
00065 virtual void solve(const double* porevolume,
00066 const double* source,
00067 const double dt,
00068 TwophaseState& state);
00069
00070 private:
00071 typedef AutoDiffBlock<double> ADB;
00072 typedef ADB::V V;
00073 typedef ADB::M M;
00074
00075 private:
00076 const UnstructuredGrid& grid_;
00077 const IncompPropertiesInterface& props_;
00078 const LinearSolverInterface& linsolver_;
00079 const HelperOps ops_;
00080 double gravity_;
00081 double tol_;
00082 int maxit_;
00083 std::vector<int> allcells_;
00084 V transi_;
00085 };
00086
00087 }
00088
00089 #endif // OPM_TRANSPORTSOLVERTWOPHASEAD_HEADER_INCLUDED