opm-simulators
Toggle main menu visibility
Loading...
Searching...
No Matches
MechContainer.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_MECH_CONTAINER_HPP
27
#define OPM_MECH_CONTAINER_HPP
28
29
#include <dune/common/fvector.hh>
30
31
#include <opm/common/utility/VoigtArray.hpp>
32
33
#include <array>
34
#include <cstddef>
35
#include <map>
36
#include <string>
37
#include <vector>
38
39
namespace
Opm
{
40
41
namespace
data {
class
Solution; }
42
43
template
<
class
Scalar>
44
class
MechContainer
45
{
46
using
ScalarBuffer = std::vector<Scalar>;
47
48
public
:
49
void
allocate(
const
std::size_t bufferSize,
50
std::map<std::string, int>& rstKeywords);
51
52
void
assignDisplacement(
const
unsigned
globalDofIdx,
53
const
Dune::FieldVector<Scalar,3>& disp);
54
55
void
assignDelStress(
const
unsigned
globalDofIdx,
56
const
Dune::FieldVector<Scalar,6>& delStress);
57
58
void
assignPotentialForces(
const
unsigned
globalDofIdx,
59
const
Scalar force,
60
const
Scalar pressForce,
61
const
Scalar tempForce);
62
63
void
assignFracStress(
const
unsigned
globalDofIdx,
64
const
Dune::FieldVector<Scalar,6>& fracStress);
65
66
void
assignLinStress(
const
unsigned
globalDofIdx,
67
const
Dune::FieldVector<Scalar,6>& linStress);
68
69
void
assignStrain(
const
unsigned
globalDofIdx,
70
const
Dune::FieldVector<Scalar,6>& strain);
71
72
void
assignStress(
const
unsigned
globalDofIdx,
73
const
Dune::FieldVector<Scalar,6>& stress);
74
75
void
outputRestart(data::Solution& sol);
76
77
bool
allocated()
const
78
{
return
allocated_; }
79
80
private
:
81
bool
allocated_ =
false
;
82
ScalarBuffer potentialForce_;
83
ScalarBuffer potentialPressForce_;
84
ScalarBuffer potentialTempForce_;
85
86
std::array<ScalarBuffer,3> disp_;
87
VoigtArray<Scalar> delstress_;
88
VoigtArray<Scalar> fracstress_;
89
VoigtArray<Scalar> linstress_;
90
VoigtArray<Scalar> strain_;
91
VoigtArray<Scalar> stress_;
92
};
93
94
}
// namespace Opm
95
96
#endif
// OPM_MECH_CONTAINER_HPP
Opm::MechContainer
Definition
MechContainer.hpp:45
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition
blackoilbioeffectsmodules.hh:43
opm
simulators
flow
MechContainer.hpp
Generated by
1.17.0