opm-simulators
Toggle main menu visibility
Loading...
Searching...
No Matches
TracerContainer.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_TRACER_CONTAINER_HPP
27
#define OPM_TRACER_CONTAINER_HPP
28
29
#include <functional>
30
#include <vector>
31
32
namespace
Opm
{
33
34
namespace
data {
class
Solution; }
35
class
TracerConfig;
36
37
template
<
class
Flu
id
System>
38
class
TracerContainer
39
{
40
using
Scalar =
typename
FluidSystem::Scalar;
41
using
ScalarBuffer = std::vector<Scalar>;
42
43
public
:
44
void
allocate(
const
unsigned
bufferSize,
45
const
TracerConfig& tracers);
46
47
using
AssignFunction = std::function<Scalar(
const
unsigned
)>;
48
49
void
assignFreeConcentrations(
const
unsigned
globalDofIdx,
50
const
AssignFunction& concentration);
51
52
void
assignSolConcentrations(
const
unsigned
globalDofIdx,
53
const
AssignFunction& concentration);
54
55
void
outputRestart(data::Solution& sol,
56
const
TracerConfig& tracers);
57
58
private
:
59
std::vector<ScalarBuffer> freeConcentrations_{};
60
std::vector<ScalarBuffer> solConcentrations_{};
61
bool
allocated_{
false
};
62
};
63
64
}
// namespace Opm
65
66
#endif
// OPM_TRACER_CONTAINER_HPP
Opm::TracerContainer
Definition
TracerContainer.hpp:39
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition
blackoilbioeffectsmodules.hh:43
opm
simulators
flow
TracerContainer.hpp
Generated by
1.17.0