ffc team mailing list archive
-
ffc team
-
Mailing list archive
-
Message #01035
Re: error
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.
In more detail: In FFC the keyword Constant() should just return a
DG(0) function and on the DOLFIN side, one can create a corresponding
constant function by
Function c(mesh, 3.0);
for example.
/Anders
Follow ups
References
-
error
From: Garth N. Wells, 2007-04-26