Skip to content

Commit

Permalink
format black
Browse files Browse the repository at this point in the history
  • Loading branch information
adtzlr committed Nov 13, 2024
1 parent 2312941 commit f33ef79
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/felupe/constitution/jax/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/felupe/constitution/jax/_hyperelastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion src/felupe/constitution/jax/_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/felupe/constitution/jax/models/hyperelastic/_yeoh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion src/felupe/constitution/jax/models/lagrange/_morph.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
@wraps(morph_docstring)
@total_lagrange
def morph(F, statevars, p):

# right Cauchy-Green deformation tensor
C = F.T @ F

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 0 additions & 4 deletions tests/test_constitution_jax.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit f33ef79

Please sign in to comment.