What can be expected from replay?
A couple of questions/issues and a general question:
1. The below code snippet gives 0 equations registered in the .html output -- I would expect at least 1. Also, the replay reports success, this seems disturbing.
2. If commenting in the vector modification in "Issue 2", at least 1 equation is registered (though we would expect 2) but replay still reports success although we are modifying the vector directly. I'm pretty surprised by this...
(I'm on dolfin and dolfin-adjoint from today.)
I'm generally using replay as a first step to check that the solve is annotated correctly. But perhaps this is a little hopeful... I guess that if I deliberately turn off annotation, then I cannot expect replay to complain. Also, same if I make modifications that does not actually modify the results (setting vector values that are 0 to 0). But, in general, what can I expect replay to complain about?
from dolfin import *
from dolfin_adjoint import *
mesh = UnitIntervalMesh(2)
V = FunctionSpace(mesh, "CG", 1)
w = Function(V)
u = TrialFunction(V)
v = TestFunction(V)
f = Constant(1.0)
# Issue 1: This doesn't seem to register?
w = project(f, V)
## Issue 2: Success when modifying the vector?
#solve(u*v*dx == v*dx, w)
#w.vector()[1] = 0.0
#print w.vector().array()
adj_html(
success = replay_
print "success = ", success
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Marie Rognes
- Solved:
- Last query:
- Last reply: