Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Nov 10, 2023
1 parent 68bc0bb commit 6a4a335
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions conmech/solvers/optimization/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,11 @@ def _solve_impl(
"qsmlm",
):
# pylint: disable=import-outside-toplevel,import-error)
from kosopt import qsmlm
from kosopt import qsmlmi

solution = qsmlm.minimize(self.loss, solution, args=args, maxiter=maxiter)
solution = qsmlmi.minimize(
self.loss, solution, args=args, maxiter=maxiter
)
else:
result = scipy.optimize.minimize(
self.loss,
Expand Down
8 changes: 5 additions & 3 deletions examples/Bagirov_Bartman_Ochal_2023.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,15 @@ def main(config: Config):
mesh_descr = RectangleMeshDescription(
initial_position=None,
max_element_perimeter=0.25 * 10 * mm,
scale=[2.5 * 10 * mm, 10 * mm],
scale=[8 * 10 * mm, 10 * mm],
)

setup = StaticSetup(mesh_descr=mesh_descr)

for method in ("Powell", "BFGS", "CG", "qsm"):
for force in np.arange(25e3 * kN, 26e3 * kN + 1, 1e3 * kN) * surface:
for method in ("Powell", "BFGS", "CG", "qsm")[3:]:
for force in (
np.asarray([23e3 * kN, 26.2e3 * kN, 27e3 * kN, 30e3 * kN]) * surface
):

def outer_forces(x, t=None):
if x[1] >= 0.0099:
Expand Down

0 comments on commit 6a4a335

Please sign in to comment.