Commit ddbbf9b2 authored by Martin Reinecke's avatar Martin Reinecke

Merge branch 'NIFTy_4' of gitlab.mpcdf.mpg.de:ift/NIFTy into NIFTy_4

parents fb82805a 057ecb10
Pipeline #29921 passed with stages
in 12 minutes and 43 seconds
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
import numpy as np import numpy as np
from ..field import Field from ..field import Field
from ..sugar import from_random
__all__ = ["check_value_gradient_consistency", __all__ = ["check_value_gradient_consistency",
"check_value_gradient_curvature_consistency"] "check_value_gradient_curvature_consistency"]
...@@ -26,7 +27,7 @@ __all__ = ["check_value_gradient_consistency", ...@@ -26,7 +27,7 @@ __all__ = ["check_value_gradient_consistency",
def _get_acceptable_energy(E): def _get_acceptable_energy(E):
if not np.isfinite(E.value): if not np.isfinite(E.value):
raise ValueError raise ValueError
dir = Field.from_random("normal", E.position.domain) dir = from_random("normal", E.position.domain)
# find a step length that leads to a "reasonable" energy # find a step length that leads to a "reasonable" energy
for i in range(50): for i in range(50):
try: try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment