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
3183070a
Commit
3183070a
authored
3 years ago
by
Kilian Weishaupt
Browse files
Options
Downloads
Patches
Plain Diff
[staggered][gridGeometry] Remove superfluous scvIndicesOfElement vector
parent
256ab1ce
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
-8
1 addition, 8 deletions
...iscretization/facecentered/staggered/fvelementgeometry.hh
dumux/discretization/facecentered/staggered/fvgridgeometry.hh
+1
-14
1 addition, 14 deletions
...x/discretization/facecentered/staggered/fvgridgeometry.hh
with
2 additions
and
22 deletions
dumux/discretization/facecentered/staggered/fvelementgeometry.hh
+
1
−
8
View file @
3183070a
...
...
@@ -138,9 +138,7 @@ public:
//! number of sub control volumes in this fv element geometry
std
::
size_t
numScv
()
const
{
return
scvIndices_
().
size
();
}
{
return
numScvsPerElement
;
}
//! number of sub control volumes in this fv element geometry
std
::
size_t
numScvf
()
const
...
...
@@ -201,11 +199,6 @@ public:
private
:
const
auto
&
scvIndices_
()
const
{
return
gridGeometry
().
scvIndicesOfElement
(
eIdx_
);
}
const
auto
&
scvfIndices_
()
const
{
return
gridGeometry
().
scvfIndicesOfElement
(
eIdx_
);
...
...
This diff is collapsed.
Click to expand it.
dumux/discretization/facecentered/staggered/fvgridgeometry.hh
+
1
−
14
View file @
3183070a
...
...
@@ -212,10 +212,6 @@ public:
const
SubControlVolumeFace
&
scvf
(
GridIndexType
scvfIdx
)
const
{
return
scvfs_
[
scvfIdx
];
}
//! Get the global sub control volume indices of an element
const
std
::
array
<
GridIndexType
,
numScvsPerElement
>&
scvIndicesOfElement
(
GridIndexType
eIdx
)
const
{
return
scvIndicesOfElement_
[
eIdx
];
}
//! Get the global sub control volume face indices of an element
const
std
::
vector
<
GridIndexType
>&
scvfIndicesOfElement
(
GridIndexType
eIdx
)
const
{
return
scvfIndicesOfElement_
[
eIdx
];
}
...
...
@@ -261,14 +257,12 @@ private:
// clear containers (necessary after grid refinement)
scvs_
.
clear
();
scvfs_
.
clear
();
scvIndicesOfElement_
.
clear
();
scvfIndicesOfElement_
.
clear
();
lateralOrthogonalScvf_
.
clear
();
intersectionMapper_
.
update
(
this
->
gridView
());
// determine size of containers
const
auto
numElements
=
this
->
gridView
().
size
(
0
);
scvIndicesOfElement_
.
resize
(
numElements
);
scvfIndicesOfElement_
.
resize
(
numElements
);
hasBoundaryScvf_
.
resize
(
numElements
,
false
);
scvfOfScvInfo_
.
resize
(
numElements
);
...
...
@@ -288,9 +282,6 @@ private:
{
assert
(
numScvsPerElement
==
element
.
subEntities
(
1
));
// the element-wise index sets for finite volume geometry
std
::
array
<
GridIndexType
,
numScvsPerElement
>
scvsIndexSet
;
std
::
vector
<
GridIndexType
>
scvfsIndexSet
;
scvfsIndexSet
.
reserve
(
1
/*frontal in element*/
+
1
/*frontal on boundary*/
+
numLateralScvfsPerScv
);
...
...
@@ -303,8 +294,6 @@ private:
SmallLocalIndexType
localScvIdx
=
0
;
for
(
const
auto
&
intersection
:
intersections
(
this
->
gridView
(),
element
))
{
scvsIndexSet
[
localScvIdx
]
=
scvIdx
++
;
// one scv per element face
// the frontal sub control volume face at the element center
scvfsIndexSet
.
push_back
(
scvfIdx
++
);
...
...
@@ -344,7 +333,6 @@ private:
// Save the scv indices belonging to this element to build up fv element geometries fast
const
auto
eIdx
=
this
->
elementMapper
().
index
(
element
);
scvIndicesOfElement_
[
eIdx
]
=
std
::
move
(
scvsIndexSet
);
scvfIndicesOfElement_
[
eIdx
]
=
std
::
move
(
scvfsIndexSet
);
// create the bi-directional map
...
...
@@ -361,7 +349,7 @@ private:
}
// reserve memory
const
auto
numInteriorScvs
=
scvIdx
;
const
auto
numInteriorScvs
=
numElements
*
numScvsPerElement
;
scvs_
.
reserve
(
numInteriorScvs
);
scvfs_
.
reserve
((
numScvsPerElement
/*one interior frontal scvf per scv*/
+
numLateralScvfsPerElement
)
*
numElements
+
numBoundaryScv_
);
...
...
@@ -548,7 +536,6 @@ private:
std
::
vector
<
std
::
vector
<
SmallLocalIndexType
>>
scvfOfScvInfo_
;
std
::
vector
<
GridIndexType
>
lateralOrthogonalScvf_
;
std
::
vector
<
std
::
array
<
GridIndexType
,
numScvsPerElement
>>
scvIndicesOfElement_
;
std
::
vector
<
std
::
vector
<
GridIndexType
>>
scvfIndicesOfElement_
;
// a map for periodic boundary vertices
...
...
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