From cfae3edcaf63e1085c2f9df6e391acf5a340ebdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halvor=20M=C3=B8ll=20Nilsen?= Date: Thu, 15 Nov 2012 13:20:49 +0100 Subject: [PATCH] Changes to try to make naming and classes more consistent. This is a start to make devide models and tranport solvers so that VE models is more easely handled --- .../transport/TwoPhaseTransportSolver.cpp | 34 ++++++++++++ .../transport/TwoPhaseTransportSolver.hpp | 52 +++++++++++++++++++ .../reorder/TransportModelInterface.hpp | 2 +- 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 opm/core/transport/TwoPhaseTransportSolver.cpp create mode 100644 opm/core/transport/TwoPhaseTransportSolver.hpp diff --git a/opm/core/transport/TwoPhaseTransportSolver.cpp b/opm/core/transport/TwoPhaseTransportSolver.cpp new file mode 100644 index 000000000..8c05bea77 --- /dev/null +++ b/opm/core/transport/TwoPhaseTransportSolver.cpp @@ -0,0 +1,34 @@ +/*=========================================================================== +// +// File: TwoPhaseTransportSolver.cpp +// +// Author: hnil +// +// Created: 9 Nov 2012 +//==========================================================================*/ +/* + 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 . +*/ + + +#include "TwoPhaseTransportSolver.hpp" + +TwoPhaseTransportSolver::TwoPhaseTransportSolver() +{ +} diff --git a/opm/core/transport/TwoPhaseTransportSolver.hpp b/opm/core/transport/TwoPhaseTransportSolver.hpp new file mode 100644 index 000000000..60bd76619 --- /dev/null +++ b/opm/core/transport/TwoPhaseTransportSolver.hpp @@ -0,0 +1,52 @@ +/*=========================================================================== +// +// File: TwoPhaseTransportSolver.hpp +// +// Author: hnil +// +// Created: 9 Nov 2012 +//==========================================================================*/ +/* + 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 TWOPHASETRANSPORTSOLVER_HPP +#define TWOPHASETRANSPORTSOLVER_HPP +/// Base class for tranport solvers +class TwoPhaseTransportSolver +{ +public: + /// Construct solver. + virtual ~TwoPhaseTransportSolver() {}; + + /// Solve for saturation at next timestep. + /// \param[in] darcyflux Array of signed face fluxes. + /// \param[in] porevolume Array of pore volumes. + /// \param[in] source Transport source term. + /// \param[in] dt Time step. + /// \param[in, out] saturation Phase saturations. + virtual void solve(const double* darcyflux, + const double* porevolume, + const double* source, + const double dt, + std::vector& saturation) = 0; +}; + +#endif // TWOPHASETRANSPORTSOLVER_HPP diff --git a/opm/core/transport/reorder/TransportModelInterface.hpp b/opm/core/transport/reorder/TransportModelInterface.hpp index 1a93ff362..2a1acb8fb 100644 --- a/opm/core/transport/reorder/TransportModelInterface.hpp +++ b/opm/core/transport/reorder/TransportModelInterface.hpp @@ -35,7 +35,7 @@ namespace Opm class TransportModelInterface { public: - virtual ~TransportModelInterface() {} + virtual ~TransportModelInterface() {} private: virtual void solveSingleCell(const int cell) = 0; virtual void solveMultiCell(const int num_cells, const int* cells) = 0;