MICPContainer.hpp
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
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 2 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 Consult the COPYING file in the top-level source directory of this
19 module for the precise wording of the license and the list of
20 copyright holders.
21*/
26#ifndef OPM_MICP_CONTAINER_HPP
27#define OPM_MICP_CONTAINER_HPP
28
29#include <vector>
30
31namespace Opm {
32
33namespace data { class Solution; }
34template<class Scalar> struct MICPSolutionContainer;
35
36template<class Scalar>
38{
39 using ScalarBuffer = std::vector<Scalar>;
40
41public:
42 void allocate(const unsigned bufferSize);
43
44 void assign(const unsigned globalDofIdx,
45 const Scalar microbialConcentration,
46 const Scalar oxygenConcentration,
47 const Scalar ureaConcentration,
48 const Scalar biofilmConcentration,
49 const Scalar calciteConcentration);
50
52
53 void outputRestart(data::Solution& sol);
54
55 void readRestart(const unsigned globalDofIdx,
56 const unsigned elemIdx,
57 const data::Solution& sol);
58
59 bool allocated() const
60 { return allocated_; }
61
62private:
63 bool allocated_ = false;
64 ScalarBuffer cMicrobes_;
65 ScalarBuffer cOxygen_;
66 ScalarBuffer cUrea_;
67 ScalarBuffer cBiofilm_;
68 ScalarBuffer cCalcite_;
69};
70
71} // namespace Opm
72
73#endif // OPM_MICP_CONTAINER_HPP
Definition: MICPContainer.hpp:38
void assign(const unsigned globalDofIdx, const Scalar microbialConcentration, const Scalar oxygenConcentration, const Scalar ureaConcentration, const Scalar biofilmConcentration, const Scalar calciteConcentration)
void readRestart(const unsigned globalDofIdx, const unsigned elemIdx, const data::Solution &sol)
void outputRestart(data::Solution &sol)
bool allocated() const
Definition: MICPContainer.hpp:59
MICPSolutionContainer< Scalar > getSolution() const
void allocate(const unsigned bufferSize)
Definition: blackoilboundaryratevector.hh:39
Struct holding MICP extension data.
Definition: SolutionContainers.hpp:57