Created
February 29, 2016 13:51
-
-
Save wence-/5c94a304d27e2d35b551 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
w_theta = Function(V) | |
_, sigma_theta = split(w_theta) | |
theta_form = m*det(I + sigma_theta)*dx | |
theta = Constant(assemble(theta_form)/total_area) | |
def updatetheta(snes, it, rnorm, constant, w_theta): | |
x = snes.getSolution() | |
with w_theta.dat.vec as v: | |
x.copy(v) | |
constant.assign(assemble(theta_form)/total_area) | |
print constant.dat.data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment