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
219fc32e
Commit
219fc32e
authored
3 years ago
by
Kilian Weishaupt
Browse files
Options
Downloads
Patches
Plain Diff
[staggered][gridGeometry] Use lambda to get global scv index
parent
20e7c629
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2901
Feature/improve staggered gridgeometry
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/discretization/facecentered/staggered/fvgridgeometry.hh
+8
-7
8 additions, 7 deletions
...x/discretization/facecentered/staggered/fvgridgeometry.hh
with
8 additions
and
7 deletions
dumux/discretization/facecentered/staggered/fvgridgeometry.hh
+
8
−
7
View file @
219fc32e
...
...
@@ -361,10 +361,12 @@ private:
for
(
const
auto
&
element
:
elements
(
this
->
gridView
()))
{
const
auto
eIdx
=
this
->
elementMapper
().
index
(
element
);
const
auto
&
globalScvIndices
=
scvIndicesOfElement_
[
eIdx
];
const
auto
&
globalScvfIndices
=
scvfIndicesOfElement_
[
eIdx
];
scvfOfScvInfo_
[
eIdx
].
reserve
(
globalScvfIndices
.
size
());
auto
globalScvIdx
=
[
&
](
const
auto
elementIdx
,
const
auto
localScvIdx
)
{
return
numScvsPerElement
*
elementIdx
+
localScvIdx
;
};
SmallLocalIndexType
localScvIdx
=
0
;
// also corresponds to local element face index (one scv per face)
SmallLocalIndexType
localScvfIdx
=
0
;
for
(
const
auto
&
intersection
:
intersections
(
this
->
gridView
(),
element
))
...
...
@@ -406,7 +408,7 @@ private:
// the sub control volume
scvs_
.
emplace_back
(
elementGeometry
,
intersectionGeometry
,
globalScvI
ndices
[
localScvIdx
]
,
globalScvI
dx
(
eIdx
,
localScvIdx
)
,
localScvIdx
,
dofIndex
,
Dumux
::
normalAxis
(
intersection
.
centerUnitOuterNormal
()),
...
...
@@ -416,7 +418,7 @@ private:
// the frontal sub control volume face at the element center
scvfs_
.
emplace_back
(
elementGeometry
,
intersectionGeometry
,
std
::
array
{
globalScvI
ndices
[
localScvIdx
]
,
globalScvI
ndices
[
localOppositeScvIdx
]
},
std
::
array
{
globalScvI
dx
(
eIdx
,
localScvIdx
)
,
globalScvI
dx
(
eIdx
,
localOppositeScvIdx
)
},
localScvfIdx
,
globalScvfIndices
[
localScvfIdx
],
intersection
.
centerUnitOuterNormal
(),
...
...
@@ -447,14 +449,13 @@ private:
{
const
auto
parallelElemIdx
=
this
->
elementMapper
().
index
(
lateralIntersection
.
outside
());
const
auto
localOutsideScvIdx
=
geometryHelper
.
localFaceIndexInOtherElement
(
localScvIdx
);
const
auto
&
globalScvIndicesOfNeighborElement
=
scvIndicesOfElement_
[
parallelElemIdx
];
return
globalScvIndicesOfNeighborElement
[
localOutsideScvIdx
];
return
globalScvIdx
(
parallelElemIdx
,
localOutsideScvIdx
);
}
else
return
numInteriorScvs
+
outSideBoundaryVolVarIdx_
++
;
}();
return
std
::
array
{
globalScvI
ndices
[
localScvIdx
]
,
globalOutsideScvIdx
};
return
std
::
array
{
globalScvI
dx
(
eIdx
,
localScvIdx
)
,
globalOutsideScvIdx
};
}();
scvfs_
.
emplace_back
(
elementGeometry
,
...
...
@@ -490,7 +491,7 @@ private:
// the frontal sub control volume face at the boundary
scvfs_
.
emplace_back
(
element
.
geometry
(),
intersection
.
geometry
(),
std
::
array
{
globalScvI
ndices
[
localScvIdx
]
,
globalScvI
ndices
[
localScvIdx
]
},
// TODO outside boundary, periodic, parallel?
std
::
array
{
globalScvI
dx
(
eIdx
,
localScvIdx
)
,
globalScvI
dx
(
eIdx
,
localScvIdx
)
},
// TODO outside boundary, periodic, parallel?
localScvfIdx
,
globalScvfIndices
[
localScvfIdx
],
intersection
.
centerUnitOuterNormal
(),
...
...
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