Skip to content
GitLab
Menu
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
ca7a12ac
Commit
ca7a12ac
authored
Oct 11, 2017
by
Martin Reinecke
Browse files
remove infnorm for now
parent
a1135cbe
Pipeline
#19498
passed with stage
in 4 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/energies/energy.py
View file @
ca7a12ac
...
...
@@ -18,7 +18,6 @@
from
..nifty_meta
import
NiftyMeta
from
..memoization
import
memo
from
future.utils
import
with_metaclass
...
...
@@ -80,9 +79,7 @@ class Energy(with_metaclass(NiftyMeta, type('NewBase', (object,), {}))):
-------
out : Energy
Energy object at new position.
"""
return
self
.
__class__
(
position
)
@
property
...
...
@@ -90,27 +87,21 @@ class Energy(with_metaclass(NiftyMeta, type('NewBase', (object,), {}))):
"""
The Field location in parameter space where value, gradient and
curvature are evaluated.
"""
return
self
.
_position
@
property
def
value
(
self
):
"""
The value of the energy functional at given `position`.
"""
raise
NotImplementedError
@
property
def
gradient
(
self
):
"""
The gradient at given `position`.
"""
raise
NotImplementedError
@
property
...
...
@@ -118,27 +109,13 @@ class Energy(with_metaclass(NiftyMeta, type('NewBase', (object,), {}))):
def
gradient_norm
(
self
):
"""
The length of the gradient at given `position`.
"""
return
self
.
gradient
.
norm
()
@
property
@
memo
def
gradient_infnorm
(
self
):
"""
The infinity norm of the gradient at given `position`.
"""
return
abs
(
self
.
gradient
).
max
()
@
property
def
curvature
(
self
):
"""
A positive semi-definite operator or function describing the curvature
of the potential at the given `position`.
"""
raise
NotImplementedError
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