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
63202e7e
Commit
63202e7e
authored
3 years ago
by
Kilian Weishaupt
Browse files
Options
Downloads
Patches
Plain Diff
[staggered][geometryhelper] Add hardcoded local index mapping
parent
f321584a
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/geometryhelper.hh
+67
-0
67 additions, 0 deletions
...x/discretization/facecentered/staggered/geometryhelper.hh
with
67 additions
and
0 deletions
dumux/discretization/facecentered/staggered/geometryhelper.hh
+
67
−
0
View file @
63202e7e
...
...
@@ -62,6 +62,73 @@ public:
return
(
ownLocalFaceIndex
%
2
)
?
(
ownLocalFaceIndex
-
1
)
:
(
ownLocalFaceIndex
+
1
);
}
//! Return the local index of a lateral orthogonal scvf
static
constexpr
int
lateralOrthogonalScvfLocalIndex
(
const
SmallLocalIndexType
ownLocalScvfIndex
)
{
if
constexpr
(
GridView
::
Grid
::
dimension
==
1
)
{
assert
(
false
&&
"There are no lateral scvfs in 1D"
);
return
-
1
;
}
if
constexpr
(
GridView
::
Grid
::
dimension
==
2
)
{
switch
(
ownLocalScvfIndex
)
{
case
1
:
return
7
;
case
7
:
return
1
;
case
2
:
return
10
;
case
10
:
return
2
;
case
4
:
return
8
;
case
8
:
return
4
;
case
5
:
return
11
;
case
11
:
return
5
;
default:
{
assert
(
false
&&
"No lateral orthogonal scvf found"
);
return
-
1
;
}
}
}
else
{
switch
(
ownLocalScvfIndex
)
{
case
1
:
return
11
;
case
11
:
return
1
;
case
2
:
return
16
;
case
16
:
return
2
;
case
3
:
return
21
;
case
21
:
return
3
;
case
4
:
return
26
;
case
26
:
return
4
;
case
6
:
return
12
;
case
12
:
return
6
;
case
7
:
return
17
;
case
17
:
return
7
;
case
8
:
return
22
;
case
22
:
return
8
;
case
9
:
return
27
;
case
27
:
return
9
;
case
13
:
return
23
;
case
23
:
return
13
;
case
14
:
return
28
;
case
28
:
return
14
;
case
18
:
return
24
;
case
24
:
return
18
;
case
19
:
return
29
;
case
29
:
return
19
;
default:
{
assert
(
false
&&
"No lateral orthogonal scvf found"
);
return
-
1
;
}
}
}
}
//! Returns the local indices of the faces lateral to the own one.
static
constexpr
auto
localLaterFaceIndices
(
const
SmallLocalIndexType
ownLocalFaceIndex
)
{
...
...
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