diff --git a/exp/2025/08/27/inverse-segement/src/20-forward.py b/exp/2025/08/27/inverse-segement/src/20-forward.py index 2ae0e88ba..f8c087f07 100644 --- a/exp/2025/08/27/inverse-segement/src/20-forward.py +++ b/exp/2025/08/27/inverse-segement/src/20-forward.py @@ -4,13 +4,13 @@ import jax.numpy as jnp import numpy as np import pyvista as pv +from liblaf.apple.jax.typing import Vector from loguru import logger from liblaf import cherries, melon from liblaf.apple import sim from liblaf.apple.jax import optim from liblaf.apple.jax import sim as sim_jax -from liblaf.apple.jax.typing import Vector jax.config.update("jax_enable_x64", True) # noqa: FBT003 diff --git a/exp/2025/08/27/inverse-segement/src/30-inverse.py b/exp/2025/08/27/inverse-segement/src/30-inverse.py index 598abe1fc..f5d64b4d7 100644 --- a/exp/2025/08/27/inverse-segement/src/30-inverse.py +++ b/exp/2025/08/27/inverse-segement/src/30-inverse.py @@ -9,13 +9,13 @@ import numpy as np import pyvista as pv from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.typing import Scalar, Vector from loguru import logger from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree from liblaf.apple.jax import sim as sim_jax -from liblaf.apple.jax.typing import Scalar, Vector class Config(cherries.BaseConfig): diff --git a/exp/2025/08/27/inverse/src/20-forward.py b/exp/2025/08/27/inverse/src/20-forward.py index e14058b2d..ee9df9ba6 100644 --- a/exp/2025/08/27/inverse/src/20-forward.py +++ b/exp/2025/08/27/inverse/src/20-forward.py @@ -4,13 +4,13 @@ import jax.numpy as jnp import numpy as np import pyvista as pv +from liblaf.apple.jax.typing import Vector from loguru import logger from liblaf import cherries, melon from liblaf.apple import sim from liblaf.apple.jax import optim from liblaf.apple.jax import sim as sim_jax -from liblaf.apple.jax.typing import Vector jax.config.update("jax_enable_x64", True) # noqa: FBT003 diff --git a/exp/2025/08/27/inverse/src/30-inverse.py b/exp/2025/08/27/inverse/src/30-inverse.py index 4eab86797..e2690e024 100644 --- a/exp/2025/08/27/inverse/src/30-inverse.py +++ b/exp/2025/08/27/inverse/src/30-inverse.py @@ -9,13 +9,13 @@ import numpy as np import pyvista as pv from jaxtyping import Array, Float +from liblaf.apple.jax.typing import Scalar, Vector from loguru import logger from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree from liblaf.apple.jax import sim as sim_jax -from liblaf.apple.jax.typing import Scalar, Vector os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25" jax.config.update("jax_enable_x64", True) # noqa: FBT003 diff --git a/exp/2025/09/10/inverse-mixed/src/20-forward.py b/exp/2025/09/10/inverse-mixed/src/20-forward.py index b9782b3b2..587dacf4c 100644 --- a/exp/2025/09/10/inverse-mixed/src/20-forward.py +++ b/exp/2025/09/10/inverse-mixed/src/20-forward.py @@ -3,12 +3,12 @@ import jax.numpy as jnp import numpy as np import pyvista as pv +from liblaf.apple.jax.typing import Vector from loguru import logger from liblaf import cherries, melon from liblaf.apple import sim from liblaf.apple.jax import optim -from liblaf.apple.jax.typing import Vector from liblaf.apple.warp import sim as sim_wp diff --git a/exp/2025/09/10/inverse-mixed/src/30-inverse.py b/exp/2025/09/10/inverse-mixed/src/30-inverse.py index 04df21db7..f1928eaaa 100644 --- a/exp/2025/09/10/inverse-mixed/src/30-inverse.py +++ b/exp/2025/09/10/inverse-mixed/src/30-inverse.py @@ -6,21 +6,21 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.sim.energy.elastic import utils +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.sim.energy.elastic import utils -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 @lx.is_positive_semidefinite.register(lx.DiagonalLinearOperator) diff --git a/exp/2025/09/10/inverse/src/20-forward.py b/exp/2025/09/10/inverse/src/20-forward.py index affcfc693..8d16e075f 100644 --- a/exp/2025/09/10/inverse/src/20-forward.py +++ b/exp/2025/09/10/inverse/src/20-forward.py @@ -3,12 +3,12 @@ import jax.numpy as jnp import numpy as np import pyvista as pv +from liblaf.apple.jax.typing import Vector from loguru import logger from liblaf import cherries, melon from liblaf.apple import sim from liblaf.apple.jax import optim -from liblaf.apple.jax.typing import Vector from liblaf.apple.warp import sim as sim_wp diff --git a/exp/2025/09/10/inverse/src/30-inverse.py b/exp/2025/09/10/inverse/src/30-inverse.py index b7b926cd3..59947d5d0 100644 --- a/exp/2025/09/10/inverse/src/30-inverse.py +++ b/exp/2025/09/10/inverse/src/30-inverse.py @@ -5,21 +5,21 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, Float +from liblaf.apple.jax.sim.energy.elastic import utils +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.sim.energy.elastic import utils -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 @lx.is_positive_semidefinite.register(lx.DiagonalLinearOperator) diff --git a/exp/2025/09/10/inverse/src/31-inverse-v2.py b/exp/2025/09/10/inverse/src/31-inverse-v2.py index aa97b326f..8b57a2568 100644 --- a/exp/2025/09/10/inverse/src/31-inverse-v2.py +++ b/exp/2025/09/10/inverse/src/31-inverse-v2.py @@ -6,21 +6,21 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.sim.energy.elastic import utils +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.sim.energy.elastic import utils -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 @lx.is_positive_semidefinite.register(lx.DiagonalLinearOperator) diff --git a/exp/2025/09/24/inverse-grin/src/20-forward.py b/exp/2025/09/24/inverse-grin/src/20-forward.py index f4d8e179f..06eaf3571 100644 --- a/exp/2025/09/24/inverse-grin/src/20-forward.py +++ b/exp/2025/09/24/inverse-grin/src/20-forward.py @@ -3,12 +3,12 @@ import jax.numpy as jnp import numpy as np import pyvista as pv +from liblaf.apple.jax.typing import Vector from loguru import logger from liblaf import cherries, melon from liblaf.apple import sim from liblaf.apple.jax import optim -from liblaf.apple.jax.typing import Vector from liblaf.apple.warp import sim as sim_wp diff --git a/exp/2025/09/24/inverse-grin/src/21-forward.py b/exp/2025/09/24/inverse-grin/src/21-forward.py index f601ed2b9..dce79e612 100644 --- a/exp/2025/09/24/inverse-grin/src/21-forward.py +++ b/exp/2025/09/24/inverse-grin/src/21-forward.py @@ -3,12 +3,12 @@ import jax.numpy as jnp import numpy as np import pyvista as pv +from liblaf.apple.jax.typing import Vector from liblaf.peach import optim from loguru import logger from liblaf import cherries, melon from liblaf.apple import sim -from liblaf.apple.jax.typing import Vector from liblaf.apple.warp import sim as sim_wp diff --git a/exp/2025/09/24/inverse-grin/src/30-inverse.py b/exp/2025/09/24/inverse-grin/src/30-inverse.py index fe10e27aa..c6065d6b3 100644 --- a/exp/2025/09/24/inverse-grin/src/30-inverse.py +++ b/exp/2025/09/24/inverse-grin/src/30-inverse.py @@ -5,21 +5,21 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.jax.sim as sim_jax +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.jax.sim as sim_jax -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25" diff --git a/exp/2025/09/24/inverse-grin/src/31-inverse.py b/exp/2025/09/24/inverse-grin/src/31-inverse.py index 8ae3671fd..51457515a 100644 --- a/exp/2025/09/24/inverse-grin/src/31-inverse.py +++ b/exp/2025/09/24/inverse-grin/src/31-inverse.py @@ -5,21 +5,21 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.jax.sim as sim_jax +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.jax.sim as sim_jax -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25" diff --git a/exp/2025/09/24/inverse-grin/src/32-inverse.py b/exp/2025/09/24/inverse-grin/src/32-inverse.py index d1e15c78f..8b1dfb76a 100644 --- a/exp/2025/09/24/inverse-grin/src/32-inverse.py +++ b/exp/2025/09/24/inverse-grin/src/32-inverse.py @@ -5,21 +5,21 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.jax.sim as sim_jax +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.jax.sim as sim_jax -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25" diff --git a/exp/2025/09/24/inverse-grin/src/33-inverse-no-reg.py b/exp/2025/09/24/inverse-grin/src/33-inverse-no-reg.py index 30d39a25e..76e0f560d 100644 --- a/exp/2025/09/24/inverse-grin/src/33-inverse-no-reg.py +++ b/exp/2025/09/24/inverse-grin/src/33-inverse-no-reg.py @@ -5,22 +5,22 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.jax.sim as sim_jax +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import scipy.optimize import warp as wp from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.jax.sim as sim_jax -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25" diff --git a/exp/2025/09/24/inverse-grin/src/34-inverse-no-reg.py b/exp/2025/09/24/inverse-grin/src/34-inverse-no-reg.py index d8cfd962b..1872f2286 100644 --- a/exp/2025/09/24/inverse-grin/src/34-inverse-no-reg.py +++ b/exp/2025/09/24/inverse-grin/src/34-inverse-no-reg.py @@ -5,21 +5,21 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.jax.sim as sim_jax +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.jax.sim as sim_jax -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25" diff --git a/exp/2025/09/24/inverse-grin/src/35-inverse-small-reg.py b/exp/2025/09/24/inverse-grin/src/35-inverse-small-reg.py index 39468d46e..3659b8701 100644 --- a/exp/2025/09/24/inverse-grin/src/35-inverse-small-reg.py +++ b/exp/2025/09/24/inverse-grin/src/35-inverse-small-reg.py @@ -5,21 +5,21 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.jax.sim as sim_jax +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.jax.sim as sim_jax -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25" diff --git a/exp/2025/09/24/inverse-grin/src/36-inverse-abs.py b/exp/2025/09/24/inverse-grin/src/36-inverse-abs.py index d9418a6de..ade7b8148 100644 --- a/exp/2025/09/24/inverse-grin/src/36-inverse-abs.py +++ b/exp/2025/09/24/inverse-grin/src/36-inverse-abs.py @@ -5,21 +5,21 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.jax.sim as sim_jax +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.jax.sim as sim_jax -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25" diff --git a/exp/2025/09/24/inverse-grin/src/37-inverse-quadratic.py b/exp/2025/09/24/inverse-grin/src/37-inverse-quadratic.py index abf5cfe41..e6757dbf3 100644 --- a/exp/2025/09/24/inverse-grin/src/37-inverse-quadratic.py +++ b/exp/2025/09/24/inverse-grin/src/37-inverse-quadratic.py @@ -5,21 +5,21 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.jax.sim as sim_jax +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.jax.sim as sim_jax -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25" diff --git a/exp/2025/09/24/inverse-grin/src/38-inverse-cbrt.py b/exp/2025/09/24/inverse-grin/src/38-inverse-cbrt.py index 8e757e2c5..ba2c89007 100644 --- a/exp/2025/09/24/inverse-grin/src/38-inverse-cbrt.py +++ b/exp/2025/09/24/inverse-grin/src/38-inverse-cbrt.py @@ -5,21 +5,21 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.jax.sim as sim_jax +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.jax.sim as sim_jax -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25" diff --git a/exp/2025/09/24/inverse-grin/src/39-inverse-sparse.py b/exp/2025/09/24/inverse-grin/src/39-inverse-sparse.py index a3a5b8f12..57d57742d 100644 --- a/exp/2025/09/24/inverse-grin/src/39-inverse-sparse.py +++ b/exp/2025/09/24/inverse-grin/src/39-inverse-sparse.py @@ -5,21 +5,21 @@ import equinox as eqx import jax import jax.numpy as jnp +import liblaf.apple.jax.sim as sim_jax +import liblaf.apple.warp.sim as sim_wp +import liblaf.apple.warp.utils as wp_utils import lineax as lx import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, Bool, Float +from liblaf.apple.jax.typing import Scalar, Vector +from liblaf.apple.warp.typing import vec6 from loguru import logger -import liblaf.apple.jax.sim as sim_jax -import liblaf.apple.warp.sim as sim_wp -import liblaf.apple.warp.utils as wp_utils from liblaf import cherries, grapes, melon from liblaf.apple import sim from liblaf.apple.jax import optim, tree -from liblaf.apple.jax.typing import Scalar, Vector -from liblaf.apple.warp.typing import vec6 os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"] = "0.25" diff --git a/exp/2025/09/24/inverse-grin/src/41-inspect-inverse.py b/exp/2025/09/24/inverse-grin/src/41-inspect-inverse.py index 18f8a3058..ed52391d8 100644 --- a/exp/2025/09/24/inverse-grin/src/41-inspect-inverse.py +++ b/exp/2025/09/24/inverse-grin/src/41-inspect-inverse.py @@ -1,9 +1,9 @@ import jax.numpy as jnp +import liblaf.apple.jax.sim as sim_jax import numpy as np import pyvista as pv from jaxtyping import Array, Float -import liblaf.apple.jax.sim as sim_jax from liblaf import melon diff --git a/exp/2025/10/22/inverse-flame/src/30-animate.py b/exp/2025/10/22/inverse-flame/src/30-animate.py index 7e1613eaf..9d8f00487 100644 --- a/exp/2025/10/22/inverse-flame/src/30-animate.py +++ b/exp/2025/10/22/inverse-flame/src/30-animate.py @@ -6,6 +6,7 @@ import pyvista as pv import warp as wp from jaxtyping import Array, Float +from liblaf.apple.warp.typing import vec6 from liblaf.peach import tree from liblaf.peach.optim import PNCG, Objective @@ -13,7 +14,6 @@ from liblaf.apple import sim from liblaf.apple.warp import sim as sim_wp from liblaf.apple.warp import utils as wpu -from liblaf.apple.warp.typing import vec6 logger: logging.Logger = logging.getLogger(__name__) diff --git a/exp/2025/10/29/muscle-fiber-direction/src/10-solve.py b/exp/2025/10/29/muscle-fiber-direction/src/10-solve.py index f1a2ed472..11d24ee16 100644 --- a/exp/2025/10/29/muscle-fiber-direction/src/10-solve.py +++ b/exp/2025/10/29/muscle-fiber-direction/src/10-solve.py @@ -3,12 +3,12 @@ import pyvista as pv from jax import Array from jaxtyping import Integer +from liblaf.apple.jax.typing import Scalar, Vector from liblaf.peach import optim from liblaf.peach import tree_utils as tree from liblaf import grapes, melon from liblaf.apple.jax import sim as sim_jax -from liblaf.apple.jax.typing import Scalar, Vector @tree.define diff --git a/pyproject.toml b/pyproject.toml index cca6559c0..d5a4f3219 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "cytoolz>=1,<2", "einops>=0.8,<0.9", "equinox>=0.13,<0.14", - "felupe>=9,<10", + "felupe>=10,<11", "frozendict>=2.4.7,<3.0.0", "jarp>=0.1.1,<0.2.0", "jax>=0.9,<0.10", diff --git a/tests/warp/energies/elastic/hyperelastic/common.py b/tests/warp/energies/elastic/hyperelastic/common.py index 65f1da1d2..c5ee72f57 100644 --- a/tests/warp/energies/elastic/hyperelastic/common.py +++ b/tests/warp/energies/elastic/hyperelastic/common.py @@ -2,15 +2,15 @@ import jax import jax.numpy as jnp +import liblaf.apple.warp.utils as wpu import numpy as np import pyvista as pv import warp as wp from jaxtyping import Array, ArrayLike, Float, Key +from liblaf.apple.warp.energies.elastic.hyperelastic import Hyperelastic -import liblaf.apple.warp.utils as wpu from liblaf.apple import Model from liblaf.apple.jax import testing -from liblaf.apple.warp.energies.elastic.hyperelastic import Hyperelastic type EnergyParams = Mapping[str, Array] type Full = Float[Array, "points 3"] diff --git a/tests/warp/energies/elastic/hyperelastic/func/test_gradients.py b/tests/warp/energies/elastic/hyperelastic/func/test_gradients.py index 910da93ec..95dbf9e12 100644 --- a/tests/warp/energies/elastic/hyperelastic/func/test_gradients.py +++ b/tests/warp/energies/elastic/hyperelastic/func/test_gradients.py @@ -5,11 +5,11 @@ import jax.test_util import warp as wp from jaxtyping import Array, Float +from liblaf.apple.warp.energies.elastic.hyperelastic import func from liblaf.apple.jax import testing from liblaf.apple.warp import math from liblaf.apple.warp import utils as wpu -from liblaf.apple.warp.energies.elastic.hyperelastic import func class IdentityFunction(Protocol): diff --git a/tests/warp/energies/elastic/hyperelastic/func/test_hess_diag.py b/tests/warp/energies/elastic/hyperelastic/func/test_hess_diag.py index 1d9c408d3..6418bec0b 100644 --- a/tests/warp/energies/elastic/hyperelastic/func/test_hess_diag.py +++ b/tests/warp/energies/elastic/hyperelastic/func/test_hess_diag.py @@ -2,13 +2,13 @@ import hypothesis import jax.numpy as jnp +import liblaf.apple.warp.utils as wpu import numpy as np import warp as wp from jaxtyping import Array, DTypeLike, Float +from liblaf.apple.warp.energies.elastic.hyperelastic import func -import liblaf.apple.warp.utils as wpu from liblaf.apple.jax import testing -from liblaf.apple.warp.energies.elastic.hyperelastic import func def diag_from_quad( diff --git a/tests/warp/energies/elastic/hyperelastic/func/test_hess_prod.py b/tests/warp/energies/elastic/hyperelastic/func/test_hess_prod.py index 0fb142744..5c9f8d072 100644 --- a/tests/warp/energies/elastic/hyperelastic/func/test_hess_prod.py +++ b/tests/warp/energies/elastic/hyperelastic/func/test_hess_prod.py @@ -2,13 +2,13 @@ import einops import hypothesis +import liblaf.apple.warp.utils as wpu import numpy as np import warp as wp from jaxtyping import Array, Float +from liblaf.apple.warp.energies.elastic.hyperelastic import func -import liblaf.apple.warp.utils as wpu from liblaf.apple.jax import testing -from liblaf.apple.warp.energies.elastic.hyperelastic import func def check_prod( diff --git a/tests/warp/energies/elastic/hyperelastic/func/test_hess_quad.py b/tests/warp/energies/elastic/hyperelastic/func/test_hess_quad.py index ed5167673..09dd77dcb 100644 --- a/tests/warp/energies/elastic/hyperelastic/func/test_hess_quad.py +++ b/tests/warp/energies/elastic/hyperelastic/func/test_hess_quad.py @@ -2,14 +2,14 @@ from typing import Any, no_type_check import hypothesis +import liblaf.apple.warp.utils as wpu import numpy as np import warp as wp from jaxtyping import Array, Float +from liblaf.apple.warp.energies.elastic.hyperelastic import func -import liblaf.apple.warp.utils as wpu from liblaf.apple.jax import testing from liblaf.apple.warp import math -from liblaf.apple.warp.energies.elastic.hyperelastic import func type Mat33 = Float[Array, "batch 3 3"] type Mat43 = Float[Array, "batch 4 3"] diff --git a/tests/warp/energies/elastic/hyperelastic/test_arap.py b/tests/warp/energies/elastic/hyperelastic/test_arap.py index 024ed2b6d..4f4ab5ea3 100644 --- a/tests/warp/energies/elastic/hyperelastic/test_arap.py +++ b/tests/warp/energies/elastic/hyperelastic/test_arap.py @@ -2,11 +2,11 @@ import numpy as np import pytest import pyvista as pv +from liblaf.apple.warp.energies.elastic.hyperelastic import Arap from liblaf.apple import Model, ModelBuilder from liblaf.apple.consts import MU from liblaf.apple.jax import testing -from liblaf.apple.warp.energies.elastic.hyperelastic import Arap from . import common diff --git a/tests/warp/energies/elastic/hyperelastic/test_arap_muscle.py b/tests/warp/energies/elastic/hyperelastic/test_arap_muscle.py index 53a12a40c..617afd773 100644 --- a/tests/warp/energies/elastic/hyperelastic/test_arap_muscle.py +++ b/tests/warp/energies/elastic/hyperelastic/test_arap_muscle.py @@ -2,11 +2,11 @@ import numpy as np import pytest import pyvista as pv +from liblaf.apple.warp.energies.elastic.hyperelastic import ArapMuscle from liblaf.apple import Model, ModelBuilder from liblaf.apple.consts import ACTIVATION, MU from liblaf.apple.jax import testing -from liblaf.apple.warp.energies.elastic.hyperelastic import ArapMuscle from . import common diff --git a/tests/warp/energies/elastic/hyperelastic/test_phace.py b/tests/warp/energies/elastic/hyperelastic/test_phace.py index d21c14e99..ae4e88347 100644 --- a/tests/warp/energies/elastic/hyperelastic/test_phace.py +++ b/tests/warp/energies/elastic/hyperelastic/test_phace.py @@ -2,11 +2,11 @@ import numpy as np import pytest import pyvista as pv +from liblaf.apple.warp.energies.elastic.hyperelastic import Phace from liblaf.apple import Model, ModelBuilder from liblaf.apple.consts import ACTIVATION, LAMBDA, MU, MUSCLE_FRACTION from liblaf.apple.jax import testing -from liblaf.apple.warp.energies.elastic.hyperelastic import Phace from . import common diff --git a/uv.lock b/uv.lock index 4efae9f56..6f9d94b01 100644 --- a/uv.lock +++ b/uv.lock @@ -687,9 +687,9 @@ dependencies = [ { name = "click" }, { name = "prompt-toolkit" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/cb/a2/57f4ac79838cfae6912f997b4d1a64a858fb0c86d7fcaae6f7b58d267fca/click-repl-0.3.0.tar.gz", hash = "sha256:17849c23dba3d667247dc4defe1757fff98694e90fe37474f3feebb69ced26a9" } +sdist = { url = "https://files.pythonhosted.org/packages/cb/a2/57f4ac79838cfae6912f997b4d1a64a858fb0c86d7fcaae6f7b58d267fca/click-repl-0.3.0.tar.gz", hash = "sha256:17849c23dba3d667247dc4defe1757fff98694e90fe37474f3feebb69ced26a9", size = 10449, upload-time = "2023-06-15T12:43:51.141Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/52/40/9d857001228658f0d59e97ebd4c346fe73e138c6de1bce61dc568a57c7f8/click_repl-0.3.0-py3-none-any.whl", hash = "sha256:fb7e06deb8da8de86180a33a9da97ac316751c094c6899382da7feeeeb51b812" }, + { url = "https://files.pythonhosted.org/packages/52/40/9d857001228658f0d59e97ebd4c346fe73e138c6de1bce61dc568a57c7f8/click_repl-0.3.0-py3-none-any.whl", hash = "sha256:fb7e06deb8da8de86180a33a9da97ac316751c094c6899382da7feeeeb51b812", size = 10289, upload-time = "2023-06-15T12:43:48.626Z" }, ] [[package]] @@ -1001,9 +1001,9 @@ wheels = [ name = "cycler" version = "0.12.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c" } +sdist = { url = "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c", size = 7615, upload-time = "2023-10-07T05:32:18.335Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30" }, + { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321, upload-time = "2023-10-07T05:32:16.783Z" }, ] [[package]] @@ -1172,9 +1172,9 @@ wheels = [ name = "defusedxml" version = "0.7.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69" } +sdist = { url = "https://files.pythonhosted.org/packages/0f/d5/c66da9b79e5bdb124974bfe172b4daf3c984ebd9c2a06e2b8a4dc7331c72/defusedxml-0.7.1.tar.gz", hash = "sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69", size = 75520, upload-time = "2021-03-08T10:59:26.269Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/07/6c/aa3f2f849e01cb6a001cd8554a88d4c77c5c1a31c95bdf1cf9301e6d9ef4/defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61" }, + { url = "https://files.pythonhosted.org/packages/07/6c/aa3f2f849e01cb6a001cd8554a88d4c77c5c1a31c95bdf1cf9301e6d9ef4/defusedxml-0.7.1-py2.py3-none-any.whl", hash = "sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61", size = 25604, upload-time = "2021-03-08T10:59:24.45Z" }, ] [[package]] @@ -1202,9 +1202,9 @@ wheels = [ name = "diskcache" version = "5.6.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/3f/21/1c1ffc1a039ddcc459db43cc108658f32c57d271d7289a2794e401d0fdb6/diskcache-5.6.3.tar.gz", hash = "sha256:2c3a3fa2743d8535d832ec61c2054a1641f41775aa7c556758a109941e33e4fc" } +sdist = { url = "https://files.pythonhosted.org/packages/3f/21/1c1ffc1a039ddcc459db43cc108658f32c57d271d7289a2794e401d0fdb6/diskcache-5.6.3.tar.gz", hash = "sha256:2c3a3fa2743d8535d832ec61c2054a1641f41775aa7c556758a109941e33e4fc", size = 67916, upload-time = "2023-08-31T06:12:00.316Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3f/27/4570e78fc0bf5ea0ca45eb1de3818a23787af9b390c0b0a0033a1b8236f9/diskcache-5.6.3-py3-none-any.whl", hash = "sha256:5e31b2d5fbad117cc363ebaf6b689474db18a1f6438bc82358b024abd4c2ca19" }, + { url = "https://files.pythonhosted.org/packages/3f/27/4570e78fc0bf5ea0ca45eb1de3818a23787af9b390c0b0a0033a1b8236f9/diskcache-5.6.3-py3-none-any.whl", hash = "sha256:5e31b2d5fbad117cc363ebaf6b689474db18a1f6438bc82358b024abd4c2ca19", size = 45550, upload-time = "2023-08-31T06:11:58.822Z" }, ] [[package]] @@ -1567,15 +1567,15 @@ wheels = [ [[package]] name = "felupe" -version = "9.5.0" +version = "10.1.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "numpy" }, { name = "scipy" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/24/b9/1ac724449abe8f43165dd26c20d981e0a2ccfe0e6f5c4c1a72c2f32cf5cd/felupe-9.5.0.tar.gz", hash = "sha256:fa0f5ee235c545024e1f8be5db42a4689fe61a26eeef06a7289d1ae4be2a5283", size = 257327, upload-time = "2025-11-05T10:33:35.815Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a0/ad/a0e78479dd5652b18832e8557a06fedf373a0a0c72bbb2e9614e63199418/felupe-10.1.0.tar.gz", hash = "sha256:cf179e45a960ca9e79f18551a4745c37496733abed586df5d8c433bc97f4571c", size = 262217, upload-time = "2026-02-26T17:43:05.706Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/74/31/a2ad5b1616c44e9f61aa9ea36cc4a803b1e5ef25857cd66c5f669209a8d9/felupe-9.5.0-py3-none-any.whl", hash = "sha256:a5d6a7888bd8a8bcf443f520ce5c9b66cede1b17410c0655725bfdc8ac097755", size = 373657, upload-time = "2025-11-05T10:33:34.182Z" }, + { url = "https://files.pythonhosted.org/packages/f4/59/30c0464719818c8f200fd7c2c48d3bca0c6013067474cf6c0270750261b9/felupe-10.1.0-py3-none-any.whl", hash = "sha256:96fef93d29ccaf7a83f4a2b9f84cf33c89435e3a58a2ccdec00c4bd8bd649e38", size = 379200, upload-time = "2026-02-26T17:43:04.464Z" }, ] [[package]] @@ -2697,7 +2697,7 @@ requires-dist = [ { name = "cytoolz", specifier = ">=1,<2" }, { name = "einops", specifier = ">=0.8,<0.9" }, { name = "equinox", specifier = ">=0.13,<0.14" }, - { name = "felupe", specifier = ">=9,<10" }, + { name = "felupe", specifier = ">=10,<11" }, { name = "frozendict", specifier = ">=2.4.7,<3.0.0" }, { name = "jarp", specifier = ">=0.1.1,<0.2.0" }, { name = "jax", specifier = ">=0.9,<0.10" }, @@ -3472,9 +3472,9 @@ imaging = [ name = "mkdocs-material-extensions" version = "1.3.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/79/9b/9b4c96d6593b2a541e1cb8b34899a6d021d208bb357042823d4d2cabdbe7/mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443" } +sdist = { url = "https://files.pythonhosted.org/packages/79/9b/9b4c96d6593b2a541e1cb8b34899a6d021d208bb357042823d4d2cabdbe7/mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443", size = 11847, upload-time = "2023-11-22T19:09:45.208Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5b/54/662a4743aa81d9582ee9339d4ffa3c8fd40a4965e033d77b9da9774d3960/mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31" }, + { url = "https://files.pythonhosted.org/packages/5b/54/662a4743aa81d9582ee9339d4ffa3c8fd40a4965e033d77b9da9774d3960/mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31", size = 8728, upload-time = "2023-11-22T19:09:43.465Z" }, ] [[package]] @@ -3718,9 +3718,9 @@ wheels = [ name = "natsort" version = "8.4.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e2/a9/a0c57aee75f77794adaf35322f8b6404cbd0f89ad45c87197a937764b7d0/natsort-8.4.0.tar.gz", hash = "sha256:45312c4a0e5507593da193dedd04abb1469253b601ecaf63445ad80f0a1ea581" } +sdist = { url = "https://files.pythonhosted.org/packages/e2/a9/a0c57aee75f77794adaf35322f8b6404cbd0f89ad45c87197a937764b7d0/natsort-8.4.0.tar.gz", hash = "sha256:45312c4a0e5507593da193dedd04abb1469253b601ecaf63445ad80f0a1ea581", size = 76575, upload-time = "2023-06-20T04:17:19.925Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ef/82/7a9d0550484a62c6da82858ee9419f3dd1ccc9aa1c26a1e43da3ecd20b0d/natsort-8.4.0-py3-none-any.whl", hash = "sha256:4732914fb471f56b5cce04d7bae6f164a592c7712e1c85f9ef585e197299521c" }, + { url = "https://files.pythonhosted.org/packages/ef/82/7a9d0550484a62c6da82858ee9419f3dd1ccc9aa1c26a1e43da3ecd20b0d/natsort-8.4.0-py3-none-any.whl", hash = "sha256:4732914fb471f56b5cce04d7bae6f164a592c7712e1c85f9ef585e197299521c", size = 38268, upload-time = "2023-06-20T04:17:17.522Z" }, ] [[package]] @@ -4343,9 +4343,9 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "ptyprocess" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" } +sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450, upload-time = "2023-11-25T09:07:26.339Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523" }, + { url = "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", size = 63772, upload-time = "2023-11-25T06:56:14.81Z" }, ] [[package]]