<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Benedikt!<br>
AFAIK this should work.<br>
Best,<br>
Oliver<br>
<br>
Am 06.01.2011 15:16, schrieb Benedikt Oswald:
<blockquote cite="mid:2B4D3BD7-9EB2-42A4-906F-EF0388EE45C5@psi.ch"
type="cite">
<div>Dear Dune, what will happen when I use a code sequence like this:</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><span
style="color: rgb(0, 0, 0);">Dune::</span>FieldVector<span
style="color: rgb(0, 0, 0);"><</span>std::complex<double><span
style="color: rgb(0, 0, 0);">,3> electricField</span></div>
</div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><font
class="Apple-style-span" color="#000000"><br>
</font></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><font
class="Apple-style-span" color="#000000">then assign some values to
the vector's components and</font></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><font
class="Apple-style-span" color="#000000">eventually calculate the
two_norm of the vector like this:</font></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><font
class="Apple-style-span" color="#000000"><br>
</font></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><font
class="Apple-style-span" color="#000000">double length = </font><span
class="Apple-style-span" style="color: rgb(0, 0, 0);">electricField.two_norm();</span></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><span
class="Apple-style-span" style="color: rgb(0, 0, 0);"><br>
</span></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><span
class="Apple-style-span" style="color: rgb(0, 0, 0);"><br>
</span></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><span
class="Apple-style-span" style="color: rgb(0, 0, 0);">Will this
correctly evaluate ?</span></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><span
class="Apple-style-span" style="color: rgb(0, 0, 0);"><br>
</span></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><span
class="Apple-style-span" style="color: rgb(0, 0, 0);"><br>
</span></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><span
class="Apple-style-span" style="color: rgb(0, 0, 0);">Thanks for
having a look and greetings, Benedikt</span></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><span
class="Apple-style-span" style="color: rgb(0, 0, 0);"><br>
</span></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><font
class="Apple-style-span" color="#000000"><br>
</font></div>
<div
style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; color: rgb(5, 97, 66);"><font
class="Apple-style-span" color="#000000"><br>
</font></div>
<div><br>
</div>
<br>
<div>
<div style="word-wrap: break-word;">
<div>
<div>--------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
<div>Benedikt Oswald, Dr. sc. techn., dipl. El. Ing. ETH, <a
moz-do-not-send="true" href="http://www.psi.ch">www.psi.ch</a>,
Computational Accelerator Scientist, <a moz-do-not-send="true"
href="http://amas.web.psi.ch">http://amas.web.psi.ch</a></div>
<div>Paul Scherrer Institute (PSI), CH-5232 Villigen, Suisse, <a
moz-do-not-send="true" href="mailto:benedikt.oswald@psi.ch">benedikt.oswald@psi.ch</a>,
+41(0)56 310 32 12</div>
<div><br>
</div>
<div>"Passion is required for any great work, and for the
revolution passion and audacity are required in big doses.",<br>
Ernesto 'Che' Guevara, Letter to his parents.<br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>
</div>
</div>
</div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Dune mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Dune@dune-project.org">Dune@dune-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.dune-project.org/mailman/listinfo/dune">http://lists.dune-project.org/mailman/listinfo/dune</a>
</pre>
</blockquote>
<br>
</body>
</html>