Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
adtzlr committed Oct 31, 2021
1 parent 2dc8c5c commit 72999a2
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,17 @@ F = displacement.extract(grad=True, sym=False, add_identity=True)

# define the constitutive material behavior
umat = fe.constitution.NeoHooke(mu=1.0, bulk=2.0)
P = umat.gradient(F)
A4 = umat.hessian(F)

# force residuals from assembly of equilibrium (weak form)
r = fe.IntegralForm(
fun=umat.gradient(F), v=displacement, dV=region.dV, grad_v=True
P, v=displacement, dV=region.dV, grad_v=True
).assemble().toarray()[:,0]

# tangent stiffness matrix from (parallel) assembly of linearized equilibrium
K = fe.IntegralForm(
fun=umat.hessian(F),
v=displacement,
dV=region.dV,
u=displacement,
grad_v=True,
grad_u=True,
A4, v=displacement, dV=region.dV, u=displacement, grad_v=True, grad_u=True,
).assemble(parallel=True)

# solution: partition, solve linear system and update field values
Expand Down

0 comments on commit 72999a2

Please sign in to comment.