← Back to team overview

dolfin team mailing list archive

complex valued functoins

 

Hi

I am working on some electromagnetic problems that require I model the
electric field as a complex phasor.  When compiling user-defined functions I
get an error message.

For example, consider the following simple function:

f = Function(V, '1.0j')


when calling the JIT compiler, the log shows the following error (in the
last couple of lines):

dolfin_compile_function_934f16b21b1210d9244eba2ba7985a9a_wrap.cxx: In member
function ‘virtual void
dolfin::function_91ee55df622466fafbf3ba887ffb745e::eval(double*, const
double*) const’:
dolfin_compile_function_934f16b21b1210d9244eba2ba7985a9a_wrap.cxx:3221:
error: cannot convert ‘double __complex__’ to ‘double’ in assignment
error: command 'gcc' failed with exit status 1

Does dolfin support complex valued functions?  If so, how do I go about
getting them working?  And if not, how do I go about adding the
functionality.

Thanks
Evan

Follow ups