Page MenuHomec4science

classTree_1_1Particle.html
No OneTemporary

File Metadata

Created
Sun, Nov 24, 20:43

classTree_1_1Particle.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PHPC - nBody project: Tree::Particle&lt; Type &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">PHPC - nBody project
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespaceTree.html">Tree</a></li><li class="navelem"><a class="el" href="classTree_1_1Particle.html">Particle</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classTree_1_1Particle-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Tree::Particle&lt; Type &gt; Class Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include &lt;<a class="el" href="Particle_8hpp_source.html">Particle.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Tree::Particle&lt; Type &gt;:</div>
<div class="dyncontent">
<div class="center">
<img src="classTree_1_1Particle.png" usemap="#Tree::Particle_3C_20Type_20_3E_map" alt=""/>
<map id="Tree::Particle_3C_20Type_20_3E_map" name="Tree::Particle_3C_20Type_20_3E_map">
<area href="classTree_1_1AbstractType.html" alt="Tree::AbstractType&lt; Type &gt;" shape="rect" coords="0,0,171,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acf5241af5d99f4c9fc7a5108f682b583"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTree_1_1Particle.html#acf5241af5d99f4c9fc7a5108f682b583">Particle</a> (float mass=0.0f, Type pos=Type())</td></tr>
<tr class="separator:acf5241af5d99f4c9fc7a5108f682b583"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeedd281f281bf492314624f5d22e3e4f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTree_1_1Particle.html#aeedd281f281bf492314624f5d22e3e4f">~Particle</a> ()=default</td></tr>
<tr class="separator:aeedd281f281bf492314624f5d22e3e4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e9ca29ec750d707066e95318554928f"><td class="memItemLeft" align="right" valign="top">Type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTree_1_1Particle.html#a9e9ca29ec750d707066e95318554928f">get</a> (property p) override</td></tr>
<tr class="separator:a9e9ca29ec750d707066e95318554928f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68961ce42ef677f22eadcd528b86ef6c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTree_1_1Particle.html#a68961ce42ef677f22eadcd528b86ef6c">set</a> (property p, Type vec) override</td></tr>
<tr class="separator:a68961ce42ef677f22eadcd528b86ef6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4750d1d5cfcd897d9d63379a206483e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTree_1_1Particle.html#ae4750d1d5cfcd897d9d63379a206483e">update_vel_pos</a> () override</td></tr>
<tr class="separator:ae4750d1d5cfcd897d9d63379a206483e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeefc278f82fed8e7681c20fc5def377e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTree_1_1Particle.html#aeefc278f82fed8e7681c20fc5def377e">is_out_boundaries</a> (Type dim)</td></tr>
<tr class="separator:aeefc278f82fed8e7681c20fc5def377e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classTree_1_1AbstractType"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classTree_1_1AbstractType')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classTree_1_1AbstractType.html">Tree::AbstractType&lt; Type &gt;</a></td></tr>
<tr class="memitem:a3f42f3bf35d312a797cb37167abe3f10 inherit pub_methods_classTree_1_1AbstractType"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTree_1_1AbstractType.html#a3f42f3bf35d312a797cb37167abe3f10">~AbstractType</a> ()=default</td></tr>
<tr class="separator:a3f42f3bf35d312a797cb37167abe3f10 inherit pub_methods_classTree_1_1AbstractType"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8792b9ec4e213a6193cd80abaae7d19 inherit pub_methods_classTree_1_1AbstractType"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTree_1_1AbstractType.html#af8792b9ec4e213a6193cd80abaae7d19">get_mass</a> ()</td></tr>
<tr class="separator:af8792b9ec4e213a6193cd80abaae7d19 inherit pub_methods_classTree_1_1AbstractType"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54e536377689eeb5eefdc77e31281e1b inherit pub_methods_classTree_1_1AbstractType"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTree_1_1AbstractType.html#a54e536377689eeb5eefdc77e31281e1b">set_mass</a> (float mass)</td></tr>
<tr class="separator:a54e536377689eeb5eefdc77e31281e1b inherit pub_methods_classTree_1_1AbstractType"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_attribs_classTree_1_1AbstractType"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classTree_1_1AbstractType')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classTree_1_1AbstractType.html">Tree::AbstractType&lt; Type &gt;</a></td></tr>
<tr class="memitem:a20e5b9f34790c59de432feaea5a56972 inherit pro_attribs_classTree_1_1AbstractType"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTree_1_1AbstractType.html#a20e5b9f34790c59de432feaea5a56972">_m</a> = 0.0f</td></tr>
<tr class="separator:a20e5b9f34790c59de432feaea5a56972 inherit pro_attribs_classTree_1_1AbstractType"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename Type&gt;<br />
class Tree::Particle&lt; Type &gt;</h3>
<p>Class <a class="el" href="classTree_1_1Particle.html">Particle</a>, to store all the information of a given particle.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Type</td><td>of the vector, 2D or 3D (and int, float, etc ...) </td></tr>
</table>
</dd>
</dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="acf5241af5d99f4c9fc7a5108f682b583"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf5241af5d99f4c9fc7a5108f682b583">&#9670;&nbsp;</a></span>Particle()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classTree_1_1Particle.html">Tree::Particle</a>&lt; Type &gt;::<a class="el" href="classTree_1_1Particle.html">Particle</a> </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>mass</em> = <code>0.0f</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Type&#160;</td>
<td class="paramname"><em>pos</em> = <code>Type()</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor to create a particle. All the member variables have defaults zero values if needed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">mass</td><td>of the given particle, in float </td></tr>
<tr><td class="paramname">pos</td><td>vector of the given particle </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aeedd281f281bf492314624f5d22e3e4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeedd281f281bf492314624f5d22e3e4f">&#9670;&nbsp;</a></span>~Particle()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classTree_1_1Particle.html">Tree::Particle</a>&lt; Type &gt;::~<a class="el" href="classTree_1_1Particle.html">Particle</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor to safely delete a given particle. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a9e9ca29ec750d707066e95318554928f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e9ca29ec750d707066e95318554928f">&#9670;&nbsp;</a></span>get()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">Type <a class="el" href="classTree_1_1Particle.html">Tree::Particle</a>&lt; Type &gt;::get </td>
<td>(</td>
<td class="paramtype">property&#160;</td>
<td class="paramname"><em>p</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return one of the following attribute of the given particle :</p><ul>
<li>position</li>
<li>velocity</li>
<li>load</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>enum value of the attribute </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>desired attribute of the given particle </dd></dl>
<p>Implements <a class="el" href="classTree_1_1AbstractType.html#aa341d843f7ebfc7fb3f5383827e50712">Tree::AbstractType&lt; Type &gt;</a>.</p>
</div>
</div>
<a id="aeefc278f82fed8e7681c20fc5def377e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeefc278f82fed8e7681c20fc5def377e">&#9670;&nbsp;</a></span>is_out_boundaries()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool <a class="el" href="classTree_1_1Particle.html">Tree::Particle</a>&lt; Type &gt;::is_out_boundaries </td>
<td>(</td>
<td class="paramtype">Type&#160;</td>
<td class="paramname"><em>dim</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Test if a given particle is out of the overall area and return true if it is the case, false otherwise.</p>
<dl class="section return"><dt>Returns</dt><dd>true if particle out of its boundaries, false otherwise </dd></dl>
<p>Reimplemented from <a class="el" href="classTree_1_1AbstractType.html#aa463dc8eaeccfc90c5b63c59aa113924">Tree::AbstractType&lt; Type &gt;</a>.</p>
</div>
</div>
<a id="a68961ce42ef677f22eadcd528b86ef6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68961ce42ef677f22eadcd528b86ef6c">&#9670;&nbsp;</a></span>set()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classTree_1_1Particle.html">Tree::Particle</a>&lt; Type &gt;::set </td>
<td>(</td>
<td class="paramtype">property&#160;</td>
<td class="paramname"><em>p</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Type&#160;</td>
<td class="paramname"><em>vec</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set attribute value of one of the following attribute for a given particle :</p><ul>
<li>position</li>
<li>velocity</li>
<li>load</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">p</td><td>enum value of the attribute </td></tr>
<tr><td class="paramname">vec</td><td>new vector value to set the attribute </td></tr>
</table>
</dd>
</dl>
<p>Reimplemented from <a class="el" href="classTree_1_1AbstractType.html#a6f30d2de6725088207b9d5fbd49e07d8">Tree::AbstractType&lt; Type &gt;</a>.</p>
</div>
</div>
<a id="ae4750d1d5cfcd897d9d63379a206483e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4750d1d5cfcd897d9d63379a206483e">&#9670;&nbsp;</a></span>update_vel_pos()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Type &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="classTree_1_1Particle.html">Tree::Particle</a>&lt; Type &gt;::update_vel_pos </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Update velocity and position of a given particle for a given load on it. Reset load after update. </p>
<p>Reimplemented from <a class="el" href="classTree_1_1AbstractType.html#a0160d586d64c6031dac5dc412f01b73d">Tree::AbstractType&lt; Type &gt;</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/media/lmunier/Data/EPFL/Master/2eme_annee/Semestre_2/Parallel_and_High_Performance_Computing/phpc_submit_nbody/src/<a class="el" href="Particle_8hpp_source.html">Particle.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>

Event Timeline