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
ed79f282
Commit
ed79f282
authored
6 years ago
by
Kilian Weishaupt
Committed by
Timo Koch
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[box] Add hasBoundaryScvf() to fvGeometry
parent
40431006
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1290
Feature/fvgeometry boundary
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dumux/discretization/box/fvelementgeometry.hh
+12
-0
12 additions, 0 deletions
dumux/discretization/box/fvelementgeometry.hh
dumux/discretization/box/fvgridgeometry.hh
+8
-0
8 additions, 0 deletions
dumux/discretization/box/fvgridgeometry.hh
with
20 additions
and
0 deletions
dumux/discretization/box/fvelementgeometry.hh
+
12
−
0
View file @
ed79f282
...
...
@@ -148,6 +148,10 @@ public:
const
FVGridGeometry
&
fvGridGeometry
()
const
{
return
*
fvGridGeometryPtr_
;
}
//! Returns whether one of the geometry's scvfs lies on a boundary
bool
hasBoundaryScvf
()
const
{
return
fvGridGeometry
().
hasBoundaryScvf
(
eIdx_
);
}
private
:
const
Element
*
elementPtr_
;
const
FVGridGeometry
*
fvGridGeometryPtr_
;
...
...
@@ -263,11 +267,16 @@ public:
const
FVGridGeometry
&
fvGridGeometry
()
const
{
return
*
fvGridGeometryPtr_
;
}
//! Returns whether one of the geometry's scvfs lies on a boundary
bool
hasBoundaryScvf
()
const
{
return
hasBoundaryScvf_
;
}
private
:
void
makeElementGeometries
(
const
Element
&
element
)
{
auto
eIdx
=
fvGridGeometry
().
elementMapper
().
index
(
element
);
hasBoundaryScvf_
=
false
;
// get the element geometry
auto
elementGeometry
=
element
.
geometry
();
...
...
@@ -316,6 +325,7 @@ private:
if
(
intersection
.
boundary
()
&&
!
intersection
.
neighbor
())
{
const
auto
isGeometry
=
intersection
.
geometry
();
hasBoundaryScvf_
=
true
;
for
(
unsigned
int
isScvfLocalIdx
=
0
;
isScvfLocalIdx
<
isGeometry
.
corners
();
++
isScvfLocalIdx
)
{
...
...
@@ -348,6 +358,8 @@ private:
//! vectors to store the geometries locally after binding an element
std
::
vector
<
SubControlVolume
>
scvs_
;
std
::
vector
<
SubControlVolumeFace
>
scvfs_
;
bool
hasBoundaryScvf_
=
false
;
};
}
// end namespace Dumux
...
...
This diff is collapsed.
Click to expand it.
dumux/discretization/box/fvgridgeometry.hh
+
8
−
0
View file @
ed79f282
...
...
@@ -156,6 +156,7 @@ public:
auto
numElements
=
this
->
gridView
().
size
(
0
);
scvs_
.
resize
(
numElements
);
scvfs_
.
resize
(
numElements
);
hasBoundaryScvf_
.
resize
(
numElements
,
false
);
boundaryDofIndices_
.
assign
(
numDofs
(),
false
);
...
...
@@ -215,6 +216,8 @@ public:
if
(
intersection
.
boundary
()
&&
!
intersection
.
neighbor
())
{
const
auto
isGeometry
=
intersection
.
geometry
();
hasBoundaryScvf_
[
eIdx
]
=
true
;
// count
numScvf_
+=
isGeometry
.
corners
();
numBoundaryScvf_
+=
isGeometry
.
corners
();
...
...
@@ -317,6 +320,10 @@ public:
const
std
::
unordered_map
<
std
::
size_t
,
std
::
size_t
>&
periodicVertexMap
()
const
{
return
periodicVertexMap_
;
}
//! Returns whether one of the geometry's scvfs lies on a boundary
bool
hasBoundaryScvf
(
std
::
size_t
eIdx
)
const
{
return
hasBoundaryScvf_
[
eIdx
];
}
private
:
const
FeCache
feCache_
;
...
...
@@ -330,6 +337,7 @@ private:
// vertices on the boudary
std
::
vector
<
bool
>
boundaryDofIndices_
;
std
::
vector
<
bool
>
hasBoundaryScvf_
;
// a map for periodic boundary vertices
std
::
unordered_map
<
std
::
size_t
,
std
::
size_t
>
periodicVertexMap_
;
...
...
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