TpsaContainer.hpp
Go to the documentation of this file.
1/*
2This file is part of the Open Porous Media project (OPM).
3
4 OPM is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 OPM is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with OPM. If not, see <http://www.gnu.org/licenses/>.
16 Consult the COPYING file in the top-level source directory of this
17 module for the precise wording of the license and the list of
18 copyright holders.
19*/
24#ifndef OPM_TPSA_CONTAINER_HPP
25#define OPM_TPSA_CONTAINER_HPP
26
27#include <dune/common/fvector.hh>
28
29#include <array>
30#include <cstddef>
31#include <map>
32#include <string>
33#include <vector>
34
35namespace Opm
36{
37
38namespace data
39{
40 class Solution;
41}
42
43template <typename Scalar>
45{
46 using ScalarBuffer = std::vector<Scalar>;
47
48public:
49 void allocate(const std::size_t bufferSize,
50 std::map<std::string, int>& rstKeywords);
51
52 void assignRotation(const unsigned globalDofIdx,
53 const Dune::FieldVector<Scalar, 3>& rotation);
54
55 void assignSolidPressure(const unsigned globalDofIdx,
56 const Scalar solidPressure);
57
58 void outputRestart(data::Solution& sol);
59
60 bool allocated() const
61 {
62 return allocated_;
63 }
64
65private:
66 bool allocated_{false};
67 ScalarBuffer solidPressure_;
68 std::array<ScalarBuffer, 3> rotation_;
69}; // class TpsaContainer
70
71} // namespace Opm
72
73#endif //OPM_TPSA_CONTAINER_HPP
Definition: TpsaContainer.hpp:45
void allocate(const std::size_t bufferSize, std::map< std::string, int > &rstKeywords)
bool allocated() const
Definition: TpsaContainer.hpp:60
void outputRestart(data::Solution &sol)
void assignRotation(const unsigned globalDofIdx, const Dune::FieldVector< Scalar, 3 > &rotation)
void assignSolidPressure(const unsigned globalDofIdx, const Scalar solidPressure)
Definition: blackoilbioeffectsmodules.hh:45