Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LDD-for-two-phase-flow-systems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
David Seus
LDD-for-two-phase-flow-systems
Commits
6b0d09a7
Commit
6b0d09a7
authored
6 years ago
by
David Seus
Browse files
Options
Downloads
Patches
Plain Diff
fix implementation of DomainPatch._calc_interface_has_common_dof_indices
parent
9cfcafff
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LDDsimulation/domainPatch.py
+34
-1
34 additions, 1 deletion
LDDsimulation/domainPatch.py
with
34 additions
and
1 deletion
LDDsimulation/domainPatch.py
+
34
−
1
View file @
6b0d09a7
...
@@ -715,8 +715,41 @@ class DomainPatch(df.SubDomain):
...
@@ -715,8 +715,41 @@ class DomainPatch(df.SubDomain):
def
_calc_interface_has_common_dof_indices
(
self
):
def
_calc_interface_has_common_dof_indices
(
self
):
"""
populate dictionary self._interface_has_common_dof_indices
"""
populate dictionary self._interface_has_common_dof_indices
Determin for each interface in self.has_interface the dof indices
Determin for each interface in self.has_interface the dof indices that
also belong to another interface and store them in the dictionary
self._interface_has_common_dof_indices
This method populates the dictionary
self._interface_has_common_dof_indices
"""
"""
for
interf_ind
,
interf_dofs
in
self
.
_dof_indices_of_interface
.
items
():
# initialise bool numpy arry for the search.
if
self
.
isRichards
:
is_part_of_neighbour_interface_w
=
np
.
zeros
(
interf_dofs
[
'
wetting
'
].
size
,
dtype
=
bool
)
else
:
is_part_of_neighbour_interface_w
=
np
.
zeros
(
interf_dofs
[
'
wetting
'
].
size
,
dtype
=
bool
)
is_part_of_neighbour_interface_nw
=
np
.
zeros
(
interf_dofs
[
'
nonwetting
'
].
size
,
dtype
=
bool
)
for
other_interf_ind
,
other_interf_dofs
in
self
.
_dof_indices_of_interface
.
items
():
if
other_interf_ind
is
not
interf_ind
:
if
self
.
isRichards
:
is_part_of_neighbour_interface_w
+=
np
.
isin
(
interf_dofs
[
'
wetting
'
],
other_interf_dofs
[
'
wetting
'
],
assume_unique
=
True
)
else
:
is_part_of_neighbour_interface_w
+=
np
.
isin
(
interf_dofs
[
'
wetting
'
],
other_interf_dofs
[
'
wetting
'
],
assume_unique
=
True
)
is_part_of_neighbour_interface_nw
+=
np
.
isin
(
interf_dofs
[
'
nonwetting
'
],
other_interf_dofs
[
'
nonwetting
'
],
assume_unique
=
True
)
# this carries a numpyarray of the indices which belong to other
# interfaces, too
self
.
_interface_has_common_dof_indices
.
update
({
interf_ind
:
dict
()})
if
self
.
isRichards
:
self
.
_interface_has_common_dof_indices
[
interf_ind
].
update
(
{
'
wetting
'
:
interf_dofs
[
'
wetting
'
][
is_part_of_neighbour_interface_w
]}
)
else
:
self
.
_interface_has_common_dof_indices
[
interf_ind
].
update
(
{
'
wetting
'
:
interf_dofs
[
'
wetting
'
][
is_part_of_neighbour_interface_w
]},
{
'
nonwetting
'
:
interf_dofs
[
'
nonwetting
'
][
is_part_of_neighbour_interface_nw
]}
)
# END OF CLASS DomainPatch
# END OF CLASS DomainPatch
...
...
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