Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
IMAGINE
Commits
c5d7be24
Commit
c5d7be24
authored
Mar 31, 2017
by
Theo Steininger
Browse files
Fixed two bugs in MixinBase
parent
cbbe1fbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
imagine/observers/hammurapy/observable_mixins/mixin_base.py
View file @
c5d7be24
...
...
@@ -42,7 +42,11 @@ class MixinBase(object):
ensemble_space
=
magnetic_field
.
domain
[
0
]
for
component
in
component_names
:
# It is important to initialize the Observables with an explicit
# value. Otherwise the d2o will not instantaneuosly be created
# (c.f. lazy object creation).
observable_dict
[
component
]
=
Observable
(
val
=
0
,
domain
=
(
ensemble_space
,
self
.
__hpSpace
),
distribution_strategy
=
'equal'
)
...
...
@@ -108,8 +112,8 @@ class MixinBase(object):
else
:
mean_list
=
[]
for
component
in
component_names
:
mean_list
+=
np
.
empty
(
dummy_obs_field
.
domain
[
1
].
shape
,
dtype
=
np
.
float64
)
mean_list
+=
[
np
.
empty
(
dummy_obs_field
.
domain
[
1
].
shape
,
dtype
=
np
.
float64
)
]
for
i
,
component
in
enumerate
(
component_names
):
comm
.
Bcast
([
mean_list
[
i
],
MPI
.
DOUBLE
],
root
=
size
-
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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