Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
f89a5b17
Commit
f89a5b17
authored
Oct 02, 2017
by
Martin Reinecke
Browse files
set PowerSpace volume factors to 1
parent
9734d7db
Pipeline
#19140
canceled with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/domain_object.py
View file @
f89a5b17
...
...
@@ -19,7 +19,6 @@
from
__future__
import
division
import
abc
from
.nifty_meta
import
NiftyMeta
from
future.utils
import
with_metaclass
...
...
@@ -137,7 +136,7 @@ class DomainObject(with_metaclass(
"""
raise
NotImplementedError
(
"There is no generic scalar_
weight
method for DomainObject."
)
"There is no generic scalar_
dvol
method for DomainObject."
)
def
dvol
(
self
):
""" Returns the volume factors of this domain, either as a floating
...
...
nifty/spaces/power_space/power_space.py
View file @
f89a5b17
...
...
@@ -198,11 +198,7 @@ class PowerSpace(Space):
return
self
.
shape
[
0
]
def
scalar_dvol
(
self
):
return
None
def
dvol
(
self
):
# MR FIXME: this will probably change to 1 soon
return
np
.
asarray
(
self
.
rho
,
dtype
=
np
.
float64
)
return
1.
def
get_k_length_array
(
self
):
return
self
.
kindex
.
copy
()
...
...
test/test_spaces/test_power_space.py
View file @
f89a5b17
...
...
@@ -129,4 +129,4 @@ class PowerSpaceFunctionalityTest(unittest.TestCase):
def
test_dvol
(
self
):
p
=
PowerSpace
(
harmonic_partner
=
RGSpace
(
10
,
harmonic
=
True
))
assert_almost_equal
(
p
.
dvol
(),
p
.
rho
)
assert_almost_equal
(
p
.
dvol
(),
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