Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux
Commits
452489ff
Commit
452489ff
authored
7 years ago
by
Kilian Weishaupt
Browse files
Options
Downloads
Patches
Plain Diff
[3p3c][model] Adapt to new volVar interface
parent
206798e0
No related branches found
No related tags found
2 merge requests
!617
[WIP] Next
,
!537
Fix/global volvar cache for box
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/porousmediumflow/3p3c/implicit/model.hh
+34
-11
34 additions, 11 deletions
dumux/porousmediumflow/3p3c/implicit/model.hh
with
34 additions
and
11 deletions
dumux/porousmediumflow/3p3c/implicit/model.hh
+
34
−
11
View file @
452489ff
...
@@ -106,6 +106,7 @@ class ThreePThreeCModel: public GET_PROP_TYPE(TypeTag, BaseModel)
...
@@ -106,6 +106,7 @@ class ThreePThreeCModel: public GET_PROP_TYPE(TypeTag, BaseModel)
using
PrimaryVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
PrimaryVariables
);
using
PrimaryVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
PrimaryVariables
);
using
VolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
VolumeVariables
);
using
VolumeVariables
=
typename
GET_PROP_TYPE
(
TypeTag
,
VolumeVariables
);
using
SolutionVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
SolutionVector
);
using
SolutionVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
SolutionVector
);
using
ElementSolutionVector
=
typename
GET_PROP_TYPE
(
TypeTag
,
ElementSolutionVector
);
using
Indices
=
typename
GET_PROP_TYPE
(
TypeTag
,
Indices
);
using
Indices
=
typename
GET_PROP_TYPE
(
TypeTag
,
Indices
);
enum
{
enum
{
...
@@ -198,27 +199,49 @@ public:
...
@@ -198,27 +199,49 @@ public:
// update the secondary variables if global caching is enabled
// update the secondary variables if global caching is enabled
// \note we only updated if phase presence changed as the volume variables
// \note we only updated if phase presence changed as the volume variables
// are already updated once by the switch
// are already updated once by the switch
if
(
switchFlag_
)
for
(
const
auto
&
element
:
elements
(
this
->
problem_
().
gridView
())
)
{
{
for
(
const
auto
&
element
:
elements
(
this
->
problem_
().
gridView
()))
// make sure FVElementGeometry & vol vars are bound to the element
{
auto
fvGeometry
=
localView
(
this
->
globalFvGeometry
());
// make sure FVElementGeometry & vol vars are bound to the element
fvGeometry
.
bindElement
(
element
);
auto
fvGeometry
=
localView
(
this
->
globalFvGeometry
());
fvGeometry
.
bindElement
(
element
);
if
(
switchFlag_
)
{
for
(
auto
&&
scv
:
scvs
(
fvGeometry
))
for
(
auto
&&
scv
:
scvs
(
fvGeometry
))
{
{
auto
dofIdxGlobal
=
scv
.
dofIndex
();
auto
dofIdxGlobal
=
scv
.
dofIndex
();
if
(
priVarSwitch_
().
wasSwitched
(
dofIdxGlobal
))
if
(
priVarSwitch_
().
wasSwitched
(
dofIdxGlobal
))
{
{
const
auto
eIdx
=
this
->
problem_
().
elementMapper
().
index
(
element
);
this
->
nonConstCurGlobalVolVars
().
volVars
(
scv
).
update
(
this
->
curSol
()[
dofIdxGlobal
],
const
auto
elemSol
=
this
->
elementSolution
(
element
,
this
->
curSol
());
this
->
problem_
(),
this
->
nonConstCurGlobalVolVars
().
volVars
(
eIdx
,
scv
.
indexInElement
()).
update
(
elemSol
,
element
,
this
->
problem_
(),
scv
);
element
,
scv
);
}
}
}
}
}
// handle the boundary volume variables for cell-centered models
if
(
!
isBox
)
{
for
(
auto
&&
scvf
:
scvfs
(
fvGeometry
))
{
// if we are not on a boundary, skip the rest
if
(
!
scvf
.
boundary
())
continue
;
// check if boundary is a pure dirichlet boundary
const
auto
bcTypes
=
this
->
problem_
().
boundaryTypes
(
element
,
scvf
);
if
(
bcTypes
.
hasOnlyDirichlet
())
{
const
auto
insideScvIdx
=
scvf
.
insideScvIdx
();
const
auto
&
insideScv
=
fvGeometry
.
scv
(
insideScvIdx
);
const
auto
elemSol
=
ElementSolutionVector
{
this
->
problem_
().
dirichlet
(
element
,
scvf
)};
this
->
nonConstCurGlobalVolVars
().
volVars
(
scvf
.
outsideScvIdx
(),
0
/*indexInElement*/
).
update
(
elemSol
,
this
->
problem_
(),
element
,
insideScv
);
}
}
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment