diff() converts a constant to a zero
Asked by
B. Emek Abali
if I want to use an expression or its derivative
V=VectorFunctio
v=Function(V)
z=variable(v)
a=det(grad(v))
Da=diff(a,z)
form = v[i]*Da[i]*dx
it is fine, but if the expresion is a constant
b=10.0
Db=diff(b,z)
form = v[i]*Db[i]*dx
the diff() returns a Zero and thus raise an error
TypeError: unsupported operand type(s) for +: 'set' and 'tuple'
How should I define the constant expression that it differentiates as a list with three zeros?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Martin Sandve Alnæs
- Solved:
- Last query:
- Last reply:
To post a message you must log in.