Fw: Calculating h-fields from the eigenvectors (check)

<[email protected]> Mon, 23 Mar 2015 15:11:19 +0000
Newsgroups gmane.comp.science.photonic-bands
Message-ID <[email protected]>
--_005_142712347899185414surreyacuk_
Content-Type: multipart/alternative;
	boundary="_000_142712347899185414surreyacuk_"

--_000_142712347899185414surreyacuk_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

?Hi,


I am running a check in MPB to make sure that I understand what the eigenve=
ctors, I have output, are. I figured the easiest check was to compare the h=
-fields generated by MPB to the h-fields that I recreated using the eigenve=
ctors that I output from the same simulation.

I have attached the matlab code (quick2.m) that I wrote to calculate the fi=
elds using the eigenvectors where "eigenvecs.dat" is generated by using "h5=
totxt" on the eigenvector output. I have also attached the .ctl file (first=
bs.ctl)

However, the fields I generate are completely different to the fields outpu=
t by MPB. Is there something I am misunderstanding in what the eigenvectors=
 are, how to make the G vectors or is there a trick you do that I have miss=
ed?

Thank you

Ross




--_000_142712347899185414surreyacuk_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"><!-- P {margin-top:0;margi=
n-bottom:0;} --></style>
</head>
<body dir=3D"ltr">
<div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt;color:#000000;back=
ground-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<div dir=3D"ltr" style=3D"color: rgb(33, 33, 33);">
<div>
<div id=3D"divtagdefaultwrapper" style=3D"font-size:12pt; color:#000000; ba=
ckground-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p style=3D"margin-top: 0px; margin-bottom: 0px;">&#8203;Hi,<br>
</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style=3D"margin-top: 0px; margin-bottom: 0px;">I am running a check in M=
PB to make sure that I understand what the eigenvectors, I have output, are=
. I figured the easiest check was to compare the h-fields generated by MPB =
to the h-fields that I recreated using
 the eigenvectors that I&nbsp;output from the same simulation.<br>
</p>
<div><br>
</div>
<div>I have attached the matlab code (quick2.m)&nbsp;that I wrote to calcul=
ate the fields using the eigenvectors where &quot;eigenvecs.dat&quot; is ge=
nerated by using &quot;h5totxt&quot; on the eigenvector output. I have also=
 attached the .ctl file (firstbs.ctl)<br>
</div>
<div><br>
</div>
<div>However, the fields I generate are completely different to the fields =
output by MPB. Is there something I am misunderstanding in what the eigenve=
ctors are,&nbsp;how to make the G vectors or is there a trick you do that I=
 have missed?<br>
</div>
<div><br>
</div>
<div>Thank you<br>
</div>
<div><br>
</div>
<div>Ross<br>
</div>
<div><br>
</div>
<div><br>
</div>
<p style=3D"margin-top: 0px; margin-bottom: 0px;"><br>
</p>
</div>
</div>
</div>
</div>
</body>
</html>

--_000_142712347899185414surreyacuk_--

--_005_142712347899185414surreyacuk_
Content-Type: application/octet-stream; name="firstbs.ctl"
Content-Description: firstbs.ctl
Content-Disposition: attachment; filename="firstbs.ctl"; size=1807;
	creation-date="Mon, 23 Mar 2015 14:58:11 GMT";
	modification-date="Mon, 23 Mar 2015 14:59:20 GMT"
Content-Transfer-Encoding: base64

KHNldCEgdG9sZXJhbmNlIDFlLTYpCihzZXQtcGFyYW0hIG1lc2gtc2l6ZSA1KQooc2V0LXBhcmFt
ISBudW0tYmFuZHMgMzApCihzZXQtcGFyYW0hIHJlc29sdXRpb24gMTYpCgooZGVmaW5lLXBhcmFt
IHNpemVVQyAxKQoKCihzZXQhIGdlb21ldHJ5LWxhdHRpY2UgKG1ha2UgbGF0dGljZSAKICAgKHNp
emUgc2l6ZVVDIHNpemVVQyBuby1zaXplKSA7IChzaXplIHggeSB6KQo7ICAgKGJhc2lzMSAxIDAp
CjsgICAoYmFzaXMyIDAgMSkKOyAgIChiYXNpczMgMCAwIDEpCikpCgoKKGRlZmluZS1wYXJhbSBl
cHNEaSAxMS41NikKKGRlZmluZS1wYXJhbSBlcHNCYW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AwKSkKCjsoZGVmaW5lIGhTeW1Q
b2ludHMgKGxpc3QgR2FtbWEgWEMgTUMgR2FtbWEpKQooZGVmaW5lIGhTeW1Qb2ludHMgKGxpc3Qg
R2FtbWEpKQooZGVmaW5lLXBhcmFtIGstaW50ZXJwIDEwKQoKKHNldCEgay1wb2ludHMgKGludGVy
cG9sYXRlIGstaW50ZXJwIGhTeW1Qb2ludHMpKSAKCihkZWZpbmUgT3V0cHV0RmlsZSAob3Blbi1v
dXRwdXQtZmlsZSAibWFnLmRhdCIpKQooZGVmaW5lIGtuZXcgKHZlY3RvcjMpKQooZGVmaW5lIGtv
bGQgKHZlY3RvcjMpKQooZGVmaW5lIGtkaWZmIDApCihkaXNwbGF5IGtkaWZmIE91dHB1dEZpbGUp
CihkaXNwbGF5ICJcbiIgT3V0cHV0RmlsZSkKOyhwcmludCAobGVuZ3RoIGstcG9pbnRzKSkKKGRv
ICgoaSAxICgrIGkgMSkpKSAoICg+IGkgKC0gKGxlbmd0aCBrLXBvaW50cykgMSkpKQogICAoc2V0
ISBrbmV3IChsaXN0LXJlZiBrLXBvaW50cyBpKSkKICAgKHNldCEga29sZCAobGlzdC1yZWYgay1w
b2ludHMgKC0gaSAxKSkpCiAgIChzZXQhIGtkaWZmICgrIGtkaWZmICh2ZWN0b3IzLW5vcm0gKHZl
Y3RvcjMtIGtuZXcga29sZCkpKSkKICAKICAgKGRpc3BsYXkga2RpZmYgT3V0cHV0RmlsZSkKICAg
KGRpc3BsYXkgIlxuIiBPdXRwdXRGaWxlKQopCgoocnVuLXRlKSAKKHJ1bi10ZSBvdXRwdXQtaGZp
ZWxkLXopCgooc2F2ZS1laWdlbnZlY3RvcnMgImVpZ2VudmVjcyIpCg==

--_005_142712347899185414surreyacuk_
Content-Type: text/x-objcsrc; name="quick2.m"
Content-Description: quick2.m
Content-Disposition: attachment; filename="quick2.m"; size=764;
	creation-date="Mon, 23 Mar 2015 14:58:23 GMT";
	modification-date="Mon, 23 Mar 2015 14:59:20 GMT"
Content-Transfer-Encoding: base64

Y2xlYXIgYWxsOwpsb2FkKCdlaWdlbnZlY3MuZGF0Jyk7CgphID0gWzEgMDsgMCAxXTsKYiA9IFsy
KnBpIDA7IDAgMipwaV07Cgpmb3IgaT0xOnNpemUoZWlnZW52ZWNzLDEpLzIKICAgIHRlbXAoaSw6
KSA9IGNvbXBsZXgoZWlnZW52ZWNzKDIqaS0xLDopLCBlaWdlbnZlY3MoMippLDopKTsKICAgIEVW
KGNlaWwoaS8yKSxhYnMobW9kKGksMiktMiksOikgPSB0ZW1wKGksOik7CmVuZAoKcmVzPWZsb29y
KHNxcnQoc2l6ZShFViwxKSkpOyBjb3VudCA9IDA7CmZvciBpPTE6cmVzCiAgICBmb3Igaj0xOnJl
cwogICAgICAgIGNvdW50ID0gY291bnQgKyAxOwogICAgICAgIHIoY291bnQsMSkgPSBpL3JlczsK
ICAgICAgICByKGNvdW50LDIpID0gai9yZXM7CiAgICBlbmQKZW5kCgpmb3IgaT0xOnNpemUociwx
KQogICAgRyhpLDopID0gYigxLDopKnIoaSwxKSArIGIoMiw6KSpyKGksMik7CmVuZAoKCmZvciBp
PTE6c2l6ZShyLDEpCiAgICBFKGkpID0gMDsKICAgIGZvciBqPTE6c2l6ZShHLCAxKQogICAgICAg
IEUoaSkgPSBFKGkpICsgRVYoaiwxLDIpKmV4cCgxaSpkb3QoRyhqLDopLCByKGksOikpKTsKICAg
IGVuZAplbmQKCmNvdW50ID0gMTsKZm9yIGk9MTpyZXMKICAgIGZvciBqPTE6cmVzCiAgICAgICAg
cmVzdWx0cyhpLGopID0gRShjb3VudCk7CiAgICAgICAgY291bnQgPSBjb3VudCArIDE7CiAgICBl
bmQKZW5kCgoKZmlndXJlOwpzdXJmKHJlYWwocmVzdWx0cyksICdFZGdlQ29sb3InLCdOb25lJyk7
CnZpZXcoMik7CiAgICAgICAgCiAgICA=

--_005_142712347899185414surreyacuk_
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
mpb-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss
--_005_142712347899185414surreyacuk_--