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
067817dc
Commit
067817dc
authored
Jun 02, 2021
by
Martin Reinecke
Browse files
tweaks
parent
f94e696d
Pipeline
#102735
passed with stages
in 14 minutes and 15 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/domains/rg_space.py
View file @
067817dc
...
...
@@ -11,7 +11,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-202
0
Max-Planck-Society
# Copyright(C) 2013-202
1
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
...
...
@@ -77,6 +77,8 @@ class RGSpace(StructuredDomain):
if
self
.
_harmonic
:
temp
=
1.
/
(
np
.
array
(
self
.
_shape
)
*
temp
)
self
.
_rdistances
=
tuple
(
temp
)
self
.
_hdistances
=
tuple
(
1.
/
(
np
.
array
(
self
.
shape
)
*
np
.
array
(
self
.
_rdistances
)))
if
min
(
self
.
_rdistances
)
<=
0
:
raise
ValueError
(
'Non-positive distances encountered'
)
...
...
@@ -220,7 +222,4 @@ class RGSpace(StructuredDomain):
The n-th entry of the tuple is the distance between neighboring
grid points along the n-th dimension.
"""
if
self
.
_harmonic
:
return
tuple
(
1.
/
(
np
.
array
(
self
.
shape
)
*
np
.
array
(
self
.
_rdistances
)))
else
:
return
self
.
_rdistances
return
self
.
_hdistances
if
self
.
_harmonic
else
self
.
_rdistances
test/test_spaces/test_rg_space.py
View file @
067817dc
...
...
@@ -11,7 +11,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Copyright(C) 2013-201
9
Max-Planck-Society
# Copyright(C) 2013-20
2
1 Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
...
...
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