<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tinowagner.com // Blog &#187; Magnetpendel</title>
	<atom:link href="http://blog.tinowagner.com/tag/magnetpendel/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tinowagner.com</link>
	<description>Dies und das.</description>
	<lastBuildDate>Wed, 25 Nov 2009 00:44:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Magnetic pendulum, the OpenCL way.</title>
		<link>http://blog.tinowagner.com/2009/11/23/magnetic-pendulum-the-opencl-way/</link>
		<comments>http://blog.tinowagner.com/2009/11/23/magnetic-pendulum-the-opencl-way/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 18:48:21 +0000</pubDate>
		<dc:creator>Tino Wagner</dc:creator>
				<category><![CDATA[Allgemein]]></category>
		<category><![CDATA[Physik]]></category>
		<category><![CDATA[Programmieren]]></category>
		<category><![CDATA[magnetic pendulum]]></category>
		<category><![CDATA[Magnetpendel]]></category>
		<category><![CDATA[OpenCL]]></category>

		<guid isPermaLink="false">http://blog.tinowagner.com/?p=70</guid>
		<description><![CDATA[For the last couple of days I did some effort on porting my Python implementation of a magnetic pendulum (German post here, the slides include lots of pictures) to OpenCL. It&#8217;s really cool to leverage GPU power for your own benefit.
If you&#8217;d like to see code rather than words, you should come around at my [...]]]></description>
			<content:encoded><![CDATA[<p>For the last couple of days I did some effort on porting my Python implementation of a <a href="http://www.inf.ethz.ch/personal/muellren/pendulum/index.html">magnetic pendulum</a> (German post <a href="http://blog.tinowagner.com/2009/07/13/das-magnetpendel/">here</a>, the <a href="http://tinowagner.com/projekte/magnetic_pendulum/vortrag_short-web.pdf">slides</a> include lots of pictures) to <a href="http://en.wikipedia.org/wiki/OpenCL">OpenCL</a>. It&#8217;s really cool to leverage <span class="caps">GPU</span> power for your own benefit.</p>
<p>If you&#8217;d like to see code rather than words, you should <a href="http://github.com/tuxu/magnetic_pendulum">come around at my Git repository</a>. Just to quote from the <a href="http://github.com/tuxu/magnetic_pendulum/blob/master/README">README</a> file:</p>
<blockquote><p>
This is an implementation of a magnetic pendulum in OpenCL. A spherical pendulum is influenced by magnets. For every point of origin the program finds the magnet the pendulum&#8217;s body will be nearest when it comes to rest (friction is taken into account). It will create an image, where every pixel (points in the <img src="http://blog.tinowagner.com/wp-content/cache/tex_1ed346930917426bc46d41e22cc525ec.png" align="absmiddle" class="tex" alt="\phi" />-<img src="http://blog.tinowagner.com/wp-content/cache/tex_2554a2bb846cffd697389e5dc8912759.png" align="absmiddle" class="tex" alt="\theta" />-plane) is mapped to a color representing each magnet.</p>
<p>The problem is ideally suited for parallel computing as every initial condition can be solved independently from the others. I did a Python version some time ago that utilized Scipy. Although it was quite optimized with C code, it performed very bad. To create a map of 1600&#215;1600 pixels, it took about 2700 minutes! Leveraging the power hidden in GPUs, I wanted to know what speed-up would be reached.</p>
<p>The code works quite good so far. I began coding a <span class="caps">CPU</span> version in C that is a lot faster than the original Python version, but even my decent <span class="caps">GPU</span> outperforms that by a factor of ten. The map from above can now be done in 284 seconds. That is seconds, not minutes! <img src='http://blog.tinowagner.com/wp-content/plugins/smilies-themer/Silk/emoticon_smile.png' alt=':-)' class='wp-smiley' /> </p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.tinowagner.com/2009/11/23/magnetic-pendulum-the-opencl-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Das Magnetpendel</title>
		<link>http://blog.tinowagner.com/2009/07/13/das-magnetpendel/</link>
		<comments>http://blog.tinowagner.com/2009/07/13/das-magnetpendel/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 18:08:18 +0000</pubDate>
		<dc:creator>Tino Wagner</dc:creator>
				<category><![CDATA[Physik]]></category>
		<category><![CDATA[Programmieren]]></category>
		<category><![CDATA[Magnetpendel]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.tinowagner.com/?p=50</guid>
		<description><![CDATA[Als Projektarbeit f&#252;r Computational Physics habe ich ein Magnetpendel programmiert. Geschrieben in Python mit wxWidgets und Pyglet, parallelisiert mit IPython.

Pr&#228;sentation des Projekts: PDF (Kurzfassung, 1 MB), PDF (Langfassung mit weiteren Fraktalen, 14 MB)
Dokumentation: hier
Quelltext


]]></description>
			<content:encoded><![CDATA[<a rel="lightbox" href="http://tinowagner.com/projekte/magnetic_pendulum/screen.jpg"><img title="Screenshot des Magnetpendels" src="http://tinowagner.com/projekte/magnetic_pendulum/screen.jpg" alt="Screenshot des Magnetpendels" width="400" height="248" /></a>
<a rel="lightbox" href="http://tinowagner.com/projekte/magnetic_pendulum/map.png"><img title="Beispiel f&#252;r eine berechnete Karte" src="http://tinowagner.com/projekte/magnetic_pendulum/map.png" alt="Beispiel f&#252;r eine berechnete Karte" width="200" height="200" /></a>
<p>Als Projektarbeit f&#252;r <a title="Computational Physics" href="http://www.comp-phys.tu-dresden.de/cp2009/">Computational Physics</a> habe ich ein <a title="Magnetpendel" href="http://de.wikipedia.org/wiki/Magnetpendel">Magnetpendel</a> programmiert. Geschrieben in Python mit wxWidgets und <a href="http://pyglet.org/">Pyglet</a>, parallelisiert mit <a title="IPython" href="http://ipython.scipy.org/doc/stable/html/parallel/index.html">IPython</a>.</p>
<ul>
<li>Pr&#228;sentation des Projekts: <a title="Kurzfassung" href="http://tinowagner.com/projekte/magnetic_pendulum/vortrag_short-web.pdf">PDF</a> (Kurzfassung, 1 MB), <a title="Langfassung" href="http://tinowagner.com/projekte/magnetic_pendulum/vortrag.pdf">PDF</a> (Langfassung mit weiteren Fraktalen, 14 MB)</li>
<li>Dokumentation: <a href="http://tinowagner.com/projekte/magnetic_pendulum/docs/">hier</a></li>
<li><a title="Quelltext" href="http://tinowagner.com/projekte/magnetic_pendulum/magnetic_pendulum-src.zip">Quelltext</a></li>
<p>
</ul></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tinowagner.com/2009/07/13/das-magnetpendel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
