Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIFTy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
be1a0818
Commit
be1a0818
authored
Feb 17, 2018
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetics and small tweaks
parent
72670f97
Pipeline
#25064
passed with stages
in 6 minutes and 39 seconds
Changes
19
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
25 additions
and
29 deletions
+25
-29
nifty4/domains/domain.py
nifty4/domains/domain.py
+0
-3
nifty4/domains/structured_domain.py
nifty4/domains/structured_domain.py
+0
-3
nifty4/library/wiener_filter_energy.py
nifty4/library/wiener_filter_energy.py
+1
-1
nifty4/minimization/conjugate_gradient.py
nifty4/minimization/conjugate_gradient.py
+1
-1
nifty4/minimization/gradient_norm_controller.py
nifty4/minimization/gradient_norm_controller.py
+1
-1
nifty4/minimization/iteration_controller.py
nifty4/minimization/iteration_controller.py
+1
-1
nifty4/minimization/line_search.py
nifty4/minimization/line_search.py
+3
-3
nifty4/minimization/line_search_strong_wolfe.py
nifty4/minimization/line_search_strong_wolfe.py
+4
-3
nifty4/minimization/nonlinear_cg.py
nifty4/minimization/nonlinear_cg.py
+1
-1
nifty4/minimization/quadratic_energy.py
nifty4/minimization/quadratic_energy.py
+1
-1
nifty4/minimization/relaxed_newton.py
nifty4/minimization/relaxed_newton.py
+4
-3
nifty4/plotting/plot.py
nifty4/plotting/plot.py
+1
-1
setup.py
setup.py
+1
-1
test/common.py
test/common.py
+1
-1
test/test_energies/test_power.py
test/test_energies/test_power.py
+1
-1
test/test_field.py
test/test_field.py
+1
-1
test/test_minimization/test_minimizers.py
test/test_minimization/test_minimizers.py
+1
-1
test/test_operators/test_smoothing_operator.py
test/test_operators/test_smoothing_operator.py
+1
-1
test/test_spaces/test_interface.py
test/test_spaces/test_interface.py
+1
-1
No files found.
nifty4/domains/domain.py
View file @
be1a0818
...
...
@@ -27,9 +27,6 @@ class Domain(with_metaclass(
"""The abstract class repesenting a (structured or unstructured) domain.
"""
def
__init__
(
self
):
pass
@
abc
.
abstractmethod
def
__repr__
(
self
):
raise
NotImplementedError
...
...
nifty4/domains/structured_domain.py
View file @
be1a0818
...
...
@@ -29,9 +29,6 @@ class StructuredDomain(Domain):
are needed for power spectrum analysis and smoothing.
"""
def
__init__
(
self
):
super
(
StructuredDomain
,
self
).
__init__
()
@
abc
.
abstractproperty
def
scalar_dvol
(
self
):
"""float or None : uniform cell volume, if applicable
...
...
nifty4/library/wiener_filter_energy.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
nifty4/minimization/conjugate_gradient.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
nifty4/minimization/gradient_norm_controller.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
nifty4/minimization/iteration_controller.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
nifty4/minimization/line_search.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
@@ -31,8 +31,8 @@ class LineSearch(with_metaclass(abc.ABCMeta,
minimization process.
"""
def
__init__
(
self
):
self
.
preferred_initial_step_size
=
Non
e
def
__init__
(
self
,
preferred_initial_step_size
=
None
):
self
.
preferred_initial_step_size
=
preferred_initial_step_siz
e
@
abc
.
abstractmethod
def
perform_line_search
(
self
,
energy
,
pk
,
f_k_minus_1
=
None
):
...
...
nifty4/minimization/line_search_strong_wolfe.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
@@ -50,11 +50,12 @@ class LineSearchStrongWolfe(LineSearch):
(Default: 100)
"""
def
__init__
(
self
,
c1
=
1e-4
,
c2
=
0.9
,
def
__init__
(
self
,
preferred_initial_step_size
=
None
,
c1
=
1e-4
,
c2
=
0.9
,
max_step_size
=
1000000000
,
max_iterations
=
100
,
max_zoom_iterations
=
100
):
super
(
LineSearchStrongWolfe
,
self
).
__init__
()
super
(
LineSearchStrongWolfe
,
self
).
__init__
(
preferred_initial_step_size
)
self
.
c1
=
np
.
float
(
c1
)
self
.
c2
=
np
.
float
(
c2
)
...
...
nifty4/minimization/nonlinear_cg.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
nifty4/minimization/quadratic_energy.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
nifty4/minimization/relaxed_newton.py
View file @
be1a0818
...
...
@@ -26,11 +26,12 @@ class RelaxedNewton(DescentMinimizer):
The descent direction is determined by weighting the gradient at the
current parameter position with the inverse local curvature.
"""
def
__init__
(
self
,
controller
,
line_searcher
=
LineSearchStrongWolfe
()):
def
__init__
(
self
,
controller
,
line_searcher
=
None
):
if
line_searcher
is
None
:
line_searcher
=
LineSearchStrongWolfe
(
preferred_initial_step_size
=
1.
)
super
(
RelaxedNewton
,
self
).
__init__
(
controller
=
controller
,
line_searcher
=
line_searcher
)
# FIXME: this does not look idiomatic
self
.
line_searcher
.
preferred_initial_step_size
=
1.
def
get_descent_direction
(
self
,
energy
):
return
-
energy
.
curvature
.
inverse_times
(
energy
.
gradient
)
nifty4/plotting/plot.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
setup.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
test/common.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
test/test_energies/test_power.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
test/test_field.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
test/test_minimization/test_minimizers.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
test/test_operators/test_smoothing_operator.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
test/test_spaces/test_interface.py
View file @
be1a0818
...
...
@@ -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
7
Max-Planck-Society
# Copyright(C) 2013-201
8
Max-Planck-Society
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
...
...
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