My Project
Loading...
Searching...
No Matches
WellConnectionAuxiliaryModule.hpp
1
/*
2
Copyright 2017 Dr. Blatt - HPC-Simulation-Software & Services
3
Copyright 2017 Statoil ASA.
4
5
This file is part of the Open Porous Media project (OPM).
6
7
OPM is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
11
12
OPM is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with OPM. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#ifndef OPM_WELLCONNECTIONAUXILIARYMODULE_HEADER_INCLUDED
22
#define OPM_WELLCONNECTIONAUXILIARYMODULE_HEADER_INCLUDED
23
24
#include <opm/models/discretization/common/baseauxiliarymodule.hh>
25
26
#include <vector>
27
28
namespace
Dune {
class
CpGrid; }
29
30
namespace
Opm
31
{
32
33
class
Schedule;
34
35
class
WellConnectionAuxiliaryModuleGeneric
36
{
37
protected
:
38
WellConnectionAuxiliaryModuleGeneric
(
const
Schedule
& schedule,
39
const
Dune::CpGrid& grid);
40
41
std::vector<std::vector<int> > wells_;
42
};
43
44
template
<
class
TypeTag>
45
class
WellConnectionAuxiliaryModule
46
:
public
BaseAuxiliaryModule<TypeTag>
47
,
private
WellConnectionAuxiliaryModuleGeneric
48
{
49
using
GlobalEqVector
=
GetPropType<TypeTag, Properties::GlobalEqVector>
;
50
using
SparseMatrixAdapter
=
GetPropType<TypeTag, Properties::SparseMatrixAdapter>
;
51
52
public
:
53
54
using
NeighborSet = typename
55
::Opm::BaseAuxiliaryModule<TypeTag>::NeighborSet;
56
57
WellConnectionAuxiliaryModule
(
const
Schedule
& schedule,
58
const
Dune::CpGrid& grid)
59
:
WellConnectionAuxiliaryModuleGeneric
(schedule, grid)
60
{
61
}
62
63
unsigned
numDofs()
const
64
{
65
// No extra dofs are inserted for wells.
66
return
0;
67
}
68
69
void
addNeighbors(std::vector<NeighborSet>&
neighbors
)
const
70
{
71
for
(
const
auto
&
well_perforations
: wells_)
72
{
73
for
(
const
auto
&
perforation
:
well_perforations
)
74
neighbors
[
perforation
].insert(
well_perforations
.begin(),
75
well_perforations
.end());
76
}
77
}
78
79
void
applyInitial()
80
{}
81
82
void
linearize(
SparseMatrixAdapter
& ,
GlobalEqVector
&)
83
{
84
// Linearization is done in StandardDenseWells
85
}
86
87
private
:
88
};
89
90
}
// end namespace OPM
91
#endif
Opm::AquiferInterface
Definition
AquiferInterface.hpp:35
Opm::WellConnectionAuxiliaryModuleGeneric
Definition
WellConnectionAuxiliaryModule.hpp:36
Opm::WellConnectionAuxiliaryModule
Definition
WellConnectionAuxiliaryModule.hpp:48
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition
BlackoilPhases.hpp:27
opm
simulators
wells
WellConnectionAuxiliaryModule.hpp
Generated by
1.9.8