Is Dolfin - UFC interaction broken in dev version?
Hello,
Before updating today to the dev version of Dolfin, i was able to run the following code:
element_type = "Nedelec 1st kind H(curl)"
element_order = 2
V_c = FunctionSpace(mesh, element_type, element_order) #mesh is in 3D, is read from a XML file
V = MixedFunctionSp
Er, Ei = TrialFunctions(V)
vr, vi = TestFunctions(V)
fr = Function(
fi = Function(
#Filled fr, fi somehow....
wf = -fr*(dot(Er, vr)+dot(Ei, vi))*dx + fi*(dot(Ei, vr) - dot(Er, vi))*dx \
+ dot(curl(Er), curl(vr))*dx + dot(curl(Ei), curl(vi))*dx
n = FacetNormal(mesh)
# Add surface term at excitation boundary
d_exc = some_integer_index
r_v = Expression(
k_dir_c = Constant( k_dir.tolist() ) # k_dir is a 3-element numpy array ...
E0_c = Constant( E0.tolist() ) # ... and so is E0
# ... real part
#wf += dot(-k*cross(n, cross(Ei, n)) - k*sin(dot(k_dir_c, r_v))*cross(n, cross(E0_c, n-k_dir_c)), vr)*ds(d_exc)
## ... imaginary part
#wf += dot(k*cross(n, cross(Er, n)) - k*cos(dot(k_dir_c, r_v))*cross(n, cross(E0_c, n-k_dir_c)), vi)*ds(d_exc)
T = Function(V)
a, L = lhs(wf), rhs(wf)
problem = LinearVariation
When running into the last line, the following output shows up:
Traceback (most recent call last):
File "test_mx_
problem = LinearVariation
File "/usr/local/
a = Form(a, form_compiler_
File "/usr/local/
function_
File "/usr/local/
r = compiled_
File "/usr/lib/
def rank(self): return _ufc.form_
TypeError: in method 'form_rank', argument 1 of type 'ufc::form const *'
This is novel, as in the current ubuntu repo version it works fine. In a previous post, I indicated that to switch to the dev version, i just uninstalled dolfin, which also uninstalls the 'fenics' metapackage, leaving behind ffc, ufl, etc. untouched. Then I built dolfin and installed it in /usr/local. Build and installation were successful. What might have gone wrong here?
Thanks,
Luis.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Johan Hake
- Solved:
- Last query:
- Last reply: