Page MenuHomec4science

particle_8hh_source.html
No OneTemporary

File Metadata

Created
Mon, Nov 11, 18:56

particle_8hh_source.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>particles: particle.hh Source File</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">particles
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- 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 class="header">
<div class="headertitle">
<div class="title">particle.hh</div> </div>
</div><!--header-->
<div class="contents">
<a href="particle_8hh.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#ifndef __PARTICLE__HH__</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#define __PARTICLE__HH__</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">/* -------------------------------------------------------------------------- */</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="vector_8hh.html">vector.hh</a>&quot;</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">/* -------------------------------------------------------------------------- */</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="class_particle.html"> 9</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_particle.html">Particle</a> {</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160; <span class="comment">/* ------------------------------------------------------------------------ */</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160; <span class="comment">/* Constructors/Destructors */</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160; <span class="comment">/* ------------------------------------------------------------------------ */</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; <span class="keyword">virtual</span> <a class="code" href="class_particle.html#a9d921eb3cc8673d98639bfc99c34da92">~Particle</a>() = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160; <span class="comment">// Accessors</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="class_particle.html#a5094a11840d0195e2e55c0c68ba4e361"> 20</a></span>&#160; <a class="code" href="my__types_8hh.html#a445a5f0e2a34c9d97d69a3c2d1957907">Real</a>&amp; <a class="code" href="class_particle.html#a5094a11840d0195e2e55c0c68ba4e361">getMass</a>() { <span class="keywordflow">return</span> <a class="code" href="class_particle.html#aedffc67eb6011a5a4e4bb28e81e3c0ab">mass</a>; }</div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="class_particle.html#a7455a9d0300e5f09e83f58075287851f"> 22</a></span>&#160; <a class="code" href="class_vector.html">Vector</a>&amp; <a class="code" href="class_particle.html#a7455a9d0300e5f09e83f58075287851f">getPosition</a>() { <span class="keywordflow">return</span> <a class="code" href="class_particle.html#ac8ef1b0be3ed1723709b9fdcf65e3651">position</a>; }</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="class_particle.html#a43b7c349070acca9475af2e9b60a1d2f"> 24</a></span>&#160; <a class="code" href="class_vector.html">Vector</a>&amp; <a class="code" href="class_particle.html#a43b7c349070acca9475af2e9b60a1d2f">getForce</a>() { <span class="keywordflow">return</span> <a class="code" href="class_particle.html#ac536fd14c0d9f335be940c183e73135e">force</a>; }</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="class_particle.html#a36feccd3bd3028570fc0bce3afb19d06"> 26</a></span>&#160; <a class="code" href="class_vector.html">Vector</a>&amp; <a class="code" href="class_particle.html#a36feccd3bd3028570fc0bce3afb19d06">getVelocity</a>() { <span class="keywordflow">return</span> <a class="code" href="class_particle.html#a32ff566d7b7c4749052dec7efbf3b72f">velocity</a>; }</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; <span class="comment">// I/O functions</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_particle.html#a6d5e86940fe0cdc37ad1ffbac34420b6">printself</a>(std::ostream&amp; stream) <span class="keyword">const</span>;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_particle.html#a727da6db62846b7209fb38cc74b2908a">initself</a>(std::istream&amp; sstr);</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="comment">// Members</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="class_particle.html#aedffc67eb6011a5a4e4bb28e81e3c0ab"> 38</a></span>&#160; <a class="code" href="my__types_8hh.html#a445a5f0e2a34c9d97d69a3c2d1957907">Real</a> <a class="code" href="class_particle.html#aedffc67eb6011a5a4e4bb28e81e3c0ab">mass</a>;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="class_particle.html#a32ff566d7b7c4749052dec7efbf3b72f"> 39</a></span>&#160; <a class="code" href="class_vector.html">Vector</a> <a class="code" href="class_particle.html#ac8ef1b0be3ed1723709b9fdcf65e3651">position</a>, <a class="code" href="class_particle.html#ac536fd14c0d9f335be940c183e73135e">force</a>, <a class="code" href="class_particle.html#a32ff566d7b7c4749052dec7efbf3b72f">velocity</a>;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;};</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="comment">/* -------------------------------------------------------------------------- */</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="preprocessor">#endif //__PARTICLE__HH__</span></div><div class="ttc" id="class_particle_html_ac8ef1b0be3ed1723709b9fdcf65e3651"><div class="ttname"><a href="class_particle.html#ac8ef1b0be3ed1723709b9fdcf65e3651">Particle::position</a></div><div class="ttdeci">Vector position</div><div class="ttdef"><b>Definition:</b> particle.hh:39</div></div>
<div class="ttc" id="class_particle_html_a36feccd3bd3028570fc0bce3afb19d06"><div class="ttname"><a href="class_particle.html#a36feccd3bd3028570fc0bce3afb19d06">Particle::getVelocity</a></div><div class="ttdeci">Vector &amp; getVelocity()</div><div class="ttdoc">Get velocity. </div><div class="ttdef"><b>Definition:</b> particle.hh:26</div></div>
<div class="ttc" id="class_particle_html"><div class="ttname"><a href="class_particle.html">Particle</a></div><div class="ttdoc">Particle base class. </div><div class="ttdef"><b>Definition:</b> particle.hh:9</div></div>
<div class="ttc" id="vector_8hh_html"><div class="ttname"><a href="vector_8hh.html">vector.hh</a></div></div>
<div class="ttc" id="class_particle_html_a9d921eb3cc8673d98639bfc99c34da92"><div class="ttname"><a href="class_particle.html#a9d921eb3cc8673d98639bfc99c34da92">Particle::~Particle</a></div><div class="ttdeci">virtual ~Particle()=default</div><div class="ttdoc">Default destructor (virtual because of virtual functions in this class) </div></div>
<div class="ttc" id="class_particle_html_a5094a11840d0195e2e55c0c68ba4e361"><div class="ttname"><a href="class_particle.html#a5094a11840d0195e2e55c0c68ba4e361">Particle::getMass</a></div><div class="ttdeci">Real &amp; getMass()</div><div class="ttdoc">Get mass. </div><div class="ttdef"><b>Definition:</b> particle.hh:20</div></div>
<div class="ttc" id="class_particle_html_a727da6db62846b7209fb38cc74b2908a"><div class="ttname"><a href="class_particle.html#a727da6db62846b7209fb38cc74b2908a">Particle::initself</a></div><div class="ttdeci">virtual void initself(std::istream &amp;sstr)</div><div class="ttdoc">function to initilize values from input files </div><div class="ttdef"><b>Definition:</b> particle.cc:8</div></div>
<div class="ttc" id="my__types_8hh_html_a445a5f0e2a34c9d97d69a3c2d1957907"><div class="ttname"><a href="my__types_8hh.html#a445a5f0e2a34c9d97d69a3c2d1957907">Real</a></div><div class="ttdeci">double Real</div><div class="ttdef"><b>Definition:</b> my_types.hh:8</div></div>
<div class="ttc" id="class_particle_html_aedffc67eb6011a5a4e4bb28e81e3c0ab"><div class="ttname"><a href="class_particle.html#aedffc67eb6011a5a4e4bb28e81e3c0ab">Particle::mass</a></div><div class="ttdeci">Real mass</div><div class="ttdef"><b>Definition:</b> particle.hh:38</div></div>
<div class="ttc" id="class_particle_html_a7455a9d0300e5f09e83f58075287851f"><div class="ttname"><a href="class_particle.html#a7455a9d0300e5f09e83f58075287851f">Particle::getPosition</a></div><div class="ttdeci">Vector &amp; getPosition()</div><div class="ttdoc">Get position. </div><div class="ttdef"><b>Definition:</b> particle.hh:22</div></div>
<div class="ttc" id="class_particle_html_a32ff566d7b7c4749052dec7efbf3b72f"><div class="ttname"><a href="class_particle.html#a32ff566d7b7c4749052dec7efbf3b72f">Particle::velocity</a></div><div class="ttdeci">Vector velocity</div><div class="ttdef"><b>Definition:</b> particle.hh:39</div></div>
<div class="ttc" id="class_particle_html_a43b7c349070acca9475af2e9b60a1d2f"><div class="ttname"><a href="class_particle.html#a43b7c349070acca9475af2e9b60a1d2f">Particle::getForce</a></div><div class="ttdeci">Vector &amp; getForce()</div><div class="ttdoc">Get force. </div><div class="ttdef"><b>Definition:</b> particle.hh:24</div></div>
<div class="ttc" id="class_vector_html"><div class="ttname"><a href="class_vector.html">Vector</a></div><div class="ttdoc">3D Vector class </div><div class="ttdef"><b>Definition:</b> vector.hh:14</div></div>
<div class="ttc" id="class_particle_html_ac536fd14c0d9f335be940c183e73135e"><div class="ttname"><a href="class_particle.html#ac536fd14c0d9f335be940c183e73135e">Particle::force</a></div><div class="ttdeci">Vector force</div><div class="ttdef"><b>Definition:</b> particle.hh:39</div></div>
<div class="ttc" id="class_particle_html_a6d5e86940fe0cdc37ad1ffbac34420b6"><div class="ttname"><a href="class_particle.html#a6d5e86940fe0cdc37ad1ffbac34420b6">Particle::printself</a></div><div class="ttdeci">virtual void printself(std::ostream &amp;stream) const</div><div class="ttdoc">function to print the content of the class </div><div class="ttdef"><b>Definition:</b> particle.cc:3</div></div>
</div><!-- fragment --></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.13
</small></address>
</body>
</html>

Event Timeline