Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
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
ift
NIFTy
Commits
c15eb016
There was a problem fetching the pipeline summary.
Commit
c15eb016
authored
7 years ago
by
Martin Reinecke
Browse files
Options
Downloads
Patches
Plain Diff
cleanup
parent
e8f33125
No related branches found
No related tags found
1 merge request
!209
WIP: Byebye volume factors
Pipeline
#
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
nifty/operators/fft_operator.py
+8
-17
8 additions, 17 deletions
nifty/operators/fft_operator.py
test/test_operators/test_response_operator.py
+1
-1
1 addition, 1 deletion
test/test_operators/test_response_operator.py
with
9 additions
and
18 deletions
nifty/operators/fft_operator.py
+
8
−
17
View file @
c15eb016
...
...
@@ -19,7 +19,6 @@
import
numpy
as
np
from
..
import
DomainTuple
from
..spaces
import
RGSpace
from
..utilities
import
infer_space
from
.linear_operator
import
LinearOperator
from
..
import
dobj
from
..
import
utilities
...
...
@@ -65,7 +64,7 @@ class FFTOperator(LinearOperator):
# Initialize domain and target
self
.
_domain
=
DomainTuple
.
make
(
domain
)
self
.
_space
=
infer_space
(
self
.
_domain
,
space
)
self
.
_space
=
utilities
.
infer_space
(
self
.
_domain
,
space
)
adom
=
self
.
_domain
[
self
.
_space
]
if
target
is
None
:
...
...
@@ -161,16 +160,8 @@ class FFTOperator(LinearOperator):
ldat2
=
dobj
.
local_data
(
tmp
).
reshape
(
ldat
.
shape
)
tmp
=
dobj
.
from_local_data
(
x
.
val
.
shape
,
ldat2
,
distaxis
=
0
)
Tval
=
Field
(
tdom
,
tmp
)
if
x
.
domain
[
self
.
_space
].
harmonic
:
if
(
mode
==
LinearOperator
.
TIMES
or
mode
==
LinearOperator
.
ADJOINT_TIMES
):
if
mode
&
(
LinearOperator
.
TIMES
|
LinearOperator
.
ADJOINT_TIMES
):
fct
=
self
.
_domain
[
self
.
_space
].
scalar_dvol
()
else
:
fct
=
1.
/
(
self
.
_domain
[
self
.
_space
].
scalar_dvol
()
*
self
.
_domain
[
self
.
_space
].
dim
)
else
:
if
(
mode
==
LinearOperator
.
TIMES
or
mode
==
LinearOperator
.
ADJOINT_TIMES
):
fct
=
1.
/
(
self
.
_target
[
self
.
_space
].
scalar_dvol
()
*
self
.
_target
[
self
.
_space
].
dim
)
else
:
fct
=
self
.
_target
[
self
.
_space
].
scalar_dvol
()
if
fct
!=
1
:
...
...
This diff is collapsed.
Click to expand it.
test/test_operators/test_response_operator.py
+
1
−
1
View file @
c15eb016
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