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
7d431ac9
Commit
7d431ac9
authored
Jul 09, 2018
by
Martin Reinecke
Browse files
cosmetics
parent
98b59a58
Changes
2
Hide whitespace changes
Inline
Side-by-side
nifty5/library/correlated_fields.py
View file @
7d431ac9
...
...
@@ -29,6 +29,7 @@ from ..operators.domain_distributor import DomainDistributor
from
..operators.harmonic_transform_operator
\
import
HarmonicTransformOperator
def
make_correlated_field
(
s_space
,
amplitude_model
):
'''
Method for construction of correlated fields
...
...
@@ -84,7 +85,8 @@ def make_mf_correlated_field(s_space_spatial, s_space_energy,
a
=
a_spatial
*
a_energy
A
=
pd
(
a
)
position
=
MultiField
.
from_dict
({
'xi'
:
Field
.
from_random
(
'normal'
,
h_space
)})
position
=
MultiField
.
from_dict
(
{
'xi'
:
Field
.
from_random
(
'normal'
,
h_space
)})
xi
=
Variable
(
position
)[
'xi'
]
correlated_field_h
=
A
*
xi
correlated_field
=
ht
(
correlated_field_h
)
...
...
nifty5/multi/multi_field.py
View file @
7d431ac9
...
...
@@ -132,8 +132,8 @@ class MultiField(object):
@
staticmethod
def
from_global_data
(
domain
,
arr
,
sum_up
=
False
):
return
MultiField
(
domain
,
tuple
(
Field
.
from_global_data
(
domain
[
key
],
arr
[
key
],
sum_up
)
return
MultiField
(
domain
,
tuple
(
Field
.
from_global_data
(
domain
[
key
],
arr
[
key
],
sum_up
)
for
key
in
domain
.
keys
()))
def
norm
(
self
):
...
...
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