Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
e015388e
Commit
e015388e
authored
Jan 10, 2017
by
Dennis Gläser
Browse files
[volvars] introduce convenience function to extract privars from element solution
parent
1ddb21c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
dumux/discretization/volumevariables.hh
View file @
e015388e
...
...
@@ -82,10 +82,17 @@ public:
const
Element
&
element
,
const
SubControlVolume
&
scv
)
{
priVars_
=
isBox
?
elemSol
[
scv
.
index
()]
:
elemSol
[
0
]
;
priVars_
=
extractDofPriVars
(
elemSol
,
scv
)
;
extrusionFactor_
=
problem
.
extrusionFactor
(
element
,
scv
,
elemSol
);
}
/*!
* \brief Returns the primary variables at the dof associated with a given scv.
*/
static
const
PrimaryVariables
&
extractDofPriVars
(
const
ElementSolutionVector
&
elemSol
,
const
SubControlVolume
&
scv
)
{
return
isBox
?
elemSol
[
scv
.
index
()]
:
elemSol
[
0
];
}
/*!
* \brief Return the vector of primary variables
*/
...
...
dumux/porousmediumflow/1p/implicit/volumevariables.hh
View file @
e015388e
...
...
@@ -91,7 +91,7 @@ public:
fluidState
.
setTemperature
(
t
);
fluidState
.
setSaturation
(
/*phaseIdx=*/
0
,
1.
);
const
auto
&
priVars
=
isBox
?
elemSol
[
scv
.
index
()]
:
elemSol
[
0
]
;
const
auto
&
priVars
=
ParentType
::
extractDofPriVars
(
elemSol
,
scv
)
;
fluidState
.
setPressure
(
/*phaseIdx=*/
0
,
priVars
[
Indices
::
pressureIdx
]);
// saturation in a single phase is always 1 and thus redundant
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment