← Back to team overview

dolfin team mailing list archive

Re: [UFC-dev] broken test in FFC

 

Quoting Kristian Oelgaard <k.b.oelgaard@xxxxxxxxxx>:

> 
> 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.

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
> UFC-dev@xxxxxxxxxx
> http://fenics.org/mailman/listinfo/ufc-dev
> 


Attachment: ufc-kristian-oelgaard-2009-02-16.hg
Description: Binary data


References