[Dune] Field Vector with K = std::complex<double> ?

Oliver Sander sander at mi.fu-berlin.de
Tue Jan 11 13:59:30 CET 2011


Hi Benedikt!
If you really want to know what the code does then go and read it.
It's just C++ after all.  I wouldn't do anything else at this point either.
--
Oliver

Am 11.01.2011 13:56, schrieb Benedikt Oswald:
> Hi Oliver, thanks...but:
>
> when I read the documentation for the method two_norm() it says that 
> it calculates
> the square root of the sum of the square of the elements, but for a 
> complex vector
> one would require that the method calculates the square root over the 
> sum of
> the element times its complex conjugate ?
>
> what do you think on this ?
>
> Greetings, Benedikt
>
>
>
> On Jan 7, 2011, at 4:36 PM, Oliver Sander wrote:
>
>> Hi Benedikt!
>> AFAIK this should work.
>> Best,
>> Oliver
>>
>> Am 06.01.2011 15:16, schrieb Benedikt Oswald:
>>> Dear Dune, what will happen when I use a code sequence like this:
>>>
>>>
>>> Dune::FieldVector<std::complex<double>,3> electricField
>>>
>>> then assign some values to the vector's components and
>>> eventually calculate the two_norm of the vector like this:
>>>
>>> double length = electricField.two_norm();
>>>
>>>
>>> Will this correctly evaluate ?
>>>
>>>
>>> Thanks for having a look and greetings, Benedikt
>>>
>>>
>>>
>>>
>>>
>>> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>> Benedikt Oswald, Dr. sc. techn., dipl. El. Ing. ETH, www.psi.ch 
>>> <http://www.psi.ch/>, Computational Accelerator Scientist, 
>>> http://amas.web.psi.ch <http://amas.web.psi.ch/>
>>> Paul Scherrer  Institute (PSI), CH-5232 Villigen, Suisse, 
>>> benedikt.oswald at psi.ch <mailto:benedikt.oswald at psi.ch>, +41(0)56 310 
>>> 32 12
>>>
>>> "Passion is required for any great work, and for the 
>>> revolution passion and audacity are required in big doses.",
>>>  Ernesto 'Che' Guevara, Letter to his parents.
>>> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
>>>
>>>
>>> _______________________________________________
>>> Dune mailing list
>>> Dune at dune-project.org
>>> http://lists.dune-project.org/mailman/listinfo/dune
>>>    
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org <mailto:Dune at dune-project.org>
>> http://lists.dune-project.org/mailman/listinfo/dune
>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Benedikt Oswald, Dr. sc. techn., dipl. El. Ing. ETH, www.psi.ch 
> <http://www.psi.ch>, Computational Accelerator Scientist, 
> http://amas.web.psi.ch
> Paul Scherrer  Institute (PSI), CH-5232 Villigen, Suisse, 
> benedikt.oswald at psi.ch <mailto:benedikt.oswald at psi.ch>, +41(0)56 310 32 12
>
> "Passion is required for any great work, and for the 
> revolution passion and audacity are required in big doses.",
>  Ernesto 'Che' Guevara, Letter to his parents.
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20110111/7581b50a/attachment.htm>


More information about the Dune mailing list