<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3314" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008>Dear all
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=968350209-24102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008>I have found a bug
when using the time solver with complex numbers. (Maybe it is just a
feature that hasn't just been implemented yet and not a bug). You can
replicate the error with the attached script. I have also made a
correction, which I have tested succesfully. To be used at own
risk.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=968350209-24102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008>The bug appears with
both getdp 2.0 with petsc and 1.2.1 with sparsekit. All
corrections in the source file are marked with 'LHR' (my initials). The version
is getdp 2.0. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008></SPAN></FONT><FONT
face=Arial size=2><SPAN class=968350209-24102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008>The problem is that
getdp dosn't build the matrices and vectors when complex numbers and a time
solver are used. The static solution works correctly. The problem is in the
file Cal_AssembleTerm.cpp, and has to do with the variable Current.NbrHar which
is 1 with reals and 2 with complex numbers. If Current.NbrHar = 2
getdp does not build the matrices and vectors which will be zero when using the
time solver. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008></SPAN></FONT><FONT
face=Arial size=2><SPAN class=968350209-24102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008>Question: what does
Current.NbrHar > 2 mean? And is there a (good) reason why getdp has not
design to work with Current.NbrHar = 2?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=968350209-24102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008>I have attached my
corrected source file. I have correct the bug in all instances in the file I
could find, except in the "multiharmonics" part. BTW: what does
the multiharmonics part do?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=968350209-24102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008>The attached script
simulates equation d_x^2 e(x,t) = d_t e(x,t). You can also change it
to e(x,t) = -d_t e(x,t), in which case the solution is e(x,t) =
e(x,t=0)*exp(-t).</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008></SPAN></FONT><FONT
face=Arial size=2><SPAN class=968350209-24102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008>Another related
problem: There is some confusion in the postprocessing in getdp with the
Current.NbrHar = 2 after having used the time solver. If a complex field is
postprocessed (after having used the time solver) it has the form e.g
re[e(t=0)],im[e(t=0)],re[e(t=1)],im[e(t=1)], t=0,0,1,1. This is fine. But if I
output re(e) instead of e, then it still outputs the imaginary value which is
now zero. If im(e) is outputted it returns im(e) + 0*i, instead of
just im(e) which is a real. </SPAN></FONT><FONT face=Arial size=2><SPAN
class=968350209-24102008></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=968350209-24102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=968350209-24102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008>KR
Lars</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=968350209-24102008>
<DIV align=left><FONT face=Arial size=2>
<P class=MsoNormal
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 0cm 0cm 0pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext; mso-element: para-border-div; mso-border-bottom-alt: solid windowtext 1.5pt; mso-padding-alt: 0cm 0cm 3.0pt 0cm"
align=left><SPAN style="COLOR: #003366"><?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman"
size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B
style="mso-bidi-font-weight: normal"><SPAN
style="COLOR: #003366; FONT-FAMILY: Verdana"><FONT
size=3>_____________________</FONT></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><B
style="mso-bidi-font-weight: normal"><SPAN
style="COLOR: #003366; FONT-FAMILY: Verdana"><FONT size=3>Lars
Rindorf<o:p></o:p></FONT></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: #003366; FONT-FAMILY: Verdana">Technology
consultant, Ph.D.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: #003366; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: #003366; FONT-FAMILY: Verdana">Mobile +45 7220
3367<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: #003366; FONT-FAMILY: Verdana"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B
style="mso-bidi-font-weight: normal"><SPAN
style="FONT-SIZE: 10pt; COLOR: #003366; FONT-FAMILY: Verdana">Surfaces and
microtechnology<o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Verdana">Danish Technological
Institute<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Verdana">Gregersensvej<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Verdana">2630
Taastrup<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Verdana">Denmark<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Verdana"><A
href="http://www.dti.dk/"><SPAN
style="COLOR: gray">http://www.dti.dk</SPAN></A><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: gray; FONT-FAMILY: Verdana">Phone +45 7220
2000<o:p></o:p></SPAN></P></FONT></DIV></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=968350209-24102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=968350209-24102008></SPAN></FONT> </DIV></BODY></HTML>