Allow disabling basis tabulation

Issue #48 new
Dominic Kempf created an issue

I am working on a Dune backend, which naturally supports quadrilaterals. Unfortunately, I did not find a quick way to disable the parts of ffc that do not (which I do not need anyway). This is a pity, because I really only need ffc as a driver for uflacs...

Traceback (most recent call last):
  File "/home/dominic/generation/uflpdelab/uflpdelab/cmd_compile_pdelab.py", line 109, in <module>
    run_uflpdelab(**vars(args))
  File "/home/dominic/generation/uflpdelab/uflpdelab/cmd_compile_pdelab.py", line 68, in run_uflpdelab
    local_operator_generator = LocalOperator(data, local_operator_file, parameter_class_file)
  File "/home/dominic/generation/uflpdelab/uflpdelab/pdelab/local_operator.py", line 57, in __init__
    ir = get_uflacs_ir(data.forms[0])
  File "/home/dominic/generation/uflpdelab/uflpdelab/pdelab/local_operator.py", line 27, in get_uflacs_ir
    ir = compute_ir(analysis, parameters)
  File "/usr/local/lib/python2.7/dist-packages/ffc/representation.py", line 96, in compute_ir
    for (i, fd) in enumerate(form_datas)]
  File "/usr/local/lib/python2.7/dist-packages/ffc/representation.py", line 220, in _compute_integral_ir
    parameters)
  File "/usr/local/lib/python2.7/dist-packages/ffc/uflacsrepr/uflacsrepresentation.py", line 48, in compute_integral_ir
    tabulate_basis(sorted_integrals, form_data, itg_data)
  File "/usr/local/lib/python2.7/dist-packages/ffc/quadrature/tabulate_basis.py", line 249, in tabulate_basis
    num_derivatives[ufl_element], points)
  File "/usr/local/lib/python2.7/dist-packages/ffc/quadrature/tabulate_basis.py", line 129, in _tabulate_psi_table
    entity_points = _map_entity_points(cellname, tdim, points, entity_dim, entity)
  File "/usr/local/lib/python2.7/dist-packages/ffc/quadrature/tabulate_basis.py", line 91, in _map_entity_points
    return map_facet_points(points, entity)
  File "/usr/local/lib/python2.7/dist-packages/ffc/fiatinterface.py", line 225, in map_facet_points
    coordinates = [vertex_coordinates[v] for v in facet_vertices[facet]]
KeyError: 4

Comments (1)

  1. Martin Sandve Alnæs

    You shouldn't go through ffc at all. There's a standalone driver function previously used for testing under

      uflacs/backends/ffc/ffc_compiler.py
    

    that fakes the setup ffc does.

    It's hard for me to know what the interface should ideally look like towards your code, do you have any suggestions? What would the ideal API to drive uflacs look like from the uflpdelab point of view?

  2. Log in to comment