diff --git a/src/felupe/constitution/jax/_helpers.py b/src/felupe/constitution/jax/_helpers.py index bd362070..fba57c7c 100644 --- a/src/felupe/constitution/jax/_helpers.py +++ b/src/felupe/constitution/jax/_helpers.py @@ -95,7 +95,6 @@ def vmap2(fun, in_axes=[0, 0], out_axes=[0, 0], methods=[jax.vmap, jax.vmap], ** def as_total_lagrange(fun): - @wraps(fun) def evaluate(F, *args, **kwargs): i, j = jnp.triu_indices(3) diff --git a/src/felupe/constitution/jax/_hyperelastic.py b/src/felupe/constitution/jax/_hyperelastic.py index f18d83f9..8460d8cc 100644 --- a/src/felupe/constitution/jax/_hyperelastic.py +++ b/src/felupe/constitution/jax/_hyperelastic.py @@ -146,7 +146,6 @@ def viscoelastic(C, Cin, mu, eta, dtime): """ def __init__(self, fun, nstatevars=0, jit=True, parallel=False, **kwargs): - has_aux = nstatevars > 0 self.fun = as_total_lagrange(fun) diff --git a/src/felupe/constitution/jax/_material.py b/src/felupe/constitution/jax/_material.py index 44317b3e..722979db 100644 --- a/src/felupe/constitution/jax/_material.py +++ b/src/felupe/constitution/jax/_material.py @@ -160,7 +160,6 @@ def viscoelastic(F, Cin, mu, eta, dtime): def __init__( self, fun, nstatevars=0, jit=True, parallel=False, jacobian=None, **kwargs ): - has_aux = nstatevars > 0 self.fun = fun diff --git a/src/felupe/constitution/jax/models/hyperelastic/_mooney_rivlin.py b/src/felupe/constitution/jax/models/hyperelastic/_mooney_rivlin.py index fd04eddc..9f28837c 100644 --- a/src/felupe/constitution/jax/models/hyperelastic/_mooney_rivlin.py +++ b/src/felupe/constitution/jax/models/hyperelastic/_mooney_rivlin.py @@ -25,7 +25,6 @@ @wraps(mooney_rivlin_docstring) def mooney_rivlin(C, C10, C01): - J3 = det(C) ** (-1 / 3) I1 = J3 * trace(C) I2 = (I1**2 - J3**2 * trace(C @ C)) / 2 diff --git a/src/felupe/constitution/jax/models/hyperelastic/_third_order_deformation.py b/src/felupe/constitution/jax/models/hyperelastic/_third_order_deformation.py index 429ce33f..b1fe2ce7 100644 --- a/src/felupe/constitution/jax/models/hyperelastic/_third_order_deformation.py +++ b/src/felupe/constitution/jax/models/hyperelastic/_third_order_deformation.py @@ -25,7 +25,6 @@ @wraps(tod_docstring) def third_order_deformation(C, C10, C01, C11, C20, C30): - J3 = det(C) ** (-1 / 3) I1 = J3 * trace(C) I2 = (I1**2 - J3**2 * trace(C @ C)) / 2 diff --git a/src/felupe/constitution/jax/models/hyperelastic/_yeoh.py b/src/felupe/constitution/jax/models/hyperelastic/_yeoh.py index 6ac3236a..010bec7f 100644 --- a/src/felupe/constitution/jax/models/hyperelastic/_yeoh.py +++ b/src/felupe/constitution/jax/models/hyperelastic/_yeoh.py @@ -25,6 +25,5 @@ @wraps(yeoh_docstring) def yeoh(C, C10, C20, C30): - I1 = det(C) ** (-1 / 3) * trace(C) return C10 * (I1 - 3) + C20 * (I1 - 3) ** 2 + C30 * (I1 - 3) ** 3 diff --git a/src/felupe/constitution/jax/models/lagrange/_morph.py b/src/felupe/constitution/jax/models/lagrange/_morph.py index 47c1b213..cf7d8c3c 100644 --- a/src/felupe/constitution/jax/models/lagrange/_morph.py +++ b/src/felupe/constitution/jax/models/lagrange/_morph.py @@ -28,7 +28,6 @@ @wraps(morph_docstring) @total_lagrange def morph(F, statevars, p): - # right Cauchy-Green deformation tensor C = F.T @ F diff --git a/src/felupe/constitution/jax/models/lagrange/_morph_uniaxial.py b/src/felupe/constitution/jax/models/lagrange/_morph_uniaxial.py index b168539c..dd176f39 100644 --- a/src/felupe/constitution/jax/models/lagrange/_morph_uniaxial.py +++ b/src/felupe/constitution/jax/models/lagrange/_morph_uniaxial.py @@ -25,7 +25,6 @@ @wraps(morph_ux) def morph_uniaxial(λ, statevars, p, ε=1e-6): - CTSn = statevars[:21] λn = 1 + statevars[21:42] SA1n = statevars[42:63] diff --git a/tests/test_constitution_jax.py b/tests/test_constitution_jax.py index 32c066a7..8cf6dc06 100644 --- a/tests/test_constitution_jax.py +++ b/tests/test_constitution_jax.py @@ -78,7 +78,6 @@ def test_hyperelastic_jax(): def test_hyperelastic_jax_statevars(): - def W(C, statevars, C10, K): I3 = jnp.linalg.det(C) J = jnp.sqrt(I3) @@ -99,7 +98,6 @@ def W(C, statevars, C10, K): def test_material_jax(): - def dWdF(F, C10, K): J = jnp.linalg.det(F) C = F.T @ F @@ -124,7 +122,6 @@ def dWdF(F, C10, K): def test_material_jax_statevars(): - def dWdF(F, statevars, C10, K): J = jnp.linalg.det(F) C = F.T @ F @@ -149,7 +146,6 @@ def dWdF(F, statevars, C10, K): def test_material_included_jax_statevars(): - for fun, nstatevars in zip( [ mat.models.lagrange.morph,