← Back to team overview

ufl team mailing list archive

Re: [Question #227431]: UFL Exception : Found argument in Power(...)

 

Question #227431 on UFL changed:
https://answers.launchpad.net/ufl/+question/227431

    Status: Answered => Open

imranal is still having a problem:
Thanks Kristian, managed to move the relevant term to the right hand
side. The equation is nonlinear, hence I will use Newton¨s Method to
solve the problem (had not gotten that far - if I am not mistaken, by
deafult that is what the solver uses).

Martin are you referring to the h^2 term in the weak formulation ?

I corrected as Kristian instructed, and got another error message.

The error message :

$ python falk_skan_solver.py
Calling FFC just-in-time (JIT) compiler, this may take some time.
Unable to extract all indices.
Traceback (most recent call last):
  File "falk_skan_solver.py", line 49, in <module>
    A,b = assemble_system(a,L,bcs)
  File "/usr/lib/python2.7/dist-packages/dolfin/fem/assembling.py", line 248, in assemble_system
    subdomains, form_compiler_parameters)
  File "/usr/lib/python2.7/dist-packages/dolfin/fem/form.py", line 54, in __init__
    common_cell)
  File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", line 66, in mpi_jit
    return local_jit(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/dolfin/compilemodules/jit.py", line 154, in jit
    return jit_compile(form, parameters=p, common_cell=common_cell)
  File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 73, in jit
    return jit_form(ufl_object, parameters, common_cell)
  File "/usr/lib/python2.7/dist-packages/ffc/jitcompiler.py", line 130, in jit_form
    common_cell=common_cell)
  File "/usr/lib/python2.7/dist-packages/ffc/compiler.py", line 155, in compile_form
    ir = compute_ir(analysis, parameters, common_cell)
  File "/usr/lib/python2.7/dist-packages/ffc/representation.py", line 83, in compute_ir
    for (i, fd) in enumerate(form_datas)]
  File "/usr/lib/python2.7/dist-packages/ffc/representation.py", line 214, in _compute_integral_ir
    common_cell)
  File "/usr/lib/python2.7/dist-packages/ffc/tensor/tensorrepresentation.py", line 84, in compute_integral_ir
    common_cell)
  File "/usr/lib/python2.7/dist-packages/ffc/tensor/tensorrepresentation.py", line 136, in _compute_terms
    common_cell)
  File "/usr/lib/python2.7/dist-packages/ffc/tensor/referencetensor.py", line 59, in __init__
    self.primary_multi_index   = create_multiindex(primary_indices)
  File "/usr/lib/python2.7/dist-packages/ffc/tensor/multiindex.py", line 54, in create_multiindex
    error("Unable to extract all indices.")
  File "<string>", line 1, in <lambda>
  File "/usr/lib/python2.7/dist-packages/ufl/log.py", line 148, in error
    raise self._exception_type(self._format_raw(*message))
Exception: Unable to extract all indices.

This time I managed to locate the possible cause :

According to http://fenicsproject.org/documentation/tutorial/misc.html ,
there are apparently three reasons for the error :


      1.   missing either the TrialFunction or the TestFunction object,
      2.   no terms without TrialFunction objects.
      3.   mathematically invalid operations in the variational form.

Here is the changed code :

a = (-h.dx(0)*vh - n*n*h*g*vh - n*n*beta*h*h*vg)*dx
L = -n*n*vg*dx
A,b = assemble_system(a,L,bcs)

I am inclining towards the third option here.  But I can¨t seem to find
this invalid operation.

-- 
You received this question notification because you are a member of UFL
Team, which is an answer contact for UFL.