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
0600399d
Commit
0600399d
authored
1 year ago
by
Dennis Gläser
Browse files
Options
Downloads
Patches
Plain Diff
[facet][box] duplicate dofs on fractures that extend the boundary
parent
16af23cc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3748
Cleanup/box facet dof enrichment
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/multidomain/facet/vertexmapper.hh
+12
-16
12 additions, 16 deletions
dumux/multidomain/facet/vertexmapper.hh
with
12 additions
and
16 deletions
dumux/multidomain/facet/vertexmapper.hh
+
12
−
16
View file @
0600399d
...
@@ -77,21 +77,17 @@ public:
...
@@ -77,21 +77,17 @@ public:
dim
)
]
=
true
;
dim
)
]
=
true
;
}
}
// for now, set all markers to true for vertices on codim one grid
// mark all vertices on the lower-dimensional grid to be enriched (except immersed boundaries)
for
(
const
auto
&
vertex
:
vertices
(
codimOneGridView
))
std
::
vector
<
typename
GridView
::
IndexSet
::
IndexType
>
vertexIndicesStorage
;
vertexMarkers
[
codimOneGridAdapter
.
bulkGridVertexIndex
(
vertex
)]
=
true
;
// unmark where necessary
for
(
const
auto
&
codimOneElement
:
elements
(
codimOneGridView
))
for
(
const
auto
&
codimOneElement
:
elements
(
codimOneGridView
))
{
{
// if a codimension one element has less than two embedments we do not need to enrich
// if a codimension one element has 2 or more embedments, we need to enrich
if
(
codimOneGridAdapter
.
numEmbedments
(
codimOneElement
)
<
2
)
if
(
codimOneGridAdapter
.
numEmbedments
(
codimOneElement
)
>=
2
)
{
for
(
int
i
=
0
;
i
<
codimOneElement
.
subEntities
(
dim
-
1
);
++
i
)
for
(
int
i
=
0
;
i
<
codimOneElement
.
subEntities
(
dim
-
1
);
++
i
)
vertexMarkers
[
codimOneGridAdapter
.
bulkGridVertexIndex
(
codimOneElement
.
template
subEntity
<
dim
-
1
>(
i
))
]
=
fals
e
;
vertexMarkers
[
codimOneGridAdapter
.
bulkGridVertexIndex
(
codimOneElement
.
template
subEntity
<
dim
-
1
>(
i
))
]
=
tru
e
;
// otherwise, we check for immersed boundaries where we also must not enrich
// however, we have to exclude immersed boundaries
else
{
const
auto
refElem
=
referenceElement
(
codimOneElement
);
const
auto
refElem
=
referenceElement
(
codimOneElement
);
for
(
const
auto
&
intersection
:
intersections
(
codimOneGridView
,
codimOneElement
))
for
(
const
auto
&
intersection
:
intersections
(
codimOneGridView
,
codimOneElement
))
{
{
...
@@ -99,18 +95,18 @@ public:
...
@@ -99,18 +95,18 @@ public:
if
(
!
intersection
.
boundary
())
if
(
!
intersection
.
boundary
())
continue
;
continue
;
// obtain all grid indices of the intersection corners
// obtain all
bulk
grid indices of the
lower-dimensional
intersection corners
const
auto
numCorners
=
intersection
.
geometry
().
corners
();
const
auto
numCorners
=
intersection
.
geometry
().
corners
();
std
::
vector
<
typename
GridView
::
IndexSet
::
IndexType
>
vertexIndices
(
numCorners
);
vertexIndicesStorage
.
resize
(
numCorners
);
for
(
int
i
=
0
;
i
<
numCorners
;
++
i
)
for
(
int
i
=
0
;
i
<
numCorners
;
++
i
)
{
{
const
auto
vIdxLocal
=
refElem
.
subEntity
(
intersection
.
indexInInside
(),
1
,
i
,
dim
-
1
);
const
auto
vIdxLocal
=
refElem
.
subEntity
(
intersection
.
indexInInside
(),
1
,
i
,
dim
-
1
);
vertexIndices
[
i
]
=
codimOneGridAdapter
.
bulkGridVertexIndex
(
codimOneElement
.
template
subEntity
<
dim
-
1
>(
vIdxLocal
)
);
vertexIndices
Storage
[
i
]
=
codimOneGridAdapter
.
bulkGridVertexIndex
(
codimOneElement
.
template
subEntity
<
dim
-
1
>(
vIdxLocal
)
);
}
}
// if any of the vertices is on an immersed boundary, we must not enrich any of them
// if any of the vertices is on an immersed boundary, we must not enrich any of them
if
(
std
::
any_of
(
vertexIndices
.
begin
(),
vertexIndices
.
end
(),
[
&
isOnBoundary
]
(
auto
idx
)
{
return
!
isOnBoundary
[
idx
];
}))
if
(
std
::
any_of
(
vertexIndices
Storage
.
begin
(),
vertexIndices
Storage
.
end
(),
[
&
isOnBoundary
]
(
auto
idx
)
{
return
!
isOnBoundary
[
idx
];
}))
std
::
for_each
(
vertexIndices
.
begin
(),
vertexIndices
.
end
(),
[
&
vertexMarkers
]
(
auto
idx
)
{
vertexMarkers
[
idx
]
=
false
;
});
std
::
for_each
(
vertexIndices
Storage
.
begin
(),
vertexIndices
Storage
.
end
(),
[
&
vertexMarkers
]
(
auto
idx
)
{
vertexMarkers
[
idx
]
=
false
;
});
}
}
}
}
}
}
...
...
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