Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
15d11511
Commit
15d11511
authored
Mar 03, 2021
by
Jakob Knollmüller
Browse files
modification of DOFDistributor for unstructured domain
parent
c84329d5
Pipeline
#94861
failed with stages
in 5 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/operators/distributors.py
View file @
15d11511
...
...
@@ -73,10 +73,14 @@ class DOFDistributor(LinearOperator):
if
partner
.
scalar_dvol
is
not
None
:
wgt
=
np
.
bincount
(
dofdex
.
val
.
ravel
(),
minlength
=
nbin
)
wgt
=
wgt
*
partner
.
scalar_dvol
el
s
e
:
el
if
partner
.
dvol
is
not
Non
e
:
dvol
=
Field
.
from_raw
(
partner
,
partner
.
dvol
).
val
wgt
=
np
.
bincount
(
dofdex
.
val
.
ravel
(),
minlength
=
nbin
,
weights
=
dvol
)
else
:
wgt
=
np
.
bincount
(
dofdex
.
val
.
ravel
(),
minlength
=
nbin
)
# for UnstructuredDomain
# The explicit conversion to float64 is necessary because bincount
# sometimes returns its result as an integer array, even when
# floating-point weights are present ...
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment