Skip to content

Commit

Permalink
Merge pull request #97 from sblauth/hotfix/1.8.8
Browse files Browse the repository at this point in the history
Hotfix/1.8.8
  • Loading branch information
sblauth authored Sep 15, 2022
2 parents 883364f + 14511da commit 99af184
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"description": "<p>cashocs is a computational, adjoint-based shape optimization and optimal control software.</p>",
"license": "GPL-3.0+",
"title": "cashocs v1.8.7",
"version": "v1.8.7",
"title": "cashocs v1.8.8",
"version": "v1.8.8",
"upload_type": "software",
"creators": [
{
Expand Down
2 changes: 1 addition & 1 deletion cashocs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
from cashocs.nonlinear_solvers import newton_solve
from cashocs.nonlinear_solvers import picard_iteration

__version__ = "1.8.7"
__version__ = "1.8.8"

__citation__ = """
@Article{Blauth2021cashocs,
Expand Down
13 changes: 5 additions & 8 deletions cashocs/_optimization/optimization_algorithms/l_bfgs.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,12 @@ def update_hessian_approximation(self) -> None:
self.history_y.appendleft([x.copy(True) for x in self.y_k])
self.history_s.appendleft([x.copy(True) for x in self.s_k])
curvature_condition = self.form_handler.scalar_product(self.y_k, self.s_k)
denominator = np.sqrt(
self.form_handler.scalar_product(self.s_k, self.s_k)
* self.form_handler.scalar_product(self.y_k, self.y_k)
)

if (
curvature_condition
/ np.sqrt(
self.form_handler.scalar_product(self.s_k, self.s_k)
* self.form_handler.scalar_product(self.y_k, self.y_k)
)
<= 1e-14
):
if denominator <= 1e-15 or curvature_condition / denominator <= 1e-14:
self.has_curvature_info = False

self.history_s.clear()
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
author = "Sebastian Blauth"

# The full version, including alpha/beta/rc tags
release = "1.8.7"
release = "1.8.8"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = cashocs
version = 1.8.7
version = 1.8.8
author = Sebastian Blauth
author_email = sebastian.blauth@itwm.fraunhofer.de
description = Computational Adjoint-Based Shape Optimization and Optimal Control Software
Expand Down

0 comments on commit 99af184

Please sign in to comment.