Subject: [FFC-dev] broken test in FFC

From: Kristian Oelgaard <[email-masked]>
Date: Tue, 10 Feb 2009 17:28:10 +0100

Hi,

The ffc/test/verify_tensors/test.py is broken and I could use some help sorting
it out.

It breaks when I try to call for instance the ufc_benchmark.tabulate_cell_integral()

A = numpy.array(ufc_benchmark.tabulate_cell_integral(compiled_form, w, cell,
domain))
TypeError: in method 'tabulate_cell_integral', argument 1 of type 'ufc::form
const &'

where the ufc_benchmark method is defined in ufc_benchmark.h as:
std::vector< std::vector<double> > tabulate_cell_integral(const ufc::form& form,
std::vector< std::vector<double> > w, ufc::cell cell, int domain);

and the compiled_form is the returned object from a call to jit(form, options)

compiled form:
<form_99d11f3aec379b3b03c523ef1e0c4238ef60b05b.form_99d11f3aec379b3b03c523ef1e0c4238ef60b05b;
proxy of <Swig Object of type 'boost::shared_ptr<
form_99d11f3aec379b3b03c523ef1e0c4238ef60b05b > *' at 0x8c97a80> >

The implementation in DOLFIN, dolfin/site-packages/dolfin/form.py and
dolfin/fem/Form.h, is almost identical as far as I can tell, so what is going
wrong in FFC?

I use development versions of all FEniCS components.

Kristian

---

From: Kristian Oelgaard <[email-masked]>
Date: Mon, 16 Feb 2009 12:07:38 +0100

> I use development versions of all FEniCS components.

I fixed this by changing

const ufc::form & form

to

const boost::shared_ptr<ufc::form> form

in relevant places in ufc/src/utils/python/ufc_benchmark/ufc_benchmark.*

see attached bundle.

If there's a better way of doing it feel free to make changes.

Kristian

> Kristian
> 
> _______________________________________________
> UFC-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/ufc-dev
>