← Back to team overview

dolfin team mailing list archive

Re: [Bug 497395] Re: cpparg not working in new Expression class

 

On Wednesday 16 December 2009 06:07:29 Anders Logg wrote:
> Take a look at demo/pde/tensor-weighted-poisson/python that demonstrates
> the use of this.
> 
> In some cases, one needs the dolfin:: prefix (like MeshFunction and Array)
>  but not in other places (like Expression and Data). It would be good if it
>  could be avoided completely (the prefix).
 
Ok, but then we need to include all dolfin types while compiling the swig 
code. I can see if I can make this optional when passing a cpparg. I agree 
that it would be nice to avoid all dolfin:: prefixes.

Expression works because it is declared in Expression.h which is imported 
while generating code. Data works probably because it is included as argument 
in the Expression.h inside a dolfin namespace. The other types are not 
included and hence not known as dolfin::Types.

Will look into it.

Johan

-- 
cpparg not working in new Expression class
https://bugs.launchpad.net/bugs/497395
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.

Status in DOLFIN: Confirmed

Bug description:
JIT compilation with cpparg=code is not working since Array is not known:

dolfin_compile_code_63e61793c4d05809102d0089ac836490_wrap.cxx: In function ‘PyObject* _wrap_Convection_eval(PyObject*, PyObject*)’:
dolfin_compile_code_63e61793c4d05809102d0089ac836490_wrap.cxx:2721: error: ‘Array’ was not declared in this scope
dolfin_compile_code_63e61793c4d05809102d0089ac836490_wrap.cxx:2721: error: expected primary-expression before ‘double’
dolfin_compile_code_63e61793c4d05809102d0089ac836490_wrap.cxx:2721: error: expected ‘;’ before ‘double’
dolfin_compile_code_63e61793c4d05809102d0089ac836490_wrap.cxx:2758: error: ‘arg2’ was not declared in this scope
dolfin_compile_code_63e61793c4d05809102d0089ac836490_wrap.cxx:2758: error: expected type-specifier before ‘Array’
dolfin_compile_code_63e61793c4d05809102d0089ac836490_wrap.cxx:2758: error: expected ‘>’ before ‘Array’
dolfin_compile_code_63e61793c4d05809102d0089ac836490_wrap.cxx:2758: error: expected ‘(’ before ‘Array’
dolfin_compile_code_63e61793c4d05809102d0089ac836490_wrap.cxx:2758: error: expected primary-expression before ‘double’
dolfin_compile_code_63e61793c4d05809102d0089ac836490_wrap.cxx:2758: error: expected ‘)’ before ‘double’
dolfin_compile_code_63e61793c4d05809102d0089ac836490_wrap.cxx:2758: error: expected ‘;’ before ‘double’
error: command 'gcc' failed with exit status 1





Follow ups

References