On Thu, Jan 14, 2010 at 08:47:05PM -0000, Lex wrote: > Question #96782 on DOLFIN changed: > https://answers.launchpad.net/dolfin/+question/96782 > > Status: Answered => Open > > Lex is still having a problem: > Many thanks for your answer. > > So to interface the real part of a complex matrix only makes no sense? > I'm thinking about assembling the imaginary part of the equation, shift it to > the imaginary part of the matrix an then assembling the real part of the > equation in the same matrix. > > Regards, Alex
I'm suggesting you forget about moving values around in the matrix and just assemble everything as one big real-valued system. Consider for example this equation (grad(v), c*grad(u)) = (v, f) where v, u, c and f are complex-valued. Now let v = v1 + v2*i etc (for all variables appearing in the form) and carry out all the algebra. Then identify the real and imaginary parts of LHS and RHS and set them equal. You'll end up with a system of two real-valued scalar equations. Then just solve that as a system using mixed elements (V = P1 + P1) in DOLFIN. The solution will be a vector-valued function u where u[0] is the real part and u[1] is the imaginary part. -- Anders
signature.asc
Description: Digital signature
_______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

