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
256ab1ce
Commit
256ab1ce
authored
3 years ago
by
Kilian Weishaupt
Browse files
Options
Downloads
Patches
Plain Diff
[staggered][gridGeometry] Make scvs(fvGeometry) iterate directly over global vector
parent
219fc32e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2901
Feature/improve staggered gridgeometry
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dumux/discretization/facecentered/staggered/fvelementgeometry.hh
+1
-6
1 addition, 6 deletions
...iscretization/facecentered/staggered/fvelementgeometry.hh
dumux/discretization/facecentered/staggered/fvgridgeometry.hh
+9
-0
9 additions, 0 deletions
...x/discretization/facecentered/staggered/fvgridgeometry.hh
with
10 additions
and
6 deletions
dumux/discretization/facecentered/staggered/fvelementgeometry.hh
+
1
−
6
View file @
256ab1ce
...
...
@@ -105,12 +105,7 @@ public:
//! for (auto&& scv : scvs(fvGeometry))
friend
inline
auto
scvs
(
const
FaceCenteredStaggeredFVElementGeometry
&
fvGeometry
)
{
using
IndexContainerType
=
std
::
decay_t
<
decltype
(
fvGeometry
.
scvIndices_
())
>
;
using
ScvIterator
=
Dumux
::
ScvIterator
<
SubControlVolume
,
IndexContainerType
,
ThisType
>
;
return
Dune
::
IteratorRange
<
ScvIterator
>
(
ScvIterator
(
fvGeometry
.
scvIndices_
().
begin
(),
fvGeometry
),
ScvIterator
(
fvGeometry
.
scvIndices_
().
end
(),
fvGeometry
));
}
{
return
fvGeometry
.
gridGeometry
().
scvs
(
fvGeometry
);
}
//! iterator range for sub control volumes faces. Iterates over
//! all scvfs of the bound element.
...
...
This diff is collapsed.
Click to expand it.
dumux/discretization/facecentered/staggered/fvgridgeometry.hh
+
9
−
0
View file @
256ab1ce
...
...
@@ -199,6 +199,15 @@ public:
const
SubControlVolume
&
scv
(
GridIndexType
scvIdx
)
const
{
return
scvs_
[
scvIdx
];
}
//! Iterator range for sub control volumes. Iterates over
//! all scvs of the element-local fvGeometry.
auto
scvs
(
const
LocalView
&
fvGeometry
)
const
{
const
auto
begin
=
scvs_
.
cbegin
()
+
numScvsPerElement
*
fvGeometry
.
elementIndex
();
const
auto
end
=
begin
+
numScvsPerElement
;
return
Dune
::
IteratorRange
<
decltype
(
begin
)
>
(
begin
,
end
);
}
//! Get a sub control volume face with a global scvf index
const
SubControlVolumeFace
&
scvf
(
GridIndexType
scvfIdx
)
const
{
return
scvfs_
[
scvfIdx
];
}
...
...
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