Loading [MathJax]/extensions/tex2jax.js
OGS
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
z
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
l
m
n
p
r
s
t
v
y
Classes
Class List
Class Index
Class Hierarchy
Files
File List
File Members
All
a
b
c
d
e
f
g
i
k
m
n
o
p
r
s
t
v
w
x
Functions
a
c
d
e
f
g
i
m
o
p
r
s
t
v
w
Variables
Typedefs
Enumerations
Macros
b
c
g
m
n
o
p
r
s
t
▼
OGS
►
OpenGeoSys 6.5.4-396-ge0d32a01be0 source code documentation
►
OGS CTests—Project Files
►
OGS Input File Parameters—Quality Assurance
►
OGS Input File Parameters
BulkMappingDocuPage
Todo List
OGS Input File Parameters—List of incomplete documentation pages
Bibliography
►
Namespaces
►
Classes
▼
Files
▼
File List
►
Applications
►
BaseLib
►
build
►
ChemistryLib
Documentation
►
GeoLib
►
InfoLib
►
MaterialLib
►
MathLib
►
MeshGeoToolsLib
►
MeshLib
►
MeshToolsLib
►
NumLib
►
ParameterLib
▼
ProcessLib
►
Assembly
►
BoundaryConditionAndSourceTerm
►
Common
►
ComponentTransport
►
ConstitutiveRelations
►
Deformation
►
Graph
►
HeatConduction
►
HeatTransportBHE
►
HMPhaseField
►
HT
►
HydroMechanics
►
LargeDeformation
►
LIE
►
LiquidFlow
▼
Output
►
AddProcessDataToMesh.cpp
►
AddProcessDataToMesh.h
►
CellAverageAlgorithm.h
CellAverageData.cpp
►
CellAverageData.h
►
CreateOutput.cpp
►
CreateOutput.h
►
CreateOutputConfig.cpp
►
CreateOutputConfig.h
►
CreateSecondaryVariables.cpp
►
CreateSecondaryVariables.h
►
ExtrapolatorData.h
►
Output.cpp
►
Output.h
►
OutputConfig.h
►
OutputDataSpecification.cpp
►
OutputDataSpecification.h
►
OutputFormat.cpp
►
OutputFormat.h
►
ProcessOutputData.cpp
►
ProcessOutputData.h
SecondaryVariable.cpp
►
SecondaryVariable.h
►
SubmeshResiduumOutputConfig.cpp
►
SubmeshResiduumOutputConfig.h
►
PhaseField
►
Reflection
►
RichardsComponentTransport
►
RichardsFlow
►
RichardsMechanics
►
SmallDeformation
►
SmallDeformationNonlocal
►
SteadyStateDiffusion
►
StokesFlow
►
SurfaceFlux
►
TES
►
TH2M
►
ThermalTwoPhaseFlowWithPP
►
ThermoHydroMechanics
►
ThermoMechanicalPhaseField
►
ThermoMechanics
►
ThermoRichardsFlow
►
ThermoRichardsMechanics
►
TwoPhaseFlowWithPP
►
TwoPhaseFlowWithPrho
►
Utils
►
WellboreSimulator
►
AbstractJacobianAssembler.h
AnalyticalJacobianAssembler.cpp
►
AnalyticalJacobianAssembler.h
►
AssemblyMixin.cpp
►
AssemblyMixin.h
►
CentralDifferencesJacobianAssembler.cpp
►
CentralDifferencesJacobianAssembler.h
►
CompareJacobiansJacobianAssembler.cpp
►
CompareJacobiansJacobianAssembler.h
►
CoupledSolutionsForStaggeredScheme.cpp
►
CoupledSolutionsForStaggeredScheme.h
►
CreateDeactivatedSubdomain.cpp
►
CreateDeactivatedSubdomain.h
►
CreateForwardDifferencesJacobianAssembler.cpp
►
CreateForwardDifferencesJacobianAssembler.h
►
CreateJacobianAssembler.cpp
►
CreateJacobianAssembler.h
►
CreateProcessData.cpp
►
CreateProcessData.h
►
CreateTimeLoop.cpp
►
CreateTimeLoop.h
DeactivatedSubdomain.cpp
►
DeactivatedSubdomain.h
ForwardDifferencesJacobianAssembler.cpp
►
ForwardDifferencesJacobianAssembler.h
LocalAssemblerInterface.cpp
►
LocalAssemblerInterface.h
►
LocalAssemblerTraits.h
►
Process.cpp
►
Process.h
►
ProcessData.cpp
►
ProcessData.h
►
ProcessVariable.cpp
►
ProcessVariable.h
►
SubmeshAssemblySupport.h
►
TimeLoop.cpp
►
TimeLoop.h
►
VariableTransformation.h
VectorMatrixAssembler.cpp
►
VectorMatrixAssembler.h
►
File Members
CellAverageData.cpp
Go to the documentation of this file.
1
11
#include "
CellAverageData.h
"
12
13
#include "
MeshLib/Utils/getOrCreateMeshProperty.h
"
14
15
namespace
ProcessLib
16
{
17
MeshLib::PropertyVector<double>
&
CellAverageData::getOrCreatePropertyVector
(
18
std::string
const
& name,
unsigned
const
num_comp)
19
{
20
if
(
auto
const
it =
cell_averages_
.find(name); it !=
cell_averages_
.end())
21
{
22
auto
& prop_vec = *it->second;
23
auto
const
num_comp_mesh = prop_vec.getNumberOfGlobalComponents();
24
if
(num_comp_mesh ==
static_cast<
int
>
(num_comp))
25
{
26
return
prop_vec;
27
}
28
29
OGS_FATAL
(
30
"The requested property '{}' has {} components, but the one "
31
"present in the mesh has {} components."
,
32
name, num_comp, num_comp_mesh);
33
}
34
35
auto
const
name_in_mesh = name +
"_avg"
;
36
auto
[it, emplaced] =
cell_averages_
.emplace(
37
name,
MeshLib::getOrCreateMeshProperty<double>
(
38
const_cast<
MeshLib::Mesh
&
>
(
mesh_
), name_in_mesh,
39
MeshLib::MeshItemType::Cell
, num_comp));
40
41
if
(!it->second)
42
{
43
OGS_FATAL
(
"The cell property '{}' could not be added to the mesh."
,
44
name_in_mesh);
45
}
46
47
if
(!emplaced)
48
{
49
OGS_FATAL
(
50
"Internal logic error. Something very bad happened. The cell "
51
"property '{}' was not added to the list of cell averages to "
52
"compute. There is some very strange inconsistency in the "
53
"code. Trouble ahead!"
,
54
name_in_mesh);
55
}
56
57
return
*it->second;
58
}
17
MeshLib::PropertyVector<double>
&
CellAverageData::getOrCreatePropertyVector
( {
…
}
59
}
// namespace ProcessLib
CellAverageData.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
MeshLib::Mesh
Definition
Mesh.h:45
MeshLib::PropertyVector
Definition
TwoPhaseFlowWithPrhoMaterialProperties.h:28
getOrCreateMeshProperty.h
MeshLib::getOrCreateMeshProperty
PropertyVector< T > * getOrCreateMeshProperty(Mesh &mesh, std::string const &property_name, MeshItemType const item_type, int const number_of_components)
Definition
getOrCreateMeshProperty.h:24
MeshLib::MeshItemType::Cell
@ Cell
ProcessLib
Definition
ProjectData.h:51
ProcessLib::CellAverageData::mesh_
MeshLib::Mesh const & mesh_
Definition
CellAverageData.h:26
ProcessLib::CellAverageData::getOrCreatePropertyVector
MeshLib::PropertyVector< double > & getOrCreatePropertyVector(std::string const &name, unsigned const num_comp)
Definition
CellAverageData.cpp:17
ProcessLib::CellAverageData::cell_averages_
std::map< std::string, MeshLib::PropertyVector< double > * > cell_averages_
Definition
CellAverageData.h:27
ProcessLib
Output
CellAverageData.cpp
Generated by
1.12.0