Evan Lezar wrote: > 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?
No. If so, how do I go about > getting them working? And if not, how do I go about adding the > functionality. > It would be a big task to make it seamless. The starting point would be having FFC (or soon UFL) support complex functions. I thought about this a few years ago but never got around to it. UFL question: Does or will UFL support complex functions? Garth > Thanks > Evan > > > ------------------------------------------------------------------------ > > _______________________________________________ > DOLFIN-dev mailing list > [email protected] > http://www.fenics.org/mailman/listinfo/dolfin-dev _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
