diff --git a/examples/spu_2p.cpp b/examples/spu_2p.cpp index 9b1bf8bb..9b28eed7 100644 --- a/examples/spu_2p.cpp +++ b/examples/spu_2p.cpp @@ -61,7 +61,7 @@ #include #include - +#include template Ostream& operator<<(Ostream& os, const Collection& c) diff --git a/src/CSRMatrixBlockAssembler.hpp b/src/CSRMatrixBlockAssembler.hpp index f4c0132a..d876b6f7 100644 --- a/src/CSRMatrixBlockAssembler.hpp +++ b/src/CSRMatrixBlockAssembler.hpp @@ -42,9 +42,8 @@ #include #include -#include - -#include "JacobianSystem.hpp" +#include +#include namespace Opm { namespace ImplicitTransportDefault { diff --git a/src/CSRMatrixUmfpackSolver.hpp b/src/CSRMatrixUmfpackSolver.hpp index daaf836a..06f19aa0 100644 --- a/src/CSRMatrixUmfpackSolver.hpp +++ b/src/CSRMatrixUmfpackSolver.hpp @@ -36,7 +36,7 @@ #ifndef OPM_CSRMATRIXUMFPACKSOLVER_HPP_HEADER #define OPM_CSRMATRIXUMFPACKSOLVER_HPP_HEADER -#include +#include namespace Opm { namespace ImplicitTransportLinAlgSupport { diff --git a/src/SimpleFluid2pWrapper.hpp b/src/SimpleFluid2pWrapper.hpp new file mode 100644 index 00000000..e4aec572 --- /dev/null +++ b/src/SimpleFluid2pWrapper.hpp @@ -0,0 +1,78 @@ +/*=========================================================================== +// +// File: SimpleFluid2pWrapper.hpp +// +// Created: 2011-09-30 11:38:28+0200 +// +// Authors: Ingeborg S. Ligaarden +// Jostein R. Natvig +// Halvor M. Nilsen +// Atgeirr F. Rasmussen +// Bård Skaflestad +// +//==========================================================================*/ + + +/* + Copyright 2011 SINTEF ICT, Applied Mathematics. + Copyright 2011 Statoil ASA. + + This file is part of the Open Porous Media Project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . +*/ + +#ifndef OPM_SimpleFluid2pWrapper_HPP_HEADER +#define OPM_SimpleFluid2pWrapper_HPP_HEADER + +#include +#include + +namespace Opm { + template + class SimpleFluid2pWrapper { + public: + SimpleFluid2pWrapper (const ReservoirProperties& resprop) + { + resprop_ = resprop; + } + + double density(int p) const { return 0; } + + template + void + mobility(int c, const Sat& s, Mob& mob, DMob& dmob) const { + + + const double s1 = s[0]; + const double s2 = 1 - s1; + mob[0] = resprop_.mobilityFirstPhase(c, s[0]) ; + mob[1] = resprop_.mobilitySecondPhase(c, s[0]) ; + mob[2] = resprop_.dmobilityFirstPhase(c, s[0]) ; + mob[3] = resprop_.dmobilitySecondPhase(c, s[0]) ; + + mob[0] /= mu_[0]; dmob[0*2 + 0] /= mu_[0]; + mob[1] /= mu_[1]; dmob[1*2 + 1] /= mu_[1]; + } + + private: + ReservoirProperties& resprop_; + std::array mu_ ; + std::array rho_; + }; +} + +#endif /* OPM_SimpleFluid2pWrapper_HPP_HEADER */