← Back to team overview

dolfin team mailing list archive

Re: [Question #150875]: Problem with assemble() with MixedFunctionSpace of symmetric TensorFunctionSpaces

 

Question #150875 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/150875

Jørgen Myre gave more information on the question:
Anders Logg proposed the following fix:
"Try adding this to your code, somewhere at
the top:"

parameters["form_compiler"]["representation"] = "quadrature"

I added this to the second line (right under "from dolfin import *"),
but I now get the following error:

Traceback (most recent call last):
  File "tensortest2.py", line 30, in <module>
    a = assemble(A, tensor=a)
  File "/usr/lib/python2.6/dist-packages/dolfin/fem/assemble.py", line 100, in assemble
    common_cell=common_cell)
  File "/usr/lib/python2.6/dist-packages/dolfin/fem/form.py", line 34, in __init__
    (self._compiled_form, module, self.form_data) = jit(form, form_compiler_parameters, common_cell)
  File "/usr/lib/python2.6/dist-packages/dolfin/compilemodules/jit.py", line 47, in mpi_jit
    return local_jit(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/dolfin/compilemodules/jit.py", line 114, in jit
    return jit_compile(form, parameters=p, common_cell=common_cell)
  File "/usr/lib/python2.6/dist-packages/ffc/jitcompiler.py", line 64, in jit
    return jit_form(object, parameters, common_cell)
  File "/usr/lib/python2.6/dist-packages/ffc/jitcompiler.py", line 122, in jit_form
    compile_form(preprocessed_form, prefix=jit_object.signature(), parameters=parameters)
  File "/usr/lib/python2.6/dist-packages/ffc/compiler.py", line 140, in compile_form
    ir = compute_ir(analysis, parameters)
  File "/usr/lib/python2.6/dist-packages/ffc/representation.py", line 66, in compute_ir
    irs = [_compute_integral_ir(f, i, parameters) for (i, f) in enumerate(forms)]
  File "/usr/lib/python2.6/dist-packages/ffc/representation.py", line 186, in _compute_integral_ir
    parameters)
  File "/usr/lib/python2.6/dist-packages/ffc/quadrature/quadraturerepresentation.py", line 103, in compute_integral_ir
    ir["trans_integrals"] = _transform_integrals(transformer, integrals_dict, domain_type)
  File "/usr/lib/python2.6/dist-packages/ffc/quadrature/quadraturerepresentation.py", line 279, in _transform_integrals
    terms = transformer.generate_terms(integrand)
  File "/usr/lib/python2.6/dist-packages/ffc/quadrature/quadraturetransformerbase.py", line 672, in generate_terms
    terms = self.visit(integrand)
  File "/usr/lib/python2.6/dist-packages/ufl/algorithms/transformations.py", line 129, in visit
    r = h(o, *map(self.visit, o.operands()))
  File "/usr/lib/python2.6/dist-packages/ufl/algorithms/transformations.py", line 133, in visit
    r = h(o)
  File "/usr/lib/python2.6/dist-packages/ffc/quadrature/quadraturetransformerbase.py", line 524, in index_sum
    ops.append(self.visit(summand))
  File "/usr/lib/python2.6/dist-packages/ufl/algorithms/transformations.py", line 133, in visit
    r = h(o)
  File "/usr/lib/python2.6/dist-packages/ffc/quadrature/quadraturetransformerbase.py", line 524, in index_sum
    ops.append(self.visit(summand))
  File "/usr/lib/python2.6/dist-packages/ufl/algorithms/transformations.py", line 129, in visit
    r = h(o, *map(self.visit, o.operands()))
  File "/usr/lib/python2.6/dist-packages/ufl/algorithms/transformations.py", line 133, in visit
    r = h(o)
  File "/usr/lib/python2.6/dist-packages/ffc/quadrature/quadraturetransformerbase.py", line 487, in indexed
    code = self.visit(indexed_expr)
  File "/usr/lib/python2.6/dist-packages/ufl/algorithms/transformations.py", line 133, in visit
    r = h(o)
  File "/usr/lib/python2.6/dist-packages/ffc/quadrature/quadraturetransformerbase.py", line 653, in list_tensor
    code = self.visit(op)
  File "/usr/lib/python2.6/dist-packages/ufl/algorithms/transformations.py", line 133, in visit
    r = h(o)
  File "/usr/lib/python2.6/dist-packages/ffc/quadrature/quadraturetransformerbase.py", line 653, in list_tensor
    code = self.visit(op)
  File "/usr/lib/python2.6/dist-packages/ufl/algorithms/transformations.py", line 133, in visit
    r = h(o)
  File "/usr/lib/python2.6/dist-packages/ffc/quadrature/quadraturetransformerbase.py", line 487, in indexed
    code = self.visit(indexed_expr)
  File "/usr/lib/python2.6/dist-packages/ufl/algorithms/transformations.py", line 129, in visit
    r = h(o, *map(self.visit, o.operands()))
  File "/usr/lib/python2.6/dist-packages/ffc/quadrature/quadraturetransformerbase.py", line 299, in argument
    local_offset, ffc_element, transformation, multiindices)
  File "/usr/lib/python2.6/dist-packages/ffc/quadrature/quadraturetransformer.py", line 395, in create_argument
    mapping, basis = self._create_mapping_basis(component, deriv, ufl_argument, ffc_element)
  File "/usr/lib/python2.6/dist-packages/ffc/quadrature/quadraturetransformerbase.py", line 853, in _create_mapping_basis
    name, non_zeros, zeros, ones = self.name_map[name]
KeyError: 'FE0_C7'

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