ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #01057
Re: error
On Mon, Apr 30, 2007 at 02:24:10PM +0200, Garth N. Wells wrote:
>
>
> Anders Logg wrote:
> > On Mon, Apr 30, 2007 at 10:05:48AM +0200, Garth N. Wells wrote:
> >>
> >> Anders Logg wrote:
> >>> On Thu, Apr 26, 2007 at 05:02:18PM +0200, Garth N. Wells wrote:
> >>>> When try to compile the code generated by FFC for the DOFLIN
> >>>> Cahn-Hilliard demo (src/demo/nls/cahn-hilliard/CahnHilliard2D.form) , I
> >>>> get the below errors related to undeclared variables.
> >>>>
> >>>> Garth
> >>>>
> >>>> CahnHilliard2D.h: In member function ‘virtual void
> >>>> UFC_CahnHilliard2DBilinearForm_cell_integral_0::tabulate_tensor(double*,
> >>>> const double* const*, const ufc::cell&) const’:
> >>>> CahnHilliard2D.h:3136: error: ‘c3’ was not declared in this scope
> >>>> CahnHilliard2D.h:3136: error: ‘c2’ was not declared in this scope
> >>>> CahnHilliard2D.h:3136: error: ‘c1’ was not declared in this scope
> >>>> CahnHilliard2D.h:4681: error: ‘c0’ was not declared in this scope
> >>>> CahnHilliard2D.h: In member function ‘virtual void
> >>>> UFC_CahnHilliard2DLinearForm_cell_integral_0::tabulate_tensor(double*,
> >>>> const double* const*, const ufc::cell&) const’:
> >>>> CahnHilliard2D.h:7572: error: ‘c3’ was not declared in this scope
> >>>> CahnHilliard2D.h:7572: error: ‘c2’ was not declared in this scope
> >>>> CahnHilliard2D.h:7572: error: ‘c1’ was not declared in this scope
> >>>> CahnHilliard2D.h:9654: error: ‘c0’ was not declared in this scope
> >>> I think the problem is that constants are no longer supported in
> >>> UFC/FFC. They need to be mapped to DG(0) elements and this is something
> >>> I haven't fixed yet.
> >>>
> >> Could you make it possible to invert DG(0) functions (e.g. 1/t)?
> >>
> >> Garth
> >
> > Yes (with some work), but is it necessary?
> >
> > You can define the corresponding function in DOLFIN as
> >
> > Function cinv(mesh, 1.0/c);
> >
>
> Can be useful for terms like time t which can appear as t and 1/t,
> saving the introduction of an extra variable.
>
> Garth
Sounds reasonable. I'll put it on my (long and expanding) todo list...
/Anders
References