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
116a16c6
Commit
116a16c6
authored
Oct 24, 2019
by
Reimar H Leike
Browse files
fixup
parent
4231c07b
Pipeline
#62451
passed with stages
in 7 minutes and 1 second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty5/operators/energy_operators.py
View file @
116a16c6
...
@@ -280,7 +280,7 @@ class StudentTEnergy(EnergyOperator):
...
@@ -280,7 +280,7 @@ class StudentTEnergy(EnergyOperator):
return
Field
.
scalar
(
v
)
return
Field
.
scalar
(
v
)
if
not
x
.
want_metric
:
if
not
x
.
want_metric
:
return
v
return
v
met
=
ScalingOperator
(
self
.
domain
,
(
self
.
_theta
+
1
)
/
(
self
.
_theta
+
3
))
met
=
ScalingOperator
((
self
.
_theta
+
1
)
/
(
self
.
_theta
+
3
)
,
self
.
domain
)
met
=
SandwichOperator
.
make
(
x
.
jac
,
met
)
met
=
SandwichOperator
.
make
(
x
.
jac
,
met
)
return
v
.
add_metric
(
met
)
return
v
.
add_metric
(
met
)
...
...
nifty5/operators/log1p.py
View file @
116a16c6
...
@@ -35,7 +35,7 @@ class Log1p(Operator):
...
@@ -35,7 +35,7 @@ class Log1p(Operator):
lin
=
isinstance
(
x
,
Linearization
)
lin
=
isinstance
(
x
,
Linearization
)
xval
=
x
.
val
if
lin
else
x
xval
=
x
.
val
if
lin
else
x
xlval
=
xval
.
local_data
xlval
=
xval
.
local_data
res
=
from_local_data
(
x
.
domain
,
log1p
(
xlval
))
res
=
from_local_data
(
x
val
.
domain
,
log1p
(
xlval
))
if
not
lin
:
if
not
lin
:
return
res
return
res
jac
=
DiagonalOperator
(
1
/
(
1
+
xval
))
jac
=
DiagonalOperator
(
1
/
(
1
+
xval
))
...
...
Write
Preview
Supports
Markdown
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