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
7beb5b80
Commit
7beb5b80
authored
Jan 04, 2019
by
Philipp Arras
Browse files
Fixup
parent
338dbccc
Changes
2
Hide whitespace changes
Inline
Side-by-side
nifty5/library/dynamic_operator.py
View file @
7beb5b80
...
...
@@ -29,13 +29,7 @@ from ..operators.harmonic_operators import FFTOperator
from
..operators.scaling_operator
import
ScalingOperator
from
..operators.simple_linear_operators
import
FieldAdapter
,
Realizer
from
..sugar
import
makeOp
from
.light_cone_operator
import
LightConeOperator
def
_field_from_function
(
domain
,
func
,
absolute
=
False
):
domain
=
DomainTuple
.
make
(
domain
)
k_array
=
_make_coords
(
domain
,
absolute
=
absolute
)
return
Field
.
from_global_data
(
domain
,
func
(
k_array
))
from
.light_cone_operator
import
LightConeOperator
,
_field_from_function
def
make_dynamic_operator
(
FFT
,
harmonic_padding
,
sm_s0
,
sm_x0
,
keys
=
[
'f'
,
'c'
],
...
...
nifty5/library/light_cone_operator.py
View file @
7beb5b80
...
...
@@ -28,6 +28,12 @@ from ..operators.linear_operator import LinearOperator
from
..operators.operator
import
Operator
def
_field_from_function
(
domain
,
func
,
absolute
=
False
):
domain
=
DomainTuple
.
make
(
domain
)
k_array
=
_make_coords
(
domain
,
absolute
=
absolute
)
return
Field
.
from_global_data
(
domain
,
func
(
k_array
))
def
_make_coords
(
domain
,
absolute
=
False
):
domain
=
DomainTuple
.
make
(
domain
)
dim
=
len
(
domain
.
shape
)
...
...
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