BioeffectsContainer.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_BIOEFFECTS_CONTAINER_HPP
27#define OPM_BIOEFFECTS_CONTAINER_HPP
28
29#include <vector>
30
31namespace Opm {
32
33namespace data { class Solution; }
34template<class Scalar> struct BioeffectsSolutionContainer;
35
36template<class Scalar>
38{
39 using ScalarBuffer = std::vector<Scalar>;
40
41public:
42 void allocate(const unsigned bufferSize, const bool isMICP);
43
44 void assign(const unsigned globalDofIdx,
45 const Scalar oxygenConcentration,
46 const Scalar ureaConcentration,
47 const Scalar calciteConcentration);
48
49 void assign(const unsigned globalDofIdx,
50 const Scalar microbialConcentration,
51 const Scalar biofilmConcentration);
52
54
55 void outputRestart(data::Solution& sol, const bool isMICP);
56
57 void readRestart(const unsigned globalDofIdx,
58 const unsigned elemIdx,
59 const data::Solution& sol,
60 const bool isMICP);
61
62 bool allocated() const
63 { return allocated_; }
64
65private:
66 bool allocated_ = false;
67 ScalarBuffer cMicrobes_{};
68 ScalarBuffer cOxygen_{};
69 ScalarBuffer cUrea_{};
70 ScalarBuffer cBiofilm_{};
71 ScalarBuffer cCalcite_{};
72};
73
74} // namespace Opm
75
76#endif // OPM_BIOEFFECTS_CONTAINER_HPP
Definition: BioeffectsContainer.hpp:38
BioeffectsSolutionContainer< Scalar > getSolution() const
void assign(const unsigned globalDofIdx, const Scalar oxygenConcentration, const Scalar ureaConcentration, const Scalar calciteConcentration)
void readRestart(const unsigned globalDofIdx, const unsigned elemIdx, const data::Solution &sol, const bool isMICP)
bool allocated() const
Definition: BioeffectsContainer.hpp:62
void outputRestart(data::Solution &sol, const bool isMICP)
void assign(const unsigned globalDofIdx, const Scalar microbialConcentration, const Scalar biofilmConcentration)
void allocate(const unsigned bufferSize, const bool isMICP)
Definition: blackoilbioeffectsmodules.hh:43
Struct holding MICP extension data.
Definition: SolutionContainers.hpp:57