Update docs
This commit is contained in:
@@ -105,8 +105,6 @@ $(document).ready(function(){initNavTree('IsingModel_8cpp.html',''); initResizab
|
||||
<p>The implementation of the Ising model.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include "<a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>"</code><br />
|
||||
<code>#include <cmath></code><br />
|
||||
<code>#include <random></code><br />
|
||||
</div>
|
||||
<p><a href="IsingModel_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
@@ -115,7 +113,7 @@ $(document).ready(function(){initNavTree('IsingModel_8cpp.html',''); initResizab
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<dl class="section version"><dt>Version</dt><dd>0.1</dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000009">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000003">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
</div></div><!-- contents -->
|
||||
|
||||
@@ -101,157 +101,175 @@ $(document).ready(function(){initNavTree('IsingModel_8cpp_source.html',''); init
|
||||
<div class="headertitle"><div class="title">IsingModel.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="IsingModel_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include "<a class="code" href="IsingModel_8hpp.html">IsingModel.hpp</a>"</span></div>
|
||||
<a href="IsingModel_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/** @file IsingModel.cpp</span></div>
|
||||
<div class="line"><span class="lineno"> 2</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 3</span><span class="comment"> * @author Cory Alexander Balaton (coryab)</span></div>
|
||||
<div class="line"><span class="lineno"> 4</span><span class="comment"> * @author Janita Ovidie Sandtrøen Willumsen (janitaws)</span></div>
|
||||
<div class="line"><span class="lineno"> 5</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 6</span><span class="comment"> * @version 0.1</span></div>
|
||||
<div class="line"><span class="lineno"> 7</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 8</span><span class="comment"> * @brief The implementation of the Ising model</span></div>
|
||||
<div class="line"><span class="lineno"> 9</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 10</span><span class="comment"> * @bug No known bugs</span></div>
|
||||
<div class="line"><span class="lineno"> 11</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="IsingModel_8hpp.html" title="The definition of the Ising model.">"IsingModel.hpp"</a></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include <cmath></span></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include <random></span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864"> 17</a></span><a class="code hl_function" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel::IsingModel</a>()</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span>{</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span>}</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5"> 21</a></span><a class="code hl_function" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel::IsingModel</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T)</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span>{</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> this->L = <a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>;</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> this->T = <a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a>;</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> this-><a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">initialize_lattice</a>();</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> this-><a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">initialize_neighbors</a>();</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> this-><a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">initialize_energy_diff</a>();</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> this-><a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">initialize_magnetization</a>();</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> this-><a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">initialize_energy</a>();</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span>}</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15"> 32</a></span><a class="code hl_function" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel::IsingModel</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T, <span class="keywordtype">int</span> val)</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span>{</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> this->L = <a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>;</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> this->T = <a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a>;</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>.set_size(this->L, this->L);</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>.fill(val);</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> this-><a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">initialize_neighbors</a>();</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> this-><a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">initialize_energy_diff</a>();</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> this-><a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">initialize_magnetization</a>();</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> this-><a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">initialize_energy</a>();</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span>}</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a"> 44</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">IsingModel::initialize_lattice</a>()</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span>{</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>.set_size(this-><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>, this-><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>);</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> std::random_device rd{};</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> std::mt19937 engine{rd()};</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> std::uniform_int_distribution<> coin_flip(0, 1);</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>.n_elem; i++)</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>(i) = 2 * coin_flip(engine) - 1;</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span>}</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="classIsingModel.html#a6776109105051597c275670dabd0054a"> 56</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">IsingModel::initialize_neighbors</a>()</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>{</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> this-><a class="code hl_variable" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a>.set_size(this-><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>, 2);</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="comment">// Having i as a signed integer is necessary in this case.</span></div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < (int)this-><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>; i++) {</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> this-><a class="code hl_variable" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a>(i, UP) = INDEX(i - 1, this-><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>);</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> this-><a class="code hl_variable" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a>(i, DOWN) = INDEX(i + 1, this-><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>);</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> }</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"><a class="line" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864"> 14</a></span><a class="code hl_class" href="classIsingModel.html">IsingModel</a>::<a class="code hl_function" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel</a>()</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span>{</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">-></a><a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">initialize_engine</a><a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">(</a><a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">)</a>;</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>}</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5"> 19</a></span><a class="code hl_class" href="classIsingModel.html">IsingModel</a>::<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">IsingModel</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T)</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span>{</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">-></a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a> = L;</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">-></a><a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a> = T;</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">-></a><a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">initialize_engine</a><a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">(</a><a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">)</a>;</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">-></a><a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">initialize_lattice</a><a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">(</a><a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">)</a>;</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">-></a><a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">initialize_neighbors</a><a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">(</a><a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">)</a>;</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">-></a><a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">initialize_energy_diff</a><a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">(</a><a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">)</a>;</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">-></a><a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">initialize_magnetization</a><a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">(</a><a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">)</a>;</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">-></a><a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">initialize_energy</a><a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">(</a><a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">)</a>;</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>}</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15"> 31</a></span><a class="code hl_class" href="classIsingModel.html">IsingModel</a>::<a class="code hl_function" href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15">IsingModel</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T, <span class="keywordtype">int</span> val)</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>{</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">-></a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a> = L;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">-></a><a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a> = T;</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">-></a><a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">initialize_engine</a><a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">(</a><a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">)</a>;</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78">-></a><a class="code hl_function" href="classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78">initialize_lattice</a><a class="code hl_function" href="classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78">(</a>val<a class="code hl_function" href="classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78">)</a>;</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">-></a><a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">initialize_neighbors</a><a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">(</a><a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">)</a>;</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">-></a><a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">initialize_energy_diff</a><a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">(</a><a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">)</a>;</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">-></a><a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">initialize_magnetization</a><a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">(</a><a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">)</a>;</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">-></a><a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">initialize_energy</a><a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">(</a><a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">)</a>;</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span>}</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5"> 43</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a>::<a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">initialize_engine</a>()</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span>{</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> std::random_device rd{};</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">-></a><a class="code hl_variable" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">engine</a> = std::mt19937{rd()};</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>}</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a"> 49</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a>::<a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">initialize_lattice</a>()</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span>{</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keyword">this</span>->lattice.set_size(<span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">-></a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>, <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">-></a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>);</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> std::uniform_int_distribution<> coin_flip(0, 1);</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">for</span> (size_t i = 0; i < <span class="keyword">this</span>->lattice.n_elem; i++)</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">this</span>->lattice(i) = 2 * coin_flip(<span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">-></a><a class="code hl_variable" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">engine</a>) - 1;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>}</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78"> 59</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a>::<a class="code hl_function" href="classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78">initialize_lattice</a>(<span class="keywordtype">int</span> val)</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span>{</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// If val is neither 1 or -1, then initialize random values.</span></div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">if</span> (val != 1 && val != -1) {</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keyword">this</span><a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">-></a><a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">initialize_lattice</a><a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">(</a><a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">)</a>;</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> }</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4"> 67</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">IsingModel::initialize_energy_diff</a>()</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span>{</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = -8; i <= 8; i += 4) {</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> this-><a class="code hl_variable" href="classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd">energy_diff</a>.insert({i, std::exp(-(<span class="keywordtype">double</span>)i / this-><a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a>)});</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span>}</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">this</span>->lattice.set_size(<span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">-></a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>, <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">-></a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>);</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">this</span>->lattice.fill(val);</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span>}</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="classIsingModel.html#a6776109105051597c275670dabd0054a"> 70</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a>::<a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">initialize_neighbors</a>()</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span>{</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keyword">this</span>->neighbors.set_size(<span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">-></a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>, 2);</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4"> 74</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">IsingModel::initialize_magnetization</a>()</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span>{</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> this-><a class="code hl_variable" href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47">M</a> = 0.;</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>.n_elem; i++) {</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> this-><a class="code hl_variable" href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47">M</a> += this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>(i);</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="comment">// Having i as a signed integer is necessary in this case.</span></div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < (<span class="keywordtype">int</span>)<span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">-></a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>; i++) {</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keyword">this</span>->neighbors(i, <a class="code hl_define" href="IsingModel_8hpp.html#a1965eaca47dbf3f87acdafc2208f04eb">UP</a>) = <a class="code hl_define" href="IsingModel_8hpp.html#a3039ac753f46401767c38f867787fae6">INDEX</a>(i - 1, <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">-></a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>);</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keyword">this</span>->neighbors(i, <a class="code hl_define" href="IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f">DOWN</a>) = <a class="code hl_define" href="IsingModel_8hpp.html#a3039ac753f46401767c38f867787fae6">INDEX</a>(i + 1, <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">-></a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>);</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> }</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span>}</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span>}</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1"> 82</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">IsingModel::initialize_energy</a>()</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>{</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> this-><a class="code hl_variable" href="classIsingModel.html#ae9f872ca2054992161d53306119979dd">E</a> = 0.;</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="comment">// Loop through the matrix</span></div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j = 0; j < this-><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>; j++) {</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < this-><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>; i++) {</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> this-><a class="code hl_variable" href="classIsingModel.html#ae9f872ca2054992161d53306119979dd">E</a> -= this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>(i, j)</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> * (this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>(i, this-><a class="code hl_variable" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a>(j, RIGHT))</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> + this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>(this-><a class="code hl_variable" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a>(i, DOWN), j));</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> }</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4"> 81</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a>::<a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">initialize_energy_diff</a>()</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span>{</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = -8; i <= 8; i += 4) {</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e">-></a><a class="code hl_variable" href="classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e">energy_diff</a>[i+8] = std::exp(-(<span class="keywordtype">double</span>)i / <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">-></a><a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a>);</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> }</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span>}</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"><a class="line" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4"> 88</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a>::<a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">initialize_magnetization</a>()</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span>{</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">-></a><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">M</a> = 0.;</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordflow">for</span> (size_t i = 0; i < <span class="keyword">this</span>->lattice.n_elem; i++) {</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">-></a><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">M</a> += <span class="keyword">this</span>->lattice(i);</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> }</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span>}</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488"> 96</a></span><a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">IsingModel::Metropolis</a>()</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1"> 96</a></span><span class="keywordtype">void</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a>::<a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">initialize_energy</a>()</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span>{</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> std::random_device rd{};</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> std::mt19937_64 engine{rd()};</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordtype">int</span> ri, rj;</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordtype">int</span> dE;</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="comment">// Create random distribution for indeces</span></div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> std::uniform_int_distribution<> random_index(0, this-><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a> - 1);</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="comment">// Create random distribution for acceptance</span></div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> std::uniform_real_distribution<> random_number(0., 1.);</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="comment">// Loop over the number of spins</span></div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>.n_elem; i++) {</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="comment">// Get random indeces</span></div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> ri = random_index(engine);</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> rj = random_index(engine);</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">-></a><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">E</a> = 0.;</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> </div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="comment">// Loop through the matrix</span></div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">for</span> (size_t j = 0; j < <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">-></a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>; j++) {</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">for</span> (size_t i = 0; i < <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">-></a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>; i++) {</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">-></a><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">E</a> -= <span class="keyword">this</span>->lattice(i, j)</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> * (<span class="keyword">this</span>->lattice(i, <span class="keyword">this</span>->neighbors(j, <a class="code hl_define" href="IsingModel_8hpp.html#a80fb826a684cf3f0d306b22aa100ddac">RIGHT</a>))</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> + <span class="keyword">this</span>->lattice(<span class="keyword">this</span>->neighbors(i, <a class="code hl_define" href="IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f">DOWN</a>), j));</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> }</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span>}</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"><a class="line" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488"> 110</a></span><a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_class" href="classIsingModel.html">IsingModel</a>::<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>()</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span>{</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordtype">int</span> ri, rj;</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordtype">int</span> dE;</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> </div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="comment">// Calculate the difference in energy</span></div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> dE = 2 * this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>(ri, rj)</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> * (this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>(ri, this-><a class="code hl_variable" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a>(rj, LEFT))</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> + this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>(ri, this-><a class="code hl_variable" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a>(rj, RIGHT))</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> + this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>(this-><a class="code hl_variable" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a>(ri, UP), rj)</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> + this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>(this-><a class="code hl_variable" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a>(ri, DOWN), rj));</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="comment">// Choose whether or not to accept the new configuration</span></div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">if</span> (random_number(engine) <= this-><a class="code hl_variable" href="classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd">energy_diff</a>[dE]) {</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="comment">// Update if the configuration is accepted</span></div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>(ri, rj) *= -1;</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> this-><a class="code hl_variable" href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47">M</a> += 2 * this-><a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>(ri, rj);</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> this-><a class="code hl_variable" href="classIsingModel.html#ae9f872ca2054992161d53306119979dd">E</a> += dE;</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> }</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> }</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">return</span> <a class="code hl_class" href="classdata__t.html">data_t</a>((<span class="keywordtype">double</span>)this-><a class="code hl_variable" href="classIsingModel.html#ae9f872ca2054992161d53306119979dd">E</a>, (<span class="keywordtype">double</span>)(this->E * this->E), (<span class="keywordtype">double</span>)this-><a class="code hl_variable" href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47">M</a>,</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> (<span class="keywordtype">double</span>)(this->M * this->M), std::fabs((<span class="keywordtype">double</span>)this->M));</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span>}</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"><a class="line" href="classIsingModel.html#aaa0787d964b004a17869811a5e947ff5"> 135</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="classIsingModel.html#aaa0787d964b004a17869811a5e947ff5">IsingModel::get_E</a>()</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span>{</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordflow">return</span> this-><a class="code hl_variable" href="classIsingModel.html#ae9f872ca2054992161d53306119979dd">E</a>;</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span>}</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"><a class="line" href="classIsingModel.html#aa5701496e6483bc4668c486d6d3af625"> 140</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="classIsingModel.html#aa5701496e6483bc4668c486d6d3af625">IsingModel::get_M</a>()</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span>{</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">return</span> this-><a class="code hl_variable" href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47">M</a>;</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span>}</div>
|
||||
<div class="ttc" id="aIsingModel_8hpp_html"><div class="ttname"><a href="IsingModel_8hpp.html">IsingModel.hpp</a></div><div class="ttdoc">The definition of the Ising model.</div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a0d373a61baca6b0faa607bb12d82cc47"><div class="ttname"><a href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47">IsingModel::M</a></div><div class="ttdeci">int M</div><div class="ttdoc">The current magnetic strength. unit: Unitless.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00072">IsingModel.hpp:72</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a1a4ceb1bb2593dbd20c51ed04100cbcd"><div class="ttname"><a href="classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd">IsingModel::energy_diff</a></div><div class="ttdeci">std::unordered_map< int, double > energy_diff</div><div class="ttdoc">A hash map containing all possible energy changes.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00056">IsingModel.hpp:56</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a20fc4c0c99d8a119f70a1614784d4e5c"><div class="ttname"><a href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">IsingModel::T</a></div><div class="ttdeci">double T</div><div class="ttdoc">The temperature of the model.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00060">IsingModel.hpp:60</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a2b8ac43baefeb386186266d5aa4de348"><div class="ttname"><a href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">IsingModel::L</a></div><div class="ttdeci">int L</div><div class="ttdoc">Size of the lattice.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00064">IsingModel.hpp:64</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a2c3c76c79717c968d7c227c58b46df41"><div class="ttname"><a href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">IsingModel::lattice</a></div><div class="ttdeci">arma::Mat< int > lattice</div><div class="ttdoc">matrix where element .</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00042">IsingModel.hpp:42</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a34a4710949b4a70f3e37ca223aefcf8a"><div class="ttname"><a href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">IsingModel::initialize_lattice</a></div><div class="ttdeci">void initialize_lattice()</div><div class="ttdoc">Initialize the lattice with a random distribution of 1s and -1s.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00044">IsingModel.cpp:44</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a56559d68dc9aaff1976d84b157f43488"><div class="ttname"><a href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">IsingModel::Metropolis</a></div><div class="ttdeci">data_t Metropolis()</div><div class="ttdoc">The Metropolis algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00096">IsingModel.cpp:96</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a59fced38c695e2fa647f53be81b9d2a1"><div class="ttname"><a href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">IsingModel::initialize_energy</a></div><div class="ttdeci">void initialize_energy()</div><div class="ttdoc">Initialize the energy.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00082">IsingModel.cpp:82</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a6776109105051597c275670dabd0054a"><div class="ttname"><a href="classIsingModel.html#a6776109105051597c275670dabd0054a">IsingModel::initialize_neighbors</a></div><div class="ttdeci">void initialize_neighbors()</div><div class="ttdoc">initialize the neighbors matrix.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00056">IsingModel.cpp:56</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a926cf4964d190d2ce23e5a17201787a4"><div class="ttname"><a href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">IsingModel::initialize_magnetization</a></div><div class="ttdeci">void initialize_magnetization()</div><div class="ttdoc">Initialize the magnetization.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00074">IsingModel.cpp:74</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a94093aaf30facca62737f2ac381fdbcd"><div class="ttname"><a href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">IsingModel::neighbors</a></div><div class="ttdeci">arma::Mat< int > neighbors</div><div class="ttdoc">matrix with the neighbors of each element .</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00052">IsingModel.hpp:52</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_aa5701496e6483bc4668c486d6d3af625"><div class="ttname"><a href="classIsingModel.html#aa5701496e6483bc4668c486d6d3af625">IsingModel::get_M</a></div><div class="ttdeci">int get_M()</div><div class="ttdoc">Get the current magnetization.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00140">IsingModel.cpp:140</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_aaa0787d964b004a17869811a5e947ff5"><div class="ttname"><a href="classIsingModel.html#aaa0787d964b004a17869811a5e947ff5">IsingModel::get_E</a></div><div class="ttdeci">int get_E()</div><div class="ttdoc">Get the current energy.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00135">IsingModel.cpp:135</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_acf281f6f5ed02911ca6ab07004449864"><div class="ttname"><a href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel::IsingModel</a></div><div class="ttdeci">IsingModel()</div><div class="ttdoc">Constructor used for testing.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00017">IsingModel.cpp:17</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_ae9f872ca2054992161d53306119979dd"><div class="ttname"><a href="classIsingModel.html#ae9f872ca2054992161d53306119979dd">IsingModel::E</a></div><div class="ttdeci">int E</div><div class="ttdoc">The current energy state. unit: .</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00068">IsingModel.hpp:68</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_aff9a1201933fd5408845a1447e4895b4"><div class="ttname"><a href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">IsingModel::initialize_energy_diff</a></div><div class="ttdeci">void initialize_energy_diff()</div><div class="ttdoc">Initialize the hashmap with the correct values.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00067">IsingModel.cpp:67</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00018">data_type.hpp:18</a></div></div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="comment">// Create random distribution for indeces</span></div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> std::uniform_int_distribution<> random_index(0, <span class="keyword">this</span>->L - 1);</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="comment">// Create random distribution for acceptance</span></div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> std::uniform_real_distribution<> random_number(0., 1.);</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="comment">// Loop over the number of spins</span></div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordflow">for</span> (size_t i = 0; i < <span class="keyword">this</span>->lattice.n_elem; i++) {</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="comment">// Get random indeces</span></div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> ri = random_index(<a class="code hl_variable" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">engine</a>);</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> rj = random_index(<a class="code hl_variable" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">engine</a>);</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="comment">// Calculate the difference in energy</span></div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> dE = 2 * <span class="keyword">this</span>->lattice(ri, rj)</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> * (<span class="keyword">this</span>->lattice(ri, <span class="keyword">this</span>->neighbors(rj, <a class="code hl_define" href="IsingModel_8hpp.html#a437ef08681e7210d6678427030446a54">LEFT</a>))</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> + <span class="keyword">this</span>->lattice(ri, <span class="keyword">this</span>->neighbors(rj, <a class="code hl_define" href="IsingModel_8hpp.html#a80fb826a684cf3f0d306b22aa100ddac">RIGHT</a>))</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> + <span class="keyword">this</span>->lattice(<span class="keyword">this</span>->neighbors(ri, <a class="code hl_define" href="IsingModel_8hpp.html#a1965eaca47dbf3f87acdafc2208f04eb">UP</a>), rj)</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> + <span class="keyword">this</span>->lattice(<span class="keyword">this</span>->neighbors(ri, <a class="code hl_define" href="IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f">DOWN</a>), rj));</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="comment">// Choose whether or not to accept the new configuration</span></div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <span class="keywordflow">if</span> (random_number(<a class="code hl_variable" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">engine</a>) <= <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e">-></a><a class="code hl_variable" href="classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e">energy_diff</a>[dE+8]) {</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="comment">// Update if the configuration is accepted</span></div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keyword">this</span>->lattice(ri, rj) *= -1;</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">-></a><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">M</a> += 2 * <span class="keyword">this</span>->lattice(ri, rj);</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">-></a><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">E</a> += dE;</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> }</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> }</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> </div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">return</span> <a class="code hl_class" href="classdata__t.html">data_t</a><a class="code hl_function" href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">(</a>(<span class="keywordtype">double</span>)<span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">-></a><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">E</a><a class="code hl_function" href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">,</a> (<span class="keywordtype">double</span>)(<span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">-></a><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">E</a> * <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">-></a><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">E</a>)<a class="code hl_function" href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">,</a> (<span class="keywordtype">double</span>)<span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">-></a><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">M</a><a class="code hl_function" href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">,</a></div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> (<span class="keywordtype">double</span>)(<span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">-></a><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">M</a> * <span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">-></a><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">M</a>)<a class="code hl_function" href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">,</a> std::fabs((<span class="keywordtype">double</span>)<span class="keyword">this</span><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">-></a><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">M</a>)<a class="code hl_function" href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">)</a>;</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span>}</div>
|
||||
<div class="ttc" id="aIsingModel_8hpp_html_a1965eaca47dbf3f87acdafc2208f04eb"><div class="ttname"><a href="IsingModel_8hpp.html#a1965eaca47dbf3f87acdafc2208f04eb">UP</a></div><div class="ttdeci">#define UP</div><div class="ttdoc">Used for the neighbor matrix in the class.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00026">IsingModel.hpp:26</a></div></div>
|
||||
<div class="ttc" id="aIsingModel_8hpp_html_a3039ac753f46401767c38f867787fae6"><div class="ttname"><a href="IsingModel_8hpp.html#a3039ac753f46401767c38f867787fae6">INDEX</a></div><div class="ttdeci">#define INDEX(I, N)</div><div class="ttdoc">I modulo N.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00023">IsingModel.hpp:23</a></div></div>
|
||||
<div class="ttc" id="aIsingModel_8hpp_html_a4193cd1c8c2e6ebd0e056fa2364a663f"><div class="ttname"><a href="IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f">DOWN</a></div><div class="ttdeci">#define DOWN</div><div class="ttdoc">Used for the neighbor matrix in the class.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00028">IsingModel.hpp:28</a></div></div>
|
||||
<div class="ttc" id="aIsingModel_8hpp_html_a437ef08681e7210d6678427030446a54"><div class="ttname"><a href="IsingModel_8hpp.html#a437ef08681e7210d6678427030446a54">LEFT</a></div><div class="ttdeci">#define LEFT</div><div class="ttdoc">Used for the neighbor matrix in the class.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00027">IsingModel.hpp:27</a></div></div>
|
||||
<div class="ttc" id="aIsingModel_8hpp_html_a80fb826a684cf3f0d306b22aa100ddac"><div class="ttname"><a href="IsingModel_8hpp.html#a80fb826a684cf3f0d306b22aa100ddac">RIGHT</a></div><div class="ttdeci">#define RIGHT</div><div class="ttdoc">Used for the neighbor matrix in the class.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00029">IsingModel.hpp:29</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html"><div class="ttname"><a href="classIsingModel.html">IsingModel</a></div><div class="ttdoc">The Ising model in 2 dimensions.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00036">IsingModel.hpp:36</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a1bbe0cb10abee98058e7b45b22b9cd0a"><div class="ttname"><a href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">IsingModel::engine</a></div><div class="ttdeci">std::mt19937 engine</div><div class="ttdoc">The RNG that is used for the Metropolis algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00078">IsingModel.hpp:78</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a1c8a2a4331c7e60c3e1350c0cf8300b9"><div class="ttname"><a href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">IsingModel::E</a></div><div class="ttdeci">int64_t E</div><div class="ttdoc">The current energy state. unit: .</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00070">IsingModel.hpp:70</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a20fc4c0c99d8a119f70a1614784d4e5c"><div class="ttname"><a href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">IsingModel::T</a></div><div class="ttdeci">double T</div><div class="ttdoc">The temperature of the model.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00062">IsingModel.hpp:62</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a2b8ac43baefeb386186266d5aa4de348"><div class="ttname"><a href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">IsingModel::L</a></div><div class="ttdeci">int L</div><div class="ttdoc">Size of the lattice.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00066">IsingModel.hpp:66</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a34a4710949b4a70f3e37ca223aefcf8a"><div class="ttname"><a href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">IsingModel::initialize_lattice</a></div><div class="ttdeci">void initialize_lattice()</div><div class="ttdoc">Initialize the lattice with a random distribution of 1s and -1s.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00049">IsingModel.cpp:49</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a46c9446e94854452f715d307c77c1c15"><div class="ttname"><a href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15">IsingModel::IsingModel</a></div><div class="ttdeci">IsingModel(int L, double T, int val)</div><div class="ttdoc">Constructor for the Ising model.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00031">IsingModel.cpp:31</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a4a39ee7fbfbbf566f75bc28900ca9ea5"><div class="ttname"><a href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">IsingModel::IsingModel</a></div><div class="ttdeci">IsingModel(int L, double T)</div><div class="ttdoc">Constructor for the Ising model.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00019">IsingModel.cpp:19</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a56559d68dc9aaff1976d84b157f43488"><div class="ttname"><a href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">IsingModel::Metropolis</a></div><div class="ttdeci">data_t Metropolis()</div><div class="ttdoc">The Metropolis algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00110">IsingModel.cpp:110</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a59fced38c695e2fa647f53be81b9d2a1"><div class="ttname"><a href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">IsingModel::initialize_energy</a></div><div class="ttdeci">void initialize_energy()</div><div class="ttdoc">Initialize the energy of the system.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00096">IsingModel.cpp:96</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a6776109105051597c275670dabd0054a"><div class="ttname"><a href="classIsingModel.html#a6776109105051597c275670dabd0054a">IsingModel::initialize_neighbors</a></div><div class="ttdeci">void initialize_neighbors()</div><div class="ttdoc">initialize the neighbors matrix.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00070">IsingModel.cpp:70</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a7112dd6433b1bb9512150cbdc1a0b77e"><div class="ttname"><a href="classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e">IsingModel::energy_diff</a></div><div class="ttdeci">double energy_diff[17]</div><div class="ttdoc">An array containing all possible energy differences.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00058">IsingModel.hpp:58</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a926cf4964d190d2ce23e5a17201787a4"><div class="ttname"><a href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">IsingModel::initialize_magnetization</a></div><div class="ttdeci">void initialize_magnetization()</div><div class="ttdoc">Initialize the magnetization of the system.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00088">IsingModel.cpp:88</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_aaedc25b7284e04849269f31291590bf5"><div class="ttname"><a href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">IsingModel::initialize_engine</a></div><div class="ttdeci">void initialize_engine()</div><div class="ttdoc">Initialize the RNG.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00043">IsingModel.cpp:43</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_acc86effd6889bea199a3d70a9f38dc78"><div class="ttname"><a href="classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78">IsingModel::initialize_lattice</a></div><div class="ttdeci">void initialize_lattice(int val)</div><div class="ttdoc">Initialize the lattice with a specific value.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00059">IsingModel.cpp:59</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_acf281f6f5ed02911ca6ab07004449864"><div class="ttname"><a href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel::IsingModel</a></div><div class="ttdeci">IsingModel()</div><div class="ttdoc">Constructor used for testing.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00014">IsingModel.cpp:14</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_aef7232b28df08e064ef58eb5ef32f738"><div class="ttname"><a href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">IsingModel::M</a></div><div class="ttdeci">int64_t M</div><div class="ttdoc">The current magnetic strength. unit: Unitless.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00074">IsingModel.hpp:74</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_aff9a1201933fd5408845a1447e4895b4"><div class="ttname"><a href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">IsingModel::initialize_energy_diff</a></div><div class="ttdeci">void initialize_energy_diff()</div><div class="ttdoc">Initialize the energy_diff array with the correct values.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00081">IsingModel.cpp:81</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdoc">Type to use with the IsingModel class and montecarlo module.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00019">data_type.hpp:19</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a3f2d19ab309e696ba91a2000479bcb83"><div class="ttname"><a href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">data_t::data_t</a></div><div class="ttdeci">data_t(double E, double E2, double M, double M2, double M_abs)</div><div class="ttdoc">Constructor with parameters.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00045">data_type.hpp:45</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
@@ -107,11 +107,10 @@ $(document).ready(function(){initNavTree('IsingModel_8hpp.html',''); initResizab
|
||||
|
||||
<p>The definition of the Ising model.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include "<a class="el" href="constants_8hpp_source.html">constants.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="typedefs_8hpp_source.html">typedefs.hpp</a>"</code><br />
|
||||
<div class="textblock"><code>#include "<a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||
<code>#include <armadillo></code><br />
|
||||
<code>#include <cstdint></code><br />
|
||||
<code>#include <random></code><br />
|
||||
<code>#include <unordered_map></code><br />
|
||||
</div>
|
||||
@@ -126,14 +125,19 @@ Classes</h2></td></tr>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:a3039ac753f46401767c38f867787fae6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="IsingModel_8hpp.html#a3039ac753f46401767c38f867787fae6">INDEX</a>(I, N)   (I + N) % N</td></tr>
|
||||
<tr class="memdesc:a3039ac753f46401767c38f867787fae6"><td class="mdescLeft"> </td><td class="mdescRight">I modulo N. <br /></td></tr>
|
||||
<tr class="separator:a3039ac753f46401767c38f867787fae6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1965eaca47dbf3f87acdafc2208f04eb"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="IsingModel_8hpp.html#a1965eaca47dbf3f87acdafc2208f04eb">UP</a>   0</td></tr>
|
||||
<tr class="memdesc:a1965eaca47dbf3f87acdafc2208f04eb"><td class="mdescLeft"> </td><td class="mdescRight">Used for the neighbor matrix in the class. <br /></td></tr>
|
||||
<tr class="separator:a1965eaca47dbf3f87acdafc2208f04eb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a437ef08681e7210d6678427030446a54"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="IsingModel_8hpp.html#a437ef08681e7210d6678427030446a54">LEFT</a>   0</td></tr>
|
||||
<tr class="memdesc:a437ef08681e7210d6678427030446a54"><td class="mdescLeft"> </td><td class="mdescRight">Used for the neighbor matrix in the class. <br /></td></tr>
|
||||
<tr class="separator:a437ef08681e7210d6678427030446a54"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a4193cd1c8c2e6ebd0e056fa2364a663f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f">DOWN</a>   1</td></tr>
|
||||
<tr class="memdesc:a4193cd1c8c2e6ebd0e056fa2364a663f"><td class="mdescLeft"> </td><td class="mdescRight">Used for the neighbor matrix in the class. <br /></td></tr>
|
||||
<tr class="separator:a4193cd1c8c2e6ebd0e056fa2364a663f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a80fb826a684cf3f0d306b22aa100ddac"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="IsingModel_8hpp.html#a80fb826a684cf3f0d306b22aa100ddac">RIGHT</a>   1</td></tr>
|
||||
<tr class="memdesc:a80fb826a684cf3f0d306b22aa100ddac"><td class="mdescLeft"> </td><td class="mdescRight">Used for the neighbor matrix in the class. <br /></td></tr>
|
||||
<tr class="separator:a80fb826a684cf3f0d306b22aa100ddac"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
@@ -142,7 +146,7 @@ Macros</h2></td></tr>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<dl class="section version"><dt>Version</dt><dd>0.1</dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000003">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000004">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
</div><h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
@@ -158,7 +162,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00029">29</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p>Used for the neighbor matrix in the class. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00028">28</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -188,7 +194,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00024">24</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p>I modulo N. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00023">23</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -204,7 +212,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00028">28</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p>Used for the neighbor matrix in the class. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00027">27</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -220,7 +230,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00030">30</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p>Used for the neighbor matrix in the class. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00029">29</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -236,7 +248,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00027">27</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p>Used for the neighbor matrix in the class. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00026">26</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
var IsingModel_8hpp =
|
||||
[
|
||||
[ "IsingModel", "classIsingModel.html", "classIsingModel" ]
|
||||
[ "IsingModel", "classIsingModel.html", "classIsingModel" ],
|
||||
[ "DOWN", "IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f", null ],
|
||||
[ "INDEX", "IsingModel_8hpp.html#a3039ac753f46401767c38f867787fae6", null ],
|
||||
[ "LEFT", "IsingModel_8hpp.html#a437ef08681e7210d6678427030446a54", null ],
|
||||
[ "RIGHT", "IsingModel_8hpp.html#a80fb826a684cf3f0d306b22aa100ddac", null ],
|
||||
[ "UP", "IsingModel_8hpp.html#a1965eaca47dbf3f87acdafc2208f04eb", null ]
|
||||
];
|
||||
@@ -101,92 +101,168 @@ $(document).ready(function(){initNavTree('IsingModel_8hpp_source.html',''); init
|
||||
<div class="headertitle"><div class="title">IsingModel.hpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="IsingModel_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#ifndef __ISING_MODEL__</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#define __ISING_MODEL__</span></div>
|
||||
<a href="IsingModel_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/** @file IsingModel.hpp</span></div>
|
||||
<div class="line"><span class="lineno"> 2</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 3</span><span class="comment"> * @author Cory Alexander Balaton (coryab)</span></div>
|
||||
<div class="line"><span class="lineno"> 4</span><span class="comment"> * @author Janita Ovidie Sandtrøen Willumsen (janitaws)</span></div>
|
||||
<div class="line"><span class="lineno"> 5</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 6</span><span class="comment"> * @version 0.1</span></div>
|
||||
<div class="line"><span class="lineno"> 7</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 8</span><span class="comment"> * @brief The definition of the Ising model.</span></div>
|
||||
<div class="line"><span class="lineno"> 9</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 10</span><span class="comment"> * @bug No known bugs</span></div>
|
||||
<div class="line"><span class="lineno"> 11</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#</span><span class="preprocessor">ifndef</span> <span class="preprocessor">__ISING_MODEL__</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">__ISING_MODEL__</span></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include "<a class="code" href="constants_8hpp.html">constants.hpp</a>"</span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include "<a class="code" href="data__type_8hpp.html">data_type.hpp</a>"</span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include "<a class="code" href="typedefs_8hpp.html">typedefs.hpp</a>"</span></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include "<a class="code" href="utils_8hpp.html">utils.hpp</a>"</span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include <armadillo></span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include <random></span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include <unordered_map></span></div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#define INDEX(I, N) (I + N) % N</span></div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// Indeces for the neighbor matrix.</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#define UP 0</span></div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="preprocessor">#define LEFT 0</span></div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#define DOWN 1</span></div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#define RIGHT 1</span></div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="classIsingModel.html"> 37</a></span><span class="keyword">class </span><a class="code hl_class" href="classIsingModel.html">IsingModel</a> {</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code hl_class" href="classIsingModelTest.html">IsingModelTest</a>;</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41"> 42</a></span> arma::Mat<int> <a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>;</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd"> 52</a></span> arma::Mat<int> <a class="code hl_variable" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a>;</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd"> 56</a></span> std::unordered_map<int, double> <a class="code hl_variable" href="classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd">energy_diff</a>;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c"> 60</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a>;</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348"> 64</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>;</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="classIsingModel.html#ae9f872ca2054992161d53306119979dd"> 68</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classIsingModel.html#ae9f872ca2054992161d53306119979dd">E</a>;</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47"> 72</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47">M</a>;</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">initialize_lattice</a>();</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">initialize_neighbors</a>();</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> </div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">initialize_energy_diff</a>();</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">initialize_magnetization</a>();</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">initialize_energy</a>();</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <a class="code hl_function" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel</a>();</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <a class="code hl_function" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a>);</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> </div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <a class="code hl_function" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel</a>(<span class="keywordtype">int</span> <a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a>, <span class="keywordtype">int</span> val);</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> </div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>();</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classIsingModel.html#aaa0787d964b004a17869811a5e947ff5">get_E</a>();</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> </div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="keywordtype">int</span> <a class="code hl_function" href="classIsingModel.html#aa5701496e6483bc4668c486d6d3af625">get_M</a>();</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span>};</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="ttc" id="aclassIsingModelTest_html"><div class="ttname"><a href="classIsingModelTest.html">IsingModelTest</a></div><div class="ttdoc">Test class for the Ising model.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00030">test_suite.cpp:30</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html"><div class="ttname"><a href="classIsingModel.html">IsingModel</a></div><div class="ttdoc">The Ising model in 2 dimensions.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00037">IsingModel.hpp:37</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a0d373a61baca6b0faa607bb12d82cc47"><div class="ttname"><a href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47">IsingModel::M</a></div><div class="ttdeci">int M</div><div class="ttdoc">The current magnetic strength. unit: Unitless.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00072">IsingModel.hpp:72</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a1a4ceb1bb2593dbd20c51ed04100cbcd"><div class="ttname"><a href="classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd">IsingModel::energy_diff</a></div><div class="ttdeci">std::unordered_map< int, double > energy_diff</div><div class="ttdoc">A hash map containing all possible energy changes.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00056">IsingModel.hpp:56</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a20fc4c0c99d8a119f70a1614784d4e5c"><div class="ttname"><a href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">IsingModel::T</a></div><div class="ttdeci">double T</div><div class="ttdoc">The temperature of the model.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00060">IsingModel.hpp:60</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a2b8ac43baefeb386186266d5aa4de348"><div class="ttname"><a href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">IsingModel::L</a></div><div class="ttdeci">int L</div><div class="ttdoc">Size of the lattice.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00064">IsingModel.hpp:64</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a2c3c76c79717c968d7c227c58b46df41"><div class="ttname"><a href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">IsingModel::lattice</a></div><div class="ttdeci">arma::Mat< int > lattice</div><div class="ttdoc">matrix where element .</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00042">IsingModel.hpp:42</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a34a4710949b4a70f3e37ca223aefcf8a"><div class="ttname"><a href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">IsingModel::initialize_lattice</a></div><div class="ttdeci">void initialize_lattice()</div><div class="ttdoc">Initialize the lattice with a random distribution of 1s and -1s.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00044">IsingModel.cpp:44</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a56559d68dc9aaff1976d84b157f43488"><div class="ttname"><a href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">IsingModel::Metropolis</a></div><div class="ttdeci">data_t Metropolis()</div><div class="ttdoc">The Metropolis algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00096">IsingModel.cpp:96</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a59fced38c695e2fa647f53be81b9d2a1"><div class="ttname"><a href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">IsingModel::initialize_energy</a></div><div class="ttdeci">void initialize_energy()</div><div class="ttdoc">Initialize the energy.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00082">IsingModel.cpp:82</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a6776109105051597c275670dabd0054a"><div class="ttname"><a href="classIsingModel.html#a6776109105051597c275670dabd0054a">IsingModel::initialize_neighbors</a></div><div class="ttdeci">void initialize_neighbors()</div><div class="ttdoc">initialize the neighbors matrix.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00056">IsingModel.cpp:56</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a926cf4964d190d2ce23e5a17201787a4"><div class="ttname"><a href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">IsingModel::initialize_magnetization</a></div><div class="ttdeci">void initialize_magnetization()</div><div class="ttdoc">Initialize the magnetization.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00074">IsingModel.cpp:74</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a94093aaf30facca62737f2ac381fdbcd"><div class="ttname"><a href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">IsingModel::neighbors</a></div><div class="ttdeci">arma::Mat< int > neighbors</div><div class="ttdoc">matrix with the neighbors of each element .</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00052">IsingModel.hpp:52</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_aa5701496e6483bc4668c486d6d3af625"><div class="ttname"><a href="classIsingModel.html#aa5701496e6483bc4668c486d6d3af625">IsingModel::get_M</a></div><div class="ttdeci">int get_M()</div><div class="ttdoc">Get the current magnetization.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00140">IsingModel.cpp:140</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_aaa0787d964b004a17869811a5e947ff5"><div class="ttname"><a href="classIsingModel.html#aaa0787d964b004a17869811a5e947ff5">IsingModel::get_E</a></div><div class="ttdeci">int get_E()</div><div class="ttdoc">Get the current energy.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00135">IsingModel.cpp:135</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_acf281f6f5ed02911ca6ab07004449864"><div class="ttname"><a href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel::IsingModel</a></div><div class="ttdeci">IsingModel()</div><div class="ttdoc">Constructor used for testing.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00017">IsingModel.cpp:17</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_ae9f872ca2054992161d53306119979dd"><div class="ttname"><a href="classIsingModel.html#ae9f872ca2054992161d53306119979dd">IsingModel::E</a></div><div class="ttdeci">int E</div><div class="ttdoc">The current energy state. unit: .</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00068">IsingModel.hpp:68</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_aff9a1201933fd5408845a1447e4895b4"><div class="ttname"><a href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">IsingModel::initialize_energy_diff</a></div><div class="ttdeci">void initialize_energy_diff()</div><div class="ttdoc">Initialize the hashmap with the correct values.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00067">IsingModel.cpp:67</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00018">data_type.hpp:18</a></div></div>
|
||||
<div class="ttc" id="aconstants_8hpp_html"><div class="ttname"><a href="constants_8hpp.html">constants.hpp</a></div><div class="ttdoc">Library of constants.</div></div>
|
||||
<div class="ttc" id="adata__type_8hpp_html"><div class="ttname"><a href="data__type_8hpp.html">data_type.hpp</a></div><div class="ttdoc">Header for the data_t type.</div></div>
|
||||
<div class="ttc" id="atypedefs_8hpp_html"><div class="ttname"><a href="typedefs_8hpp.html">typedefs.hpp</a></div><div class="ttdoc">Useful typedefs for cleaner code.</div></div>
|
||||
<div class="ttc" id="autils_8hpp_html"><div class="ttname"><a href="utils_8hpp.html">utils.hpp</a></div><div class="ttdoc">Function prototypes and macros that are useful.</div></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="data__type_8hpp.html" title="Header for the data_t type.">"data_type.hpp"</a></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="utils_8hpp.html" title="Function prototypes and macros that are useful.">"utils.hpp"</a></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">armadillo</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">cstdint</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">random</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">unordered_map</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="IsingModel_8hpp.html#a3039ac753f46401767c38f867787fae6"> 23</a></span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">INDEX</span><span class="preprocessor">(</span><span class="preprocessor">I</span><span class="preprocessor">,</span> <span class="preprocessor">N</span><span class="preprocessor">)</span> <span class="preprocessor">(</span><span class="preprocessor">I</span> <span class="preprocessor">+</span> <span class="preprocessor">N</span><span class="preprocessor">)</span> <span class="preprocessor">%</span> <span class="preprocessor">N</span> <span class="comment">///< I modulo N</span></div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// Indeces for the neighbor matrix.</span></div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="IsingModel_8hpp.html#a1965eaca47dbf3f87acdafc2208f04eb"> 26</a></span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">UP</span> 0 <span class="comment">///< Used for the neighbor matrix in the class</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="IsingModel_8hpp.html#a437ef08681e7210d6678427030446a54"> 27</a></span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">LEFT</span> 0 <span class="comment">///< Used for the neighbor matrix in the class</span></div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f"> 28</a></span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">DOWN</span> 1 <span class="comment">///< Used for the neighbor matrix in the class</span></div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="IsingModel_8hpp.html#a80fb826a684cf3f0d306b22aa100ddac"> 29</a></span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">RIGHT</span> 1 <span class="comment">///< Used for the neighbor matrix in the class</span></div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="comment">/** @brief The Ising model in 2 dimensions.</span></div>
|
||||
<div class="line"><span class="lineno"> 32</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 33</span><span class="comment"> * @details None of the methods are parallelized, as there is very little</span></div>
|
||||
<div class="line"><span class="lineno"> 34</span><span class="comment"> * benefit in doing so.</span></div>
|
||||
<div class="line"><span class="lineno"> 35</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="classIsingModel.html"> 36</a></span><span class="keyword">class</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a> {</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="keyword">private</span>:</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="comment">/** @brief Give access to private members to the test class IsingModelTest.</span></div>
|
||||
<div class="line"><span class="lineno"> 39</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="classIsingModel.html#a2b1cf104e0bda1fce78ed366e1ec7287"> 40</a></span> <span class="keyword">friend</span> <span class="keyword">class</span> <a class="code hl_class" href="classIsingModelTest.html">IsingModelTest</a>;</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="comment">/** @brief \f$ L \times L \f$ matrix where element \f$ x \in {-1, 1}\f$.</span></div>
|
||||
<div class="line"><span class="lineno"> 43</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41"> 44</a></span> arma::Mat<<span class="keywordtype">int</span>> <a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>;</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="comment">/** @brief \f$ L \times 2 \f$ matrix with the neighbors of each element</span></div>
|
||||
<div class="line"><span class="lineno"> 47</span><span class="comment"> * \f$ x_i \f$.</span></div>
|
||||
<div class="line"><span class="lineno"> 48</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 49</span><span class="comment"> * @details The reason why it's \f$ L \times 2 \f$ instead of</span></div>
|
||||
<div class="line"><span class="lineno"> 50</span><span class="comment"> * \f$ L \times 2 \f$, is that we can see that we can use the same column</span></div>
|
||||
<div class="line"><span class="lineno"> 51</span><span class="comment"> * for the left and upper neighbor, and we can use the same column for the</span></div>
|
||||
<div class="line"><span class="lineno"> 52</span><span class="comment"> * right and lower neighbor.</span></div>
|
||||
<div class="line"><span class="lineno"> 53</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd"> 54</a></span> arma::Mat<<span class="keywordtype">int</span>> <a class="code hl_variable" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a>;</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="comment">/** @brief An array containing all possible energy differences.</span></div>
|
||||
<div class="line"><span class="lineno"> 57</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e"> 58</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e">energy_diff</a>[17];</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="comment">/** @brief The temperature of the model.</span></div>
|
||||
<div class="line"><span class="lineno"> 61</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c"> 62</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a>;</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="comment">/** @brief Size of the lattice.</span></div>
|
||||
<div class="line"><span class="lineno"> 65</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348"> 66</a></span> <span class="keywordtype">int</span> <a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a>;</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="comment">/** @brief The current energy state. unit: \f$ J \f$.</span></div>
|
||||
<div class="line"><span class="lineno"> 69</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9"> 70</a></span> int64_t <a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">E</a>;</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="comment">/** @brief The current magnetic strength. unit: Unitless.</span></div>
|
||||
<div class="line"><span class="lineno"> 73</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738"> 74</a></span> int64_t <a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">M</a>;</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="comment">/** @brief The RNG that is used for the Metropolis algorithm</span></div>
|
||||
<div class="line"><span class="lineno"> 77</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a"> 78</a></span> std::mt19937 <a class="code hl_variable" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">engine</a>;</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="comment">/** @brief Initialize the RNG.</span></div>
|
||||
<div class="line"><span class="lineno"> 81</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">initialize_engine</a>();</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="comment">/** @brief Initialize the lattice with a random distribution of 1s and</span></div>
|
||||
<div class="line"><span class="lineno"> 85</span><span class="comment"> * -1s.</span></div>
|
||||
<div class="line"><span class="lineno"> 86</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">initialize_lattice</a>();</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> </div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="comment">/** @brief Initialize the lattice with a specific value.</span></div>
|
||||
<div class="line"><span class="lineno"> 90</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78">initialize_lattice</a>(<span class="keywordtype">int</span> val);</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> </div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="comment">/** @brief initialize the neighbors matrix.</span></div>
|
||||
<div class="line"><span class="lineno"> 94</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">initialize_neighbors</a>();</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> </div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="comment">/** @brief Initialize the energy_diff array with the correct values.</span></div>
|
||||
<div class="line"><span class="lineno"> 98</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">initialize_energy_diff</a>();</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="comment">/** @brief Initialize the magnetization of the system.</span></div>
|
||||
<div class="line"><span class="lineno"> 102</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">initialize_magnetization</a>();</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="comment">/** @brief Initialize the energy of the system.</span></div>
|
||||
<div class="line"><span class="lineno"> 106</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">initialize_energy</a>();</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="comment">/** @brief Constructor used for testing.</span></div>
|
||||
<div class="line"><span class="lineno"> 110</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <a class="code hl_function" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel</a>();</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> </div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span><span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="comment">/** @brief Constructor for the Ising model.</span></div>
|
||||
<div class="line"><span class="lineno"> 115</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 116</span><span class="comment"> * @param L The size of the lattice.</span></div>
|
||||
<div class="line"><span class="lineno"> 117</span><span class="comment"> * @param T The temperature for the system.</span></div>
|
||||
<div class="line"><span class="lineno"> 118</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">IsingModel</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T);</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="comment">/** @brief Constructor for the Ising model.</span></div>
|
||||
<div class="line"><span class="lineno"> 122</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 123</span><span class="comment"> * @param L The size of the lattice.</span></div>
|
||||
<div class="line"><span class="lineno"> 124</span><span class="comment"> * @param T The temperature for the system.</span></div>
|
||||
<div class="line"><span class="lineno"> 125</span><span class="comment"> * @param val The value to set for all spins.</span></div>
|
||||
<div class="line"><span class="lineno"> 126</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <a class="code hl_function" href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15">IsingModel</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T, <span class="keywordtype">int</span> val);</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> </div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> <span class="comment">/** @brief The Metropolis algorithm.</span></div>
|
||||
<div class="line"><span class="lineno"> 130</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>();</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span>};</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> </div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span><span class="preprocessor">#</span><span class="preprocessor">endif</span></div>
|
||||
<div class="ttc" id="aIsingModel_8hpp_html_a1965eaca47dbf3f87acdafc2208f04eb"><div class="ttname"><a href="IsingModel_8hpp.html#a1965eaca47dbf3f87acdafc2208f04eb">UP</a></div><div class="ttdeci">#define UP</div><div class="ttdoc">Used for the neighbor matrix in the class.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00026">IsingModel.hpp:26</a></div></div>
|
||||
<div class="ttc" id="aIsingModel_8hpp_html_a3039ac753f46401767c38f867787fae6"><div class="ttname"><a href="IsingModel_8hpp.html#a3039ac753f46401767c38f867787fae6">INDEX</a></div><div class="ttdeci">#define INDEX(I, N)</div><div class="ttdoc">I modulo N.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00023">IsingModel.hpp:23</a></div></div>
|
||||
<div class="ttc" id="aIsingModel_8hpp_html_a4193cd1c8c2e6ebd0e056fa2364a663f"><div class="ttname"><a href="IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f">DOWN</a></div><div class="ttdeci">#define DOWN</div><div class="ttdoc">Used for the neighbor matrix in the class.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00028">IsingModel.hpp:28</a></div></div>
|
||||
<div class="ttc" id="aIsingModel_8hpp_html_a437ef08681e7210d6678427030446a54"><div class="ttname"><a href="IsingModel_8hpp.html#a437ef08681e7210d6678427030446a54">LEFT</a></div><div class="ttdeci">#define LEFT</div><div class="ttdoc">Used for the neighbor matrix in the class.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00027">IsingModel.hpp:27</a></div></div>
|
||||
<div class="ttc" id="aIsingModel_8hpp_html_a80fb826a684cf3f0d306b22aa100ddac"><div class="ttname"><a href="IsingModel_8hpp.html#a80fb826a684cf3f0d306b22aa100ddac">RIGHT</a></div><div class="ttdeci">#define RIGHT</div><div class="ttdoc">Used for the neighbor matrix in the class.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00029">IsingModel.hpp:29</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModelTest_html"><div class="ttname"><a href="classIsingModelTest.html">IsingModelTest</a></div><div class="ttdoc">Test class for the Ising model.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00036">test_suite.cpp:36</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html"><div class="ttname"><a href="classIsingModel.html">IsingModel</a></div><div class="ttdoc">The Ising model in 2 dimensions.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00036">IsingModel.hpp:36</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a1bbe0cb10abee98058e7b45b22b9cd0a"><div class="ttname"><a href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">IsingModel::engine</a></div><div class="ttdeci">std::mt19937 engine</div><div class="ttdoc">The RNG that is used for the Metropolis algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00078">IsingModel.hpp:78</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a1c8a2a4331c7e60c3e1350c0cf8300b9"><div class="ttname"><a href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">IsingModel::E</a></div><div class="ttdeci">int64_t E</div><div class="ttdoc">The current energy state. unit: .</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00070">IsingModel.hpp:70</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a20fc4c0c99d8a119f70a1614784d4e5c"><div class="ttname"><a href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">IsingModel::T</a></div><div class="ttdeci">double T</div><div class="ttdoc">The temperature of the model.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00062">IsingModel.hpp:62</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a2b8ac43baefeb386186266d5aa4de348"><div class="ttname"><a href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">IsingModel::L</a></div><div class="ttdeci">int L</div><div class="ttdoc">Size of the lattice.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00066">IsingModel.hpp:66</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a2c3c76c79717c968d7c227c58b46df41"><div class="ttname"><a href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">IsingModel::lattice</a></div><div class="ttdeci">arma::Mat< int > lattice</div><div class="ttdoc">matrix where element .</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00044">IsingModel.hpp:44</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a34a4710949b4a70f3e37ca223aefcf8a"><div class="ttname"><a href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">IsingModel::initialize_lattice</a></div><div class="ttdeci">void initialize_lattice()</div><div class="ttdoc">Initialize the lattice with a random distribution of 1s and -1s.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00049">IsingModel.cpp:49</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a46c9446e94854452f715d307c77c1c15"><div class="ttname"><a href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15">IsingModel::IsingModel</a></div><div class="ttdeci">IsingModel(int L, double T, int val)</div><div class="ttdoc">Constructor for the Ising model.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00031">IsingModel.cpp:31</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a4a39ee7fbfbbf566f75bc28900ca9ea5"><div class="ttname"><a href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">IsingModel::IsingModel</a></div><div class="ttdeci">IsingModel(int L, double T)</div><div class="ttdoc">Constructor for the Ising model.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00019">IsingModel.cpp:19</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a56559d68dc9aaff1976d84b157f43488"><div class="ttname"><a href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">IsingModel::Metropolis</a></div><div class="ttdeci">data_t Metropolis()</div><div class="ttdoc">The Metropolis algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00110">IsingModel.cpp:110</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a59fced38c695e2fa647f53be81b9d2a1"><div class="ttname"><a href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">IsingModel::initialize_energy</a></div><div class="ttdeci">void initialize_energy()</div><div class="ttdoc">Initialize the energy of the system.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00096">IsingModel.cpp:96</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a6776109105051597c275670dabd0054a"><div class="ttname"><a href="classIsingModel.html#a6776109105051597c275670dabd0054a">IsingModel::initialize_neighbors</a></div><div class="ttdeci">void initialize_neighbors()</div><div class="ttdoc">initialize the neighbors matrix.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00070">IsingModel.cpp:70</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a7112dd6433b1bb9512150cbdc1a0b77e"><div class="ttname"><a href="classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e">IsingModel::energy_diff</a></div><div class="ttdeci">double energy_diff[17]</div><div class="ttdoc">An array containing all possible energy differences.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00058">IsingModel.hpp:58</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a926cf4964d190d2ce23e5a17201787a4"><div class="ttname"><a href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">IsingModel::initialize_magnetization</a></div><div class="ttdeci">void initialize_magnetization()</div><div class="ttdoc">Initialize the magnetization of the system.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00088">IsingModel.cpp:88</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a94093aaf30facca62737f2ac381fdbcd"><div class="ttname"><a href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">IsingModel::neighbors</a></div><div class="ttdeci">arma::Mat< int > neighbors</div><div class="ttdoc">matrix with the neighbors of each element .</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00054">IsingModel.hpp:54</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_aaedc25b7284e04849269f31291590bf5"><div class="ttname"><a href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">IsingModel::initialize_engine</a></div><div class="ttdeci">void initialize_engine()</div><div class="ttdoc">Initialize the RNG.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00043">IsingModel.cpp:43</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_acc86effd6889bea199a3d70a9f38dc78"><div class="ttname"><a href="classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78">IsingModel::initialize_lattice</a></div><div class="ttdeci">void initialize_lattice(int val)</div><div class="ttdoc">Initialize the lattice with a specific value.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00059">IsingModel.cpp:59</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_acf281f6f5ed02911ca6ab07004449864"><div class="ttname"><a href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel::IsingModel</a></div><div class="ttdeci">IsingModel()</div><div class="ttdoc">Constructor used for testing.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00014">IsingModel.cpp:14</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_aef7232b28df08e064ef58eb5ef32f738"><div class="ttname"><a href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">IsingModel::M</a></div><div class="ttdeci">int64_t M</div><div class="ttdoc">The current magnetic strength. unit: Unitless.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00074">IsingModel.hpp:74</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_aff9a1201933fd5408845a1447e4895b4"><div class="ttname"><a href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">IsingModel::initialize_energy_diff</a></div><div class="ttdeci">void initialize_energy_diff()</div><div class="ttdoc">Initialize the energy_diff array with the correct values.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00081">IsingModel.cpp:81</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdoc">Type to use with the IsingModel class and montecarlo module.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00019">data_type.hpp:19</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a3f2d19ab309e696ba91a2000479bcb83"><div class="ttname"><a href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">data_t::data_t</a></div><div class="ttdeci">data_t(double E, double E2, double M, double M2, double M_abs)</div><div class="ttdoc">Constructor with parameters.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00045">data_type.hpp:45</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
114
docs/README_8md.html
Normal file
114
docs/README_8md.html
Normal file
@@ -0,0 +1,114 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: README.md File 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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('README_8md.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">README.md File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="README_8md.html">README.md</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -103,7 +103,7 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
|
||||
<div class="contents">
|
||||
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
|
||||
<table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classdata__t.html" target="_self">data_t</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classdata__t.html" target="_self">data_t</a></td><td class="desc">Type to use with the <a class="el" href="classIsingModel.html" title="The Ising model in 2 dimensions.">IsingModel</a> class and montecarlo module </td></tr>
|
||||
<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classIsingModel.html" target="_self">IsingModel</a></td><td class="desc">The Ising model in 2 dimensions </td></tr>
|
||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="classIsingModelTest.html" target="_self">IsingModelTest</a></td><td class="desc">Test class for the Ising model </td></tr>
|
||||
</table>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var annotated_dup =
|
||||
[
|
||||
[ "data_t", "classdata__t.html", null ],
|
||||
[ "data_t", "classdata__t.html", "classdata__t" ],
|
||||
[ "IsingModel", "classIsingModel.html", "classIsingModel" ],
|
||||
[ "IsingModelTest", "classIsingModelTest.html", "classIsingModelTest" ]
|
||||
];
|
||||
@@ -102,34 +102,38 @@ $(document).ready(function(){initNavTree('bug.html',''); initResizable(); });
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><dl class="reflist">
|
||||
<dt>File <a class="el" href="constants_8hpp.html">constants.hpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000001"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="data__type_8cpp.html">data_type.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000008"></a>No known bugs </dd>
|
||||
<dd><a class="anchor" id="_bug000001"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="data__type_8hpp.html">data_type.hpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000002"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="IsingModel_8cpp.html">IsingModel.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000009"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="IsingModel_8hpp.html">IsingModel.hpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000003"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="main_8cpp.html">main.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000010"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="monte__carlo_8cpp.html">monte_carlo.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000011"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="monte__carlo_8hpp.html">monte_carlo.hpp</a> </dt>
|
||||
<dt>File <a class="el" href="IsingModel_8hpp.html">IsingModel.hpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000004"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="main_8cpp.html">main.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000005"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="mcmc__progression_8cpp.html">mcmc_progression.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000008"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="monte__carlo_8cpp.html">monte_carlo.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000009"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="monte__carlo_8hpp.html">monte_carlo.hpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000006"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="pd__estimate_8cpp.html">pd_estimate.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000010"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="phase__transition_8cpp.html">phase_transition.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000011"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="phase__transition__mpi_8cpp.html">phase_transition_mpi.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000012"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="test__suite_8cpp.html">test_suite.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000013"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="testlib_8cpp.html">testlib.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000014"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="testlib_8hpp.html">testlib.hpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000005"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="typedefs_8hpp.html">typedefs.hpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000006"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="utils_8cpp.html">utils.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000015"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="testlib_8hpp.html">testlib.hpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000014"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="time_8cpp.html">time.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000016"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="utils_8cpp.html">utils.cpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000017"></a>No known bugs </dd>
|
||||
<dt>File <a class="el" href="utils_8hpp.html">utils.hpp</a> </dt>
|
||||
<dd><a class="anchor" id="_bug000007"></a>No known bugs </dd>
|
||||
</dl>
|
||||
|
||||
@@ -104,25 +104,26 @@ $(document).ready(function(){initNavTree('classIsingModel.html',''); initResizab
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classIsingModel.html">IsingModel</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#ae9f872ca2054992161d53306119979dd">E</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd">energy_diff</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#aaa0787d964b004a17869811a5e947ff5">get_E</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#aa5701496e6483bc4668c486d6d3af625">get_M</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">initialize_energy</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">initialize_energy_diff</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">E</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e">energy_diff</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">engine</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">initialize_energy</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">initialize_energy_diff</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">initialize_engine</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">initialize_lattice</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">initialize_magnetization</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a6776109105051597c275670dabd0054a">initialize_neighbors</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">IsingModel</a>(int L, double T)</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15">IsingModel</a>(int L, double T, int val)</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>IsingModelTest</b> (defined in <a class="el" href="classIsingModel.html">IsingModel</a>)</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47">M</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78">initialize_lattice</a>(int val)</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">initialize_magnetization</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a6776109105051597c275670dabd0054a">initialize_neighbors</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">IsingModel</a>(int L, double T)</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15">IsingModel</a>(int L, double T, int val)</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a2b1cf104e0bda1fce78ed366e1ec7287">IsingModelTest</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">friend</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">M</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>()</td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a></td><td class="entry"><a class="el" href="classIsingModel.html">IsingModel</a></td><td class="entry"><span class="mlabel">private</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
@@ -124,29 +124,29 @@ Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a56559d68dc9aaff1976d84b157f43488"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a> ()</td></tr>
|
||||
<tr class="memdesc:a56559d68dc9aaff1976d84b157f43488"><td class="mdescLeft"> </td><td class="mdescRight">The Metropolis algorithm. <br /></td></tr>
|
||||
<tr class="separator:a56559d68dc9aaff1976d84b157f43488"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aaa0787d964b004a17869811a5e947ff5"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#aaa0787d964b004a17869811a5e947ff5">get_E</a> ()</td></tr>
|
||||
<tr class="memdesc:aaa0787d964b004a17869811a5e947ff5"><td class="mdescLeft"> </td><td class="mdescRight">Get the current energy. <br /></td></tr>
|
||||
<tr class="separator:aaa0787d964b004a17869811a5e947ff5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa5701496e6483bc4668c486d6d3af625"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#aa5701496e6483bc4668c486d6d3af625">get_M</a> ()</td></tr>
|
||||
<tr class="memdesc:aa5701496e6483bc4668c486d6d3af625"><td class="mdescLeft"> </td><td class="mdescRight">Get the current magnetization. <br /></td></tr>
|
||||
<tr class="separator:aa5701496e6483bc4668c486d6d3af625"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
|
||||
Private Member Functions</h2></td></tr>
|
||||
<tr class="memitem:aaedc25b7284e04849269f31291590bf5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">initialize_engine</a> ()</td></tr>
|
||||
<tr class="memdesc:aaedc25b7284e04849269f31291590bf5"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the RNG. <br /></td></tr>
|
||||
<tr class="separator:aaedc25b7284e04849269f31291590bf5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a34a4710949b4a70f3e37ca223aefcf8a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">initialize_lattice</a> ()</td></tr>
|
||||
<tr class="memdesc:a34a4710949b4a70f3e37ca223aefcf8a"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the lattice with a random distribution of 1s and -1s. <br /></td></tr>
|
||||
<tr class="separator:a34a4710949b4a70f3e37ca223aefcf8a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:acc86effd6889bea199a3d70a9f38dc78"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78">initialize_lattice</a> (int val)</td></tr>
|
||||
<tr class="memdesc:acc86effd6889bea199a3d70a9f38dc78"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the lattice with a specific value. <br /></td></tr>
|
||||
<tr class="separator:acc86effd6889bea199a3d70a9f38dc78"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6776109105051597c275670dabd0054a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a6776109105051597c275670dabd0054a">initialize_neighbors</a> ()</td></tr>
|
||||
<tr class="memdesc:a6776109105051597c275670dabd0054a"><td class="mdescLeft"> </td><td class="mdescRight">initialize the neighbors matrix. <br /></td></tr>
|
||||
<tr class="separator:a6776109105051597c275670dabd0054a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aff9a1201933fd5408845a1447e4895b4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">initialize_energy_diff</a> ()</td></tr>
|
||||
<tr class="memdesc:aff9a1201933fd5408845a1447e4895b4"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the hashmap with the correct values. <br /></td></tr>
|
||||
<tr class="memdesc:aff9a1201933fd5408845a1447e4895b4"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the energy_diff array with the correct values. <br /></td></tr>
|
||||
<tr class="separator:aff9a1201933fd5408845a1447e4895b4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a926cf4964d190d2ce23e5a17201787a4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">initialize_magnetization</a> ()</td></tr>
|
||||
<tr class="memdesc:a926cf4964d190d2ce23e5a17201787a4"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the magnetization. <br /></td></tr>
|
||||
<tr class="memdesc:a926cf4964d190d2ce23e5a17201787a4"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the magnetization of the system. <br /></td></tr>
|
||||
<tr class="separator:a926cf4964d190d2ce23e5a17201787a4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a59fced38c695e2fa647f53be81b9d2a1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">initialize_energy</a> ()</td></tr>
|
||||
<tr class="memdesc:a59fced38c695e2fa647f53be81b9d2a1"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the energy. <br /></td></tr>
|
||||
<tr class="memdesc:a59fced38c695e2fa647f53be81b9d2a1"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the energy of the system. <br /></td></tr>
|
||||
<tr class="separator:a59fced38c695e2fa647f53be81b9d2a1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:acf281f6f5ed02911ca6ab07004449864"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel</a> ()</td></tr>
|
||||
<tr class="memdesc:acf281f6f5ed02911ca6ab07004449864"><td class="mdescLeft"> </td><td class="mdescRight">Constructor used for testing. <br /></td></tr>
|
||||
@@ -160,32 +160,36 @@ Private Attributes</h2></td></tr>
|
||||
<tr class="memitem:a94093aaf30facca62737f2ac381fdbcd"><td class="memItemLeft" align="right" valign="top">arma::Mat< int > </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">neighbors</a></td></tr>
|
||||
<tr class="memdesc:a94093aaf30facca62737f2ac381fdbcd"><td class="mdescLeft"> </td><td class="mdescRight">\( L \times 2 \) matrix with the neighbors of each element \( x_i \). <br /></td></tr>
|
||||
<tr class="separator:a94093aaf30facca62737f2ac381fdbcd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1a4ceb1bb2593dbd20c51ed04100cbcd"><td class="memItemLeft" align="right" valign="top">std::unordered_map< int, double > </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd">energy_diff</a></td></tr>
|
||||
<tr class="memdesc:a1a4ceb1bb2593dbd20c51ed04100cbcd"><td class="mdescLeft"> </td><td class="mdescRight">A hash map containing all possible energy changes. <br /></td></tr>
|
||||
<tr class="separator:a1a4ceb1bb2593dbd20c51ed04100cbcd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7112dd6433b1bb9512150cbdc1a0b77e"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e">energy_diff</a> [17]</td></tr>
|
||||
<tr class="memdesc:a7112dd6433b1bb9512150cbdc1a0b77e"><td class="mdescLeft"> </td><td class="mdescRight">An array containing all possible energy differences. <br /></td></tr>
|
||||
<tr class="separator:a7112dd6433b1bb9512150cbdc1a0b77e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a20fc4c0c99d8a119f70a1614784d4e5c"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a></td></tr>
|
||||
<tr class="memdesc:a20fc4c0c99d8a119f70a1614784d4e5c"><td class="mdescLeft"> </td><td class="mdescRight">The temperature of the model. <br /></td></tr>
|
||||
<tr class="separator:a20fc4c0c99d8a119f70a1614784d4e5c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a2b8ac43baefeb386186266d5aa4de348"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a></td></tr>
|
||||
<tr class="memdesc:a2b8ac43baefeb386186266d5aa4de348"><td class="mdescLeft"> </td><td class="mdescRight">Size of the lattice. <br /></td></tr>
|
||||
<tr class="separator:a2b8ac43baefeb386186266d5aa4de348"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae9f872ca2054992161d53306119979dd"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#ae9f872ca2054992161d53306119979dd">E</a></td></tr>
|
||||
<tr class="memdesc:ae9f872ca2054992161d53306119979dd"><td class="mdescLeft"> </td><td class="mdescRight">The current energy state. unit: \( J \). <br /></td></tr>
|
||||
<tr class="separator:ae9f872ca2054992161d53306119979dd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0d373a61baca6b0faa607bb12d82cc47"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47">M</a></td></tr>
|
||||
<tr class="memdesc:a0d373a61baca6b0faa607bb12d82cc47"><td class="mdescLeft"> </td><td class="mdescRight">The current magnetic strength. unit: Unitless. <br /></td></tr>
|
||||
<tr class="separator:a0d373a61baca6b0faa607bb12d82cc47"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1c8a2a4331c7e60c3e1350c0cf8300b9"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">E</a></td></tr>
|
||||
<tr class="memdesc:a1c8a2a4331c7e60c3e1350c0cf8300b9"><td class="mdescLeft"> </td><td class="mdescRight">The current energy state. unit: \( J \). <br /></td></tr>
|
||||
<tr class="separator:a1c8a2a4331c7e60c3e1350c0cf8300b9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aef7232b28df08e064ef58eb5ef32f738"><td class="memItemLeft" align="right" valign="top">int64_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">M</a></td></tr>
|
||||
<tr class="memdesc:aef7232b28df08e064ef58eb5ef32f738"><td class="mdescLeft"> </td><td class="mdescRight">The current magnetic strength. unit: Unitless. <br /></td></tr>
|
||||
<tr class="separator:aef7232b28df08e064ef58eb5ef32f738"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1bbe0cb10abee98058e7b45b22b9cd0a"><td class="memItemLeft" align="right" valign="top">std::mt19937 </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">engine</a></td></tr>
|
||||
<tr class="memdesc:a1bbe0cb10abee98058e7b45b22b9cd0a"><td class="mdescLeft"> </td><td class="mdescRight">The RNG that is used for the Metropolis algorithm. <br /></td></tr>
|
||||
<tr class="separator:a1bbe0cb10abee98058e7b45b22b9cd0a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
|
||||
Friends</h2></td></tr>
|
||||
<tr class="memitem:a2b1cf104e0bda1fce78ed366e1ec7287"><td class="memItemLeft" align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModel.html#a2b1cf104e0bda1fce78ed366e1ec7287">IsingModelTest</a></td></tr>
|
||||
<tr class="memdesc:a2b1cf104e0bda1fce78ed366e1ec7287"><td class="mdescLeft"> </td><td class="mdescRight">Give access to private members to the test class <a class="el" href="classIsingModelTest.html" title="Test class for the Ising model.">IsingModelTest</a>. <br /></td></tr>
|
||||
<tr class="separator:a2b1cf104e0bda1fce78ed366e1ec7287"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>The Ising model in 2 dimensions. </p>
|
||||
<p>None of the methods are parallelized, as there is very little benefit in doing so. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00037">37</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00036">36</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="acf281f6f5ed02911ca6ab07004449864" name="acf281f6f5ed02911ca6ab07004449864"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#acf281f6f5ed02911ca6ab07004449864">◆ </a></span>IsingModel() <span class="overload">[1/3]</span></h2>
|
||||
@@ -212,7 +216,7 @@ Friends</h2></td></tr>
|
||||
|
||||
<p>Constructor used for testing. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00017">17</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00014">14</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -251,7 +255,7 @@ Friends</h2></td></tr>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00021">21</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00019">19</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -297,55 +301,11 @@ Friends</h2></td></tr>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00032">32</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00031">31</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="aaa0787d964b004a17869811a5e947ff5" name="aaa0787d964b004a17869811a5e947ff5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aaa0787d964b004a17869811a5e947ff5">◆ </a></span>get_E()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int IsingModel::get_E </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Get the current energy. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>double </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00135">135</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa5701496e6483bc4668c486d6d3af625" name="aa5701496e6483bc4668c486d6d3af625"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa5701496e6483bc4668c486d6d3af625">◆ </a></span>get_M()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int IsingModel::get_M </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Get the current magnetization. </p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>double </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00140">140</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a59fced38c695e2fa647f53be81b9d2a1" name="a59fced38c695e2fa647f53be81b9d2a1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a59fced38c695e2fa647f53be81b9d2a1">◆ </a></span>initialize_energy()</h2>
|
||||
|
||||
@@ -369,9 +329,9 @@ Friends</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Initialize the energy. </p>
|
||||
<p>Initialize the energy of the system. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00082">82</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00096">96</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -398,14 +358,43 @@ Friends</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Initialize the hashmap with the correct values. </p>
|
||||
<p>Initialize the energy_diff array with the correct values. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00067">67</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00081">81</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aaedc25b7284e04849269f31291590bf5" name="aaedc25b7284e04849269f31291590bf5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aaedc25b7284e04849269f31291590bf5">◆ </a></span>initialize_engine()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void IsingModel::initialize_engine </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Initialize the RNG. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00043">43</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a34a4710949b4a70f3e37ca223aefcf8a" name="a34a4710949b4a70f3e37ca223aefcf8a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a34a4710949b4a70f3e37ca223aefcf8a">◆ </a></span>initialize_lattice()</h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a34a4710949b4a70f3e37ca223aefcf8a">◆ </a></span>initialize_lattice() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -429,7 +418,37 @@ Friends</h2></td></tr>
|
||||
|
||||
<p>Initialize the lattice with a random distribution of 1s and -1s. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00044">44</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00049">49</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="acc86effd6889bea199a3d70a9f38dc78" name="acc86effd6889bea199a3d70a9f38dc78"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#acc86effd6889bea199a3d70a9f38dc78">◆ </a></span>initialize_lattice() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void IsingModel::initialize_lattice </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>val</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Initialize the lattice with a specific value. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00059">59</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -456,9 +475,9 @@ Friends</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Initialize the magnetization. </p>
|
||||
<p>Initialize the magnetization of the system. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00074">74</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00088">88</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -487,7 +506,7 @@ Friends</h2></td></tr>
|
||||
|
||||
<p>initialize the neighbors matrix. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00056">56</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00070">70</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -508,7 +527,7 @@ Friends</h2></td></tr>
|
||||
|
||||
<p>The Metropolis algorithm. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00096">96</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8cpp_source.html#l00110">110</a> of file <a class="el" href="IsingModel_8cpp_source.html">IsingModel.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -533,13 +552,15 @@ Friends</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00039">39</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p>Give access to private members to the test class <a class="el" href="classIsingModelTest.html" title="Test class for the Ising model.">IsingModelTest</a>. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00040">40</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Member Data Documentation</h2>
|
||||
<a id="ae9f872ca2054992161d53306119979dd" name="ae9f872ca2054992161d53306119979dd"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae9f872ca2054992161d53306119979dd">◆ </a></span>E</h2>
|
||||
<a id="a1c8a2a4331c7e60c3e1350c0cf8300b9" name="a1c8a2a4331c7e60c3e1350c0cf8300b9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1c8a2a4331c7e60c3e1350c0cf8300b9">◆ </a></span>E</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -548,7 +569,7 @@ Friends</h2></td></tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int IsingModel::E</td>
|
||||
<td class="memname">int64_t IsingModel::E</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -560,12 +581,12 @@ Friends</h2></td></tr>
|
||||
|
||||
<p>The current energy state. unit: \( J \). </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00068">68</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00070">70</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a1a4ceb1bb2593dbd20c51ed04100cbcd" name="a1a4ceb1bb2593dbd20c51ed04100cbcd"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1a4ceb1bb2593dbd20c51ed04100cbcd">◆ </a></span>energy_diff</h2>
|
||||
<a id="a7112dd6433b1bb9512150cbdc1a0b77e" name="a7112dd6433b1bb9512150cbdc1a0b77e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a7112dd6433b1bb9512150cbdc1a0b77e">◆ </a></span>energy_diff</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -574,7 +595,7 @@ Friends</h2></td></tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::unordered_map<int, double> IsingModel::energy_diff</td>
|
||||
<td class="memname">double IsingModel::energy_diff[17]</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -584,9 +605,35 @@ Friends</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>A hash map containing all possible energy changes. </p>
|
||||
<p>An array containing all possible energy differences. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00056">56</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00058">58</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a1bbe0cb10abee98058e7b45b22b9cd0a" name="a1bbe0cb10abee98058e7b45b22b9cd0a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1bbe0cb10abee98058e7b45b22b9cd0a">◆ </a></span>engine</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::mt19937 IsingModel::engine</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">private</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>The RNG that is used for the Metropolis algorithm. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00078">78</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -612,7 +659,7 @@ Friends</h2></td></tr>
|
||||
|
||||
<p>Size of the lattice. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00064">64</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00066">66</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -638,12 +685,12 @@ Friends</h2></td></tr>
|
||||
|
||||
<p>\( L \times L \) matrix where element \( x \in {-1, 1}\). </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00042">42</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00044">44</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a0d373a61baca6b0faa607bb12d82cc47" name="a0d373a61baca6b0faa607bb12d82cc47"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a0d373a61baca6b0faa607bb12d82cc47">◆ </a></span>M</h2>
|
||||
<a id="aef7232b28df08e064ef58eb5ef32f738" name="aef7232b28df08e064ef58eb5ef32f738"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aef7232b28df08e064ef58eb5ef32f738">◆ </a></span>M</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -652,7 +699,7 @@ Friends</h2></td></tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int IsingModel::M</td>
|
||||
<td class="memname">int64_t IsingModel::M</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@@ -664,7 +711,7 @@ Friends</h2></td></tr>
|
||||
|
||||
<p>The current magnetic strength. unit: Unitless. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00072">72</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00074">74</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -691,7 +738,7 @@ Friends</h2></td></tr>
|
||||
<p>\( L \times 2 \) matrix with the neighbors of each element \( x_i \). </p>
|
||||
<p>The reason why it's \( L \times 2 \) instead of \( L \times 2 \), is that we can see that we can use the same column for the left and upper neighbor, and we can use the same column for the right and lower neighbor. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00052">52</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00054">54</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -717,7 +764,7 @@ Friends</h2></td></tr>
|
||||
|
||||
<p>The temperature of the model. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00060">60</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="IsingModel_8hpp_source.html#l00062">62</a> of file <a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,19 +3,21 @@ var classIsingModel =
|
||||
[ "IsingModel", "classIsingModel.html#acf281f6f5ed02911ca6ab07004449864", null ],
|
||||
[ "IsingModel", "classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5", null ],
|
||||
[ "IsingModel", "classIsingModel.html#a46c9446e94854452f715d307c77c1c15", null ],
|
||||
[ "get_E", "classIsingModel.html#aaa0787d964b004a17869811a5e947ff5", null ],
|
||||
[ "get_M", "classIsingModel.html#aa5701496e6483bc4668c486d6d3af625", null ],
|
||||
[ "initialize_energy", "classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1", null ],
|
||||
[ "initialize_energy_diff", "classIsingModel.html#aff9a1201933fd5408845a1447e4895b4", null ],
|
||||
[ "initialize_engine", "classIsingModel.html#aaedc25b7284e04849269f31291590bf5", null ],
|
||||
[ "initialize_lattice", "classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a", null ],
|
||||
[ "initialize_lattice", "classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78", null ],
|
||||
[ "initialize_magnetization", "classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4", null ],
|
||||
[ "initialize_neighbors", "classIsingModel.html#a6776109105051597c275670dabd0054a", null ],
|
||||
[ "Metropolis", "classIsingModel.html#a56559d68dc9aaff1976d84b157f43488", null ],
|
||||
[ "E", "classIsingModel.html#ae9f872ca2054992161d53306119979dd", null ],
|
||||
[ "energy_diff", "classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd", null ],
|
||||
[ "IsingModelTest", "classIsingModel.html#a2b1cf104e0bda1fce78ed366e1ec7287", null ],
|
||||
[ "E", "classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9", null ],
|
||||
[ "energy_diff", "classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e", null ],
|
||||
[ "engine", "classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a", null ],
|
||||
[ "L", "classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348", null ],
|
||||
[ "lattice", "classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41", null ],
|
||||
[ "M", "classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47", null ],
|
||||
[ "M", "classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738", null ],
|
||||
[ "neighbors", "classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd", null ],
|
||||
[ "T", "classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c", null ]
|
||||
];
|
||||
@@ -111,7 +111,7 @@ $(document).ready(function(){initNavTree('classIsingModelTest.html',''); initRes
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a717e5852ca51432a61fb6ed38da37931"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931">test_init_functions</a> ()</td></tr>
|
||||
<tr class="memdesc:a717e5852ca51432a61fb6ed38da37931"><td class="mdescLeft"> </td><td class="mdescRight">Test That initializing works as intended. <br /></td></tr>
|
||||
<tr class="memdesc:a717e5852ca51432a61fb6ed38da37931"><td class="mdescLeft"> </td><td class="mdescRight">Test that initializing works as intended. <br /></td></tr>
|
||||
<tr class="separator:a717e5852ca51432a61fb6ed38da37931"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a4ace7013fa2d257ad1747961da6bc4de"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de">test_2x2_lattice</a> (double tol, int max_cycles)</td></tr>
|
||||
<tr class="memdesc:a4ace7013fa2d257ad1747961da6bc4de"><td class="mdescLeft"> </td><td class="mdescRight">Test numerical data with analytical data. <br /></td></tr>
|
||||
@@ -120,7 +120,7 @@ Public Member Functions</h2></td></tr>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Test class for the Ising model. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00030">30</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00036">36</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a id="a4ace7013fa2d257ad1747961da6bc4de" name="a4ace7013fa2d257ad1747961da6bc4de"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a4ace7013fa2d257ad1747961da6bc4de">◆ </a></span>test_2x2_lattice()</h2>
|
||||
@@ -166,7 +166,7 @@ Public Member Functions</h2></td></tr>
|
||||
</dl>
|
||||
<p>return int </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00070">70</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00076">76</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -193,9 +193,9 @@ Public Member Functions</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Test That initializing works as intended. </p>
|
||||
<p>Test that initializing works as intended. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00034">34</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="test__suite_8cpp_source.html#l00040">40</a> of file <a class="el" href="test__suite_8cpp_source.html">test_suite.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -104,20 +104,19 @@ $(document).ready(function(){initNavTree('classdata__t.html',''); initResizable(
|
||||
|
||||
<p>This is the complete list of members for <a class="el" href="classdata__t.html">data_t</a>, including all inherited members.</p>
|
||||
<table class="directory">
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>data_t</b>() (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>data_t</b>(double E, double E2, double M, double M2, double M_abs) (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>E</b> (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>E2</b> (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>M</b> (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>M2</b> (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>M_abs</b> (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>operator*</b>(T num) (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>operator*=</b>(T num) (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>operator+</b>(const data_t &b) (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>operator+=</b>(const data_t &b) (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>operator/</b>(T num) (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>operator/=</b>(T num) (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr bgcolor="#f0f0f0" class="odd"><td class="entry"><b>operator=</b>(T num) (defined in <a class="el" href="classdata__t.html">data_t</a>)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classdata__t.html#aa2690d3e5d711b4baf3c8f8b9095faf7">data_t</a>()</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">data_t</a>(double E, double E2, double M, double M2, double M_abs)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a></td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a></td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a></td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a></td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a></td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classdata__t.html#a7954efc97086ea50e10c33113b203085">operator*</a>(T num)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classdata__t.html#a6ddf3a7372730ef2393aee8bbcb34992">operator*=</a>(T num)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classdata__t.html#a13bc1d73eadeb39c507e89f5872d726f">operator+</a>(const data_t &b)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb">operator+=</a>(const data_t &b)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="odd"><td class="entry"><a class="el" href="classdata__t.html#a429a11c53ee7fe08f6a4e75db524521d">operator/</a>(T num)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
<tr class="even"><td class="entry"><a class="el" href="classdata__t.html#a88da5be78439fbdecfa473ec007dffd8">operator/=</a>(T num)</td><td class="entry"><a class="el" href="classdata__t.html">data_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
|
||||
</table></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
@@ -105,47 +105,65 @@ $(document).ready(function(){initNavTree('classdata__t.html',''); initResizable(
|
||||
<div class="headertitle"><div class="title">data_t Class Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Type to use with the <a class="el" href="classIsingModel.html" title="The Ising model in 2 dimensions.">IsingModel</a> class and montecarlo module.
|
||||
<a href="classdata__t.html#details">More...</a></p>
|
||||
|
||||
<p><code>#include <<a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>></code></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:a3f2d19ab309e696ba91a2000479bcb83"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">data_t</a> (double E, double E2, double M, double M2, double M_abs)</td></tr>
|
||||
<tr class="memitem:aa2690d3e5d711b4baf3c8f8b9095faf7"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdata__t.html#aa2690d3e5d711b4baf3c8f8b9095faf7">data_t</a> ()</td></tr>
|
||||
<tr class="memdesc:aa2690d3e5d711b4baf3c8f8b9095faf7"><td class="mdescLeft"> </td><td class="mdescRight">constructor with no parameters. <br /></td></tr>
|
||||
<tr class="separator:aa2690d3e5d711b4baf3c8f8b9095faf7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3f2d19ab309e696ba91a2000479bcb83"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">data_t</a> (double <a class="el" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a>, double <a class="el" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a>, double <a class="el" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a>, double <a class="el" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a>, double <a class="el" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a>)</td></tr>
|
||||
<tr class="memdesc:a3f2d19ab309e696ba91a2000479bcb83"><td class="mdescLeft"> </td><td class="mdescRight">Constructor with parameters. <br /></td></tr>
|
||||
<tr class="separator:a3f2d19ab309e696ba91a2000479bcb83"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a429a11c53ee7fe08f6a4e75db524521d"><td class="memTemplParams" colspan="2">template<class T > </td></tr>
|
||||
<tr class="memitem:a429a11c53ee7fe08f6a4e75db524521d"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdata__t.html#a429a11c53ee7fe08f6a4e75db524521d">operator/</a> (T num)</td></tr>
|
||||
<tr class="memdesc:a429a11c53ee7fe08f6a4e75db524521d"><td class="mdescLeft"> </td><td class="mdescRight">Overload of the division operator. <br /></td></tr>
|
||||
<tr class="separator:a429a11c53ee7fe08f6a4e75db524521d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a88da5be78439fbdecfa473ec007dffd8"><td class="memTemplParams" colspan="2">template<class T > </td></tr>
|
||||
<tr class="memitem:a88da5be78439fbdecfa473ec007dffd8"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdata__t.html#a88da5be78439fbdecfa473ec007dffd8">operator/=</a> (T num)</td></tr>
|
||||
<tr class="memdesc:a88da5be78439fbdecfa473ec007dffd8"><td class="mdescLeft"> </td><td class="mdescRight">Overload of the division equals operator. <br /></td></tr>
|
||||
<tr class="separator:a88da5be78439fbdecfa473ec007dffd8"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7954efc97086ea50e10c33113b203085"><td class="memTemplParams" colspan="2">template<class T > </td></tr>
|
||||
<tr class="memitem:a7954efc97086ea50e10c33113b203085"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdata__t.html#a7954efc97086ea50e10c33113b203085">operator*</a> (T num)</td></tr>
|
||||
<tr class="memdesc:a7954efc97086ea50e10c33113b203085"><td class="mdescLeft"> </td><td class="mdescRight">Overload of the multiply operator. <br /></td></tr>
|
||||
<tr class="separator:a7954efc97086ea50e10c33113b203085"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6ddf3a7372730ef2393aee8bbcb34992"><td class="memTemplParams" colspan="2">template<class T > </td></tr>
|
||||
<tr class="memitem:a6ddf3a7372730ef2393aee8bbcb34992"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdata__t.html#a6ddf3a7372730ef2393aee8bbcb34992">operator*=</a> (T num)</td></tr>
|
||||
<tr class="memdesc:a6ddf3a7372730ef2393aee8bbcb34992"><td class="mdescLeft"> </td><td class="mdescRight">Overload of the multiply equals operator. <br /></td></tr>
|
||||
<tr class="separator:a6ddf3a7372730ef2393aee8bbcb34992"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a13bc1d73eadeb39c507e89f5872d726f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classdata__t.html#a13bc1d73eadeb39c507e89f5872d726f">operator+</a> (const <a class="el" href="classdata__t.html">data_t</a> &b)</td></tr>
|
||||
<tr class="memdesc:a13bc1d73eadeb39c507e89f5872d726f"><td class="mdescLeft"> </td><td class="mdescRight">Overload of the addition operator. <br /></td></tr>
|
||||
<tr class="separator:a13bc1d73eadeb39c507e89f5872d726f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a6cb96b4ff750ab29041038ca53f307cb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb">operator+=</a> (const <a class="el" href="classdata__t.html">data_t</a> &b)</td></tr>
|
||||
<tr class="memdesc:a6cb96b4ff750ab29041038ca53f307cb"><td class="mdescLeft"> </td><td class="mdescRight">Overload of the addition equals operator. <br /></td></tr>
|
||||
<tr class="separator:a6cb96b4ff750ab29041038ca53f307cb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae2d3c039ae62418d03f3fe4d02c94416"><td class="memTemplParams" colspan="2">template<class T > </td></tr>
|
||||
<tr class="memitem:ae2d3c039ae62418d03f3fe4d02c94416"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classdata__t.html#ae2d3c039ae62418d03f3fe4d02c94416">operator=</a> (T num)</td></tr>
|
||||
<tr class="separator:ae2d3c039ae62418d03f3fe4d02c94416"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
|
||||
Public Attributes</h2></td></tr>
|
||||
<tr class="memitem:a6c1a196d96e177b11ca98c61fae35a2e"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a></td></tr>
|
||||
<tr class="memdesc:a6c1a196d96e177b11ca98c61fae35a2e"><td class="mdescLeft"> </td><td class="mdescRight">Energy. <br /></td></tr>
|
||||
<tr class="separator:a6c1a196d96e177b11ca98c61fae35a2e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ad08d2488bf913c626157471cf6e8a46a"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a></td></tr>
|
||||
<tr class="memdesc:ad08d2488bf913c626157471cf6e8a46a"><td class="mdescLeft"> </td><td class="mdescRight">Magnetization. <br /></td></tr>
|
||||
<tr class="separator:ad08d2488bf913c626157471cf6e8a46a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:abb622f9c6cc5ffb9dddb151d2e202f72"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a></td></tr>
|
||||
<tr class="memdesc:abb622f9c6cc5ffb9dddb151d2e202f72"><td class="mdescLeft"> </td><td class="mdescRight">Energy squared. <br /></td></tr>
|
||||
<tr class="separator:abb622f9c6cc5ffb9dddb151d2e202f72"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a71ae3cd4460f2c66239500c11804e70b"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a></td></tr>
|
||||
<tr class="memdesc:a71ae3cd4460f2c66239500c11804e70b"><td class="mdescLeft"> </td><td class="mdescRight">Magnetization squared. <br /></td></tr>
|
||||
<tr class="separator:a71ae3cd4460f2c66239500c11804e70b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a586475e0f71322dffda2e75f228ab24b"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a></td></tr>
|
||||
<tr class="memdesc:a586475e0f71322dffda2e75f228ab24b"><td class="mdescLeft"> </td><td class="mdescRight">Absolute Magnetization. <br /></td></tr>
|
||||
<tr class="separator:a586475e0f71322dffda2e75f228ab24b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock">
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00018">18</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<div class="textblock"><p>Type to use with the <a class="el" href="classIsingModel.html" title="The Ising model in 2 dimensions.">IsingModel</a> class and montecarlo module. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00019">19</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a id="aa2690d3e5d711b4baf3c8f8b9095faf7" name="aa2690d3e5d711b4baf3c8f8b9095faf7"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa2690d3e5d711b4baf3c8f8b9095faf7">◆ </a></span>data_t() <span class="overload">[1/2]</span></h2>
|
||||
@@ -170,7 +188,9 @@ Public Attributes</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00022">22</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p>constructor with no parameters. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00029">29</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -226,7 +246,19 @@ Public Attributes</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00031">31</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p>Constructor with parameters. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">E</td><td>Initial energy </td></tr>
|
||||
<tr><td class="paramname">E2</td><td>Initial energy squared </td></tr>
|
||||
<tr><td class="paramname">M</td><td>Initial magnetization </td></tr>
|
||||
<tr><td class="paramname">M2</td><td>Initial magnetization squared </td></tr>
|
||||
<tr><td class="paramname">M_abs</td><td>Initial absolute magnetization </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00045">45</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -257,7 +289,16 @@ template<class T > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00063">63</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p>Overload of the multiply operator. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">num</td><td>The number to multiply each field by.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00096">96</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -287,7 +328,16 @@ template<class T > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00075">75</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p>Overload of the multiply equals operator. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">num</td><td>The number to multiply each field by.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00114">114</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -315,7 +365,16 @@ template<class T > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00086">86</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p>Overload of the addition operator. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">b</td><td>The <a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> field to add.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00132">132</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -343,7 +402,16 @@ template<class T > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00098">98</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p>Overload of the addition equals operator. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">b</td><td>The <a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> field to add.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00150">150</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -373,7 +441,16 @@ template<class T > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00040">40</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p>Overload of the division operator. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">num</td><td>The number to divide each field by.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00060">60</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -403,37 +480,16 @@ template<class T > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00052">52</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae2d3c039ae62418d03f3fe4d02c94416" name="ae2d3c039ae62418d03f3fe4d02c94416"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae2d3c039ae62418d03f3fe4d02c94416">◆ </a></span>operator=()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<class T > </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void data_t::operator= </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">T </td>
|
||||
<td class="paramname"><em>num</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<p>Overload of the division equals operator. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">num</td><td>The number to divide each field by.</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00109">109</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00079">79</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -450,7 +506,9 @@ template<class T > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00020">20</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p>Energy. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00021">21</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -466,7 +524,9 @@ template<class T > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00020">20</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p>Energy squared. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00023">23</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -482,7 +542,9 @@ template<class T > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00020">20</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p>Magnetization. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00022">22</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -498,7 +560,9 @@ template<class T > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00020">20</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p>Magnetization squared. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00024">24</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -514,7 +578,9 @@ template<class T > </div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00020">20</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
<p>Absolute Magnetization. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="data__type_8hpp_source.html#l00025">25</a> of file <a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
16
docs/classdata__t.js
Normal file
16
docs/classdata__t.js
Normal file
@@ -0,0 +1,16 @@
|
||||
var classdata__t =
|
||||
[
|
||||
[ "data_t", "classdata__t.html#aa2690d3e5d711b4baf3c8f8b9095faf7", null ],
|
||||
[ "data_t", "classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83", null ],
|
||||
[ "operator*", "classdata__t.html#a7954efc97086ea50e10c33113b203085", null ],
|
||||
[ "operator*=", "classdata__t.html#a6ddf3a7372730ef2393aee8bbcb34992", null ],
|
||||
[ "operator+", "classdata__t.html#a13bc1d73eadeb39c507e89f5872d726f", null ],
|
||||
[ "operator+=", "classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb", null ],
|
||||
[ "operator/", "classdata__t.html#a429a11c53ee7fe08f6a4e75db524521d", null ],
|
||||
[ "operator/=", "classdata__t.html#a88da5be78439fbdecfa473ec007dffd8", null ],
|
||||
[ "E", "classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e", null ],
|
||||
[ "E2", "classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72", null ],
|
||||
[ "M", "classdata__t.html#ad08d2488bf913c626157471cf6e8a46a", null ],
|
||||
[ "M2", "classdata__t.html#a71ae3cd4460f2c66239500c11804e70b", null ],
|
||||
[ "M_abs", "classdata__t.html#a586475e0f71322dffda2e75f228ab24b", null ]
|
||||
];
|
||||
@@ -102,18 +102,18 @@ $(document).ready(function(){initNavTree('data__type_8cpp.html',''); initResizab
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Implementation for the <a class="el" href="classdata__t.html">data_t</a> type.
|
||||
<p>Implementation for the <a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> type.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include "<a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>"</code><br />
|
||||
</div>
|
||||
<p><a href="data__type_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Implementation for the <a class="el" href="classdata__t.html">data_t</a> type. </p>
|
||||
<div class="textblock"><p>Implementation for the <a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> type. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000008">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000001">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="data__type_8cpp_source.html">data_type.cpp</a>.</p>
|
||||
</div></div><!-- contents -->
|
||||
|
||||
@@ -101,9 +101,18 @@ $(document).ready(function(){initNavTree('data__type_8cpp_source.html',''); init
|
||||
<div class="headertitle"><div class="title">data_type.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="data__type_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include "<a class="code" href="data__type_8hpp.html">data_type.hpp</a>"</span></div>
|
||||
<div class="ttc" id="adata__type_8hpp_html"><div class="ttname"><a href="data__type_8hpp.html">data_type.hpp</a></div><div class="ttdoc">Header for the data_t type.</div></div>
|
||||
<a href="data__type_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/** @file data_type.cpp</span></div>
|
||||
<div class="line"><span class="lineno"> 2</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 3</span><span class="comment"> * @author Cory Alexander Balaton (coryab)</span></div>
|
||||
<div class="line"><span class="lineno"> 4</span><span class="comment"> * @author Janita Ovidie Sandtrøen Willumsen (janitaws)</span></div>
|
||||
<div class="line"><span class="lineno"> 5</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 6</span><span class="comment"> * @version 1.0</span></div>
|
||||
<div class="line"><span class="lineno"> 7</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 8</span><span class="comment"> * @brief Implementation for the data_t type.</span></div>
|
||||
<div class="line"><span class="lineno"> 9</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 10</span><span class="comment"> * @bug No known bugs</span></div>
|
||||
<div class="line"><span class="lineno"> 11</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="data__type_8hpp.html" title="Header for the data_t type.">"data_type.hpp"</a></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
@@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('data__type_8hpp.html',''); initResizab
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Header for the <a class="el" href="classdata__t.html">data_t</a> type.
|
||||
<p>Header for the <a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> type.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include <sys/types.h></code><br />
|
||||
<code>#include <type_traits></code><br />
|
||||
@@ -114,10 +114,11 @@ $(document).ready(function(){initNavTree('data__type_8hpp.html',''); initResizab
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
||||
Classes</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classdata__t.html">data_t</a></td></tr>
|
||||
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Type to use with the <a class="el" href="classIsingModel.html" title="The Ising model in 2 dimensions.">IsingModel</a> class and montecarlo module. <a href="classdata__t.html#details">More...</a><br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Header for the <a class="el" href="classdata__t.html">data_t</a> type. </p>
|
||||
<div class="textblock"><p>Header for the <a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> type. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var data__type_8hpp =
|
||||
[
|
||||
[ "data_t", "classdata__t.html", null ]
|
||||
[ "data_t", "classdata__t.html", "classdata__t" ]
|
||||
];
|
||||
@@ -101,116 +101,185 @@ $(document).ready(function(){initNavTree('data__type_8hpp_source.html',''); init
|
||||
<div class="headertitle"><div class="title">data_type.hpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="data__type_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#ifndef __DATA_TYPE__</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#define __DATA_TYPE__</span></div>
|
||||
<a href="data__type_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/** @file data_type.hpp</span></div>
|
||||
<div class="line"><span class="lineno"> 2</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 3</span><span class="comment"> * @author Cory Alexander Balaton (coryab)</span></div>
|
||||
<div class="line"><span class="lineno"> 4</span><span class="comment"> * @author Janita Ovidie Sandtrøen Willumsen (janitaws)</span></div>
|
||||
<div class="line"><span class="lineno"> 5</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 6</span><span class="comment"> * @version 1.0</span></div>
|
||||
<div class="line"><span class="lineno"> 7</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 8</span><span class="comment"> * @brief Header for the data_t type.</span></div>
|
||||
<div class="line"><span class="lineno"> 9</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 10</span><span class="comment"> * @bug No known bugs</span></div>
|
||||
<div class="line"><span class="lineno"> 11</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#</span><span class="preprocessor">ifndef</span> <span class="preprocessor">__DATA_TYPE__</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">__DATA_TYPE__</span></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include <sys/types.h></span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <type_traits></span></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">sys</span><span class="preprocessor">/</span><span class="preprocessor">types</span><span class="preprocessor">.</span><span class="preprocessor">h</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">type_traits</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="classdata__t.html"> 18</a></span><span class="keyword">class </span><a class="code hl_class" href="classdata__t.html">data_t</a> {</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordtype">double</span> E, M, E2, M2, M_abs;</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <a class="code hl_class" href="classdata__t.html">data_t</a>()</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> {</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> this->E = 0.;</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> this->E2 = 0.;</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> this->M = 0.;</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> this->M2 = 0.;</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> this->M_abs = 0.;</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> }</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <a class="code hl_class" href="classdata__t.html">data_t</a>(<span class="keywordtype">double</span> E, <span class="keywordtype">double</span> E2, <span class="keywordtype">double</span> M, <span class="keywordtype">double</span> M2, <span class="keywordtype">double</span> M_abs)</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> {</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> this->E = E;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> this->E2 = E2;</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> this->M = M;</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> this->M2 = M2;</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> this->M_abs = M_abs;</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> }</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">template</span> <<span class="keyword">class</span> T> <a class="code hl_class" href="classdata__t.html">data_t</a> operator/(T num)</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> {</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <a class="code hl_class" href="classdata__t.html">data_t</a> res;</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> res.E = this->E / (double)num;</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> res.E2 = this->E2 / (double)num;</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> res.M = this->M / (double)num;</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> res.M2 = this->M2 / (double)num;</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> res.M_abs = this->M_abs / (double)num;</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">return</span> res;</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> }</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keyword">template</span> <<span class="keyword">class</span> T> <a class="code hl_class" href="classdata__t.html">data_t</a>& operator/=(T num)</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> {</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> this->E /= (double)num;</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> this->E2 /= (double)num;</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> this->M /= (double)num;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> this->M2 /= (double)num;</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> this->M_abs /= (double)num;</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> }</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keyword">template</span> <<span class="keyword">class</span> T> <a class="code hl_class" href="classdata__t.html">data_t</a> operator*(T num)</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> {</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <a class="code hl_class" href="classdata__t.html">data_t</a> res;</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> res.E = this->E * (double)num;</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> res.E2 = this->E2 * (double)num;</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> res.M = this->M * (double)num;</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> res.M2 = this->M2 * (double)num;</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> res.M_abs = this->M_abs * (double)num;</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">/** @brief Type to use with the IsingModel class and montecarlo module.*/</span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="classdata__t.html"> 19</a></span><span class="keyword">class</span> <a class="code hl_class" href="classdata__t.html">data_t</a> {</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="keyword">public</span>:</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e"> 21</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a>; <span class="comment">///< Energy</span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a"> 22</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a>; <span class="comment">///< Magnetization</span></div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72"> 23</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a>; <span class="comment">///< Energy squared</span></div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b"> 24</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a>; <span class="comment">///< Magnetization squared</span></div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b"> 25</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a>; <span class="comment">///< Absolute Magnetization</span></div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="comment">/** @brief constructor with no parameters.</span></div>
|
||||
<div class="line"><span class="lineno"> 28</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="classdata__t.html#aa2690d3e5d711b4baf3c8f8b9095faf7"> 29</a></span> <a class="code hl_function" href="classdata__t.html#aa2690d3e5d711b4baf3c8f8b9095faf7">data_t</a>()</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> {</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">-></a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> = 0.;</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">-></a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> = 0.;</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">-></a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> = 0.;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">-></a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> = 0.;</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">-></a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> = 0.;</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> }</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="comment">/** @brief Constructor with parameters.</span></div>
|
||||
<div class="line"><span class="lineno"> 39</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 40</span><span class="comment"> * @param E Initial energy</span></div>
|
||||
<div class="line"><span class="lineno"> 41</span><span class="comment"> * @param E2 Initial energy squared</span></div>
|
||||
<div class="line"><span class="lineno"> 42</span><span class="comment"> * @param M Initial magnetization</span></div>
|
||||
<div class="line"><span class="lineno"> 43</span><span class="comment"> * @param M2 Initial magnetization squared</span></div>
|
||||
<div class="line"><span class="lineno"> 44</span><span class="comment"> * @param M_abs Initial absolute magnetization*/</span></div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83"> 45</a></span> <a class="code hl_function" href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">data_t</a>(<span class="keywordtype">double</span> E, <span class="keywordtype">double</span> E2, <span class="keywordtype">double</span> M, <span class="keywordtype">double</span> M2, <span class="keywordtype">double</span> M_abs)</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> {</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">-></a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> = E;</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">-></a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> = E2;</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">-></a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> = M;</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">-></a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> = M2;</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">-></a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> = M_abs;</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> }</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="comment">/** @brief Overload of the division operator.</span></div>
|
||||
<div class="line"><span class="lineno"> 55</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 56</span><span class="comment"> * @param num The number to divide each field by.</span></div>
|
||||
<div class="line"><span class="lineno"> 57</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 58</span><span class="comment"> * @return data_t</span></div>
|
||||
<div class="line"><span class="lineno"> 59</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="classdata__t.html#a429a11c53ee7fe08f6a4e75db524521d"> 60</a></span> <span class="keyword">template</span> <<span class="keyword">class</span> T> <a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="classdata__t.html#a429a11c53ee7fe08f6a4e75db524521d">operator</a>/(T num)</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> {</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <a class="code hl_class" href="classdata__t.html">data_t</a> res;</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> res<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">-></a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> / (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> res<a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">.</a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">-></a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> / (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> res<a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">.</a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">-></a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> / (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> res<a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">.</a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">-></a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> / (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> res<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">.</a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">-></a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> / (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">return</span> res;</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> }</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordflow">return</span> res;</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> }</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keyword">template</span> <<span class="keyword">class</span> T> <a class="code hl_class" href="classdata__t.html">data_t</a>& operator*=(T num)</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> {</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> this->E *= (double)num;</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> this->E2 *= (double)num;</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> this->M *= (double)num;</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> this->M2 *= (double)num;</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> this->M_abs *= (double)num;</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> </div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> }</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <a class="code hl_class" href="classdata__t.html">data_t</a> operator+(<span class="keyword">const</span> <a class="code hl_class" href="classdata__t.html">data_t</a> &b)</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> {</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_class" href="classdata__t.html">data_t</a> res;</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> res.E = this->E + b.E;</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> res.E2 = this->E2 + b.E2;</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> res.M = this->M + b.M;</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> res.M2 = this->M2 + b.M2;</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> res.M_abs = this->M_abs + b.M_abs;</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">return</span> res;</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> }</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_class" href="classdata__t.html">data_t</a>& operator+=(<span class="keyword">const</span> <a class="code hl_class" href="classdata__t.html">data_t</a> &b)</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> {</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> this->E += b.E;</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> this->E2 += b.E2;</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> this->M += b.M;</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> this->M2 += b.M2;</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> this->M_abs += b.M_abs;</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> </div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> }</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keyword">template</span> <<span class="keyword">class</span> T> <span class="keywordtype">void</span> operator=(T num)</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> {</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> this->E = (double)num;</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> this->E2 = (double)num;</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> this->M = (double)num;</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> this->M2 = (double)num;</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> this->M_abs = (double)num;</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> }</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span>};</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00018">data_type.hpp:18</a></div></div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="comment">/** @brief Overload of the division equals operator.</span></div>
|
||||
<div class="line"><span class="lineno"> 74</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 75</span><span class="comment"> * @param num The number to divide each field by.</span></div>
|
||||
<div class="line"><span class="lineno"> 76</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 77</span><span class="comment"> * @return data_t</span></div>
|
||||
<div class="line"><span class="lineno"> 78</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="classdata__t.html#a88da5be78439fbdecfa473ec007dffd8"> 79</a></span> <span class="keyword">template</span> <<span class="keyword">class</span> T> <a class="code hl_class" href="classdata__t.html">data_t</a> &<a class="code hl_function" href="classdata__t.html#a88da5be78439fbdecfa473ec007dffd8">operator</a>/=(T num)</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> {</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">-></a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> /= (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">-></a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> /= (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">-></a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> /= (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">-></a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> /= (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">-></a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> /= (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> }</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="comment">/** @brief Overload of the multiply operator.</span></div>
|
||||
<div class="line"><span class="lineno"> 91</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 92</span><span class="comment"> * @param num The number to multiply each field by.</span></div>
|
||||
<div class="line"><span class="lineno"> 93</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 94</span><span class="comment"> * @return data_t</span></div>
|
||||
<div class="line"><span class="lineno"> 95</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="classdata__t.html#a7954efc97086ea50e10c33113b203085"> 96</a></span> <span class="keyword">template</span> <<span class="keyword">class</span> T> <a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="classdata__t.html#a7954efc97086ea50e10c33113b203085">operator</a>*(T num)</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> {</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_class" href="classdata__t.html">data_t</a> res;</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> res<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">-></a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> * (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> res<a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">.</a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">-></a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> * (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> res<a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">.</a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">-></a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> * (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> res<a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">.</a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">-></a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> * (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> res<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">.</a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">-></a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> * (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">return</span> res;</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="comment">/** @brief Overload of the multiply equals operator.</span></div>
|
||||
<div class="line"><span class="lineno"> 109</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 110</span><span class="comment"> * @param num The number to multiply each field by.</span></div>
|
||||
<div class="line"><span class="lineno"> 111</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 112</span><span class="comment"> * @return data_t</span></div>
|
||||
<div class="line"><span class="lineno"> 113</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"><a class="line" href="classdata__t.html#a6ddf3a7372730ef2393aee8bbcb34992"> 114</a></span> <span class="keyword">template</span> <<span class="keyword">class</span> T> <a class="code hl_class" href="classdata__t.html">data_t</a> &<a class="code hl_function" href="classdata__t.html#a6ddf3a7372730ef2393aee8bbcb34992">operator</a>*=(T num)</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> {</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">-></a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> *= (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">-></a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> *= (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">-></a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> *= (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">-></a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> *= (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">-></a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> *= (<span class="keywordtype">double</span>)num;</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> }</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> </div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> </div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="comment">/** @brief Overload of the addition operator.</span></div>
|
||||
<div class="line"><span class="lineno"> 127</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 128</span><span class="comment"> * @param b The data_t field to add.</span></div>
|
||||
<div class="line"><span class="lineno"> 129</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 130</span><span class="comment"> * @return data_t</span></div>
|
||||
<div class="line"><span class="lineno"> 131</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"><a class="line" href="classdata__t.html#a13bc1d73eadeb39c507e89f5872d726f"> 132</a></span> <a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="classdata__t.html#a13bc1d73eadeb39c507e89f5872d726f">operator</a>+(<span class="keyword">const</span> <a class="code hl_class" href="classdata__t.html">data_t</a> &b)</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> {</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <a class="code hl_class" href="classdata__t.html">data_t</a> res;</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> res<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">-></a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> + b<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a>;</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> res<a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">.</a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">-></a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> + b<a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">.</a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a>;</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> res<a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">.</a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">-></a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> + b<a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">.</a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a>;</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> res<a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">.</a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">-></a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> + b<a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">.</a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a>;</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> res<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">.</a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> = <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">-></a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> + b<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">.</a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a>;</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> </div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="keywordflow">return</span> res;</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> }</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> </div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="comment">/** @brief Overload of the addition equals operator.</span></div>
|
||||
<div class="line"><span class="lineno"> 145</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 146</span><span class="comment"> * @param b The data_t field to add.</span></div>
|
||||
<div class="line"><span class="lineno"> 147</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 148</span><span class="comment"> * @return data_t</span></div>
|
||||
<div class="line"><span class="lineno"> 149</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"><a class="line" href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb"> 150</a></span> <a class="code hl_class" href="classdata__t.html">data_t</a> &<a class="code hl_function" href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb">operator</a>+=(<span class="keyword">const</span> <a class="code hl_class" href="classdata__t.html">data_t</a> &b)</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> {</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">-></a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> += b<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a>;</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">-></a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> += b<a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">.</a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a>;</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">-></a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> += b<a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">.</a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a>;</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">-></a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> += b<a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">.</a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a>;</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keyword">this</span><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">-></a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> += b<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">.</a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a>;</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> </div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> }</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span>};</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> </div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span><span class="comment">// Declare a custom reduction for the data_t type.</span></div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span><span class="preprocessor">#</span><span class="preprocessor">pragma</span> <span class="preprocessor">omp</span> <span class="preprocessor">declare</span> <span class="preprocessor">reduction</span><span class="preprocessor">(</span><span class="preprocessor">+</span> <span class="preprocessor">:</span> <span class="preprocessor">data_t</span> <span class="preprocessor">:</span> <span class="preprocessor">omp_out</span> <span class="preprocessor">+=</span> <span class="preprocessor">omp_in</span><span class="preprocessor">)</span></div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span><span class="preprocessor">#</span><span class="preprocessor">endif</span></div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdoc">Type to use with the IsingModel class and montecarlo module.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00019">data_type.hpp:19</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a13bc1d73eadeb39c507e89f5872d726f"><div class="ttname"><a href="classdata__t.html#a13bc1d73eadeb39c507e89f5872d726f">data_t::operator+</a></div><div class="ttdeci">data_t operator+(const data_t &b)</div><div class="ttdoc">Overload of the addition operator.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00132">data_type.hpp:132</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a3f2d19ab309e696ba91a2000479bcb83"><div class="ttname"><a href="classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83">data_t::data_t</a></div><div class="ttdeci">data_t(double E, double E2, double M, double M2, double M_abs)</div><div class="ttdoc">Constructor with parameters.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00045">data_type.hpp:45</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a429a11c53ee7fe08f6a4e75db524521d"><div class="ttname"><a href="classdata__t.html#a429a11c53ee7fe08f6a4e75db524521d">data_t::operator/</a></div><div class="ttdeci">data_t operator/(T num)</div><div class="ttdoc">Overload of the division operator.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00060">data_type.hpp:60</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a586475e0f71322dffda2e75f228ab24b"><div class="ttname"><a href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">data_t::M_abs</a></div><div class="ttdeci">double M_abs</div><div class="ttdoc">Absolute Magnetization.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00025">data_type.hpp:25</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a6c1a196d96e177b11ca98c61fae35a2e"><div class="ttname"><a href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">data_t::E</a></div><div class="ttdeci">double E</div><div class="ttdoc">Energy.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00021">data_type.hpp:21</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a6cb96b4ff750ab29041038ca53f307cb"><div class="ttname"><a href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb">data_t::operator+=</a></div><div class="ttdeci">data_t & operator+=(const data_t &b)</div><div class="ttdoc">Overload of the addition equals operator.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00150">data_type.hpp:150</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a6ddf3a7372730ef2393aee8bbcb34992"><div class="ttname"><a href="classdata__t.html#a6ddf3a7372730ef2393aee8bbcb34992">data_t::operator*=</a></div><div class="ttdeci">data_t & operator*=(T num)</div><div class="ttdoc">Overload of the multiply equals operator.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00114">data_type.hpp:114</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a71ae3cd4460f2c66239500c11804e70b"><div class="ttname"><a href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">data_t::M2</a></div><div class="ttdeci">double M2</div><div class="ttdoc">Magnetization squared.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00024">data_type.hpp:24</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a7954efc97086ea50e10c33113b203085"><div class="ttname"><a href="classdata__t.html#a7954efc97086ea50e10c33113b203085">data_t::operator*</a></div><div class="ttdeci">data_t operator*(T num)</div><div class="ttdoc">Overload of the multiply operator.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00096">data_type.hpp:96</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a88da5be78439fbdecfa473ec007dffd8"><div class="ttname"><a href="classdata__t.html#a88da5be78439fbdecfa473ec007dffd8">data_t::operator/=</a></div><div class="ttdeci">data_t & operator/=(T num)</div><div class="ttdoc">Overload of the division equals operator.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00079">data_type.hpp:79</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_aa2690d3e5d711b4baf3c8f8b9095faf7"><div class="ttname"><a href="classdata__t.html#aa2690d3e5d711b4baf3c8f8b9095faf7">data_t::data_t</a></div><div class="ttdeci">data_t()</div><div class="ttdoc">constructor with no parameters.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00029">data_type.hpp:29</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_abb622f9c6cc5ffb9dddb151d2e202f72"><div class="ttname"><a href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">data_t::E2</a></div><div class="ttdeci">double E2</div><div class="ttdoc">Energy squared.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00023">data_type.hpp:23</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_ad08d2488bf913c626157471cf6e8a46a"><div class="ttname"><a href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">data_t::M</a></div><div class="ttdeci">double M</div><div class="ttdoc">Magnetization.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00022">data_type.hpp:22</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
@@ -102,15 +102,10 @@ $(document).ready(function(){initNavTree('dir_68267d1309a1af8e8297ef4c3efbcdba.h
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="subdirs" name="subdirs"></a>
|
||||
Directories</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">directory  </td><td class="memItemRight" valign="bottom"><a class="el" href="dir_634e799a3947388232110823971192a8.html">scripts</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
|
||||
Files</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="data__type_8cpp.html">data_type.cpp</a> <a href="data__type_8cpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:data__type_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">Implementation for the <a class="el" href="classdata__t.html">data_t</a> type. <br /></td></tr>
|
||||
<tr class="memdesc:data__type_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">Implementation for the <a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> type. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="IsingModel_8cpp.html">IsingModel.cpp</a> <a href="IsingModel_8cpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:IsingModel_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">The implementation of the Ising model. <br /></td></tr>
|
||||
@@ -118,9 +113,18 @@ Files</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html">main.cpp</a> <a href="main_8cpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:main_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">The main program. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="mcmc__progression_8cpp.html">mcmc_progression.cpp</a> <a href="mcmc__progression_8cpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:mcmc__progression_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">Execute the mcmc algorithm and write data to file after each Monte Carlo cycle. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8cpp.html">monte_carlo.cpp</a> <a href="monte__carlo_8cpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:monte__carlo_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">Implementation of the monte carlo functions. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="pd__estimate_8cpp.html">pd_estimate.cpp</a> <a href="pd__estimate_8cpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:pd__estimate_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">execute the mcmc algorithm and write data to file after each Monte Carlo cycles. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="phase__transition_8cpp.html">phase_transition.cpp</a> <a href="phase__transition_8cpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:phase__transition_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">Sweep over different temperatures and generate data. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="phase__transition__mpi_8cpp.html">phase_transition_mpi.cpp</a> <a href="phase__transition__mpi_8cpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:phase__transition__mpi_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">Sweep over different temperatures and generate data. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -130,6 +134,9 @@ Files</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="testlib_8cpp.html">testlib.cpp</a> <a href="testlib_8cpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:testlib_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">Implementation of the testing library. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="time_8cpp.html">time.cpp</a> <a href="time_8cpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:time_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">Timing various things. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8cpp.html">utils.cpp</a> <a href="utils_8cpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:utils_8cpp"><td class="mdescLeft"> </td><td class="mdescRight">Implementation of the utils. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
var dir_68267d1309a1af8e8297ef4c3efbcdba =
|
||||
[
|
||||
[ "scripts", "dir_634e799a3947388232110823971192a8.html", "dir_634e799a3947388232110823971192a8" ],
|
||||
[ "data_type.cpp", "data__type_8cpp.html", null ],
|
||||
[ "IsingModel.cpp", "IsingModel_8cpp.html", null ],
|
||||
[ "main.cpp", "main_8cpp.html", "main_8cpp" ],
|
||||
[ "mcmc_progression.cpp", "mcmc__progression_8cpp.html", "mcmc__progression_8cpp" ],
|
||||
[ "monte_carlo.cpp", "monte__carlo_8cpp.html", "monte__carlo_8cpp" ],
|
||||
[ "pd_estimate.cpp", "pd__estimate_8cpp.html", "pd__estimate_8cpp" ],
|
||||
[ "phase_transition.cpp", "phase__transition_8cpp.html", "phase__transition_8cpp" ],
|
||||
[ "phase_transition_mpi.cpp", "phase__transition__mpi_8cpp.html", "phase__transition__mpi_8cpp" ],
|
||||
[ "test_suite.cpp", "test__suite_8cpp.html", "test__suite_8cpp" ],
|
||||
[ "testlib.cpp", "testlib_8cpp.html", "testlib_8cpp" ],
|
||||
[ "time.cpp", "time_8cpp.html", "time_8cpp" ],
|
||||
[ "utils.cpp", "utils_8cpp.html", "utils_8cpp" ]
|
||||
];
|
||||
@@ -104,24 +104,18 @@ $(document).ready(function(){initNavTree('dir_d44c64559bbebec7f509842c48db8b23.h
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
|
||||
Files</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="constants_8hpp.html">constants.hpp</a> <a href="constants_8hpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:constants_8hpp"><td class="mdescLeft"> </td><td class="mdescRight">Library of constants. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="data__type_8hpp.html">data_type.hpp</a> <a href="data__type_8hpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:data__type_8hpp"><td class="mdescLeft"> </td><td class="mdescRight">Header for the <a class="el" href="classdata__t.html">data_t</a> type. <br /></td></tr>
|
||||
<tr class="memdesc:data__type_8hpp"><td class="mdescLeft"> </td><td class="mdescRight">Header for the <a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> type. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="IsingModel_8hpp.html">IsingModel.hpp</a> <a href="IsingModel_8hpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:IsingModel_8hpp"><td class="mdescLeft"> </td><td class="mdescRight">The definition of the Ising model. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html">monte_carlo.hpp</a> <a href="monte__carlo_8hpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:monte__carlo_8hpp"><td class="mdescLeft"> </td><td class="mdescRight">Functions for monte carlo simulations. <br /></td></tr>
|
||||
<tr class="memdesc:monte__carlo_8hpp"><td class="mdescLeft"> </td><td class="mdescRight">Functions for Monte Carlo simulations. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="testlib_8hpp.html">testlib.hpp</a> <a href="testlib_8hpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:testlib_8hpp"><td class="mdescLeft"> </td><td class="mdescRight">A small test library. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="typedefs_8hpp.html">typedefs.hpp</a> <a href="typedefs_8hpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:typedefs_8hpp"><td class="mdescLeft"> </td><td class="mdescRight">Useful typedefs for cleaner code. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="utils_8hpp.html">utils.hpp</a> <a href="utils_8hpp_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:utils_8hpp"><td class="mdescLeft"> </td><td class="mdescRight">Function prototypes and macros that are useful. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
var dir_d44c64559bbebec7f509842c48db8b23 =
|
||||
[
|
||||
[ "constants.hpp", "constants_8hpp.html", "constants_8hpp" ],
|
||||
[ "data_type.hpp", "data__type_8hpp.html", "data__type_8hpp" ],
|
||||
[ "IsingModel.hpp", "IsingModel_8hpp.html", "IsingModel_8hpp" ],
|
||||
[ "monte_carlo.hpp", "monte__carlo_8hpp.html", "monte__carlo_8hpp" ],
|
||||
[ "testlib.hpp", "testlib_8hpp.html", "testlib_8hpp" ],
|
||||
[ "typedefs.hpp", "typedefs_8hpp.html", null ],
|
||||
[ "utils.hpp", "utils_8hpp.html", "utils_8hpp" ]
|
||||
];
|
||||
@@ -102,28 +102,26 @@ $(document).ready(function(){initNavTree('files.html',''); initResizable(); });
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory">
|
||||
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span>]</div><table class="directory">
|
||||
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">▼</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')"> </span><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html" target="_self">include</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="constants_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="constants_8hpp.html" target="_self">constants.hpp</a></td><td class="desc">Library of constants </td></tr>
|
||||
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="data__type_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="data__type_8hpp.html" target="_self">data_type.hpp</a></td><td class="desc">Header for the <a class="el" href="classdata__t.html">data_t</a> type </td></tr>
|
||||
<tr id="row_0_2_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="IsingModel_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="IsingModel_8hpp.html" target="_self">IsingModel.hpp</a></td><td class="desc">The definition of the Ising model </td></tr>
|
||||
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="monte__carlo_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="monte__carlo_8hpp.html" target="_self">monte_carlo.hpp</a></td><td class="desc">Functions for monte carlo simulations </td></tr>
|
||||
<tr id="row_0_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="testlib_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="testlib_8hpp.html" target="_self">testlib.hpp</a></td><td class="desc">A small test library </td></tr>
|
||||
<tr id="row_0_5_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="typedefs_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="typedefs_8hpp.html" target="_self">typedefs.hpp</a></td><td class="desc">Useful typedefs for cleaner code </td></tr>
|
||||
<tr id="row_0_6_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="utils_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8hpp.html" target="_self">utils.hpp</a></td><td class="desc">Function prototypes and macros that are useful </td></tr>
|
||||
<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="data__type_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="data__type_8hpp.html" target="_self">data_type.hpp</a></td><td class="desc">Header for the <a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> type </td></tr>
|
||||
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="IsingModel_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="IsingModel_8hpp.html" target="_self">IsingModel.hpp</a></td><td class="desc">The definition of the Ising model </td></tr>
|
||||
<tr id="row_0_2_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="monte__carlo_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="monte__carlo_8hpp.html" target="_self">monte_carlo.hpp</a></td><td class="desc">Functions for Monte Carlo simulations </td></tr>
|
||||
<tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="testlib_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="testlib_8hpp.html" target="_self">testlib.hpp</a></td><td class="desc">A small test library </td></tr>
|
||||
<tr id="row_0_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="utils_8hpp_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8hpp.html" target="_self">utils.hpp</a></td><td class="desc">Function prototypes and macros that are useful </td></tr>
|
||||
<tr id="row_1_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_1_" class="arrow" onclick="toggleFolder('1_')">▼</span><span id="img_1_" class="iconfopen" onclick="toggleFolder('1_')"> </span><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html" target="_self">src</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span id="arr_1_0_" class="arrow" onclick="toggleFolder('1_0_')">▼</span><span id="img_1_0_" class="iconfopen" onclick="toggleFolder('1_0_')"> </span><a class="el" href="dir_634e799a3947388232110823971192a8.html" target="_self">scripts</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;"> </span><a href="burn__in__time_8py_source.html"><span class="icondoc"></span></a><b>burn_in_time.py</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_1_" class="odd"><td class="entry"><span style="width:48px;display:inline-block;"> </span><a href="pd__estimate_8py_source.html"><span class="icondoc"></span></a><b>pd_estimate.py</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_0_2_" class="even"><td class="entry"><span style="width:48px;display:inline-block;"> </span><a href="phase__transition_8py_source.html"><span class="icondoc"></span></a><b>phase_transition.py</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_1_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="data__type_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="data__type_8cpp.html" target="_self">data_type.cpp</a></td><td class="desc">Implementation for the <a class="el" href="classdata__t.html">data_t</a> type </td></tr>
|
||||
<tr id="row_1_2_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="IsingModel_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="IsingModel_8cpp.html" target="_self">IsingModel.cpp</a></td><td class="desc">The implementation of the Ising model </td></tr>
|
||||
<tr id="row_1_3_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="main_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="main_8cpp.html" target="_self">main.cpp</a></td><td class="desc">The main program </td></tr>
|
||||
<tr id="row_1_4_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="monte__carlo_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="monte__carlo_8cpp.html" target="_self">monte_carlo.cpp</a></td><td class="desc">Implementation of the monte carlo functions </td></tr>
|
||||
<tr id="row_1_5_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="phase__transition__mpi_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="phase__transition__mpi_8cpp.html" target="_self">phase_transition_mpi.cpp</a></td><td class="desc">Sweep over different temperatures and generate data </td></tr>
|
||||
<tr id="row_1_6_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="test__suite_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="test__suite_8cpp.html" target="_self">test_suite.cpp</a></td><td class="desc">Sweep over different temperatures and generate data </td></tr>
|
||||
<tr id="row_1_7_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="testlib_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="testlib_8cpp.html" target="_self">testlib.cpp</a></td><td class="desc">Implementation of the testing library </td></tr>
|
||||
<tr id="row_1_8_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="utils_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8cpp.html" target="_self">utils.cpp</a></td><td class="desc">Implementation of the utils </td></tr>
|
||||
<tr id="row_1_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="data__type_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="data__type_8cpp.html" target="_self">data_type.cpp</a></td><td class="desc">Implementation for the <a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> type </td></tr>
|
||||
<tr id="row_1_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="IsingModel_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="IsingModel_8cpp.html" target="_self">IsingModel.cpp</a></td><td class="desc">The implementation of the Ising model </td></tr>
|
||||
<tr id="row_1_2_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="main_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="main_8cpp.html" target="_self">main.cpp</a></td><td class="desc">The main program </td></tr>
|
||||
<tr id="row_1_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="mcmc__progression_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="mcmc__progression_8cpp.html" target="_self">mcmc_progression.cpp</a></td><td class="desc">Execute the mcmc algorithm and write data to file after each Monte Carlo cycle </td></tr>
|
||||
<tr id="row_1_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="monte__carlo_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="monte__carlo_8cpp.html" target="_self">monte_carlo.cpp</a></td><td class="desc">Implementation of the monte carlo functions </td></tr>
|
||||
<tr id="row_1_5_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="pd__estimate_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="pd__estimate_8cpp.html" target="_self">pd_estimate.cpp</a></td><td class="desc">Execute the mcmc algorithm and write data to file after each Monte Carlo cycles </td></tr>
|
||||
<tr id="row_1_6_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="phase__transition_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="phase__transition_8cpp.html" target="_self">phase_transition.cpp</a></td><td class="desc">Sweep over different temperatures and generate data </td></tr>
|
||||
<tr id="row_1_7_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="phase__transition__mpi_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="phase__transition__mpi_8cpp.html" target="_self">phase_transition_mpi.cpp</a></td><td class="desc">Sweep over different temperatures and generate data </td></tr>
|
||||
<tr id="row_1_8_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="test__suite_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="test__suite_8cpp.html" target="_self">test_suite.cpp</a></td><td class="desc">Sweep over different temperatures and generate data </td></tr>
|
||||
<tr id="row_1_9_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="testlib_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="testlib_8cpp.html" target="_self">testlib.cpp</a></td><td class="desc">Implementation of the testing library </td></tr>
|
||||
<tr id="row_1_10_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="time_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="time_8cpp.html" target="_self">time.cpp</a></td><td class="desc">Timing various things </td></tr>
|
||||
<tr id="row_1_11_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a href="utils_8cpp_source.html"><span class="icondoc"></span></a><a class="el" href="utils_8cpp.html" target="_self">utils.cpp</a></td><td class="desc">Implementation of the utils </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
|
||||
@@ -98,22 +98,63 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented class members with links to the class documentation for each member:</div><ul>
|
||||
<li>E : <a class="el" href="classIsingModel.html#ae9f872ca2054992161d53306119979dd">IsingModel</a></li>
|
||||
<li>energy_diff : <a class="el" href="classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd">IsingModel</a></li>
|
||||
<li>get_E() : <a class="el" href="classIsingModel.html#aaa0787d964b004a17869811a5e947ff5">IsingModel</a></li>
|
||||
<li>get_M() : <a class="el" href="classIsingModel.html#aa5701496e6483bc4668c486d6d3af625">IsingModel</a></li>
|
||||
<div class="textblock">Here is a list of all documented class members with links to the class documentation for each member:</div>
|
||||
|
||||
<h3><a id="index_d" name="index_d"></a>- d -</h3><ul>
|
||||
<li>data_t() : <a class="el" href="classdata__t.html#aa2690d3e5d711b4baf3c8f8b9095faf7">data_t</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_e" name="index_e"></a>- e -</h3><ul>
|
||||
<li>E : <a class="el" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">data_t</a>, <a class="el" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">IsingModel</a></li>
|
||||
<li>E2 : <a class="el" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">data_t</a></li>
|
||||
<li>energy_diff : <a class="el" href="classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e">IsingModel</a></li>
|
||||
<li>engine : <a class="el" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">IsingModel</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_i" name="index_i"></a>- i -</h3><ul>
|
||||
<li>initialize_energy() : <a class="el" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">IsingModel</a></li>
|
||||
<li>initialize_energy_diff() : <a class="el" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">IsingModel</a></li>
|
||||
<li>initialize_engine() : <a class="el" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">IsingModel</a></li>
|
||||
<li>initialize_lattice() : <a class="el" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">IsingModel</a></li>
|
||||
<li>initialize_magnetization() : <a class="el" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">IsingModel</a></li>
|
||||
<li>initialize_neighbors() : <a class="el" href="classIsingModel.html#a6776109105051597c275670dabd0054a">IsingModel</a></li>
|
||||
<li>IsingModel() : <a class="el" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel</a></li>
|
||||
<li>IsingModelTest : <a class="el" href="classIsingModel.html#a2b1cf104e0bda1fce78ed366e1ec7287">IsingModel</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_l" name="index_l"></a>- l -</h3><ul>
|
||||
<li>L : <a class="el" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">IsingModel</a></li>
|
||||
<li>lattice : <a class="el" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">IsingModel</a></li>
|
||||
<li>M : <a class="el" href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47">IsingModel</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_m" name="index_m"></a>- m -</h3><ul>
|
||||
<li>M : <a class="el" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">data_t</a>, <a class="el" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">IsingModel</a></li>
|
||||
<li>M2 : <a class="el" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">data_t</a></li>
|
||||
<li>M_abs : <a class="el" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">data_t</a></li>
|
||||
<li>Metropolis() : <a class="el" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">IsingModel</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_n" name="index_n"></a>- n -</h3><ul>
|
||||
<li>neighbors : <a class="el" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">IsingModel</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_o" name="index_o"></a>- o -</h3><ul>
|
||||
<li>operator*() : <a class="el" href="classdata__t.html#a7954efc97086ea50e10c33113b203085">data_t</a></li>
|
||||
<li>operator*=() : <a class="el" href="classdata__t.html#a6ddf3a7372730ef2393aee8bbcb34992">data_t</a></li>
|
||||
<li>operator+() : <a class="el" href="classdata__t.html#a13bc1d73eadeb39c507e89f5872d726f">data_t</a></li>
|
||||
<li>operator+=() : <a class="el" href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb">data_t</a></li>
|
||||
<li>operator/() : <a class="el" href="classdata__t.html#a429a11c53ee7fe08f6a4e75db524521d">data_t</a></li>
|
||||
<li>operator/=() : <a class="el" href="classdata__t.html#a88da5be78439fbdecfa473ec007dffd8">data_t</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_t" name="index_t"></a>- t -</h3><ul>
|
||||
<li>T : <a class="el" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">IsingModel</a></li>
|
||||
<li>test_2x2_lattice() : <a class="el" href="classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de">IsingModelTest</a></li>
|
||||
<li>test_init_functions() : <a class="el" href="classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931">IsingModelTest</a></li>
|
||||
|
||||
@@ -99,15 +99,21 @@ $(document).ready(function(){initNavTree('functions_func.html',''); initResizabl
|
||||
|
||||
<div class="contents">
|
||||
 <ul>
|
||||
<li>get_E() : <a class="el" href="classIsingModel.html#aaa0787d964b004a17869811a5e947ff5">IsingModel</a></li>
|
||||
<li>get_M() : <a class="el" href="classIsingModel.html#aa5701496e6483bc4668c486d6d3af625">IsingModel</a></li>
|
||||
<li>data_t() : <a class="el" href="classdata__t.html#aa2690d3e5d711b4baf3c8f8b9095faf7">data_t</a></li>
|
||||
<li>initialize_energy() : <a class="el" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">IsingModel</a></li>
|
||||
<li>initialize_energy_diff() : <a class="el" href="classIsingModel.html#aff9a1201933fd5408845a1447e4895b4">IsingModel</a></li>
|
||||
<li>initialize_engine() : <a class="el" href="classIsingModel.html#aaedc25b7284e04849269f31291590bf5">IsingModel</a></li>
|
||||
<li>initialize_lattice() : <a class="el" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">IsingModel</a></li>
|
||||
<li>initialize_magnetization() : <a class="el" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">IsingModel</a></li>
|
||||
<li>initialize_neighbors() : <a class="el" href="classIsingModel.html#a6776109105051597c275670dabd0054a">IsingModel</a></li>
|
||||
<li>IsingModel() : <a class="el" href="classIsingModel.html#acf281f6f5ed02911ca6ab07004449864">IsingModel</a></li>
|
||||
<li>Metropolis() : <a class="el" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">IsingModel</a></li>
|
||||
<li>operator*() : <a class="el" href="classdata__t.html#a7954efc97086ea50e10c33113b203085">data_t</a></li>
|
||||
<li>operator*=() : <a class="el" href="classdata__t.html#a6ddf3a7372730ef2393aee8bbcb34992">data_t</a></li>
|
||||
<li>operator+() : <a class="el" href="classdata__t.html#a13bc1d73eadeb39c507e89f5872d726f">data_t</a></li>
|
||||
<li>operator+=() : <a class="el" href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb">data_t</a></li>
|
||||
<li>operator/() : <a class="el" href="classdata__t.html#a429a11c53ee7fe08f6a4e75db524521d">data_t</a></li>
|
||||
<li>operator/=() : <a class="el" href="classdata__t.html#a88da5be78439fbdecfa473ec007dffd8">data_t</a></li>
|
||||
<li>test_2x2_lattice() : <a class="el" href="classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de">IsingModelTest</a></li>
|
||||
<li>test_init_functions() : <a class="el" href="classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931">IsingModelTest</a></li>
|
||||
</ul>
|
||||
|
||||
113
docs/functions_rela.html
Normal file
113
docs/functions_rela.html
Normal file
@@ -0,0 +1,113 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: Class Members - Related Functions</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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('functions_rela.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
 <ul>
|
||||
<li>IsingModelTest : <a class="el" href="classIsingModel.html#a2b1cf104e0bda1fce78ed366e1ec7287">IsingModel</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -99,11 +99,15 @@ $(document).ready(function(){initNavTree('functions_vars.html',''); initResizabl
|
||||
|
||||
<div class="contents">
|
||||
 <ul>
|
||||
<li>E : <a class="el" href="classIsingModel.html#ae9f872ca2054992161d53306119979dd">IsingModel</a></li>
|
||||
<li>energy_diff : <a class="el" href="classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd">IsingModel</a></li>
|
||||
<li>E : <a class="el" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">data_t</a>, <a class="el" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">IsingModel</a></li>
|
||||
<li>E2 : <a class="el" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">data_t</a></li>
|
||||
<li>energy_diff : <a class="el" href="classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e">IsingModel</a></li>
|
||||
<li>engine : <a class="el" href="classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a">IsingModel</a></li>
|
||||
<li>L : <a class="el" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">IsingModel</a></li>
|
||||
<li>lattice : <a class="el" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">IsingModel</a></li>
|
||||
<li>M : <a class="el" href="classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47">IsingModel</a></li>
|
||||
<li>M : <a class="el" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">data_t</a>, <a class="el" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">IsingModel</a></li>
|
||||
<li>M2 : <a class="el" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">data_t</a></li>
|
||||
<li>M_abs : <a class="el" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">data_t</a></li>
|
||||
<li>neighbors : <a class="el" href="classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd">IsingModel</a></li>
|
||||
<li>T : <a class="el" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">IsingModel</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -98,18 +98,74 @@ $(document).ready(function(){initNavTree('globals.html',''); initResizable(); })
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented file members with links to the documentation:</div><ul>
|
||||
<div class="textblock">Here is a list of all documented file members with links to the documentation:</div>
|
||||
|
||||
<h3><a id="index__5F" name="index__5F"></a>- _ -</h3><ul>
|
||||
<li>__METHOD_NAME__ : <a class="el" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">utils.hpp</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_a" name="index_a"></a>- a -</h3><ul>
|
||||
<li>ASSERT : <a class="el" href="testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">testlib.hpp</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_c" name="index_c"></a>- c -</h3><ul>
|
||||
<li>create_burn_in_time_data() : <a class="el" href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32">main.cpp</a></li>
|
||||
<li>create_pd_estimate_data() : <a class="el" href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b">main.cpp</a></li>
|
||||
<li>create_phase_transition_data() : <a class="el" href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d">main.cpp</a></li>
|
||||
<li>CV_2 : <a class="el" href="test__suite_8cpp.html#af02dd88b4d495baf7af5826d1481634c">test_suite.cpp</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_d" name="index_d"></a>- d -</h3><ul>
|
||||
<li>DEBUG : <a class="el" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b">utils.hpp</a></li>
|
||||
<li>k_B : <a class="el" href="constants_8hpp.html#abfa7d6668c777f9516606394bbc9c414">constants.hpp</a></li>
|
||||
<li>main() : <a class="el" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main.cpp</a>, <a class="el" href="phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">phase_transition_mpi.cpp</a>, <a class="el" href="test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">test_suite.cpp</a></li>
|
||||
<li>monte_carlo_parallel() : <a class="el" href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo.hpp</a>, <a class="el" href="monte__carlo_8cpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo.cpp</a></li>
|
||||
<li>monte_carlo_progression() : <a class="el" href="monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo.hpp</a>, <a class="el" href="monte__carlo_8cpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo.cpp</a></li>
|
||||
<li>monte_carlo_serial() : <a class="el" href="monte__carlo_8hpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed">monte_carlo.hpp</a>, <a class="el" href="monte__carlo_8cpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed">monte_carlo.cpp</a></li>
|
||||
<li>pd_estimate() : <a class="el" href="monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559">monte_carlo.hpp</a>, <a class="el" href="monte__carlo_8cpp.html#a962f704ab35208bf6541eb3b707a9559">monte_carlo.cpp</a></li>
|
||||
<li>phase_transition() : <a class="el" href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">monte_carlo.hpp</a>, <a class="el" href="monte__carlo_8cpp.html#a7df22ace588b4d229d1029ce766d0009">monte_carlo.cpp</a></li>
|
||||
<li>test_2x2_lattice() : <a class="el" href="monte__carlo_8hpp.html#aa8b4fc86b26f0e3e253ba5556d2d14dc">monte_carlo.hpp</a></li>
|
||||
<li>DOWN : <a class="el" href="IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f">IsingModel.hpp</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_e" name="index_e"></a>- e -</h3><ul>
|
||||
<li>EPS_2 : <a class="el" href="test__suite_8cpp.html#a00367775d110a9537bd06bde2e630471">test_suite.cpp</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_i" name="index_i"></a>- i -</h3><ul>
|
||||
<li>INDEX : <a class="el" href="IsingModel_8hpp.html#a3039ac753f46401767c38f867787fae6">IsingModel.hpp</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_l" name="index_l"></a>- l -</h3><ul>
|
||||
<li>LEFT : <a class="el" href="IsingModel_8hpp.html#a437ef08681e7210d6678427030446a54">IsingModel.hpp</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_m" name="index_m"></a>- m -</h3><ul>
|
||||
<li>MAG_2 : <a class="el" href="test__suite_8cpp.html#a9fd092d930430eb4693d93e0c9066605">test_suite.cpp</a></li>
|
||||
<li>main() : <a class="el" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main.cpp</a>, <a class="el" href="mcmc__progression_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">mcmc_progression.cpp</a>, <a class="el" href="pd__estimate_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">pd_estimate.cpp</a>, <a class="el" href="phase__transition_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">phase_transition.cpp</a>, <a class="el" href="phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">phase_transition_mpi.cpp</a>, <a class="el" href="test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">test_suite.cpp</a>, <a class="el" href="time_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">time.cpp</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_r" name="index_r"></a>- r -</h3><ul>
|
||||
<li>RIGHT : <a class="el" href="IsingModel_8hpp.html#a80fb826a684cf3f0d306b22aa100ddac">IsingModel.hpp</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_t" name="index_t"></a>- t -</h3><ul>
|
||||
<li>test_burn_in_time() : <a class="el" href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861">main.cpp</a></li>
|
||||
<li>test_parallel_speedup() : <a class="el" href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95">main.cpp</a></li>
|
||||
<li>time_lattice_sizes() : <a class="el" href="time_8cpp.html#aa224066f42c47cae5fbd457c1948e4a5">time.cpp</a></li>
|
||||
<li>time_sample_sizes() : <a class="el" href="time_8cpp.html#ace9eb0821fe4edf19cf2e7d8ffe6efb4">time.cpp</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_u" name="index_u"></a>- u -</h3><ul>
|
||||
<li>UP : <a class="el" href="IsingModel_8hpp.html#a1965eaca47dbf3f87acdafc2208f04eb">IsingModel.hpp</a></li>
|
||||
<li>usage() : <a class="el" href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">main.cpp</a>, <a class="el" href="mcmc__progression_8cpp.html#ac907e18135856c90366aaa599a9e10b1">mcmc_progression.cpp</a>, <a class="el" href="pd__estimate_8cpp.html#ac907e18135856c90366aaa599a9e10b1">pd_estimate.cpp</a>, <a class="el" href="phase__transition_8cpp.html#ac907e18135856c90366aaa599a9e10b1">phase_transition.cpp</a>, <a class="el" href="phase__transition__mpi_8cpp.html#ac907e18135856c90366aaa599a9e10b1">phase_transition_mpi.cpp</a>, <a class="el" href="time_8cpp.html#ac907e18135856c90366aaa599a9e10b1">time.cpp</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h3><a id="index_x" name="index_x"></a>- x -</h3><ul>
|
||||
<li>X_2 : <a class="el" href="test__suite_8cpp.html#ad27c84dda71475ffd365c649b525199e">test_suite.cpp</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
@@ -101,8 +101,16 @@ $(document).ready(function(){initNavTree('globals_defs.html',''); initResizable(
|
||||
 <ul>
|
||||
<li>__METHOD_NAME__ : <a class="el" href="utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168">utils.hpp</a></li>
|
||||
<li>ASSERT : <a class="el" href="testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">testlib.hpp</a></li>
|
||||
<li>CV_2 : <a class="el" href="test__suite_8cpp.html#af02dd88b4d495baf7af5826d1481634c">test_suite.cpp</a></li>
|
||||
<li>DEBUG : <a class="el" href="utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b">utils.hpp</a></li>
|
||||
<li>k_B : <a class="el" href="constants_8hpp.html#abfa7d6668c777f9516606394bbc9c414">constants.hpp</a></li>
|
||||
<li>DOWN : <a class="el" href="IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f">IsingModel.hpp</a></li>
|
||||
<li>EPS_2 : <a class="el" href="test__suite_8cpp.html#a00367775d110a9537bd06bde2e630471">test_suite.cpp</a></li>
|
||||
<li>INDEX : <a class="el" href="IsingModel_8hpp.html#a3039ac753f46401767c38f867787fae6">IsingModel.hpp</a></li>
|
||||
<li>LEFT : <a class="el" href="IsingModel_8hpp.html#a437ef08681e7210d6678427030446a54">IsingModel.hpp</a></li>
|
||||
<li>MAG_2 : <a class="el" href="test__suite_8cpp.html#a9fd092d930430eb4693d93e0c9066605">test_suite.cpp</a></li>
|
||||
<li>RIGHT : <a class="el" href="IsingModel_8hpp.html#a80fb826a684cf3f0d306b22aa100ddac">IsingModel.hpp</a></li>
|
||||
<li>UP : <a class="el" href="IsingModel_8hpp.html#a1965eaca47dbf3f87acdafc2208f04eb">IsingModel.hpp</a></li>
|
||||
<li>X_2 : <a class="el" href="test__suite_8cpp.html#ad27c84dda71475ffd365c649b525199e">test_suite.cpp</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
@@ -99,13 +99,15 @@ $(document).ready(function(){initNavTree('globals_func.html',''); initResizable(
|
||||
|
||||
<div class="contents">
|
||||
 <ul>
|
||||
<li>main() : <a class="el" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main.cpp</a>, <a class="el" href="phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">phase_transition_mpi.cpp</a>, <a class="el" href="test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">test_suite.cpp</a></li>
|
||||
<li>monte_carlo_parallel() : <a class="el" href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo.hpp</a>, <a class="el" href="monte__carlo_8cpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo.cpp</a></li>
|
||||
<li>monte_carlo_progression() : <a class="el" href="monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo.hpp</a>, <a class="el" href="monte__carlo_8cpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo.cpp</a></li>
|
||||
<li>monte_carlo_serial() : <a class="el" href="monte__carlo_8hpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed">monte_carlo.hpp</a>, <a class="el" href="monte__carlo_8cpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed">monte_carlo.cpp</a></li>
|
||||
<li>pd_estimate() : <a class="el" href="monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559">monte_carlo.hpp</a>, <a class="el" href="monte__carlo_8cpp.html#a962f704ab35208bf6541eb3b707a9559">monte_carlo.cpp</a></li>
|
||||
<li>phase_transition() : <a class="el" href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">monte_carlo.hpp</a>, <a class="el" href="monte__carlo_8cpp.html#a7df22ace588b4d229d1029ce766d0009">monte_carlo.cpp</a></li>
|
||||
<li>test_2x2_lattice() : <a class="el" href="monte__carlo_8hpp.html#aa8b4fc86b26f0e3e253ba5556d2d14dc">monte_carlo.hpp</a></li>
|
||||
<li>create_burn_in_time_data() : <a class="el" href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32">main.cpp</a></li>
|
||||
<li>create_pd_estimate_data() : <a class="el" href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b">main.cpp</a></li>
|
||||
<li>create_phase_transition_data() : <a class="el" href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d">main.cpp</a></li>
|
||||
<li>main() : <a class="el" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main.cpp</a>, <a class="el" href="mcmc__progression_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">mcmc_progression.cpp</a>, <a class="el" href="pd__estimate_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">pd_estimate.cpp</a>, <a class="el" href="phase__transition_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">phase_transition.cpp</a>, <a class="el" href="phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">phase_transition_mpi.cpp</a>, <a class="el" href="test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">test_suite.cpp</a>, <a class="el" href="time_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">time.cpp</a></li>
|
||||
<li>test_burn_in_time() : <a class="el" href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861">main.cpp</a></li>
|
||||
<li>test_parallel_speedup() : <a class="el" href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95">main.cpp</a></li>
|
||||
<li>time_lattice_sizes() : <a class="el" href="time_8cpp.html#aa224066f42c47cae5fbd457c1948e4a5">time.cpp</a></li>
|
||||
<li>time_sample_sizes() : <a class="el" href="time_8cpp.html#ace9eb0821fe4edf19cf2e7d8ffe6efb4">time.cpp</a></li>
|
||||
<li>usage() : <a class="el" href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">main.cpp</a>, <a class="el" href="mcmc__progression_8cpp.html#ac907e18135856c90366aaa599a9e10b1">mcmc_progression.cpp</a>, <a class="el" href="pd__estimate_8cpp.html#ac907e18135856c90366aaa599a9e10b1">pd_estimate.cpp</a>, <a class="el" href="phase__transition_8cpp.html#ac907e18135856c90366aaa599a9e10b1">phase_transition.cpp</a>, <a class="el" href="phase__transition__mpi_8cpp.html#ac907e18135856c90366aaa599a9e10b1">phase_transition_mpi.cpp</a>, <a class="el" href="time_8cpp.html#ac907e18135856c90366aaa599a9e10b1">time.cpp</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
|
||||
107
docs/index.html
107
docs/index.html
@@ -126,8 +126,6 @@ Operating systems</h2>
|
||||
Tools</h2>
|
||||
<ul>
|
||||
<li>Profiling<ul>
|
||||
<li><a href="https://ftp.gnu.org/old-gnu/Manuals/gprof-2.9.1/html_mono/gprof.html">gprof</a></li>
|
||||
<li><a href="https://www.scalasca.org/">scalasca</a></li>
|
||||
<li><a href="https://www.vi-hps.org/projects/score-p">score-p</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -149,39 +147,56 @@ Libraries</h2>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="autotoc_md5"></a>
|
||||
Compiling</h1>
|
||||
<p>Compiling is as easy as running this command while being inside the src directory:</p>
|
||||
<p>The commands shown here should be run from the root of this project.</p>
|
||||
<h2><a class="anchor" id="autotoc_md6"></a>
|
||||
Normal binaries</h2>
|
||||
<p>Compiling regular binaries is as easy as running this command:</p>
|
||||
<div class="fragment"><div class="line">make</div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md6"></a>
|
||||
Running programs</h1>
|
||||
</div><!-- fragment --><p>The binaries will then be inside the **./bin** directory.</p>
|
||||
<h2><a class="anchor" id="autotoc_md7"></a>
|
||||
Profiling binaries</h2>
|
||||
<p>If you want to profile the programs (specifically the MPI program), then run this command</p>
|
||||
<div class="fragment"><div class="line">make profile</div>
|
||||
</div><!-- fragment --><p>The binaries will then be inside the **./prof** directory.</p>
|
||||
<h2><a class="anchor" id="autotoc_md8"></a>
|
||||
Debugging binaries</h2>
|
||||
<p>If you want to debug the code, then use this command:</p>
|
||||
<div class="fragment"><div class="line">make debug</div>
|
||||
</div><!-- fragment --><p>The binaries will then be inside the **./debug** directory.</p>
|
||||
<h1><a class="anchor" id="autotoc_md9"></a>
|
||||
Running programs</h1>
|
||||
<h2><a class="anchor" id="autotoc_md10"></a>
|
||||
C++ binaries</h2>
|
||||
<p>To run <b>main</b> or <b>test_suite</b>, just run this command while being inside src:</p>
|
||||
<div class="fragment"><div class="line">./<program-name></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md8"></a>
|
||||
<p>To run any of the programs, just use the following command:</p>
|
||||
<div class="fragment"><div class="line">./<bin|prof|debug>/<program-name> <args></div>
|
||||
</div><!-- fragment --><p>If you need help with any of the programs, you can use the <b>-h</b> or <b>–help</b> flag to show you how to use the programs. Here is an example:</p>
|
||||
<div class="fragment"><div class="line">./bin/main --help</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md11"></a>
|
||||
Python scripts</h2>
|
||||
<h3><a class="anchor" id="autotoc_md9"></a>
|
||||
<h3><a class="anchor" id="autotoc_md12"></a>
|
||||
Install libraries</h3>
|
||||
<p>Before running the scripts, make sure that all libraries are installed. Using pip, you can install all requirements like this:</p>
|
||||
<div class="fragment"><div class="line">pip install -r requirements.txt</div>
|
||||
</div><!-- fragment --><p>This recursively install all the packages that are listed in <b>requirements.txt</b>.</p>
|
||||
<h3><a class="anchor" id="autotoc_md10"></a>
|
||||
<h3><a class="anchor" id="autotoc_md13"></a>
|
||||
Running scripts</h3>
|
||||
<p>For the Python scripts, run them from the src directory like this:</p>
|
||||
<div class="fragment"><div class="line">python scripts/<script-name></div>
|
||||
<p>For the Python scripts, run them from the root of the project:</p>
|
||||
<div class="fragment"><div class="line">python python_scripts/<script-name></div>
|
||||
</div><!-- fragment --><p>If you have any problems running the scripts, you might have to run this instead:</p>
|
||||
<div class="fragment"><div class="line">python3 scripts/<script-name></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md11"></a>
|
||||
<div class="fragment"><div class="line">python3 python_scripts/<script-name></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="autotoc_md14"></a>
|
||||
Batch system</h2>
|
||||
<p>For the <b>phase_transition_mpi</b> program, there are scripts in the <b>src/jobs</b> directory that come along with it. This is to be able to run it on a batch system using Slurm if you have access to one. This is the recommended way to use this program as it takes approximately 90 minutes to complete when using 8 processes where each process has 10 threads.</p>
|
||||
<p>If you happen to have such a system available to you, then you should clone this repo on that system, then compile it by running:</p>
|
||||
<div class="fragment"><div class="line">make phase_transition_mpi</div>
|
||||
</div><!-- fragment --><p>You might have to load the Armadillo library using the <b>module</b> system before compiling.</p>
|
||||
<p>After compiling, you can schedule it by running:</p>
|
||||
<div class="fragment"><div class="line">sbatch jobs/<script-name></div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md12"></a>
|
||||
<p>For the <b>phase_transition_mpi</b> program, there are scripts in the **./slurm_scripts** directory that come along with it. This is to be able to run it on a batch system using Slurm if you have access to one. The only program that should be executed by the user is the **./slurm_scripts/execute.script** script. You can see how to use this script by doing:</p>
|
||||
<div class="fragment"><div class="line">./slurm_scripts/execute.script --help</div>
|
||||
</div><!-- fragment --><p>This is the recommended way to use this program as it takes approximately 90 minutes to complete when using 8 processes where each process has 10 threads.</p>
|
||||
<p>If you happen to have such a system available to you, then you should clone this repo on that system, then compile the MPI program like this:</p>
|
||||
<div class="fragment"><div class="line">make bin/phase_transition_mpi</div>
|
||||
</div><!-- fragment --><p>After compiling, you can schedule it by using the **./slurm_scripts/execute.script**:</p>
|
||||
<div class="fragment"><div class="line">./slurm_scripts/execute.script <parameters></div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md15"></a>
|
||||
Performance</h1>
|
||||
<p>This section aims to give an idea to the time it takes for the program to run so that you know a bit what to expect if you decide to run it for yourself.</p>
|
||||
<h2><a class="anchor" id="autotoc_md13"></a>
|
||||
<p>This section aims to give an idea to the time it takes for the phase transition program to run so that you know a bit what to expect if you decide to run it for yourself.</p>
|
||||
<h2><a class="anchor" id="autotoc_md16"></a>
|
||||
CPU</h2>
|
||||
<p>The times mentioned here are times achieved on a computer with these specifications:</p>
|
||||
<ul>
|
||||
@@ -198,9 +213,51 @@ CPU</h2>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2><a class="anchor" id="autotoc_md14"></a>
|
||||
<h2><a class="anchor" id="autotoc_md17"></a>
|
||||
Times</h2>
|
||||
<h1><a class="anchor" id="autotoc_md15"></a>
|
||||
<p>Note that all times here are recorded using the OpenMP implementation of the MCMC algorithm.</p>
|
||||
<table class="markdownTable">
|
||||
<tr class="markdownTableHead">
|
||||
<th class="markdownTableHeadNone">lattice size </th><th class="markdownTableHeadNone">points </th><th class="markdownTableHeadNone">samples </th><th class="markdownTableHeadNone">burn-in time </th><th class="markdownTableHeadNone">time (seconds) </th></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">100000 </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">3.20 </td></tr>
|
||||
<tr class="markdownTableRowEven">
|
||||
<td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">40 </td><td class="markdownTableBodyNone">100000 </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">6.17 </td></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">80 </td><td class="markdownTableBodyNone">100000 </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">12.11 </td></tr>
|
||||
</table>
|
||||
<table class="markdownTable">
|
||||
<tr class="markdownTableHead">
|
||||
<th class="markdownTableHeadNone">lattice size </th><th class="markdownTableHeadNone">points </th><th class="markdownTableHeadNone">samples </th><th class="markdownTableHeadNone">burn-in time </th><th class="markdownTableHeadNone">time (seconds) </th></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">100000 </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">3.20 </td></tr>
|
||||
<tr class="markdownTableRowEven">
|
||||
<td class="markdownTableBodyNone">40 </td><td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">100000 </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">11.91 </td></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone">80 </td><td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">100000 </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">47.88 </td></tr>
|
||||
</table>
|
||||
<table class="markdownTable">
|
||||
<tr class="markdownTableHead">
|
||||
<th class="markdownTableHeadNone">lattice size </th><th class="markdownTableHeadNone">points </th><th class="markdownTableHeadNone">samples </th><th class="markdownTableHeadNone">burn-in time </th><th class="markdownTableHeadNone">time (seconds) </th></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">100000 </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">3.20 </td></tr>
|
||||
<tr class="markdownTableRowEven">
|
||||
<td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">1000000 </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">29.95 </td></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">10000000 </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">305.849 </td></tr>
|
||||
</table>
|
||||
<table class="markdownTable">
|
||||
<tr class="markdownTableHead">
|
||||
<th class="markdownTableHeadNone">lattice size </th><th class="markdownTableHeadNone">points </th><th class="markdownTableHeadNone">samples </th><th class="markdownTableHeadNone">burn-in time </th><th class="markdownTableHeadNone">time (seconds) </th></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">100000 </td><td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone">3.20 </td></tr>
|
||||
<tr class="markdownTableRowEven">
|
||||
<td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">100000 </td><td class="markdownTableBodyNone">5000 </td><td class="markdownTableBodyNone">4.93 </td></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">20 </td><td class="markdownTableBodyNone">100000 </td><td class="markdownTableBodyNone">10000 </td><td class="markdownTableBodyNone">6.58 </td></tr>
|
||||
</table>
|
||||
<p>We can see that changing the number of points, samples and burn-in time changes the time in a linear fashion, while changing the size of the lattice changes the time in a square fashion.</p>
|
||||
<h1><a class="anchor" id="autotoc_md18"></a>
|
||||
Credits</h1>
|
||||
<p>The Doxygen theme used here is <a href="https://github.com/jothepro/doxygen-awesome-css">doxygen-awesome-css</a>. </p>
|
||||
</div></div><!-- PageDoc -->
|
||||
|
||||
@@ -5,18 +5,22 @@ var index =
|
||||
[ "Tools", "index.html#autotoc_md3", null ],
|
||||
[ "Libraries", "index.html#autotoc_md4", null ]
|
||||
] ],
|
||||
[ "Compiling", "index.html#autotoc_md5", null ],
|
||||
[ "Running programs", "index.html#autotoc_md6", [
|
||||
[ "C++ binaries", "index.html#autotoc_md7", null ],
|
||||
[ "Python scripts", "index.html#autotoc_md8", [
|
||||
[ "Install libraries", "index.html#autotoc_md9", null ],
|
||||
[ "Running scripts", "index.html#autotoc_md10", null ]
|
||||
[ "Compiling", "index.html#autotoc_md5", [
|
||||
[ "Normal binaries", "index.html#autotoc_md6", null ],
|
||||
[ "Profiling binaries", "index.html#autotoc_md7", null ],
|
||||
[ "Debugging binaries", "index.html#autotoc_md8", null ]
|
||||
] ],
|
||||
[ "Batch system", "index.html#autotoc_md11", null ]
|
||||
[ "Running programs", "index.html#autotoc_md9", [
|
||||
[ "C++ binaries", "index.html#autotoc_md10", null ],
|
||||
[ "Python scripts", "index.html#autotoc_md11", [
|
||||
[ "Install libraries", "index.html#autotoc_md12", null ],
|
||||
[ "Running scripts", "index.html#autotoc_md13", null ]
|
||||
] ],
|
||||
[ "Performance", "index.html#autotoc_md12", [
|
||||
[ "CPU", "index.html#autotoc_md13", null ],
|
||||
[ "Times", "index.html#autotoc_md14", null ]
|
||||
[ "Batch system", "index.html#autotoc_md14", null ]
|
||||
] ],
|
||||
[ "Credits", "index.html#autotoc_md15", null ]
|
||||
[ "Performance", "index.html#autotoc_md15", [
|
||||
[ "CPU", "index.html#autotoc_md16", null ],
|
||||
[ "Times", "index.html#autotoc_md17", null ]
|
||||
] ],
|
||||
[ "Credits", "index.html#autotoc_md18", null ]
|
||||
];
|
||||
@@ -109,23 +109,30 @@ $(document).ready(function(){initNavTree('main_8cpp.html',''); initResizable();
|
||||
<div class="textblock"><code>#include "<a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="monte__carlo_8hpp_source.html">monte_carlo.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||
<code>#include <csignal></code><br />
|
||||
<code>#include <cstdlib></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <omp.h></code><br />
|
||||
<code>#include <getopt.h></code><br />
|
||||
</div>
|
||||
<p><a href="main_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a68406fc2dd8de5849c3984658c171f32"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32">create_burn_in_time_data</a> ()</td></tr>
|
||||
<tr class="memdesc:a68406fc2dd8de5849c3984658c171f32"><td class="mdescLeft"> </td><td class="mdescRight">Create the data for the burn-in time for temperatures 1.0 and 2.4 for both unordered and ordered initial states. <br /></td></tr>
|
||||
<tr class="separator:a68406fc2dd8de5849c3984658c171f32"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a4f8ea24364d72024915d3753a572cc5b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b">create_pd_estimate_data</a> ()</td></tr>
|
||||
<tr class="memdesc:a4f8ea24364d72024915d3753a572cc5b"><td class="mdescLeft"> </td><td class="mdescRight">Create the data used to estimate the probability distribution for tempratures 1.0 anbd 2.4. <br /></td></tr>
|
||||
<tr class="separator:a4f8ea24364d72024915d3753a572cc5b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a746d8dc451b2b2536abbb1ff1acaf861"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861">test_burn_in_time</a> ()</td></tr>
|
||||
<tr class="memdesc:a746d8dc451b2b2536abbb1ff1acaf861"><td class="mdescLeft"> </td><td class="mdescRight">Create data using the same parameters except one uses burn-in time, while the other doesn't. <br /></td></tr>
|
||||
<tr class="separator:a746d8dc451b2b2536abbb1ff1acaf861"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0dfa85080578dffff23b68e372cece95"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95">test_parallel_speedup</a> ()</td></tr>
|
||||
<tr class="memdesc:a0dfa85080578dffff23b68e372cece95"><td class="mdescLeft"> </td><td class="mdescRight">Test how much Openmp speeds up. <br /></td></tr>
|
||||
<tr class="separator:a0dfa85080578dffff23b68e372cece95"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a9d62cf1399596f4c5a39abdd3196d76d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d">create_phase_transition_data</a> ()</td></tr>
|
||||
<tr class="memdesc:a9d62cf1399596f4c5a39abdd3196d76d"><td class="mdescLeft"> </td><td class="mdescRight">Create data for studying phase transition. <br /></td></tr>
|
||||
<tr class="separator:a9d62cf1399596f4c5a39abdd3196d76d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac907e18135856c90366aaa599a9e10b1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a> (std::string filename)</td></tr>
|
||||
<tr class="memdesc:ac907e18135856c90366aaa599a9e10b1"><td class="mdescLeft"> </td><td class="mdescRight">A function that displays how to use the program and quits. <br /></td></tr>
|
||||
<tr class="separator:ac907e18135856c90366aaa599a9e10b1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
|
||||
<tr class="memdesc:a3c04138a5bfe5d72780bb7e82a18e627"><td class="mdescLeft"> </td><td class="mdescRight">The main function. <br /></td></tr>
|
||||
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -136,7 +143,7 @@ Functions</h2></td></tr>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<dl class="section version"><dt>Version</dt><dd>0.1</dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000010">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000005">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
@@ -155,6 +162,8 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Create the data for the burn-in time for temperatures 1.0 and 2.4 for both unordered and ordered initial states. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00021">21</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
@@ -174,7 +183,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00034">34</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||
<p>Create the data used to estimate the probability distribution for tempratures 1.0 anbd 2.4. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00037">37</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -193,7 +204,9 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00062">62</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||
<p>Create data for studying phase transition. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00083">83</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -225,7 +238,28 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
|
||||
<p>The main function. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00084">84</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00125">125</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a746d8dc451b2b2536abbb1ff1acaf861" name="a746d8dc451b2b2536abbb1ff1acaf861"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a746d8dc451b2b2536abbb1ff1acaf861">◆ </a></span>test_burn_in_time()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void test_burn_in_time </td>
|
||||
<td>(</td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Create data using the same parameters except one uses burn-in time, while the other doesn't. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00049">49</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -244,7 +278,31 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00041">41</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||
<p>Test how much Openmp speeds up. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00060">60</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac907e18135856c90366aaa599a9e10b1" name="ac907e18135856c90366aaa599a9e10b1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac907e18135856c90366aaa599a9e10b1">◆ </a></span>usage()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void usage </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>filename</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>A function that displays how to use the program and quits. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="main_8cpp_source.html#l00110">110</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
var main_8cpp =
|
||||
[
|
||||
[ "main", "main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627", null ]
|
||||
[ "create_burn_in_time_data", "main_8cpp.html#a68406fc2dd8de5849c3984658c171f32", null ],
|
||||
[ "create_pd_estimate_data", "main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b", null ],
|
||||
[ "create_phase_transition_data", "main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d", null ],
|
||||
[ "main", "main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627", null ],
|
||||
[ "test_burn_in_time", "main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861", null ],
|
||||
[ "test_parallel_speedup", "main_8cpp.html#a0dfa85080578dffff23b68e372cece95", null ],
|
||||
[ "usage", "main_8cpp.html#ac907e18135856c90366aaa599a9e10b1", null ]
|
||||
];
|
||||
@@ -101,118 +101,195 @@ $(document).ready(function(){initNavTree('main_8cpp_source.html',''); initResiza
|
||||
<div class="headertitle"><div class="title">main.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="main_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include "<a class="code" href="data__type_8hpp.html">data_type.hpp</a>"</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include "<a class="code" href="monte__carlo_8hpp.html">monte_carlo.hpp</a>"</span></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include "<a class="code" href="utils_8hpp.html">utils.hpp</a>"</span></div>
|
||||
<a href="main_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/** @file main.cpp</span></div>
|
||||
<div class="line"><span class="lineno"> 2</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 3</span><span class="comment"> * @author Cory Alexander Balaton (coryab)</span></div>
|
||||
<div class="line"><span class="lineno"> 4</span><span class="comment"> * @author Janita Ovidie Sandtrøen Willumsen (janitaws)</span></div>
|
||||
<div class="line"><span class="lineno"> 5</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 6</span><span class="comment"> * @version 0.1</span></div>
|
||||
<div class="line"><span class="lineno"> 7</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 8</span><span class="comment"> * @brief The main program</span></div>
|
||||
<div class="line"><span class="lineno"> 9</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 10</span><span class="comment"> * @bug No known bugs</span></div>
|
||||
<div class="line"><span class="lineno"> 11</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="data__type_8hpp.html" title="Header for the data_t type.">"data_type.hpp"</a></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="monte__carlo_8hpp.html" title="Functions for Monte Carlo simulations.">"monte_carlo.hpp"</a></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="utils_8hpp.html" title="Function prototypes and macros that are useful.">"utils.hpp"</a></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <csignal></span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include <cstdlib></span></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include <iostream></span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include <omp.h></span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="keywordtype">void</span> create_burn_in_time_data()</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">getopt</span><span class="preprocessor">.</span><span class="preprocessor">h</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">/** @brief Create the data for the burn-in time for temperatures 1.0 and 2.4</span></div>
|
||||
<div class="line"><span class="lineno"> 19</span><span class="comment"> * for both unordered and ordered initial states.</span></div>
|
||||
<div class="line"><span class="lineno"> 20</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32"> 21</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32">create_burn_in_time_data</a>()</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span>{</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> <span class="comment">// Test burn-in time</span></div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <a class="code hl_function" href="monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a>(1.0, 20, 20000,</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">"output/burn_in_time/unordered_1_0.txt"</span>);</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <a class="code hl_function" href="monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a>(1.0, 20, 20000, 1,</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="stringliteral">"output/burn_in_time/ordered_1_0.txt"</span>);</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <a class="code hl_function" href="monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a>(2.4, 20, 20000,</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="stringliteral">"output/burn_in_time/unordered_2_4.txt"</span>);</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <a class="code hl_function" href="monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a>(2.4, 20, 20000, 1,</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="stringliteral">"output/burn_in_time/ordered_2_4.txt"</span>);</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> montecarlo::progression(1.0, 20, 20000,</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="stringliteral">"../output/burn_in_time/unordered_1_0.txt"</span>);</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> montecarlo::progression(1.0, 20, 20000, 1,</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> <span class="stringliteral">"../output/burn_in_time/ordered_1_0.txt"</span>);</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> montecarlo::progression(2.4, 20, 20000,</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="stringliteral">"../output/burn_in_time/unordered_2_4.txt"</span>);</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> montecarlo::progression(2.4, 20, 20000, 1,</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="stringliteral">"../output/burn_in_time/ordered_2_4.txt"</span>);</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>}</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="keywordtype">void</span> create_pd_estimate_data()</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span>{</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// Estimate pd</span></div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559">pd_estimate</a>(1.0, 20, 1000000, <span class="stringliteral">"output/pd_estimate/estimate_1_0.txt"</span>);</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559">pd_estimate</a>(2.4, 20, 1000000, <span class="stringliteral">"output/pd_estimate/estimate_2_4.txt"</span>);</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span>}</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="keywordtype">void</span> test_parallel_speedup()</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span>{</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="comment">// Test the openmp speedup</span></div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data;</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordtype">double</span> t0, t1, t2;</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordtype">int</span> tries = 5;</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> t0 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < tries; i++)</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed">monte_carlo_serial</a>(20, 1.0, 10000);</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> t1 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < tries; i++)</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <a class="code hl_function" href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a>(20, 1.0, 10000);</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> t2 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> std::cout << <span class="stringliteral">"Time serial : "</span> << (t1 - t0) / tries << <span class="stringliteral">" seconds"</span></div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> << <span class="charliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> std::cout << <span class="stringliteral">"Time parallel : "</span> << (t2 - t1) / tries << <span class="stringliteral">" seconds"</span></div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> << <span class="charliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> std::cout << <span class="stringliteral">"Speedup parallel: "</span> << (t1 - t0) / (t2 - t1) << <span class="charliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span>}</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="keywordtype">void</span> create_phase_transition_data()</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span>{</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordtype">double</span> t0, t1;</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="comment">/** @brief Create the data used to estimate the probability distribution</span></div>
|
||||
<div class="line"><span class="lineno"> 35</span><span class="comment"> * for tempratures 1.0 anbd 2.4.</span></div>
|
||||
<div class="line"><span class="lineno"> 36</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b"> 37</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b">create_pd_estimate_data</a>()</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span>{</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="comment">// Estimate pd</span></div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">pd_estimate</a>(1.0, 20, 1000000,</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="stringliteral">"../output/pd_estimate/estimate_1_0.txt"</span>);</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">pd_estimate</a>(2.4, 20, 1000000,</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="stringliteral">"../output/pd_estimate/estimate_2_4.txt"</span>);</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span>}</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="comment">/** @brief Create data using the same parameters except one uses burn-in time,</span></div>
|
||||
<div class="line"><span class="lineno"> 47</span><span class="comment"> * while the other doesn't.</span></div>
|
||||
<div class="line"><span class="lineno"> 48</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861"> 49</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861">test_burn_in_time</a>()</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span>{</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">phase_transition</a>(</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> 100, 2.1, 2.4, 40, 1e5, montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">mcmc_serial</a>,</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="stringliteral">"../output/test_burn_in_time/burn_in.txt"</span>, 5000);</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">phase_transition</a>(</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> 100, 2.1, 2.4, 40, 1e5, montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">mcmc_serial</a>,</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="stringliteral">"../output/test_burn_in_time/no_burn_in.txt"</span>, 0);</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span>}</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment">/** @brief Test how much Openmp speeds up.*/</span></div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95"> 60</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95">test_parallel_speedup</a>()</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span>{</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="comment">// Test the openmp speedup</span></div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data;</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordtype">double</span> t0, t1, t2;</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordtype">int</span> tries = 5;</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> t0 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// Phase transition</span></div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">phase_transition</a>(20, 2.1, 2.4, 40, <a class="code hl_function" href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a>,</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="stringliteral">"output/phase_transition/size_20.txt"</span>);</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">phase_transition</a>(40, 2.1, 2.4, 40, <a class="code hl_function" href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a>,</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="stringliteral">"output/phase_transition/size_40.txt"</span>);</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">phase_transition</a>(60, 2.1, 2.4, 40, <a class="code hl_function" href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a>,</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="stringliteral">"output/phase_transition/size_60.txt"</span>);</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">phase_transition</a>(80, 2.1, 2.4, 40, <a class="code hl_function" href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a>,</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="stringliteral">"output/phase_transition/size_80.txt"</span>);</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">phase_transition</a>(100, 2.1, 2.4, 40, <a class="code hl_function" href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a>,</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="stringliteral">"output/phase_transition/size_100.txt"</span>);</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> t1 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> std::cout << <span class="stringliteral">"Time: "</span> << t1 - t0 << std::endl;</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span>}</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> </div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 84</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span>{</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keywordflow">if</span> (argc < 2) {</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> std::cout << <span class="stringliteral">"Need at least 1 argument, got "</span> << argc - 1</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> << <span class="stringliteral">" arguments."</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> abort();</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> }</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordtype">int</span> arg = atoi(argv[1]);</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordflow">switch</span> (arg) {</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordflow">case</span> 1:</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> create_burn_in_time_data();</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">case</span> 2:</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> create_pd_estimate_data();</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">case</span> 3:</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> test_parallel_speedup();</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keywordflow">case</span> 4:</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> create_phase_transition_data();</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> std::cout << <span class="stringliteral">"Not a valid option!"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> abort();</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> }</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span>}</div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00018">data_type.hpp:18</a></div></div>
|
||||
<div class="ttc" id="adata__type_8hpp_html"><div class="ttname"><a href="data__type_8hpp.html">data_type.hpp</a></div><div class="ttdoc">Header for the data_t type.</div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html"><div class="ttname"><a href="monte__carlo_8hpp.html">monte_carlo.hpp</a></div><div class="ttdoc">Functions for monte carlo simulations.</div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a2dfe843fbb80e10a763f3260131a148e"><div class="ttname"><a href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">phase_transition</a></div><div class="ttdeci">void phase_transition(int L, double start_T, double end_T, int points_T, std::function< data_t(int, double, int)> monte_carlo, std::string outfile)</div><div class="ttdoc">Perform the MCMC algorithm using a range of temperatures.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00156">monte_carlo.cpp:156</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a8f8d4c5e032ed8565a3ac518b32c6aed"><div class="ttname"><a href="monte__carlo_8hpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed">monte_carlo_serial</a></div><div class="ttdeci">data_t monte_carlo_serial(int L, double T, int cycles)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00111">monte_carlo.cpp:111</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a962f704ab35208bf6541eb3b707a9559"><div class="ttname"><a href="monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559">pd_estimate</a></div><div class="ttdeci">void pd_estimate(double T, int L, int cycles, const std::string filename)</div><div class="ttdoc">Estimate the probability distribution for the energy.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00085">monte_carlo.cpp:85</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_ac97d0de27f2f0d50fc6ecf3a79f32826"><div class="ttname"><a href="monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a></div><div class="ttdeci">void monte_carlo_progression(double T, int L, int cycles, const std::string filename)</div><div class="ttdoc">Write the expected values for each Monte Carlo cycles to file.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00017">monte_carlo.cpp:17</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_acc34e2049a5030874f6f548f3adab958"><div class="ttname"><a href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a></div><div class="ttdeci">data_t monte_carlo_parallel(int L, double T, int cycles)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00128">monte_carlo.cpp:128</a></div></div>
|
||||
<div class="ttc" id="atest__suite_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">The main function.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00148">test_suite.cpp:148</a></div></div>
|
||||
<div class="ttc" id="autils_8hpp_html"><div class="ttname"><a href="utils_8hpp.html">utils.hpp</a></div><div class="ttdoc">Function prototypes and macros that are useful.</div></div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">for</span> (size_t i = 0; i < tries; i++)</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">mcmc_serial</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">(</a>20<a class="code hl_function" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">,</a> 1.0<a class="code hl_function" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">,</a> 10000<a class="code hl_function" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">)</a>;</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> t1 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">for</span> (size_t i = 0; i < tries; i++)</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">mcmc_parallel</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">(</a>20<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">,</a> 1.0<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">,</a> 10000<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">)</a>;</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> t2 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> std::cout << <span class="stringliteral">"Time serial : "</span> << (t1 - t0) / tries << <span class="stringliteral">" seconds"</span></div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> << <span class="stringliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> std::cout << <span class="stringliteral">"Time parallel : "</span> << (t2 - t1) / tries << <span class="stringliteral">" seconds"</span></div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> << <span class="stringliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> std::cout << <span class="stringliteral">"Speedup parallel: "</span> << (t1 - t0) / (t2 - t1) << <span class="stringliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span>}</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span><span class="comment">/** @brief Create data for studying phase transition.</span></div>
|
||||
<div class="line"><span class="lineno"> 82</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d"> 83</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d">create_phase_transition_data</a>()</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span>{</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordtype">double</span> t0, t1;</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> t0 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="comment">// Phase transition</span></div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">phase_transition</a>(20, 2.1, 2.4, 40, 1e4,</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">mcmc_parallel</a>,</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="stringliteral">"../output/phase_transition/size_20.txt"</span>);</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">phase_transition</a>(40, 2.1, 2.4, 40, 1e4,</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">mcmc_parallel</a>,</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="stringliteral">"../output/phase_transition/size_40.txt"</span>);</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">phase_transition</a>(60, 2.1, 2.4, 40, 1e4,</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">mcmc_parallel</a>,</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="stringliteral">"../output/phase_transition/size_60.txt"</span>);</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">phase_transition</a>(80, 2.1, 2.4, 40, 1e4,</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">mcmc_parallel</a>,</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="stringliteral">"../output/phase_transition/size_80.txt"</span>);</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">phase_transition</a>(100, 2.1, 2.4, 40, 1e4,</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">mcmc_parallel</a>,</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="stringliteral">"../output/phase_transition/size_100.txt"</span>);</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> t1 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> </div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> std::cout << <span class="stringliteral">"Time: "</span> << t1 - t0 << std::endl;</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span>}</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> </div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="comment">/** @brief A function that displays how to use the program and quits.*/</span></div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"><a class="line" href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1"> 110</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a>(std::string filename)</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span>{</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> std::cout << <span class="stringliteral">"Usage: "</span> << filename << <span class="stringliteral">" OPTION ...\n"</span></div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> << <span class="stringliteral">"At least one option should be used.\n\n"</span></div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> << <span class="stringliteral">"\t[ -h | --help ]\n"</span></div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> << <span class="stringliteral">"\t[ --all ]\n"</span></div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> << <span class="stringliteral">"\t[ --create-burn-in-data ]\n"</span></div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> << <span class="stringliteral">"\t[ --create-pd-estimate-data ]\n"</span></div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> << <span class="stringliteral">"\t[ --create-phase-transition-data ]\n"</span></div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> << <span class="stringliteral">"\t[ --test-parallel-speedup ]\n"</span></div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> << <span class="stringliteral">"\t[ --test-burn-in-time ]\n"</span>;</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> exit(-1);</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span>}</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="comment">/** @brief The main function.*/</span></div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 125</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span>{</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keyword">static</span> <span class="keyword">struct</span> option long_options[] = {</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> {<span class="stringliteral">"all"</span>, no_argument, 0, 0},</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> {<span class="stringliteral">"create-burn-in-data"</span>, no_argument, 0, 0},</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> {<span class="stringliteral">"create-pd-estimate-data"</span>, no_argument, 0, 0},</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> {<span class="stringliteral">"test-parallel-speedup"</span>, no_argument, 0, 0},</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> {<span class="stringliteral">"create-phase-transition-data"</span>, no_argument, 0, 0},</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> {<span class="stringliteral">"test-burn-in-time"</span>, no_argument, 0, 0},</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> {<span class="stringliteral">"help"</span>, no_argument, 0, 0}};</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> </div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordtype">int</span> option_index = -1;</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="keywordtype">int</span> c;</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> </div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> c = getopt_long(argc, argv, <span class="stringliteral">"h"</span>, long_options, &option_index);</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> </div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordflow">if</span> (c == -1)</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (c == <span class="stringliteral">'h'</span>)</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> </div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">switch</span> (option_index) {</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="keywordflow">case</span> 0:</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <a class="code hl_function" href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32">create_burn_in_time_data</a><a class="code hl_function" href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32">(</a><a class="code hl_function" href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32">)</a>;</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <a class="code hl_function" href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b">create_pd_estimate_data</a><a class="code hl_function" href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b">(</a><a class="code hl_function" href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b">)</a>;</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <a class="code hl_function" href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95">test_parallel_speedup</a><a class="code hl_function" href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95">(</a><a class="code hl_function" href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95">)</a>;</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <a class="code hl_function" href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d">create_phase_transition_data</a><a class="code hl_function" href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d">(</a><a class="code hl_function" href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d">)</a>;</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <a class="code hl_function" href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861">test_burn_in_time</a><a class="code hl_function" href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861">(</a><a class="code hl_function" href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861">)</a>;</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keywordflow">case</span> 1:</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <a class="code hl_function" href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32">create_burn_in_time_data</a><a class="code hl_function" href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32">(</a><a class="code hl_function" href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32">)</a>;</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> <span class="keywordflow">case</span> 2:</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <a class="code hl_function" href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b">create_pd_estimate_data</a><a class="code hl_function" href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b">(</a><a class="code hl_function" href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b">)</a>;</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">case</span> 3:</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <a class="code hl_function" href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95">test_parallel_speedup</a><a class="code hl_function" href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95">(</a><a class="code hl_function" href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95">)</a>;</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="keywordflow">case</span> 4:</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <a class="code hl_function" href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d">create_phase_transition_data</a><a class="code hl_function" href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d">(</a><a class="code hl_function" href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d">)</a>;</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <span class="keywordflow">case</span> 5:</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> <a class="code hl_function" href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861">test_burn_in_time</a><a class="code hl_function" href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861">(</a><a class="code hl_function" href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861">)</a>;</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordflow">case</span> 6: <span class="comment">// Not a mistake. This just goes to the default.</span></div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> }</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> }</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> </div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span>}</div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdoc">Type to use with the IsingModel class and montecarlo module.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00019">data_type.hpp:19</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a0dfa85080578dffff23b68e372cece95"><div class="ttname"><a href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95">test_parallel_speedup</a></div><div class="ttdeci">void test_parallel_speedup()</div><div class="ttdoc">Test how much Openmp speeds up.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00060">main.cpp:60</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdoc">The main function.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00125">main.cpp:125</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a4f8ea24364d72024915d3753a572cc5b"><div class="ttname"><a href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b">create_pd_estimate_data</a></div><div class="ttdeci">void create_pd_estimate_data()</div><div class="ttdoc">Create the data used to estimate the probability distribution for tempratures 1.0 anbd 2....</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00037">main.cpp:37</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a68406fc2dd8de5849c3984658c171f32"><div class="ttname"><a href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32">create_burn_in_time_data</a></div><div class="ttdeci">void create_burn_in_time_data()</div><div class="ttdoc">Create the data for the burn-in time for temperatures 1.0 and 2.4 for both unordered and ordered init...</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00021">main.cpp:21</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a746d8dc451b2b2536abbb1ff1acaf861"><div class="ttname"><a href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861">test_burn_in_time</a></div><div class="ttdeci">void test_burn_in_time()</div><div class="ttdoc">Create data using the same parameters except one uses burn-in time, while the other doesn't.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00049">main.cpp:49</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a9d62cf1399596f4c5a39abdd3196d76d"><div class="ttname"><a href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d">create_phase_transition_data</a></div><div class="ttdeci">void create_phase_transition_data()</div><div class="ttdoc">Create data for studying phase transition.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00083">main.cpp:83</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_ac907e18135856c90366aaa599a9e10b1"><div class="ttname"><a href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a></div><div class="ttdeci">void usage(std::string filename)</div><div class="ttdoc">A function that displays how to use the program and quits.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00110">main.cpp:110</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a34e9c3e24f26760693266b8a7b6b3d21"><div class="ttname"><a href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">montecarlo::phase_transition</a></div><div class="ttdeci">void phase_transition(int L, double start_T, double end_T, int points_T, int cycles, std::function< data_t(int, double, int, int)> monte_carlo, std::string outfile, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Perform the MCMC algorithm using a range of temperatures.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00169">monte_carlo.cpp:169</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_ae1e7f904ecfc3d8f3c4dd1ef155dd771"><div class="ttname"><a href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">montecarlo::mcmc_parallel</a></div><div class="ttdeci">data_t mcmc_parallel(int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00141">monte_carlo.cpp:141</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_ae67483ff00d1b0594d543261c8283ffd"><div class="ttname"><a href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">montecarlo::mcmc_serial</a></div><div class="ttdeci">data_t mcmc_serial(int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00122">monte_carlo.cpp:122</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_aea2dd1b5fac7c45633bc6f8dc4541226"><div class="ttname"><a href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">montecarlo::pd_estimate</a></div><div class="ttdeci">void pd_estimate(double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Estimate the probability distribution for the energy.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00091">monte_carlo.cpp:91</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
201
docs/mcmc__progression_8cpp.html
Normal file
201
docs/mcmc__progression_8cpp.html
Normal file
@@ -0,0 +1,201 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: src/mcmc_progression.cpp File 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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('mcmc__progression_8cpp.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">mcmc_progression.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Execute the mcmc algorithm and write data to file after each Monte Carlo cycle.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include "<a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="monte__carlo_8hpp_source.html">monte_carlo.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||
<code>#include <getopt.h></code><br />
|
||||
<code>#include <omp.h></code><br />
|
||||
<code>#include <string></code><br />
|
||||
</div>
|
||||
<p><a href="mcmc__progression_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ac907e18135856c90366aaa599a9e10b1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="mcmc__progression_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a> (std::string filename)</td></tr>
|
||||
<tr class="memdesc:ac907e18135856c90366aaa599a9e10b1"><td class="mdescLeft"> </td><td class="mdescRight">A function that displays how to use the program and quits. <br /></td></tr>
|
||||
<tr class="separator:ac907e18135856c90366aaa599a9e10b1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="mcmc__progression_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
|
||||
<tr class="memdesc:a3c04138a5bfe5d72780bb7e82a18e627"><td class="mdescLeft"> </td><td class="mdescRight">The main function. <br /></td></tr>
|
||||
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Execute the mcmc algorithm and write data to file after each Monte Carlo cycle. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000008">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="mcmc__progression_8cpp_source.html">mcmc_progression.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a3c04138a5bfe5d72780bb7e82a18e627" name="a3c04138a5bfe5d72780bb7e82a18e627"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3c04138a5bfe5d72780bb7e82a18e627">◆ </a></span>main()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int main </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>argc</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">char ** </td>
|
||||
<td class="paramname"><em>argv</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>The main function. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="mcmc__progression_8cpp_source.html#l00032">32</a> of file <a class="el" href="mcmc__progression_8cpp_source.html">mcmc_progression.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac907e18135856c90366aaa599a9e10b1" name="ac907e18135856c90366aaa599a9e10b1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac907e18135856c90366aaa599a9e10b1">◆ </a></span>usage()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void usage </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>filename</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>A function that displays how to use the program and quits. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="mcmc__progression_8cpp_source.html#l00022">22</a> of file <a class="el" href="mcmc__progression_8cpp_source.html">mcmc_progression.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="mcmc__progression_8cpp.html">mcmc_progression.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
5
docs/mcmc__progression_8cpp.js
Normal file
5
docs/mcmc__progression_8cpp.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var mcmc__progression_8cpp =
|
||||
[
|
||||
[ "main", "mcmc__progression_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627", null ],
|
||||
[ "usage", "mcmc__progression_8cpp.html#ac907e18135856c90366aaa599a9e10b1", null ]
|
||||
];
|
||||
194
docs/mcmc__progression_8cpp_source.html
Normal file
194
docs/mcmc__progression_8cpp_source.html
Normal file
@@ -0,0 +1,194 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: src/mcmc_progression.cpp 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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('mcmc__progression_8cpp_source.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">mcmc_progression.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="mcmc__progression_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/** @file mcmc_progression.cpp</span></div>
|
||||
<div class="line"><span class="lineno"> 2</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 3</span><span class="comment"> * @author Cory Alexander Balaton (coryab)</span></div>
|
||||
<div class="line"><span class="lineno"> 4</span><span class="comment"> * @author Janita Ovidie Sandtrøen Willumsen (janitaws)</span></div>
|
||||
<div class="line"><span class="lineno"> 5</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 6</span><span class="comment"> * @version 1.0</span></div>
|
||||
<div class="line"><span class="lineno"> 7</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 8</span><span class="comment"> * @brief Execute the mcmc algorithm and write data to file after each </span></div>
|
||||
<div class="line"><span class="lineno"> 9</span><span class="comment"> * Monte Carlo cycle.</span></div>
|
||||
<div class="line"><span class="lineno"> 10</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 11</span><span class="comment"> * @bug No known bugs</span></div>
|
||||
<div class="line"><span class="lineno"> 12</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="data__type_8hpp.html" title="Header for the data_t type.">"data_type.hpp"</a></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="monte__carlo_8hpp.html" title="Functions for Monte Carlo simulations.">"monte_carlo.hpp"</a></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="utils_8hpp.html" title="Function prototypes and macros that are useful.">"utils.hpp"</a></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">getopt</span><span class="preprocessor">.</span><span class="preprocessor">h</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">omp</span><span class="preprocessor">.</span><span class="preprocessor">h</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">string</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">/** @brief A function that displays how to use the program and quits.*/</span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="mcmc__progression_8cpp.html#ac907e18135856c90366aaa599a9e10b1"> 22</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a>(std::string filename)</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span>{</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> std::cout << <span class="stringliteral">"Usage: "</span> << filename</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> << <span class="stringliteral">" <temperature> <lattice size> "</span></div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">"<cycles> <burn-in-time> <output file>\n\n"</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> << <span class="stringliteral">"\t[ -h | --help ]\n"</span>;</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> exit(-1);</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>}</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="comment">/** @brief The main function.*/</span></div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="mcmc__progression_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 32</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span>{</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="comment">// Command options</span></div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">struct</span> option long_options[] = {{<span class="stringliteral">"help"</span>, 0, 0, 0}, {NULL, 0, NULL, 0}};</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordtype">int</span> option_index = -1;</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keywordtype">int</span> c;</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> c = getopt_long(argc, argv, <span class="stringliteral">"h"</span>, long_options, &option_index);</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">if</span> (c == -1)</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">switch</span> (c) {</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">case</span> 0:</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">switch</span> (option_index) {</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">case</span> 0: <span class="comment">// Not a mistake. This just goes to the default.</span></div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> }</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">case</span> <span class="stringliteral">'h'</span>:</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> }</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> }</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="comment">// Check that the number of arguments is at least 8.</span></div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">if</span> (argc < 6) {</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> }</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="comment">// Timing variables</span></div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordtype">double</span> t0, t1;</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> t0 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="comment">// Define/initialize variables</span></div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordtype">double</span> temp = atoi(argv[1]);</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordtype">int</span> L = atoi(argv[2]), cycles = atoi(argv[3]), burn_in_time = atoi(argv[4]);</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> std::string outfile = argv[5];</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> montecarlo::progression(temp, L, cycles, outfile, burn_in_time);</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> t1 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> std::cout << <span class="stringliteral">"Time: "</span> << t1 - t0 << <span class="stringliteral">" seconds\n"</span>;</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>}</div>
|
||||
<div class="ttc" id="amain_8cpp_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdoc">The main function.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00125">main.cpp:125</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_ac907e18135856c90366aaa599a9e10b1"><div class="ttname"><a href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a></div><div class="ttdeci">void usage(std::string filename)</div><div class="ttdoc">A function that displays how to use the program and quits.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00110">main.cpp:110</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="mcmc__progression_8cpp.html">mcmc_progression.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -29,12 +29,33 @@ var menudata={children:[
|
||||
{text:"Class List",url:"annotated.html"},
|
||||
{text:"Class Index",url:"classes.html"},
|
||||
{text:"Class Members",url:"functions.html",children:[
|
||||
{text:"All",url:"functions.html"},
|
||||
{text:"All",url:"functions.html",children:[
|
||||
{text:"d",url:"functions.html#index_d"},
|
||||
{text:"e",url:"functions.html#index_e"},
|
||||
{text:"i",url:"functions.html#index_i"},
|
||||
{text:"l",url:"functions.html#index_l"},
|
||||
{text:"m",url:"functions.html#index_m"},
|
||||
{text:"n",url:"functions.html#index_n"},
|
||||
{text:"o",url:"functions.html#index_o"},
|
||||
{text:"t",url:"functions.html#index_t"}]},
|
||||
{text:"Functions",url:"functions_func.html"},
|
||||
{text:"Variables",url:"functions_vars.html"}]}]},
|
||||
{text:"Variables",url:"functions_vars.html"},
|
||||
{text:"Related Functions",url:"functions_rela.html"}]}]},
|
||||
{text:"Files",url:"files.html",children:[
|
||||
{text:"File List",url:"files.html"},
|
||||
{text:"File Members",url:"globals.html",children:[
|
||||
{text:"All",url:"globals.html"},
|
||||
{text:"All",url:"globals.html",children:[
|
||||
{text:"_",url:"globals.html#index__5F"},
|
||||
{text:"a",url:"globals.html#index_a"},
|
||||
{text:"c",url:"globals.html#index_c"},
|
||||
{text:"d",url:"globals.html#index_d"},
|
||||
{text:"e",url:"globals.html#index_e"},
|
||||
{text:"i",url:"globals.html#index_i"},
|
||||
{text:"l",url:"globals.html#index_l"},
|
||||
{text:"m",url:"globals.html#index_m"},
|
||||
{text:"r",url:"globals.html#index_r"},
|
||||
{text:"t",url:"globals.html#index_t"},
|
||||
{text:"u",url:"globals.html#index_u"},
|
||||
{text:"x",url:"globals.html#index_x"}]},
|
||||
{text:"Functions",url:"globals_func.html"},
|
||||
{text:"Macros",url:"globals_defs.html"}]}]}]}
|
||||
|
||||
@@ -107,31 +107,29 @@ $(document).ready(function(){initNavTree('monte__carlo_8cpp.html',''); initResiz
|
||||
<p>Implementation of the monte carlo functions.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include "<a class="el" href="monte__carlo_8hpp_source.html">monte_carlo.hpp</a>"</code><br />
|
||||
<code>#include <cmath></code><br />
|
||||
<code>#include <cstdint></code><br />
|
||||
</div>
|
||||
<p><a href="monte__carlo_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ac97d0de27f2f0d50fc6ecf3a79f32826"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8cpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a> (double T, int L, int cycles, const std::string filename)</td></tr>
|
||||
<tr class="memdesc:ac97d0de27f2f0d50fc6ecf3a79f32826"><td class="mdescLeft"> </td><td class="mdescRight">Write the expected values for each Monte Carlo cycles to file. <br /></td></tr>
|
||||
<tr class="separator:ac97d0de27f2f0d50fc6ecf3a79f32826"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a89ddd777796c65eb2b289af11fc0ce09"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8cpp.html#a89ddd777796c65eb2b289af11fc0ce09">monte_carlo_progression</a> (double T, int L, int cycles, int value, const std::string filename)</td></tr>
|
||||
<tr class="memdesc:a89ddd777796c65eb2b289af11fc0ce09"><td class="mdescLeft"> </td><td class="mdescRight">Write the expected values for each Monte Carlo cycles to file. <br /></td></tr>
|
||||
<tr class="separator:a89ddd777796c65eb2b289af11fc0ce09"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a962f704ab35208bf6541eb3b707a9559"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8cpp.html#a962f704ab35208bf6541eb3b707a9559">pd_estimate</a> (double T, int L, int cycles, const std::string filename)</td></tr>
|
||||
<tr class="memdesc:a962f704ab35208bf6541eb3b707a9559"><td class="mdescLeft"> </td><td class="mdescRight">Estimate the probability distribution for the energy. <br /></td></tr>
|
||||
<tr class="separator:a962f704ab35208bf6541eb3b707a9559"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8f8d4c5e032ed8565a3ac518b32c6aed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8cpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed">monte_carlo_serial</a> (int L, double T, int cycles)</td></tr>
|
||||
<tr class="memdesc:a8f8d4c5e032ed8565a3ac518b32c6aed"><td class="mdescLeft"> </td><td class="mdescRight">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles. <br /></td></tr>
|
||||
<tr class="separator:a8f8d4c5e032ed8565a3ac518b32c6aed"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:acc34e2049a5030874f6f548f3adab958"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8cpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a> (int L, double T, int cycles)</td></tr>
|
||||
<tr class="memdesc:acc34e2049a5030874f6f548f3adab958"><td class="mdescLeft"> </td><td class="mdescRight">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel. <br /></td></tr>
|
||||
<tr class="separator:acc34e2049a5030874f6f548f3adab958"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a7df22ace588b4d229d1029ce766d0009"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8cpp.html#a7df22ace588b4d229d1029ce766d0009">phase_transition</a> (int L, double start, double end, int points, std::function< <a class="el" href="classdata__t.html">data_t</a>(int, double, int)> monte_carlo, std::string outfile)</td></tr>
|
||||
<tr class="memdesc:a7df22ace588b4d229d1029ce766d0009"><td class="mdescLeft"> </td><td class="mdescRight">Perform the MCMC algorithm using a range of temperatures. <br /></td></tr>
|
||||
<tr class="separator:a7df22ace588b4d229d1029ce766d0009"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a781d946de16211ba18ad6671a5b6838d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#a781d946de16211ba18ad6671a5b6838d">montecarlo::progression</a> (double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)</td></tr>
|
||||
<tr class="memdesc:a781d946de16211ba18ad6671a5b6838d"><td class="mdescLeft"> </td><td class="mdescRight">Write the expected values for each Monte Carlo cycles to file. <br /></td></tr>
|
||||
<tr class="separator:a781d946de16211ba18ad6671a5b6838d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1549fc386bd3cdd1cdbe0261b9dd8415"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#a1549fc386bd3cdd1cdbe0261b9dd8415">montecarlo::progression</a> (double T, int L, int cycles, int value, const std::string filename, int burn_in_time=BURN_IN_TIME)</td></tr>
|
||||
<tr class="memdesc:a1549fc386bd3cdd1cdbe0261b9dd8415"><td class="mdescLeft"> </td><td class="mdescRight">Write the expected values for each Monte Carlo cycles to file. <br /></td></tr>
|
||||
<tr class="separator:a1549fc386bd3cdd1cdbe0261b9dd8415"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aea2dd1b5fac7c45633bc6f8dc4541226"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">montecarlo::pd_estimate</a> (double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)</td></tr>
|
||||
<tr class="memdesc:aea2dd1b5fac7c45633bc6f8dc4541226"><td class="mdescLeft"> </td><td class="mdescRight">Estimate the probability distribution for the energy. <br /></td></tr>
|
||||
<tr class="separator:aea2dd1b5fac7c45633bc6f8dc4541226"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae67483ff00d1b0594d543261c8283ffd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">montecarlo::mcmc_serial</a> (int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)</td></tr>
|
||||
<tr class="memdesc:ae67483ff00d1b0594d543261c8283ffd"><td class="mdescLeft"> </td><td class="mdescRight">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles. <br /></td></tr>
|
||||
<tr class="separator:ae67483ff00d1b0594d543261c8283ffd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae1e7f904ecfc3d8f3c4dd1ef155dd771"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">montecarlo::mcmc_parallel</a> (int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)</td></tr>
|
||||
<tr class="memdesc:ae1e7f904ecfc3d8f3c4dd1ef155dd771"><td class="mdescLeft"> </td><td class="mdescRight">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel. <br /></td></tr>
|
||||
<tr class="separator:ae1e7f904ecfc3d8f3c4dd1ef155dd771"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a34e9c3e24f26760693266b8a7b6b3d21"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">montecarlo::phase_transition</a> (int L, double start_T, double end_T, int points_T, int cycles, std::function< <a class="el" href="classdata__t.html">data_t</a>(int, double, int, int)> monte_carlo, std::string outfile, int burn_in_time=BURN_IN_TIME)</td></tr>
|
||||
<tr class="memdesc:a34e9c3e24f26760693266b8a7b6b3d21"><td class="mdescLeft"> </td><td class="mdescRight">Perform the MCMC algorithm using a range of temperatures. <br /></td></tr>
|
||||
<tr class="separator:a34e9c3e24f26760693266b8a7b6b3d21"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Implementation of the monte carlo functions. </p>
|
||||
@@ -139,18 +137,18 @@ Functions</h2></td></tr>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000011">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000009">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="acc34e2049a5030874f6f548f3adab958" name="acc34e2049a5030874f6f548f3adab958"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#acc34e2049a5030874f6f548f3adab958">◆ </a></span>monte_carlo_parallel()</h2>
|
||||
<a id="ae1e7f904ecfc3d8f3c4dd1ef155dd771" name="ae1e7f904ecfc3d8f3c4dd1ef155dd771"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae1e7f904ecfc3d8f3c4dd1ef155dd771">◆ </a></span>mcmc_parallel()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="classdata__t.html">data_t</a> monte_carlo_parallel </td>
|
||||
<td class="memname"><a class="el" href="classdata__t.html">data_t</a> montecarlo::mcmc_parallel </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
@@ -165,7 +163,13 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em> </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code>BURN_IN_TIME</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
@@ -181,23 +185,78 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">T</td><td>The Temperature for the Ising model </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html">data_t</a> </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00128">128</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00141">141</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac97d0de27f2f0d50fc6ecf3a79f32826" name="ac97d0de27f2f0d50fc6ecf3a79f32826"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac97d0de27f2f0d50fc6ecf3a79f32826">◆ </a></span>monte_carlo_progression() <span class="overload">[1/2]</span></h2>
|
||||
<a id="ae67483ff00d1b0594d543261c8283ffd" name="ae67483ff00d1b0594d543261c8283ffd"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae67483ff00d1b0594d543261c8283ffd">◆ </a></span>mcmc_serial()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void monte_carlo_progression </td>
|
||||
<td class="memname"><a class="el" href="classdata__t.html">data_t</a> montecarlo::mcmc_serial </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code>BURN_IN_TIME</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">T</td><td>The Temperature for the Ising model </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00122">122</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aea2dd1b5fac7c45633bc6f8dc4541226" name="aea2dd1b5fac7c45633bc6f8dc4541226"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aea2dd1b5fac7c45633bc6f8dc4541226">◆ </a></span>pd_estimate()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void montecarlo::pd_estimate </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
@@ -218,7 +277,153 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string </td>
|
||||
<td class="paramname"><em>filename</em> </td>
|
||||
<td class="paramname"><em>filename</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code>BURN_IN_TIME</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Estimate the probability distribution for the energy. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">T</td><td>The temperature of the Ising model </td></tr>
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">filename</td><td>The file to write to </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00091">91</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a34e9c3e24f26760693266b8a7b6b3d21" name="a34e9c3e24f26760693266b8a7b6b3d21"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a34e9c3e24f26760693266b8a7b6b3d21">◆ </a></span>phase_transition()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void montecarlo::phase_transition </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>start_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>end_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>points_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::function< <a class="el" href="classdata__t.html">data_t</a>(int, double, int, int)> </td>
|
||||
<td class="paramname"><em>monte_carlo</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>outfile</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code>BURN_IN_TIME</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Perform the MCMC algorithm using a range of temperatures. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">start_T</td><td>The start temperature </td></tr>
|
||||
<tr><td class="paramname">end_T</td><td>The end temperature </td></tr>
|
||||
<tr><td class="paramname">point_T</td><td>The amount of point to measure </td></tr>
|
||||
<tr><td class="paramname">monte_carlo</td><td>Which Monte Carlo implementation to use </td></tr>
|
||||
<tr><td class="paramname">outfile</td><td>The file to write the data to </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00169">169</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a781d946de16211ba18ad6671a5b6838d" name="a781d946de16211ba18ad6671a5b6838d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a781d946de16211ba18ad6671a5b6838d">◆ </a></span>progression() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void montecarlo::progression </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string </td>
|
||||
<td class="paramname"><em>filename</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code>BURN_IN_TIME</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
@@ -235,22 +440,23 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">filename</td><td>The file to write to </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00017">17</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00015">15</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a89ddd777796c65eb2b289af11fc0ce09" name="a89ddd777796c65eb2b289af11fc0ce09"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a89ddd777796c65eb2b289af11fc0ce09">◆ </a></span>monte_carlo_progression() <span class="overload">[2/2]</span></h2>
|
||||
<a id="a1549fc386bd3cdd1cdbe0261b9dd8415" name="a1549fc386bd3cdd1cdbe0261b9dd8415"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1549fc386bd3cdd1cdbe0261b9dd8415">◆ </a></span>progression() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void monte_carlo_progression </td>
|
||||
<td class="memname">void montecarlo::progression </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
@@ -277,7 +483,13 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string </td>
|
||||
<td class="paramname"><em>filename</em> </td>
|
||||
<td class="paramname"><em>filename</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code>BURN_IN_TIME</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
@@ -295,178 +507,12 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">value</td><td>The value to set the elements in the lattice </td></tr>
|
||||
<tr><td class="paramname">filename</td><td>The file to write to </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00051">51</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a8f8d4c5e032ed8565a3ac518b32c6aed" name="a8f8d4c5e032ed8565a3ac518b32c6aed"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a8f8d4c5e032ed8565a3ac518b32c6aed">◆ </a></span>monte_carlo_serial()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="classdata__t.html">data_t</a> monte_carlo_serial </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">T</td><td>The Temperature for the Ising model </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00111">111</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a962f704ab35208bf6541eb3b707a9559" name="a962f704ab35208bf6541eb3b707a9559"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a962f704ab35208bf6541eb3b707a9559">◆ </a></span>pd_estimate()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void pd_estimate </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string </td>
|
||||
<td class="paramname"><em>filename</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Estimate the probability distribution for the energy. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">T</td><td>The temperature of the Ising model </td></tr>
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">filename</td><td>The file to write to </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00085">85</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a7df22ace588b4d229d1029ce766d0009" name="a7df22ace588b4d229d1029ce766d0009"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a7df22ace588b4d229d1029ce766d0009">◆ </a></span>phase_transition()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void phase_transition </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>start_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>end_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>points_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::function< <a class="el" href="classdata__t.html">data_t</a>(int, double, int)> </td>
|
||||
<td class="paramname"><em>monte_carlo</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>outfile</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Perform the MCMC algorithm using a range of temperatures. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">start_T</td><td>The start temperature </td></tr>
|
||||
<tr><td class="paramname">end_T</td><td>The end temperature </td></tr>
|
||||
<tr><td class="paramname">point_T</td><td>The amount of point to measure </td></tr>
|
||||
<tr><td class="paramname">monte_carlo</td><td>Which Monte Carlo implementation to use </td></tr>
|
||||
<tr><td class="paramname">outfile</td><td>The file to write the data to </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00156">156</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00053">53</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
var monte__carlo_8cpp =
|
||||
[
|
||||
[ "monte_carlo_parallel", "monte__carlo_8cpp.html#acc34e2049a5030874f6f548f3adab958", null ],
|
||||
[ "monte_carlo_progression", "monte__carlo_8cpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826", null ],
|
||||
[ "monte_carlo_progression", "monte__carlo_8cpp.html#a89ddd777796c65eb2b289af11fc0ce09", null ],
|
||||
[ "monte_carlo_serial", "monte__carlo_8cpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed", null ],
|
||||
[ "pd_estimate", "monte__carlo_8cpp.html#a962f704ab35208bf6541eb3b707a9559", null ],
|
||||
[ "phase_transition", "monte__carlo_8cpp.html#a7df22ace588b4d229d1029ce766d0009", null ]
|
||||
[ "mcmc_parallel", "monte__carlo_8cpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771", null ],
|
||||
[ "mcmc_serial", "monte__carlo_8cpp.html#ae67483ff00d1b0594d543261c8283ffd", null ],
|
||||
[ "pd_estimate", "monte__carlo_8cpp.html#aea2dd1b5fac7c45633bc6f8dc4541226", null ],
|
||||
[ "phase_transition", "monte__carlo_8cpp.html#a34e9c3e24f26760693266b8a7b6b3d21", null ],
|
||||
[ "progression", "monte__carlo_8cpp.html#a781d946de16211ba18ad6671a5b6838d", null ],
|
||||
[ "progression", "monte__carlo_8cpp.html#a1549fc386bd3cdd1cdbe0261b9dd8415", null ]
|
||||
];
|
||||
@@ -101,191 +101,225 @@ $(document).ready(function(){initNavTree('monte__carlo_8cpp_source.html',''); in
|
||||
<div class="headertitle"><div class="title">monte_carlo.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="monte__carlo_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include "<a class="code" href="monte__carlo_8hpp.html">monte_carlo.hpp</a>"</span></div>
|
||||
<a href="monte__carlo_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/** @file monte_carlo.cpp</span></div>
|
||||
<div class="line"><span class="lineno"> 2</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 3</span><span class="comment"> * @author Cory Alexander Balaton (coryab)</span></div>
|
||||
<div class="line"><span class="lineno"> 4</span><span class="comment"> * @author Janita Ovidie Sandtrøen Willumsen (janitaws)</span></div>
|
||||
<div class="line"><span class="lineno"> 5</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 6</span><span class="comment"> * @version 1.0</span></div>
|
||||
<div class="line"><span class="lineno"> 7</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 8</span><span class="comment"> * @brief Implementation of the monte carlo functions</span></div>
|
||||
<div class="line"><span class="lineno"> 9</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 10</span><span class="comment"> * @bug No known bugs</span></div>
|
||||
<div class="line"><span class="lineno"> 11</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="monte__carlo_8hpp.html" title="Functions for Monte Carlo simulations.">"monte_carlo.hpp"</a></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include <cmath></span></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include <cstdint></span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826"> 17</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8cpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a>(<span class="keywordtype">double</span> T, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> cycles,</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="keyword">const</span> std::string filename)</div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span>{</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="comment">// Set some variables</span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data, tmp;</div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="keywordtype">int</span> n_spins = L * L;</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <span class="comment">// File stuff</span></div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> std::string directory = utils::dirname(filename);</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> std::ofstream ofile;</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="comment">// Create random engine using the mersenne twister</span></div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> std::random_device rd;</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> uint32_t rd_sample = rd();</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> std::mt19937 engine(rd_sample);</div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">namespace</span> montecarlo {</div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#a781d946de16211ba18ad6671a5b6838d"> 15</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a781d946de16211ba18ad6671a5b6838d">progression</a>(<span class="keywordtype">double</span> T, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> cycles, <span class="keyword">const</span> std::string filename,</div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keywordtype">int</span> burn_in_time)</div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>{</div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// Set some variables</span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data, tmp;</div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> <span class="keywordtype">int</span> n_spins = L * L;</div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> <span class="comment">// File stuff</span></div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> std::string directory = utils<a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">::</a><a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">dirname</a><a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">(</a>filename<a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">)</a>;</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> std::ofstream ofile;</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="comment">// Create random engine using the mersenne twister</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> std::random_device rd;</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> uint32_t rd_sample = rd();</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> std::mt19937 engine(rd_sample);</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> std::cout << <span class="stringliteral">"Seed: "</span> << rd_sample << std::endl;</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> std::cout << <span class="stringliteral">"Seed: "</span> << rd_sample << std::endl;</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a> ising<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">(</a>L<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">,</a> T<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">)</a>;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a> ising(L, T);</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// Create path and open file</span></div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> utils::mkpath(directory);</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> ofile.open(filename);</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="comment">// Loop through cycles</span></div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 1; i <= cycles; i++) {</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> data += ising.<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>();</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> tmp = data / (i * n_spins);</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> ofile << i << <span class="charliteral">','</span> << tmp.E << <span class="charliteral">','</span> << tmp.E2 << <span class="charliteral">','</span> << tmp.M << <span class="charliteral">','</span></div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> << tmp.M2 << <span class="charliteral">','</span> << tmp.M_abs << <span class="charliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> }</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> ofile.close();</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="comment">// Create path and open file</span></div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> utils<a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">::</a><a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">mkpath</a><a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">(</a>directory<a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">)</a>;</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> ofile.open(filename);</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordflow">for</span> (size_t i = 0; i < burn_in_time; i++) {</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> ising<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">.</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">(</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">)</a>;</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> }</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="comment">// Loop through cycles</span></div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">for</span> (size_t i = 1; i <= cycles; i++) {</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> data <a class="code hl_function" href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb">+=</a> ising<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">.</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">(</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">)</a>;</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> tmp = data / (i * n_spins);</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> ofile << i << <span class="stringliteral">','</span> << tmp<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> << <span class="stringliteral">','</span> << tmp<a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">.</a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> << <span class="stringliteral">','</span> << tmp<a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">.</a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> << <span class="stringliteral">','</span></div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> << tmp<a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">.</a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> << <span class="stringliteral">','</span> << tmp<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">.</a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> << <span class="stringliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> }</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#a89ddd777796c65eb2b289af11fc0ce09"> 51</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8cpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a>(<span class="keywordtype">double</span> T, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> cycles, <span class="keywordtype">int</span> value,</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keyword">const</span> std::string filename)</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span>{</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="comment">// Set some variables</span></div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data, tmp;</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordtype">int</span> n_spins = L * L;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="comment">// File stuff</span></div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> std::string directory = utils::dirname(filename);</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> std::ofstream ofile;</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="comment">// Create random engine using the mersenne twister</span></div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> std::random_device rd;</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> uint32_t rd_sample = rd();</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> std::mt19937 engine(rd());</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> std::cout << <span class="stringliteral">"Seed: "</span> << rd_sample << std::endl;</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> ofile.close();</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span>}</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#a1549fc386bd3cdd1cdbe0261b9dd8415"> 53</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a1549fc386bd3cdd1cdbe0261b9dd8415">progression</a>(<span class="keywordtype">double</span> T, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> cycles, <span class="keywordtype">int</span> value,</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">const</span> std::string filename, <span class="keywordtype">int</span> burn_in_time)</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span>{</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="comment">// Set some variables</span></div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data, tmp;</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordtype">int</span> n_spins = L * L;</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="comment">// File stuff</span></div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> std::string directory = utils<a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">::</a><a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">dirname</a><a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">(</a>filename<a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">)</a>;</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> std::ofstream ofile;</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="comment">// Create random engine using the mersenne twister</span></div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> std::random_device rd;</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> uint32_t rd_sample = rd();</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> std::mt19937 engine(rd());</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a> ising(L, T, value);</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> std::cout << <span class="stringliteral">"Seed: "</span> << rd_sample << std::endl;</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="comment">// Create path and open file</span></div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> utils::mkpath(directory);</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> ofile.open(filename);</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="comment">// Loop through cycles</span></div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 1; i <= cycles; i++) {</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> data += ising.<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>();</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> tmp = data / (i * n_spins);</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> ofile << i << <span class="charliteral">','</span> << tmp.E << <span class="charliteral">','</span> << tmp.E2 << <span class="charliteral">','</span> << tmp.M << <span class="charliteral">','</span></div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> << tmp.M2 << <span class="charliteral">','</span> << tmp.M_abs << <span class="charliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> }</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> ofile.close();</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>}</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559"> 85</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559">pd_estimate</a>(<span class="keywordtype">double</span> T, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> cycles, <span class="keyword">const</span> std::string filename)</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span>{</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="comment">// Set some variables</span></div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data, tmp;</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">int</span> n_spins = L * L;</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a> ising<a class="code hl_function" href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15">(</a>L<a class="code hl_function" href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15">,</a> T<a class="code hl_function" href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15">,</a> value<a class="code hl_function" href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15">)</a>;</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">for</span> (size_t i = 0; i < burn_in_time; i++) {</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> ising<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">.</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">(</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">)</a>;</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> }</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="comment">// Create path and open file</span></div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> utils<a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">::</a><a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">mkpath</a><a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">(</a>directory<a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">)</a>;</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> ofile.open(filename);</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> </div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="comment">// Loop through cycles</span></div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordflow">for</span> (size_t i = 1; i <= cycles; i++) {</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> data <a class="code hl_function" href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb">+=</a> ising<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">.</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">(</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">)</a>;</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> tmp = data / (i * n_spins);</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> ofile << i << <span class="stringliteral">','</span> << tmp<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> << <span class="stringliteral">','</span> << tmp<a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">.</a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> << <span class="stringliteral">','</span> << tmp<a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">.</a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> << <span class="stringliteral">','</span></div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> << tmp<a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">.</a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> << <span class="stringliteral">','</span> << tmp<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">.</a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> << <span class="stringliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> }</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> ofile.close();</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span>}</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="comment">// File stuff</span></div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> std::string directory = utils::dirname(filename);</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> std::ofstream ofile;</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a> ising(L, T);</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> </div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="comment">// Create path and open file</span></div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> utils::mkpath(directory);</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> ofile.open(filename);</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="comment">// Loop through cycles</span></div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 1; i <= cycles; i++) {</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> data = ising.<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>() / n_spins;</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> ofile << data.E << <span class="charliteral">','</span> << data.E2 << <span class="charliteral">','</span> << data.M << <span class="charliteral">','</span> << data.M2</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> << <span class="charliteral">','</span> << data.M_abs << <span class="charliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226"> 91</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">pd_estimate</a>(<span class="keywordtype">double</span> T, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> cycles, <span class="keyword">const</span> std::string filename,</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keywordtype">int</span> burn_in_time)</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span>{</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="comment">// Set some variables</span></div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data, tmp;</div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordtype">int</span> n_spins = L * L;</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="comment">// File stuff</span></div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> std::string directory = utils<a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">::</a><a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">dirname</a><a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">(</a>filename<a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">)</a>;</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> std::ofstream ofile;</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> </div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a> ising<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">(</a>L<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">,</a> T<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">)</a>;</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keywordflow">for</span> (size_t i = 0; i < burn_in_time; i++) {</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> ising<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">.</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">(</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">)</a>;</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> ofile.close();</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span>}</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="comment">// Code for seeing phase transitions.</span></div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed"> 111</a></span><a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="monte__carlo_8cpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed">monte_carlo_serial</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T, <span class="keywordtype">int</span> cycles)</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span>{</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data;</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a> model(L, T);</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < BURN_IN_TIME; i++) {</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> model.<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>();</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> }</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keywordtype">double</span> E, M;</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < (uint)cycles; i++) {</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> data += model.<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>();</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> }</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> </div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordflow">return</span> data;</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span>}</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> </div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958"> 128</a></span><a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="monte__carlo_8cpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T, <span class="keywordtype">int</span> cycles)</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span>{</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data;</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span><span class="preprocessor">#pragma omp parallel</span></div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> {</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="comment">// Each thread creates an instance of IsingModel.</span></div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a> model(L, T);</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="comment">// Create path and open file</span></div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> utils<a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">::</a><a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">mkpath</a><a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">(</a>directory<a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">)</a>;</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> ofile.open(filename);</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> </div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="comment">// Loop through cycles</span></div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordflow">for</span> (size_t i = 1; i <= cycles; i++) {</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> data = ising<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">.</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">(</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">)</a> / n_spins;</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> ofile << data<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> << <span class="stringliteral">','</span> << data<a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">.</a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> << <span class="stringliteral">','</span> << data<a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">.</a><a class="code hl_variable" href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">M</a> << <span class="stringliteral">','</span> << data<a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">.</a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a></div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> << <span class="stringliteral">','</span> << data<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">.</a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> << <span class="stringliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> }</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> ofile.close();</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span>}</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="comment">// Code for seeing phase transitions.</span></div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd"> 122</a></span><a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">mcmc_serial</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T, <span class="keywordtype">int</span> cycles, <span class="keywordtype">int</span> burn_in_time)</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span>{</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data;</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a> model<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">(</a>L<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">,</a> T<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">)</a>;</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="keywordflow">for</span> (size_t i = 0; i < burn_in_time; i++) {</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> model<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">.</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">(</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">)</a>;</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> }</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordtype">double</span> E, M;</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="keywordflow">for</span> (size_t i = 0; i < (uint)cycles; i++) {</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> data <a class="code hl_function" href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb">+=</a> model<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">.</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">(</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">)</a>;</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> }</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> </div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="comment">// Each thread runs the Metropolis algorithm before starting to collect</span></div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> <span class="comment">// samples</span></div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < BURN_IN_TIME; i++) {</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> model.<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>();</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> }</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> </div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="comment">// Now each thread work on one loop together, but using their own</span></div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="comment">// instances of things, but the total of cycles add up.</span></div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="comment">// static ensure that each thread gets the same amount of iterations</span></div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span><span class="preprocessor">#pragma omp for schedule(static) reduction(+ : data)</span></div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < (uint)cycles; i++) {</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> data += model.<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>();</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> }</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> }</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> </div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordtype">double</span> norm = 1. / (double)cycles;</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> </div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> <span class="keywordflow">return</span> data * norm;</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span>}</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> </div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e"> 156</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">phase_transition</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> start, <span class="keywordtype">double</span> end, <span class="keywordtype">int</span> points,</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> std::function<<a class="code hl_class" href="classdata__t.html">data_t</a>(<span class="keywordtype">int</span>, <span class="keywordtype">double</span>, <span class="keywordtype">int</span>)> monte_carlo,</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> std::string outfile)</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span>{</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keywordtype">double</span> dt = (end - start) / (<span class="keywordtype">double</span>)points;</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordtype">int</span> cycles = 10000;</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordtype">int</span> N = L * L;</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> std::ofstream ofile;</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data;</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> </div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> utils::mkpath(utils::dirname(outfile));</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> ofile.open(outfile);</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> </div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordtype">double</span> temp, CV, X, E_var, M_var;</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> </div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> <span class="keyword">using </span>utils::scientific_format;</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < points; i++) {</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> temp = start + dt * i;</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> data = monte_carlo(L, temp, cycles);</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> E_var = (data.E2 - data.E * data.E) / (<span class="keywordtype">double</span>)N;</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> M_var = (data.M2 - data.M_abs * data.M_abs) / (<span class="keywordtype">double</span>)N;</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordtype">double</span> norm = 1. / (<span class="keywordtype">double</span>)cycles;</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> </div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> <span class="keywordflow">return</span> data * norm;</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span>}</div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> </div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771"> 141</a></span><a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">mcmc_parallel</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T, <span class="keywordtype">int</span> cycles, <span class="keywordtype">int</span> burn_in_time)</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span>{</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data;</div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span><span class="preprocessor">#</span><span class="preprocessor">pragma</span> <span class="preprocessor">omp</span> <span class="preprocessor">parallel</span></div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> {</div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="comment">// Each thread creates an instance of IsingModel.</span></div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <a class="code hl_class" href="classIsingModel.html">IsingModel</a> model<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">(</a>L<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">,</a> T<a class="code hl_function" href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">)</a>;</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> </div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> <span class="comment">// Each thread runs the Metropolis algorithm before starting to collect</span></div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="comment">// samples</span></div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> <span class="keywordflow">for</span> (size_t i = 0; i < burn_in_time; i++) {</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> model<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">.</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">(</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">)</a>;</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> }</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> </div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="comment">// Now each thread work on one loop together, but using their own</span></div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="comment">// instances of things, but the total of cycles add up.</span></div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="comment">// static ensure that each thread gets the same amount of iterations</span></div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span><span class="preprocessor">#</span><span class="preprocessor">pragma</span> <span class="preprocessor">omp</span> <span class="preprocessor">for</span> <span class="preprocessor">schedule</span><span class="preprocessor">(</span><span class="preprocessor">static</span><span class="preprocessor">)</span> <span class="preprocessor">reduction</span><span class="preprocessor">(</span><span class="preprocessor">+</span> <span class="preprocessor">:</span> <span class="preprocessor">data</span><span class="preprocessor">)</span></div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordflow">for</span> (size_t i = 0; i < (uint)cycles; i++) {</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> data <a class="code hl_function" href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb">+=</a> model<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">.</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">(</a><a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">)</a>;</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> }</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> }</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> </div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="keywordtype">double</span> norm = 1. / (<span class="keywordtype">double</span>)cycles;</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keywordflow">return</span> data * norm;</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span>}</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> </div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21"> 169</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">phase_transition</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> start, <span class="keywordtype">double</span> end, <span class="keywordtype">int</span> points, <span class="keywordtype">int</span> cycles,</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> std::function<<a class="code hl_class" href="classdata__t.html">data_t</a>(<span class="keywordtype">int</span>, <span class="keywordtype">double</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>)> monte_carlo,</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> std::string outfile, <span class="keywordtype">int</span> burn_in_time)</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span>{</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="keywordtype">double</span> dt = (end - start) / (<span class="keywordtype">double</span>)points;</div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keywordtype">int</span> N = L * L;</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> std::ofstream ofile;</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> </div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data;</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> </div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> ofile << scientific_format(temp) << <span class="charliteral">','</span></div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> << scientific_format(data.E / (<span class="keywordtype">double</span>)N) << <span class="charliteral">','</span></div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> << scientific_format(data.M_abs / N) << <span class="charliteral">','</span></div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> << scientific_format(E_var / (temp * temp)) << <span class="charliteral">','</span></div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> << scientific_format(M_var / temp) << <span class="charliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> }</div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> ofile.close();</div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span>}</div>
|
||||
<div class="ttc" id="aclassIsingModel_html"><div class="ttname"><a href="classIsingModel.html">IsingModel</a></div><div class="ttdoc">The Ising model in 2 dimensions.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00037">IsingModel.hpp:37</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a56559d68dc9aaff1976d84b157f43488"><div class="ttname"><a href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">IsingModel::Metropolis</a></div><div class="ttdeci">data_t Metropolis()</div><div class="ttdoc">The Metropolis algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00096">IsingModel.cpp:96</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00018">data_type.hpp:18</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8cpp_html_a8f8d4c5e032ed8565a3ac518b32c6aed"><div class="ttname"><a href="monte__carlo_8cpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed">monte_carlo_serial</a></div><div class="ttdeci">data_t monte_carlo_serial(int L, double T, int cycles)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00111">monte_carlo.cpp:111</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8cpp_html_ac97d0de27f2f0d50fc6ecf3a79f32826"><div class="ttname"><a href="monte__carlo_8cpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a></div><div class="ttdeci">void monte_carlo_progression(double T, int L, int cycles, const std::string filename)</div><div class="ttdoc">Write the expected values for each Monte Carlo cycles to file.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00017">monte_carlo.cpp:17</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8cpp_html_acc34e2049a5030874f6f548f3adab958"><div class="ttname"><a href="monte__carlo_8cpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a></div><div class="ttdeci">data_t monte_carlo_parallel(int L, double T, int cycles)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00128">monte_carlo.cpp:128</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html"><div class="ttname"><a href="monte__carlo_8hpp.html">monte_carlo.hpp</a></div><div class="ttdoc">Functions for monte carlo simulations.</div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a2dfe843fbb80e10a763f3260131a148e"><div class="ttname"><a href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">phase_transition</a></div><div class="ttdeci">void phase_transition(int L, double start_T, double end_T, int points_T, std::function< data_t(int, double, int)> monte_carlo, std::string outfile)</div><div class="ttdoc">Perform the MCMC algorithm using a range of temperatures.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00156">monte_carlo.cpp:156</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a962f704ab35208bf6541eb3b707a9559"><div class="ttname"><a href="monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559">pd_estimate</a></div><div class="ttdeci">void pd_estimate(double T, int L, int cycles, const std::string filename)</div><div class="ttdoc">Estimate the probability distribution for the energy.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00085">monte_carlo.cpp:85</a></div></div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> utils<a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">::</a><a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">mkpath</a><a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">(</a>utils<a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">::</a><a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">dirname</a><a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">(</a>outfile<a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">)</a><a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">)</a>;</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> ofile.open(outfile);</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> </div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> <span class="keywordtype">double</span> temp, CV, X, E_var, M_var;</div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> </div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span> <span class="keyword">using</span> utils::scientific_format;</div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> <span class="keywordflow">for</span> (size_t i = 0; i < points; i++) {</div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> temp = start + dt * i;</div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> data = monte_carlo(L, temp, cycles, burn_in_time);</div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> E_var = (data<a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">.</a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> - data<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> * data<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a>) / (<span class="keywordtype">double</span>)N;</div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> M_var = (data<a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">.</a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> - data<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">.</a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> * data<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">.</a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a>) / (<span class="keywordtype">double</span>)N;</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> </div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> ofile << <a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">scientific_format</a><a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">(</a>temp<a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">)</a> << <span class="stringliteral">','</span></div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> << <a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">scientific_format</a><a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">(</a>data<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> / (<span class="keywordtype">double</span>)N<a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">)</a> << <span class="stringliteral">','</span></div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> << <a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">scientific_format</a><a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">(</a>data<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">.</a><a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> / N<a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">)</a> << <span class="stringliteral">','</span></div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> << <a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">scientific_format</a><a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">(</a>E_var / (temp * temp)<a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">)</a> << <span class="stringliteral">','</span></div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> << <a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">scientific_format</a><a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">(</a>M_var / temp<a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">)</a> << <span class="stringliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> }</div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> ofile.close();</div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span>}</div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span>} <span class="comment">// namespace montecarlo</span></div>
|
||||
<div class="ttc" id="aclassIsingModel_html"><div class="ttname"><a href="classIsingModel.html">IsingModel</a></div><div class="ttdoc">The Ising model in 2 dimensions.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8hpp_source.html#l00036">IsingModel.hpp:36</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a46c9446e94854452f715d307c77c1c15"><div class="ttname"><a href="classIsingModel.html#a46c9446e94854452f715d307c77c1c15">IsingModel::IsingModel</a></div><div class="ttdeci">IsingModel(int L, double T, int val)</div><div class="ttdoc">Constructor for the Ising model.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00031">IsingModel.cpp:31</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a4a39ee7fbfbbf566f75bc28900ca9ea5"><div class="ttname"><a href="classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5">IsingModel::IsingModel</a></div><div class="ttdeci">IsingModel(int L, double T)</div><div class="ttdoc">Constructor for the Ising model.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00019">IsingModel.cpp:19</a></div></div>
|
||||
<div class="ttc" id="aclassIsingModel_html_a56559d68dc9aaff1976d84b157f43488"><div class="ttname"><a href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">IsingModel::Metropolis</a></div><div class="ttdeci">data_t Metropolis()</div><div class="ttdoc">The Metropolis algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="IsingModel_8cpp_source.html#l00110">IsingModel.cpp:110</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdoc">Type to use with the IsingModel class and montecarlo module.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00019">data_type.hpp:19</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a586475e0f71322dffda2e75f228ab24b"><div class="ttname"><a href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">data_t::M_abs</a></div><div class="ttdeci">double M_abs</div><div class="ttdoc">Absolute Magnetization.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00025">data_type.hpp:25</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a6c1a196d96e177b11ca98c61fae35a2e"><div class="ttname"><a href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">data_t::E</a></div><div class="ttdeci">double E</div><div class="ttdoc">Energy.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00021">data_type.hpp:21</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a6cb96b4ff750ab29041038ca53f307cb"><div class="ttname"><a href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb">data_t::operator+=</a></div><div class="ttdeci">data_t & operator+=(const data_t &b)</div><div class="ttdoc">Overload of the addition equals operator.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00150">data_type.hpp:150</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_a71ae3cd4460f2c66239500c11804e70b"><div class="ttname"><a href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">data_t::M2</a></div><div class="ttdeci">double M2</div><div class="ttdoc">Magnetization squared.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00024">data_type.hpp:24</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_abb622f9c6cc5ffb9dddb151d2e202f72"><div class="ttname"><a href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">data_t::E2</a></div><div class="ttdeci">double E2</div><div class="ttdoc">Energy squared.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00023">data_type.hpp:23</a></div></div>
|
||||
<div class="ttc" id="aclassdata__t_html_ad08d2488bf913c626157471cf6e8a46a"><div class="ttname"><a href="classdata__t.html#ad08d2488bf913c626157471cf6e8a46a">data_t::M</a></div><div class="ttdeci">double M</div><div class="ttdoc">Magnetization.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00022">data_type.hpp:22</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a1549fc386bd3cdd1cdbe0261b9dd8415"><div class="ttname"><a href="monte__carlo_8hpp.html#a1549fc386bd3cdd1cdbe0261b9dd8415">montecarlo::progression</a></div><div class="ttdeci">void progression(double T, int L, int cycles, int value, const std::string filename, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Write the expected values for each Monte Carlo cycles to file.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00053">monte_carlo.cpp:53</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a34e9c3e24f26760693266b8a7b6b3d21"><div class="ttname"><a href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">montecarlo::phase_transition</a></div><div class="ttdeci">void phase_transition(int L, double start_T, double end_T, int points_T, int cycles, std::function< data_t(int, double, int, int)> monte_carlo, std::string outfile, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Perform the MCMC algorithm using a range of temperatures.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00169">monte_carlo.cpp:169</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a781d946de16211ba18ad6671a5b6838d"><div class="ttname"><a href="monte__carlo_8hpp.html#a781d946de16211ba18ad6671a5b6838d">montecarlo::progression</a></div><div class="ttdeci">void progression(double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Write the expected values for each Monte Carlo cycles to file.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00015">monte_carlo.cpp:15</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_ae1e7f904ecfc3d8f3c4dd1ef155dd771"><div class="ttname"><a href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">montecarlo::mcmc_parallel</a></div><div class="ttdeci">data_t mcmc_parallel(int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00141">monte_carlo.cpp:141</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_ae67483ff00d1b0594d543261c8283ffd"><div class="ttname"><a href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">montecarlo::mcmc_serial</a></div><div class="ttdeci">data_t mcmc_serial(int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00122">monte_carlo.cpp:122</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_aea2dd1b5fac7c45633bc6f8dc4541226"><div class="ttname"><a href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">montecarlo::pd_estimate</a></div><div class="ttdeci">void pd_estimate(double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Estimate the probability distribution for the energy.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00091">monte_carlo.cpp:91</a></div></div>
|
||||
<div class="ttc" id="autils_8hpp_html_a2b45adc86b70f42021582994e83fa00d"><div class="ttname"><a href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">utils::mkpath</a></div><div class="ttdeci">bool mkpath(std::string path, int mode=0777)</div><div class="ttdoc">Make path given.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00032">utils.cpp:32</a></div></div>
|
||||
<div class="ttc" id="autils_8hpp_html_a3529a74fd2a25d24de73d9d4e1c90835"><div class="ttname"><a href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">utils::scientific_format</a></div><div class="ttdeci">std::string scientific_format(double d, int width=20, int prec=10)</div><div class="ttdoc">Turns a double into a string written in scientific format.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00016">utils.cpp:16</a></div></div>
|
||||
<div class="ttc" id="autils_8hpp_html_aed026119193a9bbe076671809ff0f430"><div class="ttname"><a href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">utils::dirname</a></div><div class="ttdeci">std::string dirname(const std::string &path)</div><div class="ttdoc">Get the directory name of the path.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00058">utils.cpp:58</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
@@ -105,14 +105,14 @@ $(document).ready(function(){initNavTree('monte__carlo_8hpp.html',''); initResiz
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Functions for monte carlo simulations.
|
||||
<p>Functions for Monte Carlo simulations.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include "<a class="el" href="IsingModel_8hpp_source.html">IsingModel.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||
<code>#include <functional></code><br />
|
||||
<code>#include <string></code><br />
|
||||
<code>#include <omp.h></code><br />
|
||||
<code>#include <string></code><br />
|
||||
</div>
|
||||
<p><a href="monte__carlo_8hpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
@@ -123,35 +123,32 @@ Macros</h2></td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:aa8b4fc86b26f0e3e253ba5556d2d14dc"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#aa8b4fc86b26f0e3e253ba5556d2d14dc">test_2x2_lattice</a> (double tol, int max_cycles)</td></tr>
|
||||
<tr class="memdesc:aa8b4fc86b26f0e3e253ba5556d2d14dc"><td class="mdescLeft"> </td><td class="mdescRight">Test numerical data with analytical data. <br /></td></tr>
|
||||
<tr class="separator:aa8b4fc86b26f0e3e253ba5556d2d14dc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ac97d0de27f2f0d50fc6ecf3a79f32826"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a> (double T, int L, int cycles, const std::string filename)</td></tr>
|
||||
<tr class="memdesc:ac97d0de27f2f0d50fc6ecf3a79f32826"><td class="mdescLeft"> </td><td class="mdescRight">Write the expected values for each Monte Carlo cycles to file. <br /></td></tr>
|
||||
<tr class="separator:ac97d0de27f2f0d50fc6ecf3a79f32826"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a89ddd777796c65eb2b289af11fc0ce09"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#a89ddd777796c65eb2b289af11fc0ce09">monte_carlo_progression</a> (double T, int L, int cycles, int value, const std::string filename)</td></tr>
|
||||
<tr class="memdesc:a89ddd777796c65eb2b289af11fc0ce09"><td class="mdescLeft"> </td><td class="mdescRight">Write the expected values for each Monte Carlo cycles to file. <br /></td></tr>
|
||||
<tr class="separator:a89ddd777796c65eb2b289af11fc0ce09"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a962f704ab35208bf6541eb3b707a9559"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559">pd_estimate</a> (double T, int L, int cycles, const std::string filename)</td></tr>
|
||||
<tr class="memdesc:a962f704ab35208bf6541eb3b707a9559"><td class="mdescLeft"> </td><td class="mdescRight">Estimate the probability distribution for the energy. <br /></td></tr>
|
||||
<tr class="separator:a962f704ab35208bf6541eb3b707a9559"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8f8d4c5e032ed8565a3ac518b32c6aed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed">monte_carlo_serial</a> (int L, double T, int cycles)</td></tr>
|
||||
<tr class="memdesc:a8f8d4c5e032ed8565a3ac518b32c6aed"><td class="mdescLeft"> </td><td class="mdescRight">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles. <br /></td></tr>
|
||||
<tr class="separator:a8f8d4c5e032ed8565a3ac518b32c6aed"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:acc34e2049a5030874f6f548f3adab958"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a> (int L, double T, int cycles)</td></tr>
|
||||
<tr class="memdesc:acc34e2049a5030874f6f548f3adab958"><td class="mdescLeft"> </td><td class="mdescRight">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel. <br /></td></tr>
|
||||
<tr class="separator:acc34e2049a5030874f6f548f3adab958"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a2dfe843fbb80e10a763f3260131a148e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">phase_transition</a> (int L, double start_T, double end_T, int points_T, std::function< <a class="el" href="classdata__t.html">data_t</a>(int, double, int)> monte_carlo, std::string outfile)</td></tr>
|
||||
<tr class="memdesc:a2dfe843fbb80e10a763f3260131a148e"><td class="mdescLeft"> </td><td class="mdescRight">Perform the MCMC algorithm using a range of temperatures. <br /></td></tr>
|
||||
<tr class="separator:a2dfe843fbb80e10a763f3260131a148e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a781d946de16211ba18ad6671a5b6838d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#a781d946de16211ba18ad6671a5b6838d">montecarlo::progression</a> (double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)</td></tr>
|
||||
<tr class="memdesc:a781d946de16211ba18ad6671a5b6838d"><td class="mdescLeft"> </td><td class="mdescRight">Write the expected values for each Monte Carlo cycles to file. <br /></td></tr>
|
||||
<tr class="separator:a781d946de16211ba18ad6671a5b6838d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1549fc386bd3cdd1cdbe0261b9dd8415"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#a1549fc386bd3cdd1cdbe0261b9dd8415">montecarlo::progression</a> (double T, int L, int cycles, int value, const std::string filename, int burn_in_time=BURN_IN_TIME)</td></tr>
|
||||
<tr class="memdesc:a1549fc386bd3cdd1cdbe0261b9dd8415"><td class="mdescLeft"> </td><td class="mdescRight">Write the expected values for each Monte Carlo cycles to file. <br /></td></tr>
|
||||
<tr class="separator:a1549fc386bd3cdd1cdbe0261b9dd8415"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aea2dd1b5fac7c45633bc6f8dc4541226"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">montecarlo::pd_estimate</a> (double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)</td></tr>
|
||||
<tr class="memdesc:aea2dd1b5fac7c45633bc6f8dc4541226"><td class="mdescLeft"> </td><td class="mdescRight">Estimate the probability distribution for the energy. <br /></td></tr>
|
||||
<tr class="separator:aea2dd1b5fac7c45633bc6f8dc4541226"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae67483ff00d1b0594d543261c8283ffd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">montecarlo::mcmc_serial</a> (int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)</td></tr>
|
||||
<tr class="memdesc:ae67483ff00d1b0594d543261c8283ffd"><td class="mdescLeft"> </td><td class="mdescRight">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles. <br /></td></tr>
|
||||
<tr class="separator:ae67483ff00d1b0594d543261c8283ffd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae1e7f904ecfc3d8f3c4dd1ef155dd771"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">montecarlo::mcmc_parallel</a> (int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)</td></tr>
|
||||
<tr class="memdesc:ae1e7f904ecfc3d8f3c4dd1ef155dd771"><td class="mdescLeft"> </td><td class="mdescRight">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel. <br /></td></tr>
|
||||
<tr class="separator:ae1e7f904ecfc3d8f3c4dd1ef155dd771"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a34e9c3e24f26760693266b8a7b6b3d21"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">montecarlo::phase_transition</a> (int L, double start_T, double end_T, int points_T, int cycles, std::function< <a class="el" href="classdata__t.html">data_t</a>(int, double, int, int)> monte_carlo, std::string outfile, int burn_in_time=BURN_IN_TIME)</td></tr>
|
||||
<tr class="memdesc:a34e9c3e24f26760693266b8a7b6b3d21"><td class="mdescLeft"> </td><td class="mdescRight">Perform the MCMC algorithm using a range of temperatures. <br /></td></tr>
|
||||
<tr class="separator:a34e9c3e24f26760693266b8a7b6b3d21"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Functions for monte carlo simulations. </p>
|
||||
<div class="textblock"><p>Functions for Monte Carlo simulations. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000004">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000006">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="monte__carlo_8hpp_source.html">monte_carlo.hpp</a>.</p>
|
||||
</div><h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
@@ -172,14 +169,14 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="acc34e2049a5030874f6f548f3adab958" name="acc34e2049a5030874f6f548f3adab958"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#acc34e2049a5030874f6f548f3adab958">◆ </a></span>monte_carlo_parallel()</h2>
|
||||
<a id="ae1e7f904ecfc3d8f3c4dd1ef155dd771" name="ae1e7f904ecfc3d8f3c4dd1ef155dd771"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae1e7f904ecfc3d8f3c4dd1ef155dd771">◆ </a></span>mcmc_parallel()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="classdata__t.html">data_t</a> monte_carlo_parallel </td>
|
||||
<td class="memname"><a class="el" href="classdata__t.html">data_t</a> montecarlo::mcmc_parallel </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
@@ -194,7 +191,13 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em> </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code>BURN_IN_TIME</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
@@ -210,23 +213,78 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">T</td><td>The Temperature for the Ising model </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html">data_t</a> </dd></dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00128">128</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00141">141</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac97d0de27f2f0d50fc6ecf3a79f32826" name="ac97d0de27f2f0d50fc6ecf3a79f32826"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac97d0de27f2f0d50fc6ecf3a79f32826">◆ </a></span>monte_carlo_progression() <span class="overload">[1/2]</span></h2>
|
||||
<a id="ae67483ff00d1b0594d543261c8283ffd" name="ae67483ff00d1b0594d543261c8283ffd"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae67483ff00d1b0594d543261c8283ffd">◆ </a></span>mcmc_serial()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void monte_carlo_progression </td>
|
||||
<td class="memname"><a class="el" href="classdata__t.html">data_t</a> montecarlo::mcmc_serial </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code>BURN_IN_TIME</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">T</td><td>The Temperature for the Ising model </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00122">122</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aea2dd1b5fac7c45633bc6f8dc4541226" name="aea2dd1b5fac7c45633bc6f8dc4541226"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aea2dd1b5fac7c45633bc6f8dc4541226">◆ </a></span>pd_estimate()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void montecarlo::pd_estimate </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
@@ -247,7 +305,153 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string </td>
|
||||
<td class="paramname"><em>filename</em> </td>
|
||||
<td class="paramname"><em>filename</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code>BURN_IN_TIME</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Estimate the probability distribution for the energy. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">T</td><td>The temperature of the Ising model </td></tr>
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">filename</td><td>The file to write to </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00091">91</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a34e9c3e24f26760693266b8a7b6b3d21" name="a34e9c3e24f26760693266b8a7b6b3d21"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a34e9c3e24f26760693266b8a7b6b3d21">◆ </a></span>phase_transition()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void montecarlo::phase_transition </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>start_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>end_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>points_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::function< <a class="el" href="classdata__t.html">data_t</a>(int, double, int, int)> </td>
|
||||
<td class="paramname"><em>monte_carlo</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>outfile</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code>BURN_IN_TIME</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Perform the MCMC algorithm using a range of temperatures. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">start_T</td><td>The start temperature </td></tr>
|
||||
<tr><td class="paramname">end_T</td><td>The end temperature </td></tr>
|
||||
<tr><td class="paramname">point_T</td><td>The amount of point to measure </td></tr>
|
||||
<tr><td class="paramname">monte_carlo</td><td>Which Monte Carlo implementation to use </td></tr>
|
||||
<tr><td class="paramname">outfile</td><td>The file to write the data to </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00169">169</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a781d946de16211ba18ad6671a5b6838d" name="a781d946de16211ba18ad6671a5b6838d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a781d946de16211ba18ad6671a5b6838d">◆ </a></span>progression() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void montecarlo::progression </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string </td>
|
||||
<td class="paramname"><em>filename</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code>BURN_IN_TIME</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
@@ -264,22 +468,23 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">filename</td><td>The file to write to </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00017">17</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00015">15</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a89ddd777796c65eb2b289af11fc0ce09" name="a89ddd777796c65eb2b289af11fc0ce09"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a89ddd777796c65eb2b289af11fc0ce09">◆ </a></span>monte_carlo_progression() <span class="overload">[2/2]</span></h2>
|
||||
<a id="a1549fc386bd3cdd1cdbe0261b9dd8415" name="a1549fc386bd3cdd1cdbe0261b9dd8415"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1549fc386bd3cdd1cdbe0261b9dd8415">◆ </a></span>progression() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void monte_carlo_progression </td>
|
||||
<td class="memname">void montecarlo::progression </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
@@ -306,7 +511,13 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string </td>
|
||||
<td class="paramname"><em>filename</em> </td>
|
||||
<td class="paramname"><em>filename</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code>BURN_IN_TIME</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
@@ -324,216 +535,12 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">value</td><td>The value to set the elements in the lattice </td></tr>
|
||||
<tr><td class="paramname">filename</td><td>The file to write to </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00051">51</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a8f8d4c5e032ed8565a3ac518b32c6aed" name="a8f8d4c5e032ed8565a3ac518b32c6aed"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a8f8d4c5e032ed8565a3ac518b32c6aed">◆ </a></span>monte_carlo_serial()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="classdata__t.html">data_t</a> monte_carlo_serial </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">T</td><td>The Temperature for the Ising model </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00111">111</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a962f704ab35208bf6541eb3b707a9559" name="a962f704ab35208bf6541eb3b707a9559"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a962f704ab35208bf6541eb3b707a9559">◆ </a></span>pd_estimate()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void pd_estimate </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string </td>
|
||||
<td class="paramname"><em>filename</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Estimate the probability distribution for the energy. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">T</td><td>The temperature of the Ising model </td></tr>
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">filename</td><td>The file to write to </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00085">85</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a2dfe843fbb80e10a763f3260131a148e" name="a2dfe843fbb80e10a763f3260131a148e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a2dfe843fbb80e10a763f3260131a148e">◆ </a></span>phase_transition()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void phase_transition </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>start_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>end_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>points_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::function< <a class="el" href="classdata__t.html">data_t</a>(int, double, int)> </td>
|
||||
<td class="paramname"><em>monte_carlo</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>outfile</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Perform the MCMC algorithm using a range of temperatures. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">start_T</td><td>The start temperature </td></tr>
|
||||
<tr><td class="paramname">end_T</td><td>The end temperature </td></tr>
|
||||
<tr><td class="paramname">point_T</td><td>The amount of point to measure </td></tr>
|
||||
<tr><td class="paramname">monte_carlo</td><td>Which Monte Carlo implementation to use </td></tr>
|
||||
<tr><td class="paramname">outfile</td><td>The file to write the data to </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00156">156</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa8b4fc86b26f0e3e253ba5556d2d14dc" name="aa8b4fc86b26f0e3e253ba5556d2d14dc"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa8b4fc86b26f0e3e253ba5556d2d14dc">◆ </a></span>test_2x2_lattice()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int test_2x2_lattice </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>tol</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>max_cycles</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Test numerical data with analytical data. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">tol</td><td>The tolerance between the analytical and numerical solution. </td></tr>
|
||||
<tr><td class="paramname">max_cycles</td><td>The max number of Monte Carlo cycles.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>return int </p>
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00053">53</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
var monte__carlo_8hpp =
|
||||
[
|
||||
[ "monte_carlo_parallel", "monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958", null ],
|
||||
[ "monte_carlo_progression", "monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826", null ],
|
||||
[ "monte_carlo_progression", "monte__carlo_8hpp.html#a89ddd777796c65eb2b289af11fc0ce09", null ],
|
||||
[ "monte_carlo_serial", "monte__carlo_8hpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed", null ],
|
||||
[ "pd_estimate", "monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559", null ],
|
||||
[ "phase_transition", "monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e", null ],
|
||||
[ "test_2x2_lattice", "monte__carlo_8hpp.html#aa8b4fc86b26f0e3e253ba5556d2d14dc", null ]
|
||||
[ "mcmc_parallel", "monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771", null ],
|
||||
[ "mcmc_serial", "monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd", null ],
|
||||
[ "pd_estimate", "monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226", null ],
|
||||
[ "phase_transition", "monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21", null ],
|
||||
[ "progression", "monte__carlo_8hpp.html#a781d946de16211ba18ad6671a5b6838d", null ],
|
||||
[ "progression", "monte__carlo_8hpp.html#a1549fc386bd3cdd1cdbe0261b9dd8415", null ]
|
||||
];
|
||||
@@ -101,53 +101,124 @@ $(document).ready(function(){initNavTree('monte__carlo_8hpp_source.html',''); in
|
||||
<div class="headertitle"><div class="title">monte_carlo.hpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="monte__carlo_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#ifndef __MONTE_CARLO__</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#define __MONTE_CARLO__</span></div>
|
||||
<a href="monte__carlo_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/** @file monte_carlo.hpp</span></div>
|
||||
<div class="line"><span class="lineno"> 2</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 3</span><span class="comment"> * @author Cory Alexander Balaton (coryab)</span></div>
|
||||
<div class="line"><span class="lineno"> 4</span><span class="comment"> * @author Janita Ovidie Sandtrøen Willumsen (janitaws)</span></div>
|
||||
<div class="line"><span class="lineno"> 5</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 6</span><span class="comment"> * @version 1.0</span></div>
|
||||
<div class="line"><span class="lineno"> 7</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 8</span><span class="comment"> * @brief Functions for Monte Carlo simulations.</span></div>
|
||||
<div class="line"><span class="lineno"> 9</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 10</span><span class="comment"> * @bug No known bugs</span></div>
|
||||
<div class="line"><span class="lineno"> 11</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#</span><span class="preprocessor">ifndef</span> <span class="preprocessor">__MONTE_CARLO__</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">__MONTE_CARLO__</span></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include "<a class="code" href="IsingModel_8hpp.html">IsingModel.hpp</a>"</span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include "<a class="code" href="data__type_8hpp.html">data_type.hpp</a>"</span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include "<a class="code" href="utils_8hpp.html">utils.hpp</a>"</span></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="IsingModel_8hpp.html" title="The definition of the Ising model.">"IsingModel.hpp"</a></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="data__type_8hpp.html" title="Header for the data_t type.">"data_type.hpp"</a></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="utils_8hpp.html" title="Function prototypes and macros that are useful.">"utils.hpp"</a></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include <functional></span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include <string></span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include <omp.h></span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">functional</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">omp</span><span class="preprocessor">.</span><span class="preprocessor">h</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">string</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// #define BURN_IN_TIME 12500</span></div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#define BURN_IN_TIME 5000</span></div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">BURN_IN_TIME</span> 5000</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="preprocessor">#pragma omp declare reduction(+: data_t: omp_out += omp_in)</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> </div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="monte__carlo_8hpp.html#aa8b4fc86b26f0e3e253ba5556d2d14dc"> 35</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="monte__carlo_8hpp.html#aa8b4fc86b26f0e3e253ba5556d2d14dc">test_2x2_lattice</a>(<span class="keywordtype">double</span> tol, <span class="keywordtype">int</span> max_cycles);</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a>(<span class="keywordtype">double</span> T, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> cycles,</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">const</span> std::string filename);</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a>(<span class="keywordtype">double</span> T, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> cycles, <span class="keywordtype">int</span> value,</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">const</span> std::string filename);</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> </div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559">pd_estimate</a>(<span class="keywordtype">double</span> T, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> cycles, <span class="keyword">const</span> std::string filename);</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="monte__carlo_8hpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed">monte_carlo_serial</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T, <span class="keywordtype">int</span> cycles);</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T, <span class="keywordtype">int</span> cycles);</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> </div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">phase_transition</a>(</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordtype">int</span> L, <span class="keywordtype">double</span> start_T, <span class="keywordtype">double</span> end_T, <span class="keywordtype">int</span> points_T,</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> std::function<<a class="code hl_class" href="classdata__t.html">data_t</a>(<span class="keywordtype">int</span>, <span class="keywordtype">double</span>, <span class="keywordtype">int</span>)> monte_carlo,</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> std::string outfile);</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="keyword">namespace</span> montecarlo {</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">/** @brief Write the expected values for each Monte Carlo cycles to file.</span></div>
|
||||
<div class="line"><span class="lineno"> 28</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 29</span><span class="comment"> * @param T Temperature</span></div>
|
||||
<div class="line"><span class="lineno"> 30</span><span class="comment"> * @param L The size of the lattice</span></div>
|
||||
<div class="line"><span class="lineno"> 31</span><span class="comment"> * @param cycles The amount of Monte Carlo cycles to do</span></div>
|
||||
<div class="line"><span class="lineno"> 32</span><span class="comment"> * @param filename The file to write to</span></div>
|
||||
<div class="line"><span class="lineno"> 33</span><span class="comment"> * @param burn_in_time The burn-in time to use</span></div>
|
||||
<div class="line"><span class="lineno"> 34</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a781d946de16211ba18ad6671a5b6838d">progression</a>(<span class="keywordtype">double</span> T, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> cycles, <span class="keyword">const</span> std::string filename,</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordtype">int</span> burn_in_time = <a class="code hl_define" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a>);</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="comment">/** @brief Write the expected values for each Monte Carlo cycles to file.</span></div>
|
||||
<div class="line"><span class="lineno"> 39</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 40</span><span class="comment"> * @param T Temperature</span></div>
|
||||
<div class="line"><span class="lineno"> 41</span><span class="comment"> * @param L The size of the lattice</span></div>
|
||||
<div class="line"><span class="lineno"> 42</span><span class="comment"> * @param cycles The amount of Monte Carlo cycles to do</span></div>
|
||||
<div class="line"><span class="lineno"> 43</span><span class="comment"> * @param value The value to set the elements in the lattice</span></div>
|
||||
<div class="line"><span class="lineno"> 44</span><span class="comment"> * @param filename The file to write to</span></div>
|
||||
<div class="line"><span class="lineno"> 45</span><span class="comment"> * @param burn_in_time The burn-in time to use</span></div>
|
||||
<div class="line"><span class="lineno"> 46</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a1549fc386bd3cdd1cdbe0261b9dd8415">progression</a>(<span class="keywordtype">double</span> T, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> cycles, <span class="keywordtype">int</span> value,</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keyword">const</span> std::string filename, <span class="keywordtype">int</span> burn_in_time = <a class="code hl_define" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a>);</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="comment">/** @brief Estimate the probability distribution for the energy.</span></div>
|
||||
<div class="line"><span class="lineno"> 51</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 52</span><span class="comment"> * @param T The temperature of the Ising model</span></div>
|
||||
<div class="line"><span class="lineno"> 53</span><span class="comment"> * @param L The size of the lattice</span></div>
|
||||
<div class="line"><span class="lineno"> 54</span><span class="comment"> * @param cycles The amount of Monte Carlo cycles to do</span></div>
|
||||
<div class="line"><span class="lineno"> 55</span><span class="comment"> * @param filename The file to write to</span></div>
|
||||
<div class="line"><span class="lineno"> 56</span><span class="comment"> * @param burn_in_time The burn-in time to use</span></div>
|
||||
<div class="line"><span class="lineno"> 57</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">pd_estimate</a>(<span class="keywordtype">double</span> T, <span class="keywordtype">int</span> L, <span class="keywordtype">int</span> cycles, <span class="keyword">const</span> std::string filename,</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordtype">int</span> burn_in_time = <a class="code hl_define" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a>);</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="comment">/** @brief Execute the Metropolis algorithm for a certain amount of Monte</span></div>
|
||||
<div class="line"><span class="lineno"> 62</span><span class="comment"> * Carlo cycles.</span></div>
|
||||
<div class="line"><span class="lineno"> 63</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 64</span><span class="comment"> * @param L The size of the lattice</span></div>
|
||||
<div class="line"><span class="lineno"> 65</span><span class="comment"> * @param T The Temperature for the Ising model</span></div>
|
||||
<div class="line"><span class="lineno"> 66</span><span class="comment"> * @param cycles The amount of Monte Carlo cycles to do</span></div>
|
||||
<div class="line"><span class="lineno"> 67</span><span class="comment"> * @param burn_in_time The burn-in time to use</span></div>
|
||||
<div class="line"><span class="lineno"> 68</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 69</span><span class="comment"> * @return data_t</span></div>
|
||||
<div class="line"><span class="lineno"> 70</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">mcmc_serial</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T, <span class="keywordtype">int</span> cycles,</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">int</span> burn_in_time = <a class="code hl_define" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a>);</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment">/** @brief Execute the Metropolis algorithm for a certain amount of Monte</span></div>
|
||||
<div class="line"><span class="lineno"> 75</span><span class="comment"> * Carlo cycles in parallel.</span></div>
|
||||
<div class="line"><span class="lineno"> 76</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 77</span><span class="comment"> * @param L The size of the lattice</span></div>
|
||||
<div class="line"><span class="lineno"> 78</span><span class="comment"> * @param T The Temperature for the Ising model</span></div>
|
||||
<div class="line"><span class="lineno"> 79</span><span class="comment"> * @param cycles The amount of Monte Carlo cycles to do</span></div>
|
||||
<div class="line"><span class="lineno"> 80</span><span class="comment"> * @param burn_in_time The burn-in time to use</span></div>
|
||||
<div class="line"><span class="lineno"> 81</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 82</span><span class="comment"> * @return data_t</span></div>
|
||||
<div class="line"><span class="lineno"> 83</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><a class="code hl_class" href="classdata__t.html">data_t</a> <a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">mcmc_parallel</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> T, <span class="keywordtype">int</span> cycles,</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordtype">int</span> burn_in_time = <a class="code hl_define" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a>);</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="comment">/** @brief Perform the MCMC algorithm using a range of temperatures.</span></div>
|
||||
<div class="line"><span class="lineno"> 88</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 89</span><span class="comment"> * @param L The size of the lattice</span></div>
|
||||
<div class="line"><span class="lineno"> 90</span><span class="comment"> * @param start_T The start temperature</span></div>
|
||||
<div class="line"><span class="lineno"> 91</span><span class="comment"> * @param end_T The end temperature</span></div>
|
||||
<div class="line"><span class="lineno"> 92</span><span class="comment"> * @param point_T The amount of point to measure</span></div>
|
||||
<div class="line"><span class="lineno"> 93</span><span class="comment"> * @param monte_carlo Which Monte Carlo implementation to use</span></div>
|
||||
<div class="line"><span class="lineno"> 94</span><span class="comment"> * @param outfile The file to write the data to</span></div>
|
||||
<div class="line"><span class="lineno"> 95</span><span class="comment"> * @param burn_in_time The burn-in time to use</span></div>
|
||||
<div class="line"><span class="lineno"> 96</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><span class="keywordtype">void</span> <a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">phase_transition</a>(<span class="keywordtype">int</span> L, <span class="keywordtype">double</span> start_T, <span class="keywordtype">double</span> end_T, <span class="keywordtype">int</span> points_T,</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordtype">int</span> cycles,</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> std::function<<a class="code hl_class" href="classdata__t.html">data_t</a>(<span class="keywordtype">int</span>, <span class="keywordtype">double</span>, <span class="keywordtype">int</span>, <span class="keywordtype">int</span>)> monte_carlo,</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> std::string outfile, <span class="keywordtype">int</span> burn_in_time = <a class="code hl_define" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a>);</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span>}; <span class="comment">// namespace montecarlo</span></div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> </div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="ttc" id="aIsingModel_8hpp_html"><div class="ttname"><a href="IsingModel_8hpp.html">IsingModel.hpp</a></div><div class="ttdoc">The definition of the Ising model.</div></div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00018">data_type.hpp:18</a></div></div>
|
||||
<div class="ttc" id="adata__type_8hpp_html"><div class="ttname"><a href="data__type_8hpp.html">data_type.hpp</a></div><div class="ttdoc">Header for the data_t type.</div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a2dfe843fbb80e10a763f3260131a148e"><div class="ttname"><a href="monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e">phase_transition</a></div><div class="ttdeci">void phase_transition(int L, double start_T, double end_T, int points_T, std::function< data_t(int, double, int)> monte_carlo, std::string outfile)</div><div class="ttdoc">Perform the MCMC algorithm using a range of temperatures.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00156">monte_carlo.cpp:156</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a8f8d4c5e032ed8565a3ac518b32c6aed"><div class="ttname"><a href="monte__carlo_8hpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed">monte_carlo_serial</a></div><div class="ttdeci">data_t monte_carlo_serial(int L, double T, int cycles)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00111">monte_carlo.cpp:111</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a962f704ab35208bf6541eb3b707a9559"><div class="ttname"><a href="monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559">pd_estimate</a></div><div class="ttdeci">void pd_estimate(double T, int L, int cycles, const std::string filename)</div><div class="ttdoc">Estimate the probability distribution for the energy.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00085">monte_carlo.cpp:85</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_aa8b4fc86b26f0e3e253ba5556d2d14dc"><div class="ttname"><a href="monte__carlo_8hpp.html#aa8b4fc86b26f0e3e253ba5556d2d14dc">test_2x2_lattice</a></div><div class="ttdeci">int test_2x2_lattice(double tol, int max_cycles)</div><div class="ttdoc">Test numerical data with analytical data.</div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_ac97d0de27f2f0d50fc6ecf3a79f32826"><div class="ttname"><a href="monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826">monte_carlo_progression</a></div><div class="ttdeci">void monte_carlo_progression(double T, int L, int cycles, const std::string filename)</div><div class="ttdoc">Write the expected values for each Monte Carlo cycles to file.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00017">monte_carlo.cpp:17</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_acc34e2049a5030874f6f548f3adab958"><div class="ttname"><a href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a></div><div class="ttdeci">data_t monte_carlo_parallel(int L, double T, int cycles)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00128">monte_carlo.cpp:128</a></div></div>
|
||||
<div class="ttc" id="autils_8hpp_html"><div class="ttname"><a href="utils_8hpp.html">utils.hpp</a></div><div class="ttdoc">Function prototypes and macros that are useful.</div></div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="preprocessor">#</span><span class="preprocessor">endif</span></div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdoc">Type to use with the IsingModel class and montecarlo module.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00019">data_type.hpp:19</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a0dfa85080578dffff23b68e372cece95"><div class="ttname"><a href="main_8cpp.html#a0dfa85080578dffff23b68e372cece95">test_parallel_speedup</a></div><div class="ttdeci">void test_parallel_speedup()</div><div class="ttdoc">Test how much Openmp speeds up.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00060">main.cpp:60</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdoc">The main function.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00125">main.cpp:125</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a4f8ea24364d72024915d3753a572cc5b"><div class="ttname"><a href="main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b">create_pd_estimate_data</a></div><div class="ttdeci">void create_pd_estimate_data()</div><div class="ttdoc">Create the data used to estimate the probability distribution for tempratures 1.0 anbd 2....</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00037">main.cpp:37</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a68406fc2dd8de5849c3984658c171f32"><div class="ttname"><a href="main_8cpp.html#a68406fc2dd8de5849c3984658c171f32">create_burn_in_time_data</a></div><div class="ttdeci">void create_burn_in_time_data()</div><div class="ttdoc">Create the data for the burn-in time for temperatures 1.0 and 2.4 for both unordered and ordered init...</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00021">main.cpp:21</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a746d8dc451b2b2536abbb1ff1acaf861"><div class="ttname"><a href="main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861">test_burn_in_time</a></div><div class="ttdeci">void test_burn_in_time()</div><div class="ttdoc">Create data using the same parameters except one uses burn-in time, while the other doesn't.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00049">main.cpp:49</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a9d62cf1399596f4c5a39abdd3196d76d"><div class="ttname"><a href="main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d">create_phase_transition_data</a></div><div class="ttdeci">void create_phase_transition_data()</div><div class="ttdoc">Create data for studying phase transition.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00083">main.cpp:83</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_ac907e18135856c90366aaa599a9e10b1"><div class="ttname"><a href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a></div><div class="ttdeci">void usage(std::string filename)</div><div class="ttdoc">A function that displays how to use the program and quits.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00110">main.cpp:110</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a1549fc386bd3cdd1cdbe0261b9dd8415"><div class="ttname"><a href="monte__carlo_8hpp.html#a1549fc386bd3cdd1cdbe0261b9dd8415">montecarlo::progression</a></div><div class="ttdeci">void progression(double T, int L, int cycles, int value, const std::string filename, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Write the expected values for each Monte Carlo cycles to file.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00053">monte_carlo.cpp:53</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a34e9c3e24f26760693266b8a7b6b3d21"><div class="ttname"><a href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">montecarlo::phase_transition</a></div><div class="ttdeci">void phase_transition(int L, double start_T, double end_T, int points_T, int cycles, std::function< data_t(int, double, int, int)> monte_carlo, std::string outfile, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Perform the MCMC algorithm using a range of temperatures.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00169">monte_carlo.cpp:169</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a362b5ad7de095387fcbc573632a19cbf"><div class="ttname"><a href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a></div><div class="ttdeci">#define BURN_IN_TIME</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8hpp_source.html#l00024">monte_carlo.hpp:24</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a781d946de16211ba18ad6671a5b6838d"><div class="ttname"><a href="monte__carlo_8hpp.html#a781d946de16211ba18ad6671a5b6838d">montecarlo::progression</a></div><div class="ttdeci">void progression(double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Write the expected values for each Monte Carlo cycles to file.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00015">monte_carlo.cpp:15</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_ae1e7f904ecfc3d8f3c4dd1ef155dd771"><div class="ttname"><a href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">montecarlo::mcmc_parallel</a></div><div class="ttdeci">data_t mcmc_parallel(int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00141">monte_carlo.cpp:141</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_ae67483ff00d1b0594d543261c8283ffd"><div class="ttname"><a href="monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd">montecarlo::mcmc_serial</a></div><div class="ttdeci">data_t mcmc_serial(int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00122">monte_carlo.cpp:122</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_aea2dd1b5fac7c45633bc6f8dc4541226"><div class="ttname"><a href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">montecarlo::pd_estimate</a></div><div class="ttdeci">void pd_estimate(double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Estimate the probability distribution for the energy.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00091">monte_carlo.cpp:91</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
233
docs/namespacedetails.html
Normal file
233
docs/namespacedetails.html
Normal file
@@ -0,0 +1,233 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: details Namespace 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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('namespacedetails.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">details Namespace Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a39abb7cba0535176ed62aae136d2fcc7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacedetails.html#a39abb7cba0535176ed62aae136d2fcc7">m_assert</a> (bool expr, std::string expr_str, std::string func, std::string file, int line, std::string msg)</td></tr>
|
||||
<tr class="memdesc:a39abb7cba0535176ed62aae136d2fcc7"><td class="mdescLeft"> </td><td class="mdescRight">Test an expression, confirm that test is ok, or abort execution. <br /></td></tr>
|
||||
<tr class="separator:a39abb7cba0535176ed62aae136d2fcc7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a178c4922157666a6e9c127c2ffd96346"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacedetails.html#a178c4922157666a6e9c127c2ffd96346">methodName</a> (const std::string &pretty_function)</td></tr>
|
||||
<tr class="memdesc:a178c4922157666a6e9c127c2ffd96346"><td class="mdescLeft"> </td><td class="mdescRight">Takes in the <b>PRETTY_FUNCTION</b> string and removes the return type. <br /></td></tr>
|
||||
<tr class="separator:a178c4922157666a6e9c127c2ffd96346"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a39abb7cba0535176ed62aae136d2fcc7" name="a39abb7cba0535176ed62aae136d2fcc7"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a39abb7cba0535176ed62aae136d2fcc7">◆ </a></span>m_assert()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void details::m_assert </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">bool </td>
|
||||
<td class="paramname"><em>expr</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>expr_str</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>func</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>file</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>line</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>msg</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Test an expression, confirm that test is ok, or abort execution. </p>
|
||||
<p>This function takes in an expression and prints an OK message if it's true, or it prints a fail message and aborts execution if it fails.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">expr</td><td>The expression to be evaluated </td></tr>
|
||||
<tr><td class="paramname">expr_str</td><td>The stringified version of the expression </td></tr>
|
||||
<tr><td class="paramname">func</td><td>The function name of the caller </td></tr>
|
||||
<tr><td class="paramname">file</td><td>The file of the caller </td></tr>
|
||||
<tr><td class="paramname">line</td><td>The line number where this function is called from </td></tr>
|
||||
<tr><td class="paramname">msg</td><td>The message to be displayed </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="testlib_8cpp_source.html#l00015">15</a> of file <a class="el" href="testlib_8cpp_source.html">testlib.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a178c4922157666a6e9c127c2ffd96346" name="a178c4922157666a6e9c127c2ffd96346"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a178c4922157666a6e9c127c2ffd96346">◆ </a></span>methodName()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::string details::methodName </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const std::string & </td>
|
||||
<td class="paramname"><em>pretty_function</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Takes in the <b>PRETTY_FUNCTION</b> string and removes the return type. </p>
|
||||
<p>This function should only be used for the <b>METHOD_NAME</b> macro, since it takes the output from <b>PRETTY_FUNCTION</b> and strips the return type.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">pretty_function</td><td>The string from <b>PRETTY_FUNCTION</b></td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>std::string </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="utils_8hpp_source.html#l00058">58</a> of file <a class="el" href="utils_8hpp_source.html">utils.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacedetails.html">details</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
126
docs/namespacemembers.html
Normal file
126
docs/namespacemembers.html
Normal file
@@ -0,0 +1,126 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: Namespace Members</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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('namespacemembers.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all namespace members with links to the namespace documentation for each member:</div><ul>
|
||||
<li>assert_each() : <a class="el" href="namespacetestlib.html#ab6585c8aa8c276a3442c67a57c8de6fb">testlib</a></li>
|
||||
<li>close_to() : <a class="el" href="namespacetestlib.html#a2cbf3a45367e903de6efbdbea3344cea">testlib</a></li>
|
||||
<li>concatpath() : <a class="el" href="namespaceutils.html#ae91fad89394d745d544737e43524bde6">utils</a></li>
|
||||
<li>dirname() : <a class="el" href="namespaceutils.html#aed026119193a9bbe076671809ff0f430">utils</a></li>
|
||||
<li>is_equal() : <a class="el" href="namespacetestlib.html#a3db67d8721d2f3cd626526b43186bcf3">testlib</a></li>
|
||||
<li>m_assert() : <a class="el" href="namespacedetails.html#a39abb7cba0535176ed62aae136d2fcc7">details</a></li>
|
||||
<li>mcmc_parallel() : <a class="el" href="namespacemontecarlo.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">montecarlo</a></li>
|
||||
<li>mcmc_serial() : <a class="el" href="namespacemontecarlo.html#ae67483ff00d1b0594d543261c8283ffd">montecarlo</a></li>
|
||||
<li>methodName() : <a class="el" href="namespacedetails.html#a178c4922157666a6e9c127c2ffd96346">details</a></li>
|
||||
<li>mkpath() : <a class="el" href="namespaceutils.html#a2b45adc86b70f42021582994e83fa00d">utils</a></li>
|
||||
<li>pd_estimate() : <a class="el" href="namespacemontecarlo.html#aea2dd1b5fac7c45633bc6f8dc4541226">montecarlo</a></li>
|
||||
<li>phase_transition() : <a class="el" href="namespacemontecarlo.html#a34e9c3e24f26760693266b8a7b6b3d21">montecarlo</a></li>
|
||||
<li>progression() : <a class="el" href="namespacemontecarlo.html#a781d946de16211ba18ad6671a5b6838d">montecarlo</a></li>
|
||||
<li>scientific_format() : <a class="el" href="namespaceutils.html#a3529a74fd2a25d24de73d9d4e1c90835">utils</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
126
docs/namespacemembers_func.html
Normal file
126
docs/namespacemembers_func.html
Normal file
@@ -0,0 +1,126 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: Namespace Members</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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('namespacemembers_func.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="contents">
|
||||
 <ul>
|
||||
<li>assert_each() : <a class="el" href="namespacetestlib.html#ab6585c8aa8c276a3442c67a57c8de6fb">testlib</a></li>
|
||||
<li>close_to() : <a class="el" href="namespacetestlib.html#a2cbf3a45367e903de6efbdbea3344cea">testlib</a></li>
|
||||
<li>concatpath() : <a class="el" href="namespaceutils.html#ae91fad89394d745d544737e43524bde6">utils</a></li>
|
||||
<li>dirname() : <a class="el" href="namespaceutils.html#aed026119193a9bbe076671809ff0f430">utils</a></li>
|
||||
<li>is_equal() : <a class="el" href="namespacetestlib.html#a3db67d8721d2f3cd626526b43186bcf3">testlib</a></li>
|
||||
<li>m_assert() : <a class="el" href="namespacedetails.html#a39abb7cba0535176ed62aae136d2fcc7">details</a></li>
|
||||
<li>mcmc_parallel() : <a class="el" href="namespacemontecarlo.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">montecarlo</a></li>
|
||||
<li>mcmc_serial() : <a class="el" href="namespacemontecarlo.html#ae67483ff00d1b0594d543261c8283ffd">montecarlo</a></li>
|
||||
<li>methodName() : <a class="el" href="namespacedetails.html#a178c4922157666a6e9c127c2ffd96346">details</a></li>
|
||||
<li>mkpath() : <a class="el" href="namespaceutils.html#a2b45adc86b70f42021582994e83fa00d">utils</a></li>
|
||||
<li>pd_estimate() : <a class="el" href="namespacemontecarlo.html#aea2dd1b5fac7c45633bc6f8dc4541226">montecarlo</a></li>
|
||||
<li>phase_transition() : <a class="el" href="namespacemontecarlo.html#a34e9c3e24f26760693266b8a7b6b3d21">montecarlo</a></li>
|
||||
<li>progression() : <a class="el" href="namespacemontecarlo.html#a781d946de16211ba18ad6671a5b6838d">montecarlo</a></li>
|
||||
<li>scientific_format() : <a class="el" href="namespaceutils.html#a3529a74fd2a25d24de73d9d4e1c90835">utils</a></li>
|
||||
</ul>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
514
docs/namespacemontecarlo.html
Normal file
514
docs/namespacemontecarlo.html
Normal file
@@ -0,0 +1,514 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: montecarlo Namespace 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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('namespacemontecarlo.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">montecarlo Namespace Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a781d946de16211ba18ad6671a5b6838d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemontecarlo.html#a781d946de16211ba18ad6671a5b6838d">progression</a> (double T, int L, int cycles, const std::string filename, int burn_in_time=<a class="el" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a>)</td></tr>
|
||||
<tr class="memdesc:a781d946de16211ba18ad6671a5b6838d"><td class="mdescLeft"> </td><td class="mdescRight">Write the expected values for each Monte Carlo cycles to file. <br /></td></tr>
|
||||
<tr class="separator:a781d946de16211ba18ad6671a5b6838d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a1549fc386bd3cdd1cdbe0261b9dd8415"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemontecarlo.html#a1549fc386bd3cdd1cdbe0261b9dd8415">progression</a> (double T, int L, int cycles, int value, const std::string filename, int burn_in_time=<a class="el" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a>)</td></tr>
|
||||
<tr class="memdesc:a1549fc386bd3cdd1cdbe0261b9dd8415"><td class="mdescLeft"> </td><td class="mdescRight">Write the expected values for each Monte Carlo cycles to file. <br /></td></tr>
|
||||
<tr class="separator:a1549fc386bd3cdd1cdbe0261b9dd8415"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aea2dd1b5fac7c45633bc6f8dc4541226"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemontecarlo.html#aea2dd1b5fac7c45633bc6f8dc4541226">pd_estimate</a> (double T, int L, int cycles, const std::string filename, int burn_in_time=<a class="el" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a>)</td></tr>
|
||||
<tr class="memdesc:aea2dd1b5fac7c45633bc6f8dc4541226"><td class="mdescLeft"> </td><td class="mdescRight">Estimate the probability distribution for the energy. <br /></td></tr>
|
||||
<tr class="separator:aea2dd1b5fac7c45633bc6f8dc4541226"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae67483ff00d1b0594d543261c8283ffd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemontecarlo.html#ae67483ff00d1b0594d543261c8283ffd">mcmc_serial</a> (int L, double T, int cycles, int burn_in_time=<a class="el" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a>)</td></tr>
|
||||
<tr class="memdesc:ae67483ff00d1b0594d543261c8283ffd"><td class="mdescLeft"> </td><td class="mdescRight">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles. <br /></td></tr>
|
||||
<tr class="separator:ae67483ff00d1b0594d543261c8283ffd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae1e7f904ecfc3d8f3c4dd1ef155dd771"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classdata__t.html">data_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemontecarlo.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">mcmc_parallel</a> (int L, double T, int cycles, int burn_in_time=<a class="el" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a>)</td></tr>
|
||||
<tr class="memdesc:ae1e7f904ecfc3d8f3c4dd1ef155dd771"><td class="mdescLeft"> </td><td class="mdescRight">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel. <br /></td></tr>
|
||||
<tr class="separator:ae1e7f904ecfc3d8f3c4dd1ef155dd771"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a34e9c3e24f26760693266b8a7b6b3d21"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemontecarlo.html#a34e9c3e24f26760693266b8a7b6b3d21">phase_transition</a> (int L, double start_T, double end_T, int points_T, int cycles, std::function< <a class="el" href="classdata__t.html">data_t</a>(int, double, int, int)> monte_carlo, std::string outfile, int burn_in_time=<a class="el" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a>)</td></tr>
|
||||
<tr class="memdesc:a34e9c3e24f26760693266b8a7b6b3d21"><td class="mdescLeft"> </td><td class="mdescRight">Perform the MCMC algorithm using a range of temperatures. <br /></td></tr>
|
||||
<tr class="separator:a34e9c3e24f26760693266b8a7b6b3d21"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae1e7f904ecfc3d8f3c4dd1ef155dd771" name="ae1e7f904ecfc3d8f3c4dd1ef155dd771"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae1e7f904ecfc3d8f3c4dd1ef155dd771">◆ </a></span>mcmc_parallel()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="classdata__t.html">data_t</a> montecarlo::mcmc_parallel </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code><a class="el" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a></code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">T</td><td>The Temperature for the Ising model </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00141">141</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ae67483ff00d1b0594d543261c8283ffd" name="ae67483ff00d1b0594d543261c8283ffd"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae67483ff00d1b0594d543261c8283ffd">◆ </a></span>mcmc_serial()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="classdata__t.html">data_t</a> montecarlo::mcmc_serial </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code><a class="el" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a></code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">T</td><td>The Temperature for the Ising model </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classdata__t.html" title="Type to use with the IsingModel class and montecarlo module.">data_t</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00122">122</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aea2dd1b5fac7c45633bc6f8dc4541226" name="aea2dd1b5fac7c45633bc6f8dc4541226"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aea2dd1b5fac7c45633bc6f8dc4541226">◆ </a></span>pd_estimate()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void montecarlo::pd_estimate </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string </td>
|
||||
<td class="paramname"><em>filename</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code><a class="el" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a></code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Estimate the probability distribution for the energy. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">T</td><td>The temperature of the Ising model </td></tr>
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">filename</td><td>The file to write to </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00091">91</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a34e9c3e24f26760693266b8a7b6b3d21" name="a34e9c3e24f26760693266b8a7b6b3d21"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a34e9c3e24f26760693266b8a7b6b3d21">◆ </a></span>phase_transition()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void montecarlo::phase_transition </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>start_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>end_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>points_T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::function< <a class="el" href="classdata__t.html">data_t</a>(int, double, int, int)> </td>
|
||||
<td class="paramname"><em>monte_carlo</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>outfile</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code><a class="el" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a></code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Perform the MCMC algorithm using a range of temperatures. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">start_T</td><td>The start temperature </td></tr>
|
||||
<tr><td class="paramname">end_T</td><td>The end temperature </td></tr>
|
||||
<tr><td class="paramname">point_T</td><td>The amount of point to measure </td></tr>
|
||||
<tr><td class="paramname">monte_carlo</td><td>Which Monte Carlo implementation to use </td></tr>
|
||||
<tr><td class="paramname">outfile</td><td>The file to write the data to </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00169">169</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a781d946de16211ba18ad6671a5b6838d" name="a781d946de16211ba18ad6671a5b6838d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a781d946de16211ba18ad6671a5b6838d">◆ </a></span>progression() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void montecarlo::progression </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string </td>
|
||||
<td class="paramname"><em>filename</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code><a class="el" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a></code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Write the expected values for each Monte Carlo cycles to file. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">T</td><td>Temperature </td></tr>
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">filename</td><td>The file to write to </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00015">15</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a1549fc386bd3cdd1cdbe0261b9dd8415" name="a1549fc386bd3cdd1cdbe0261b9dd8415"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a1549fc386bd3cdd1cdbe0261b9dd8415">◆ </a></span>progression() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void montecarlo::progression </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>T</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>L</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>cycles</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>value</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string </td>
|
||||
<td class="paramname"><em>filename</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>burn_in_time</em> = <code><a class="el" href="monte__carlo_8hpp.html#a362b5ad7de095387fcbc573632a19cbf">BURN_IN_TIME</a></code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Write the expected values for each Monte Carlo cycles to file. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">T</td><td>Temperature </td></tr>
|
||||
<tr><td class="paramname">L</td><td>The size of the lattice </td></tr>
|
||||
<tr><td class="paramname">cycles</td><td>The amount of Monte Carlo cycles to do </td></tr>
|
||||
<tr><td class="paramname">value</td><td>The value to set the elements in the lattice </td></tr>
|
||||
<tr><td class="paramname">filename</td><td>The file to write to </td></tr>
|
||||
<tr><td class="paramname">burn_in_time</td><td>The burn-in time to use </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="monte__carlo_8cpp_source.html#l00053">53</a> of file <a class="el" href="monte__carlo_8cpp_source.html">monte_carlo.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacemontecarlo.html">montecarlo</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
121
docs/namespaces.html
Normal file
121
docs/namespaces.html
Normal file
@@ -0,0 +1,121 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: Namespace List</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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('namespaces.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">Namespace List</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all namespaces with brief descriptions:</div><div class="directory">
|
||||
<table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacedetails.html" target="_self">details</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacemontecarlo.html" target="_self">montecarlo</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespacetestlib.html" target="_self">testlib</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_3_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespaceutils.html" target="_self">utils</a></td><td class="desc"></td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
28
docs/namespaces_dup.js
Normal file
28
docs/namespaces_dup.js
Normal file
@@ -0,0 +1,28 @@
|
||||
var namespaces_dup =
|
||||
[
|
||||
[ "details", "namespacedetails.html", [
|
||||
[ "m_assert", "namespacedetails.html#a39abb7cba0535176ed62aae136d2fcc7", null ],
|
||||
[ "methodName", "namespacedetails.html#a178c4922157666a6e9c127c2ffd96346", null ]
|
||||
] ],
|
||||
[ "montecarlo", "namespacemontecarlo.html", [
|
||||
[ "mcmc_parallel", "namespacemontecarlo.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771", null ],
|
||||
[ "mcmc_serial", "namespacemontecarlo.html#ae67483ff00d1b0594d543261c8283ffd", null ],
|
||||
[ "pd_estimate", "namespacemontecarlo.html#aea2dd1b5fac7c45633bc6f8dc4541226", null ],
|
||||
[ "phase_transition", "namespacemontecarlo.html#a34e9c3e24f26760693266b8a7b6b3d21", null ],
|
||||
[ "progression", "namespacemontecarlo.html#a781d946de16211ba18ad6671a5b6838d", null ],
|
||||
[ "progression", "namespacemontecarlo.html#a1549fc386bd3cdd1cdbe0261b9dd8415", null ]
|
||||
] ],
|
||||
[ "testlib", "namespacetestlib.html", [
|
||||
[ "assert_each", "namespacetestlib.html#ab6585c8aa8c276a3442c67a57c8de6fb", null ],
|
||||
[ "close_to", "namespacetestlib.html#a2cbf3a45367e903de6efbdbea3344cea", null ],
|
||||
[ "close_to", "namespacetestlib.html#a44f47fa3c8654c09712572d75c0ffa7f", null ],
|
||||
[ "is_equal", "namespacetestlib.html#a3db67d8721d2f3cd626526b43186bcf3", null ]
|
||||
] ],
|
||||
[ "utils", "namespaceutils.html", [
|
||||
[ "concatpath", "namespaceutils.html#ae91fad89394d745d544737e43524bde6", null ],
|
||||
[ "dirname", "namespaceutils.html#aed026119193a9bbe076671809ff0f430", null ],
|
||||
[ "mkpath", "namespaceutils.html#a2b45adc86b70f42021582994e83fa00d", null ],
|
||||
[ "scientific_format", "namespaceutils.html#ab3e89176433ddc9ba721b2eba3d08357", null ],
|
||||
[ "scientific_format", "namespaceutils.html#a3529a74fd2a25d24de73d9d4e1c90835", null ]
|
||||
] ]
|
||||
];
|
||||
354
docs/namespacetestlib.html
Normal file
354
docs/namespacetestlib.html
Normal file
@@ -0,0 +1,354 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: testlib Namespace 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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('namespacetestlib.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">testlib Namespace Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a2cbf3a45367e903de6efbdbea3344cea"><td class="memTemplParams" colspan="2">template<class T , class = typename std::enable_if<std::is_arithmetic<T>::value>::type> </td></tr>
|
||||
<tr class="memitem:a2cbf3a45367e903de6efbdbea3344cea"><td class="memTemplItemLeft" align="right" valign="top">static bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacetestlib.html#a2cbf3a45367e903de6efbdbea3344cea">close_to</a> (arma::Mat< T > &a, arma::Mat< T > &b, double tol=1e-8)</td></tr>
|
||||
<tr class="memdesc:a2cbf3a45367e903de6efbdbea3344cea"><td class="mdescLeft"> </td><td class="mdescRight">Test if two armadillo matrices/vectors are close to each other. <br /></td></tr>
|
||||
<tr class="separator:a2cbf3a45367e903de6efbdbea3344cea"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a44f47fa3c8654c09712572d75c0ffa7f"><td class="memTemplParams" colspan="2">template<class T , class = typename std::enable_if<std::is_arithmetic<T>::value>::type> </td></tr>
|
||||
<tr class="memitem:a44f47fa3c8654c09712572d75c0ffa7f"><td class="memTemplItemLeft" align="right" valign="top">static bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacetestlib.html#a44f47fa3c8654c09712572d75c0ffa7f">close_to</a> (T a, T b, double tol=1e-8)</td></tr>
|
||||
<tr class="memdesc:a44f47fa3c8654c09712572d75c0ffa7f"><td class="mdescLeft"> </td><td class="mdescRight">Test if two numbers are close to each other. <br /></td></tr>
|
||||
<tr class="separator:a44f47fa3c8654c09712572d75c0ffa7f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3db67d8721d2f3cd626526b43186bcf3"><td class="memTemplParams" colspan="2">template<class T , class = typename std::enable_if<std::is_integral<T>::value>::type> </td></tr>
|
||||
<tr class="memitem:a3db67d8721d2f3cd626526b43186bcf3"><td class="memTemplItemLeft" align="right" valign="top">static bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacetestlib.html#a3db67d8721d2f3cd626526b43186bcf3">is_equal</a> (arma::Mat< T > &a, arma::Mat< T > &b)</td></tr>
|
||||
<tr class="memdesc:a3db67d8721d2f3cd626526b43186bcf3"><td class="mdescLeft"> </td><td class="mdescRight">Test if two armadillo matrices/vectors are equal. <br /></td></tr>
|
||||
<tr class="separator:a3db67d8721d2f3cd626526b43186bcf3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab6585c8aa8c276a3442c67a57c8de6fb"><td class="memTemplParams" colspan="2">template<class T , class = typename std::enable_if<std::is_arithmetic<T>::value>::type> </td></tr>
|
||||
<tr class="memitem:ab6585c8aa8c276a3442c67a57c8de6fb"><td class="memTemplItemLeft" align="right" valign="top">static bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacetestlib.html#ab6585c8aa8c276a3442c67a57c8de6fb">assert_each</a> (std::function< bool(T)> expr, arma::Mat< T > &M)</td></tr>
|
||||
<tr class="memdesc:ab6585c8aa8c276a3442c67a57c8de6fb"><td class="mdescLeft"> </td><td class="mdescRight">Test that all elements fulfill the condition. <br /></td></tr>
|
||||
<tr class="separator:ab6585c8aa8c276a3442c67a57c8de6fb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ab6585c8aa8c276a3442c67a57c8de6fb" name="ab6585c8aa8c276a3442c67a57c8de6fb"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab6585c8aa8c276a3442c67a57c8de6fb">◆ </a></span>assert_each()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<class T , class = typename std::enable_if<std::is_arithmetic<T>::value>::type> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static bool testlib::assert_each </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">std::function< bool(T)> </td>
|
||||
<td class="paramname"><em>expr</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">arma::Mat< T > & </td>
|
||||
<td class="paramname"><em>M</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Test that all elements fulfill the condition. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">expr</td><td>The boolean expression to apply to each element </td></tr>
|
||||
<tr><td class="paramname">M</td><td>The matrix/vector to iterate over</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="testlib_8hpp_source.html#l00130">130</a> of file <a class="el" href="testlib_8hpp_source.html">testlib.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a2cbf3a45367e903de6efbdbea3344cea" name="a2cbf3a45367e903de6efbdbea3344cea"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a2cbf3a45367e903de6efbdbea3344cea">◆ </a></span>close_to() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<class T , class = typename std::enable_if<std::is_arithmetic<T>::value>::type> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static bool testlib::close_to </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">arma::Mat< T > & </td>
|
||||
<td class="paramname"><em>a</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">arma::Mat< T > & </td>
|
||||
<td class="paramname"><em>b</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>tol</em> = <code>1e-8</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Test if two armadillo matrices/vectors are close to each other. </p>
|
||||
<p>This function takes in 2 matrices/vectors and checks if they are approximately equal to each other given a tolerance.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">a</td><td>Matrix/vector a </td></tr>
|
||||
<tr><td class="paramname">b</td><td>Matrix/vector b </td></tr>
|
||||
<tr><td class="paramname">tol</td><td>The tolerance</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="testlib_8hpp_source.html#l00067">67</a> of file <a class="el" href="testlib_8hpp_source.html">testlib.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a44f47fa3c8654c09712572d75c0ffa7f" name="a44f47fa3c8654c09712572d75c0ffa7f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a44f47fa3c8654c09712572d75c0ffa7f">◆ </a></span>close_to() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<class T , class = typename std::enable_if<std::is_arithmetic<T>::value>::type> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static bool testlib::close_to </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">T </td>
|
||||
<td class="paramname"><em>a</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">T </td>
|
||||
<td class="paramname"><em>b</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>tol</em> = <code>1e-8</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Test if two numbers are close to each other. </p>
|
||||
<p>This function takes in 2 matrices/vectors and checks if they are approximately equal to each other given a tolerance.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">a</td><td>Matrix/vector a </td></tr>
|
||||
<tr><td class="paramname">b</td><td>Matrix/vector b </td></tr>
|
||||
<tr><td class="paramname">tol</td><td>The tolerance</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="testlib_8hpp_source.html#l00094">94</a> of file <a class="el" href="testlib_8hpp_source.html">testlib.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a3db67d8721d2f3cd626526b43186bcf3" name="a3db67d8721d2f3cd626526b43186bcf3"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3db67d8721d2f3cd626526b43186bcf3">◆ </a></span>is_equal()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<div class="memtemplate">
|
||||
template<class T , class = typename std::enable_if<std::is_integral<T>::value>::type> </div>
|
||||
<table class="mlabels">
|
||||
<tr>
|
||||
<td class="mlabels-left">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">static bool testlib::is_equal </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">arma::Mat< T > & </td>
|
||||
<td class="paramname"><em>a</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">arma::Mat< T > & </td>
|
||||
<td class="paramname"><em>b</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="mlabels-right">
|
||||
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Test if two armadillo matrices/vectors are equal. </p>
|
||||
<p>This function takes in 2 matrices/vectors and checks if they are equal to each other. This should only be used for integral types.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">a</td><td>Matrix/vector a </td></tr>
|
||||
<tr><td class="paramname">b</td><td>Matrix/vector b</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>bool </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="testlib_8hpp_source.html#l00111">111</a> of file <a class="el" href="testlib_8hpp_source.html">testlib.hpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespacetestlib.html">testlib</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
343
docs/namespaceutils.html
Normal file
343
docs/namespaceutils.html
Normal file
@@ -0,0 +1,343 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: utils Namespace 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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('namespaceutils.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">utils Namespace Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:a3529a74fd2a25d24de73d9d4e1c90835"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceutils.html#a3529a74fd2a25d24de73d9d4e1c90835">scientific_format</a> (double d, int width=20, int prec=10)</td></tr>
|
||||
<tr class="memdesc:a3529a74fd2a25d24de73d9d4e1c90835"><td class="mdescLeft"> </td><td class="mdescRight">Turns a double into a string written in scientific format. <br /></td></tr>
|
||||
<tr class="separator:a3529a74fd2a25d24de73d9d4e1c90835"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab3e89176433ddc9ba721b2eba3d08357"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceutils.html#ab3e89176433ddc9ba721b2eba3d08357">scientific_format</a> (const std::vector< double > &v, int width=20, int prec=10)</td></tr>
|
||||
<tr class="memdesc:ab3e89176433ddc9ba721b2eba3d08357"><td class="mdescLeft"> </td><td class="mdescRight">Turns a vector of doubles into a string written in scientific format. <br /></td></tr>
|
||||
<tr class="separator:ab3e89176433ddc9ba721b2eba3d08357"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a2b45adc86b70f42021582994e83fa00d"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceutils.html#a2b45adc86b70f42021582994e83fa00d">mkpath</a> (std::string path, int mode=0777)</td></tr>
|
||||
<tr class="memdesc:a2b45adc86b70f42021582994e83fa00d"><td class="mdescLeft"> </td><td class="mdescRight">Make path given. <br /></td></tr>
|
||||
<tr class="separator:a2b45adc86b70f42021582994e83fa00d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aed026119193a9bbe076671809ff0f430"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceutils.html#aed026119193a9bbe076671809ff0f430">dirname</a> (const std::string &path)</td></tr>
|
||||
<tr class="memdesc:aed026119193a9bbe076671809ff0f430"><td class="mdescLeft"> </td><td class="mdescRight">Get the directory name of the path. <br /></td></tr>
|
||||
<tr class="separator:aed026119193a9bbe076671809ff0f430"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ae91fad89394d745d544737e43524bde6"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceutils.html#ae91fad89394d745d544737e43524bde6">concatpath</a> (const std::string &left, const std::string &right)</td></tr>
|
||||
<tr class="memdesc:ae91fad89394d745d544737e43524bde6"><td class="mdescLeft"> </td><td class="mdescRight">Take 2 strings and concatenate them and make sure there is a directory separator (/) between them. <br /></td></tr>
|
||||
<tr class="separator:ae91fad89394d745d544737e43524bde6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ae91fad89394d745d544737e43524bde6" name="ae91fad89394d745d544737e43524bde6"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ae91fad89394d745d544737e43524bde6">◆ </a></span>concatpath()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::string utils::concatpath </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const std::string & </td>
|
||||
<td class="paramname"><em>left</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const std::string & </td>
|
||||
<td class="paramname"><em>right</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Take 2 strings and concatenate them and make sure there is a directory separator (/) between them. </p>
|
||||
<p>This function doesn't care whether or not the values given as parameters are valid path strings. It is the responsibility of the user to make sure that the values given are valid path strings. The function only guarantees that the output string is a valid path string.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">left</td><td>The left hand side of the result string </td></tr>
|
||||
<tr><td class="paramname">right</td><td>The right hand side of the result string</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00063">63</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="aed026119193a9bbe076671809ff0f430" name="aed026119193a9bbe076671809ff0f430"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aed026119193a9bbe076671809ff0f430">◆ </a></span>dirname()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::string utils::dirname </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const std::string & </td>
|
||||
<td class="paramname"><em>path</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Get the directory name of the path. </p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">path</td><td>The path to use.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00058">58</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a2b45adc86b70f42021582994e83fa00d" name="a2b45adc86b70f42021582994e83fa00d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a2b45adc86b70f42021582994e83fa00d">◆ </a></span>mkpath()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">bool utils::mkpath </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>path</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>mode</em> = <code>0777</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Make path given. </p>
|
||||
<p>This tries to be the equivalent to "mkdir -p" and creates a new directory whenever it needs to.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">path</td><td>The path to be created </td></tr>
|
||||
<tr><td class="paramname">mode</td><td>The mode/permissions for all the new directories</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>bool Success/Fail </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00032">32</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ab3e89176433ddc9ba721b2eba3d08357" name="ab3e89176433ddc9ba721b2eba3d08357"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ab3e89176433ddc9ba721b2eba3d08357">◆ </a></span>scientific_format() <span class="overload">[1/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::string utils::scientific_format </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const std::vector< double > & </td>
|
||||
<td class="paramname"><em>v</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>width</em> = <code>20</code>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>prec</em> = <code>10</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Turns a vector of doubles into a string written in scientific format. </p>
|
||||
<p>The code is stolen from <a href="https://github.com/anderkve/FYS3150">https://github.com/anderkve/FYS3150</a>.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">v</td><td>The vector to stringify </td></tr>
|
||||
<tr><td class="paramname">width</td><td>The reserved width of the string </td></tr>
|
||||
<tr><td class="paramname">prec</td><td>The precision of the stringified number</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>std::string </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00023">23</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a3529a74fd2a25d24de73d9d4e1c90835" name="a3529a74fd2a25d24de73d9d4e1c90835"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3529a74fd2a25d24de73d9d4e1c90835">◆ </a></span>scientific_format() <span class="overload">[2/2]</span></h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">std::string utils::scientific_format </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">double </td>
|
||||
<td class="paramname"><em>d</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>width</em> = <code>20</code>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>prec</em> = <code>10</code> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Turns a double into a string written in scientific format. </p>
|
||||
<p>The code is stolen from <a href="https://github.com/anderkve/FYS3150">https://github.com/anderkve/FYS3150</a>.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">d</td><td>The number to stringify </td></tr>
|
||||
<tr><td class="paramname">width</td><td>The reserved width of the string </td></tr>
|
||||
<tr><td class="paramname">prec</td><td>The precision of the stringified number</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>std::string </dd></dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="utils_8cpp_source.html#l00016">16</a> of file <a class="el" href="utils_8cpp_source.html">utils.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="namespaceutils.html">utils</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -33,7 +33,8 @@ var NAVTREE =
|
||||
[ "Class Members", "functions.html", [
|
||||
[ "All", "functions.html", null ],
|
||||
[ "Functions", "functions_func.html", null ],
|
||||
[ "Variables", "functions_vars.html", null ]
|
||||
[ "Variables", "functions_vars.html", null ],
|
||||
[ "Related Functions", "functions_rela.html", null ]
|
||||
] ]
|
||||
] ],
|
||||
[ "Files", "files.html", [
|
||||
|
||||
@@ -1,121 +1,170 @@
|
||||
var NAVTREEINDEX0 =
|
||||
{
|
||||
"IsingModel_8cpp.html":[3,0,1,2],
|
||||
"IsingModel_8cpp_source.html":[3,0,1,2],
|
||||
"IsingModel_8hpp.html":[3,0,0,2],
|
||||
"IsingModel_8hpp_source.html":[3,0,0,2],
|
||||
"IsingModel_8cpp.html":[3,0,1,1],
|
||||
"IsingModel_8cpp_source.html":[3,0,1,1],
|
||||
"IsingModel_8hpp.html":[3,0,0,1],
|
||||
"IsingModel_8hpp.html#a1965eaca47dbf3f87acdafc2208f04eb":[3,0,0,1,5],
|
||||
"IsingModel_8hpp.html#a3039ac753f46401767c38f867787fae6":[3,0,0,1,2],
|
||||
"IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f":[3,0,0,1,1],
|
||||
"IsingModel_8hpp.html#a437ef08681e7210d6678427030446a54":[3,0,0,1,3],
|
||||
"IsingModel_8hpp.html#a80fb826a684cf3f0d306b22aa100ddac":[3,0,0,1,4],
|
||||
"IsingModel_8hpp_source.html":[3,0,0,1],
|
||||
"annotated.html":[2,0],
|
||||
"bug.html":[1],
|
||||
"burn__in__time_8py_source.html":[3,0,1,0,0],
|
||||
"classIsingModel.html":[2,0,1],
|
||||
"classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47":[2,0,1,15],
|
||||
"classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd":[2,0,1,12],
|
||||
"classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c":[2,0,1,17],
|
||||
"classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348":[2,0,1,13],
|
||||
"classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41":[2,0,1,14],
|
||||
"classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a":[2,0,1,7],
|
||||
"classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a":[2,0,1,14],
|
||||
"classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9":[2,0,1,12],
|
||||
"classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c":[2,0,1,19],
|
||||
"classIsingModel.html#a2b1cf104e0bda1fce78ed366e1ec7287":[2,0,1,11],
|
||||
"classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348":[2,0,1,15],
|
||||
"classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41":[2,0,1,16],
|
||||
"classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a":[2,0,1,6],
|
||||
"classIsingModel.html#a46c9446e94854452f715d307c77c1c15":[2,0,1,2],
|
||||
"classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5":[2,0,1,1],
|
||||
"classIsingModel.html#a56559d68dc9aaff1976d84b157f43488":[2,0,1,10],
|
||||
"classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1":[2,0,1,5],
|
||||
"classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1":[2,0,1,3],
|
||||
"classIsingModel.html#a6776109105051597c275670dabd0054a":[2,0,1,9],
|
||||
"classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e":[2,0,1,13],
|
||||
"classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4":[2,0,1,8],
|
||||
"classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd":[2,0,1,16],
|
||||
"classIsingModel.html#aa5701496e6483bc4668c486d6d3af625":[2,0,1,4],
|
||||
"classIsingModel.html#aaa0787d964b004a17869811a5e947ff5":[2,0,1,3],
|
||||
"classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd":[2,0,1,18],
|
||||
"classIsingModel.html#aaedc25b7284e04849269f31291590bf5":[2,0,1,5],
|
||||
"classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78":[2,0,1,7],
|
||||
"classIsingModel.html#acf281f6f5ed02911ca6ab07004449864":[2,0,1,0],
|
||||
"classIsingModel.html#ae9f872ca2054992161d53306119979dd":[2,0,1,11],
|
||||
"classIsingModel.html#aff9a1201933fd5408845a1447e4895b4":[2,0,1,6],
|
||||
"classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738":[2,0,1,17],
|
||||
"classIsingModel.html#aff9a1201933fd5408845a1447e4895b4":[2,0,1,4],
|
||||
"classIsingModelTest.html":[2,0,2],
|
||||
"classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de":[2,0,2,0],
|
||||
"classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931":[2,0,2,1],
|
||||
"classdata__t.html":[2,0,0],
|
||||
"classdata__t.html#a13bc1d73eadeb39c507e89f5872d726f":[2,0,0,4],
|
||||
"classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83":[2,0,0,1],
|
||||
"classdata__t.html#a429a11c53ee7fe08f6a4e75db524521d":[2,0,0,6],
|
||||
"classdata__t.html#a586475e0f71322dffda2e75f228ab24b":[2,0,0,12],
|
||||
"classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e":[2,0,0,8],
|
||||
"classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb":[2,0,0,5],
|
||||
"classdata__t.html#a6ddf3a7372730ef2393aee8bbcb34992":[2,0,0,3],
|
||||
"classdata__t.html#a71ae3cd4460f2c66239500c11804e70b":[2,0,0,11],
|
||||
"classdata__t.html#a7954efc97086ea50e10c33113b203085":[2,0,0,2],
|
||||
"classdata__t.html#a88da5be78439fbdecfa473ec007dffd8":[2,0,0,7],
|
||||
"classdata__t.html#aa2690d3e5d711b4baf3c8f8b9095faf7":[2,0,0,0],
|
||||
"classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72":[2,0,0,9],
|
||||
"classdata__t.html#ad08d2488bf913c626157471cf6e8a46a":[2,0,0,10],
|
||||
"classes.html":[2,1],
|
||||
"constants_8hpp.html":[3,0,0,0],
|
||||
"constants_8hpp.html#abfa7d6668c777f9516606394bbc9c414":[3,0,0,0,0],
|
||||
"constants_8hpp_source.html":[3,0,0,0],
|
||||
"data__type_8cpp.html":[3,0,1,1],
|
||||
"data__type_8cpp_source.html":[3,0,1,1],
|
||||
"data__type_8hpp.html":[3,0,0,1],
|
||||
"data__type_8hpp_source.html":[3,0,0,1],
|
||||
"dir_634e799a3947388232110823971192a8.html":[3,0,1,0],
|
||||
"data__type_8cpp.html":[3,0,1,0],
|
||||
"data__type_8cpp_source.html":[3,0,1,0],
|
||||
"data__type_8hpp.html":[3,0,0,0],
|
||||
"data__type_8hpp_source.html":[3,0,0,0],
|
||||
"dir_68267d1309a1af8e8297ef4c3efbcdba.html":[3,0,1],
|
||||
"dir_d44c64559bbebec7f509842c48db8b23.html":[3,0,0],
|
||||
"files.html":[3,0],
|
||||
"functions.html":[2,2,0],
|
||||
"functions_func.html":[2,2,1],
|
||||
"functions_rela.html":[2,2,3],
|
||||
"functions_vars.html":[2,2,2],
|
||||
"globals.html":[3,1,0],
|
||||
"globals_defs.html":[3,1,2],
|
||||
"globals_func.html":[3,1,1],
|
||||
"index.html":[0],
|
||||
"index.html":[],
|
||||
"index.html":[0],
|
||||
"index.html#autotoc_md1":[0,0],
|
||||
"index.html#autotoc_md10":[0,2,1,1],
|
||||
"index.html#autotoc_md11":[0,2,2],
|
||||
"index.html#autotoc_md12":[0,3],
|
||||
"index.html#autotoc_md13":[0,3,0],
|
||||
"index.html#autotoc_md14":[0,3,1],
|
||||
"index.html#autotoc_md15":[0,4],
|
||||
"index.html#autotoc_md10":[0,2,0],
|
||||
"index.html#autotoc_md11":[0,2,1],
|
||||
"index.html#autotoc_md12":[0,2,1,0],
|
||||
"index.html#autotoc_md13":[0,2,1,1],
|
||||
"index.html#autotoc_md14":[0,2,2],
|
||||
"index.html#autotoc_md15":[0,3],
|
||||
"index.html#autotoc_md16":[0,3,0],
|
||||
"index.html#autotoc_md17":[0,3,1],
|
||||
"index.html#autotoc_md18":[0,4],
|
||||
"index.html#autotoc_md2":[0,0,0],
|
||||
"index.html#autotoc_md3":[0,0,1],
|
||||
"index.html#autotoc_md4":[0,0,2],
|
||||
"index.html#autotoc_md5":[0,1],
|
||||
"index.html#autotoc_md6":[0,2],
|
||||
"index.html#autotoc_md7":[0,2,0],
|
||||
"index.html#autotoc_md8":[0,2,1],
|
||||
"index.html#autotoc_md9":[0,2,1,0],
|
||||
"main_8cpp.html":[3,0,1,3],
|
||||
"main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627":[3,0,1,3,0],
|
||||
"main_8cpp_source.html":[3,0,1,3],
|
||||
"index.html#autotoc_md6":[0,1,0],
|
||||
"index.html#autotoc_md7":[0,1,1],
|
||||
"index.html#autotoc_md8":[0,1,2],
|
||||
"index.html#autotoc_md9":[0,2],
|
||||
"main_8cpp.html":[3,0,1,2],
|
||||
"main_8cpp.html#a0dfa85080578dffff23b68e372cece95":[3,0,1,2,5],
|
||||
"main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627":[3,0,1,2,3],
|
||||
"main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b":[3,0,1,2,1],
|
||||
"main_8cpp.html#a68406fc2dd8de5849c3984658c171f32":[3,0,1,2,0],
|
||||
"main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861":[3,0,1,2,4],
|
||||
"main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d":[3,0,1,2,2],
|
||||
"main_8cpp.html#ac907e18135856c90366aaa599a9e10b1":[3,0,1,2,6],
|
||||
"main_8cpp_source.html":[3,0,1,2],
|
||||
"mcmc__progression_8cpp.html":[3,0,1,3],
|
||||
"mcmc__progression_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627":[3,0,1,3,0],
|
||||
"mcmc__progression_8cpp.html#ac907e18135856c90366aaa599a9e10b1":[3,0,1,3,1],
|
||||
"mcmc__progression_8cpp_source.html":[3,0,1,3],
|
||||
"monte__carlo_8cpp.html":[3,0,1,4],
|
||||
"monte__carlo_8cpp.html#a7df22ace588b4d229d1029ce766d0009":[3,0,1,4,5],
|
||||
"monte__carlo_8cpp.html#a89ddd777796c65eb2b289af11fc0ce09":[3,0,1,4,2],
|
||||
"monte__carlo_8cpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed":[3,0,1,4,3],
|
||||
"monte__carlo_8cpp.html#a962f704ab35208bf6541eb3b707a9559":[3,0,1,4,4],
|
||||
"monte__carlo_8cpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826":[3,0,1,4,1],
|
||||
"monte__carlo_8cpp.html#acc34e2049a5030874f6f548f3adab958":[3,0,1,4,0],
|
||||
"monte__carlo_8cpp.html#a1549fc386bd3cdd1cdbe0261b9dd8415":[3,0,1,4,5],
|
||||
"monte__carlo_8cpp.html#a34e9c3e24f26760693266b8a7b6b3d21":[3,0,1,4,3],
|
||||
"monte__carlo_8cpp.html#a781d946de16211ba18ad6671a5b6838d":[3,0,1,4,4],
|
||||
"monte__carlo_8cpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771":[3,0,1,4,0],
|
||||
"monte__carlo_8cpp.html#ae67483ff00d1b0594d543261c8283ffd":[3,0,1,4,1],
|
||||
"monte__carlo_8cpp.html#aea2dd1b5fac7c45633bc6f8dc4541226":[3,0,1,4,2],
|
||||
"monte__carlo_8cpp_source.html":[3,0,1,4],
|
||||
"monte__carlo_8hpp.html":[3,0,0,3],
|
||||
"monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e":[3,0,0,3,5],
|
||||
"monte__carlo_8hpp.html#a89ddd777796c65eb2b289af11fc0ce09":[3,0,0,3,2],
|
||||
"monte__carlo_8hpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed":[3,0,0,3,3],
|
||||
"monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559":[3,0,0,3,4],
|
||||
"monte__carlo_8hpp.html#aa8b4fc86b26f0e3e253ba5556d2d14dc":[3,0,0,3,6],
|
||||
"monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826":[3,0,0,3,1],
|
||||
"monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958":[3,0,0,3,0],
|
||||
"monte__carlo_8hpp_source.html":[3,0,0,3],
|
||||
"monte__carlo_8hpp.html":[3,0,0,2],
|
||||
"monte__carlo_8hpp.html#a1549fc386bd3cdd1cdbe0261b9dd8415":[3,0,0,2,5],
|
||||
"monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21":[3,0,0,2,3],
|
||||
"monte__carlo_8hpp.html#a781d946de16211ba18ad6671a5b6838d":[3,0,0,2,4],
|
||||
"monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771":[3,0,0,2,0],
|
||||
"monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd":[3,0,0,2,1],
|
||||
"monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226":[3,0,0,2,2],
|
||||
"monte__carlo_8hpp_source.html":[3,0,0,2],
|
||||
"pages.html":[],
|
||||
"pd__estimate_8py_source.html":[3,0,1,0,1],
|
||||
"phase__transition_8py_source.html":[3,0,1,0,2],
|
||||
"phase__transition__mpi_8cpp.html":[3,0,1,5],
|
||||
"phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627":[3,0,1,5,0],
|
||||
"phase__transition__mpi_8cpp_source.html":[3,0,1,5],
|
||||
"test__suite_8cpp.html":[3,0,1,6],
|
||||
"test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4":[3,0,1,6,1],
|
||||
"test__suite_8cpp_source.html":[3,0,1,6],
|
||||
"testlib_8cpp.html":[3,0,1,7],
|
||||
"testlib_8cpp.html#a39abb7cba0535176ed62aae136d2fcc7":[3,0,1,7,0],
|
||||
"testlib_8cpp_source.html":[3,0,1,7],
|
||||
"testlib_8hpp.html":[3,0,0,4],
|
||||
"testlib_8hpp.html#a39abb7cba0535176ed62aae136d2fcc7":[3,0,0,4,1],
|
||||
"testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9":[3,0,0,4,0],
|
||||
"testlib_8hpp_source.html":[3,0,0,4],
|
||||
"typedefs_8hpp.html":[3,0,0,5],
|
||||
"typedefs_8hpp_source.html":[3,0,0,5],
|
||||
"utils_8cpp.html":[3,0,1,8],
|
||||
"utils_8cpp.html#a2b45adc86b70f42021582994e83fa00d":[3,0,1,8,1],
|
||||
"utils_8cpp.html#a3529a74fd2a25d24de73d9d4e1c90835":[3,0,1,8,3],
|
||||
"utils_8cpp.html#ab3e89176433ddc9ba721b2eba3d08357":[3,0,1,8,2],
|
||||
"utils_8cpp.html#aed026119193a9bbe076671809ff0f430":[3,0,1,8,0],
|
||||
"utils_8cpp_source.html":[3,0,1,8],
|
||||
"utils_8hpp.html":[3,0,0,6],
|
||||
"utils_8hpp.html#a178c4922157666a6e9c127c2ffd96346":[3,0,0,6,3],
|
||||
"utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d":[3,0,0,6,4],
|
||||
"utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835":[3,0,0,6,6],
|
||||
"utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168":[3,0,0,6,0],
|
||||
"utils_8hpp.html#ab3e89176433ddc9ba721b2eba3d08357":[3,0,0,6,5],
|
||||
"utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b":[3,0,0,6,1],
|
||||
"utils_8hpp.html#aed026119193a9bbe076671809ff0f430":[3,0,0,6,2],
|
||||
"utils_8hpp_source.html":[3,0,0,6]
|
||||
"pd__estimate_8cpp.html":[3,0,1,5],
|
||||
"pd__estimate_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627":[3,0,1,5,0],
|
||||
"pd__estimate_8cpp.html#ac907e18135856c90366aaa599a9e10b1":[3,0,1,5,1],
|
||||
"pd__estimate_8cpp_source.html":[3,0,1,5],
|
||||
"phase__transition_8cpp.html":[3,0,1,6],
|
||||
"phase__transition_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627":[3,0,1,6,0],
|
||||
"phase__transition_8cpp.html#ac907e18135856c90366aaa599a9e10b1":[3,0,1,6,1],
|
||||
"phase__transition_8cpp_source.html":[3,0,1,6],
|
||||
"phase__transition__mpi_8cpp.html":[3,0,1,7],
|
||||
"phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627":[3,0,1,7,0],
|
||||
"phase__transition__mpi_8cpp.html#ac907e18135856c90366aaa599a9e10b1":[3,0,1,7,1],
|
||||
"phase__transition__mpi_8cpp_source.html":[3,0,1,7],
|
||||
"test__suite_8cpp.html":[3,0,1,8],
|
||||
"test__suite_8cpp.html#a00367775d110a9537bd06bde2e630471":[3,0,1,8,2],
|
||||
"test__suite_8cpp.html#a9fd092d930430eb4693d93e0c9066605":[3,0,1,8,3],
|
||||
"test__suite_8cpp.html#ad27c84dda71475ffd365c649b525199e":[3,0,1,8,4],
|
||||
"test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4":[3,0,1,8,5],
|
||||
"test__suite_8cpp.html#af02dd88b4d495baf7af5826d1481634c":[3,0,1,8,1],
|
||||
"test__suite_8cpp_source.html":[3,0,1,8],
|
||||
"testlib_8cpp.html":[3,0,1,9],
|
||||
"testlib_8cpp.html#a39abb7cba0535176ed62aae136d2fcc7":[3,0,1,9,0],
|
||||
"testlib_8cpp_source.html":[3,0,1,9],
|
||||
"testlib_8hpp.html":[3,0,0,3],
|
||||
"testlib_8hpp.html#a2cbf3a45367e903de6efbdbea3344cea":[3,0,0,3,2],
|
||||
"testlib_8hpp.html#a39abb7cba0535176ed62aae136d2fcc7":[3,0,0,3,5],
|
||||
"testlib_8hpp.html#a3db67d8721d2f3cd626526b43186bcf3":[3,0,0,3,4],
|
||||
"testlib_8hpp.html#a44f47fa3c8654c09712572d75c0ffa7f":[3,0,0,3,3],
|
||||
"testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9":[3,0,0,3,0],
|
||||
"testlib_8hpp.html#ab6585c8aa8c276a3442c67a57c8de6fb":[3,0,0,3,1],
|
||||
"testlib_8hpp_source.html":[3,0,0,3],
|
||||
"time_8cpp.html":[3,0,1,10],
|
||||
"time_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627":[3,0,1,10,0],
|
||||
"time_8cpp.html#aa224066f42c47cae5fbd457c1948e4a5":[3,0,1,10,1],
|
||||
"time_8cpp.html#ac907e18135856c90366aaa599a9e10b1":[3,0,1,10,3],
|
||||
"time_8cpp.html#ace9eb0821fe4edf19cf2e7d8ffe6efb4":[3,0,1,10,2],
|
||||
"time_8cpp_source.html":[3,0,1,10],
|
||||
"utils_8cpp.html":[3,0,1,11],
|
||||
"utils_8cpp.html#a2b45adc86b70f42021582994e83fa00d":[3,0,1,11,2],
|
||||
"utils_8cpp.html#a3529a74fd2a25d24de73d9d4e1c90835":[3,0,1,11,4],
|
||||
"utils_8cpp.html#ab3e89176433ddc9ba721b2eba3d08357":[3,0,1,11,3],
|
||||
"utils_8cpp.html#ae91fad89394d745d544737e43524bde6":[3,0,1,11,0],
|
||||
"utils_8cpp.html#aed026119193a9bbe076671809ff0f430":[3,0,1,11,1],
|
||||
"utils_8cpp_source.html":[3,0,1,11],
|
||||
"utils_8hpp.html":[3,0,0,4],
|
||||
"utils_8hpp.html#a178c4922157666a6e9c127c2ffd96346":[3,0,0,4,4],
|
||||
"utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d":[3,0,0,4,5],
|
||||
"utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835":[3,0,0,4,7],
|
||||
"utils_8hpp.html#a60dca3177fb9cb5256609adc7af55168":[3,0,0,4,0],
|
||||
"utils_8hpp.html#ab3e89176433ddc9ba721b2eba3d08357":[3,0,0,4,6],
|
||||
"utils_8hpp.html#ae91fad89394d745d544737e43524bde6":[3,0,0,4,2],
|
||||
"utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b":[3,0,0,4,1],
|
||||
"utils_8hpp.html#aed026119193a9bbe076671809ff0f430":[3,0,0,4,3],
|
||||
"utils_8hpp_source.html":[3,0,0,4]
|
||||
};
|
||||
|
||||
201
docs/pd__estimate_8cpp.html
Normal file
201
docs/pd__estimate_8cpp.html
Normal file
@@ -0,0 +1,201 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: src/pd_estimate.cpp File 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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('pd__estimate_8cpp.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">pd_estimate.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>execute the mcmc algorithm and write data to file after each Monte Carlo cycles.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include "<a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="monte__carlo_8hpp_source.html">monte_carlo.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||
<code>#include <getopt.h></code><br />
|
||||
<code>#include <omp.h></code><br />
|
||||
<code>#include <string></code><br />
|
||||
</div>
|
||||
<p><a href="pd__estimate_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ac907e18135856c90366aaa599a9e10b1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="pd__estimate_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a> (std::string filename)</td></tr>
|
||||
<tr class="memdesc:ac907e18135856c90366aaa599a9e10b1"><td class="mdescLeft"> </td><td class="mdescRight">A function that displays how to use the program and quits. <br /></td></tr>
|
||||
<tr class="separator:ac907e18135856c90366aaa599a9e10b1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="pd__estimate_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
|
||||
<tr class="memdesc:a3c04138a5bfe5d72780bb7e82a18e627"><td class="mdescLeft"> </td><td class="mdescRight">The main function. <br /></td></tr>
|
||||
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>execute the mcmc algorithm and write data to file after each Monte Carlo cycles. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000010">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="pd__estimate_8cpp_source.html">pd_estimate.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a3c04138a5bfe5d72780bb7e82a18e627" name="a3c04138a5bfe5d72780bb7e82a18e627"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3c04138a5bfe5d72780bb7e82a18e627">◆ </a></span>main()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int main </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>argc</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">char ** </td>
|
||||
<td class="paramname"><em>argv</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>The main function. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="pd__estimate_8cpp_source.html#l00034">34</a> of file <a class="el" href="pd__estimate_8cpp_source.html">pd_estimate.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac907e18135856c90366aaa599a9e10b1" name="ac907e18135856c90366aaa599a9e10b1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac907e18135856c90366aaa599a9e10b1">◆ </a></span>usage()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void usage </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>filename</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>A function that displays how to use the program and quits. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="pd__estimate_8cpp_source.html#l00022">22</a> of file <a class="el" href="pd__estimate_8cpp_source.html">pd_estimate.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="pd__estimate_8cpp.html">pd_estimate.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
5
docs/pd__estimate_8cpp.js
Normal file
5
docs/pd__estimate_8cpp.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var pd__estimate_8cpp =
|
||||
[
|
||||
[ "main", "pd__estimate_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627", null ],
|
||||
[ "usage", "pd__estimate_8cpp.html#ac907e18135856c90366aaa599a9e10b1", null ]
|
||||
];
|
||||
197
docs/pd__estimate_8cpp_source.html
Normal file
197
docs/pd__estimate_8cpp_source.html
Normal file
@@ -0,0 +1,197 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: src/pd_estimate.cpp 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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('pd__estimate_8cpp_source.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">pd_estimate.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="pd__estimate_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/** @file pd_estimate.cpp</span></div>
|
||||
<div class="line"><span class="lineno"> 2</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 3</span><span class="comment"> * @author Cory Alexander Balaton (coryab)</span></div>
|
||||
<div class="line"><span class="lineno"> 4</span><span class="comment"> * @author Janita Ovidie Sandtrøen Willumsen (janitaws)</span></div>
|
||||
<div class="line"><span class="lineno"> 5</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 6</span><span class="comment"> * @version 1.0</span></div>
|
||||
<div class="line"><span class="lineno"> 7</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 8</span><span class="comment"> * @brief execute the mcmc algorithm and write data to file after each</span></div>
|
||||
<div class="line"><span class="lineno"> 9</span><span class="comment"> * Monte Carlo cycles.</span></div>
|
||||
<div class="line"><span class="lineno"> 10</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 11</span><span class="comment"> * @bug No known bugs</span></div>
|
||||
<div class="line"><span class="lineno"> 12</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="data__type_8hpp.html" title="Header for the data_t type.">"data_type.hpp"</a></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="monte__carlo_8hpp.html" title="Functions for Monte Carlo simulations.">"monte_carlo.hpp"</a></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="utils_8hpp.html" title="Function prototypes and macros that are useful.">"utils.hpp"</a></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">getopt</span><span class="preprocessor">.</span><span class="preprocessor">h</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">omp</span><span class="preprocessor">.</span><span class="preprocessor">h</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">string</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">/** @brief A function that displays how to use the program and quits.*/</span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="pd__estimate_8cpp.html#ac907e18135856c90366aaa599a9e10b1"> 22</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a>(std::string filename)</div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span>{</div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> std::cout << <span class="stringliteral">"Usage: "</span> << filename</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> << <span class="stringliteral">" <temperature> <lattice size> "</span></div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="stringliteral">"<cycles> <burn-in-time> <output file>\n\n"</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> << <span class="stringliteral">"\t[ -h | --help ]\n"</span>;</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> exit(-1);</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>}</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="comment">/** @brief The main function</span></div>
|
||||
<div class="line"><span class="lineno"> 32</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 33</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="pd__estimate_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 34</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span>{</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// Command options</span></div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">struct</span> option long_options[] = {{<span class="stringliteral">"help"</span>, 0, 0, 0}, {NULL, 0, NULL, 0}};</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordtype">int</span> option_index = -1;</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordtype">int</span> c;</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> c = getopt_long(argc, argv, <span class="stringliteral">"h"</span>, long_options, &option_index);</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">if</span> (c == -1)</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <span class="keywordflow">switch</span> (c) {</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">case</span> 0:</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">switch</span> (option_index) {</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">case</span> 0: <span class="comment">// Not a mistake. This just goes to the default.</span></div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> }</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">case</span> <span class="stringliteral">'h'</span>:</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> }</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> }</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="comment">// Check that the number of arguments is at least 8.</span></div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keywordflow">if</span> (argc < 6) {</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> }</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> </div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="comment">// Timing variables</span></div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordtype">double</span> t0, t1;</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> t0 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="comment">// Define/initialize variables</span></div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordtype">double</span> temp = atoi(argv[1]);</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">int</span> L = atoi(argv[2]), cycles = atoi(argv[3]), burn_in_time = atoi(argv[4]);</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> std::string outfile = argv[5];</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> </div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">pd_estimate</a><a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">(</a>temp<a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">,</a> L<a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">,</a> cycles<a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">,</a> outfile<a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">,</a> burn_in_time<a class="code hl_function" href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">)</a>;</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> t1 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> std::cout << <span class="stringliteral">"Time: "</span> << t1 - t0 << <span class="stringliteral">" seconds\n"</span>;</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span>}</div>
|
||||
<div class="ttc" id="amain_8cpp_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdoc">The main function.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00125">main.cpp:125</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_ac907e18135856c90366aaa599a9e10b1"><div class="ttname"><a href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a></div><div class="ttdeci">void usage(std::string filename)</div><div class="ttdoc">A function that displays how to use the program and quits.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00110">main.cpp:110</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_aea2dd1b5fac7c45633bc6f8dc4541226"><div class="ttname"><a href="monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226">montecarlo::pd_estimate</a></div><div class="ttdeci">void pd_estimate(double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Estimate the probability distribution for the energy.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00091">monte_carlo.cpp:91</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="pd__estimate_8cpp.html">pd_estimate.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
202
docs/phase__transition_8cpp.html
Normal file
202
docs/phase__transition_8cpp.html
Normal file
@@ -0,0 +1,202 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: src/phase_transition.cpp File 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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('phase__transition_8cpp.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">phase_transition.cpp File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
|
||||
<p>Sweep over different temperatures and generate data.
|
||||
<a href="#details">More...</a></p>
|
||||
<div class="textblock"><code>#include "<a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="monte__carlo_8hpp_source.html">monte_carlo.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||
<code>#include <getopt.h></code><br />
|
||||
<code>#include <omp.h></code><br />
|
||||
<code>#include <string></code><br />
|
||||
</div>
|
||||
<p><a href="phase__transition_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ac907e18135856c90366aaa599a9e10b1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="phase__transition_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a> (std::string filename)</td></tr>
|
||||
<tr class="memdesc:ac907e18135856c90366aaa599a9e10b1"><td class="mdescLeft"> </td><td class="mdescRight">A function that displays how to use the program and quits. <br /></td></tr>
|
||||
<tr class="separator:ac907e18135856c90366aaa599a9e10b1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="phase__transition_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
|
||||
<tr class="memdesc:a3c04138a5bfe5d72780bb7e82a18e627"><td class="mdescLeft"> </td><td class="mdescRight">The main function. <br /></td></tr>
|
||||
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Sweep over different temperatures and generate data. </p>
|
||||
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
|
||||
<p>This program takes in 4 arguments: the start temperature, the end temperature, the amount of temperature points to simulate, and the amount of monte carlo samples to collect, in that order.</p>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000011">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="phase__transition_8cpp_source.html">phase_transition.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="a3c04138a5bfe5d72780bb7e82a18e627" name="a3c04138a5bfe5d72780bb7e82a18e627"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a3c04138a5bfe5d72780bb7e82a18e627">◆ </a></span>main()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int main </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>argc</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">char ** </td>
|
||||
<td class="paramname"><em>argv</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>The main function. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="phase__transition_8cpp_source.html#l00035">35</a> of file <a class="el" href="phase__transition_8cpp_source.html">phase_transition.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac907e18135856c90366aaa599a9e10b1" name="ac907e18135856c90366aaa599a9e10b1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac907e18135856c90366aaa599a9e10b1">◆ </a></span>usage()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void usage </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>filename</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>A function that displays how to use the program and quits. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="phase__transition_8cpp_source.html#l00025">25</a> of file <a class="el" href="phase__transition_8cpp_source.html">phase_transition.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="phase__transition_8cpp.html">phase_transition.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
5
docs/phase__transition_8cpp.js
Normal file
5
docs/phase__transition_8cpp.js
Normal file
@@ -0,0 +1,5 @@
|
||||
var phase__transition_8cpp =
|
||||
[
|
||||
[ "main", "phase__transition_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627", null ],
|
||||
[ "usage", "phase__transition_8cpp.html#ac907e18135856c90366aaa599a9e10b1", null ]
|
||||
];
|
||||
201
docs/phase__transition_8cpp_source.html
Normal file
201
docs/phase__transition_8cpp_source.html
Normal file
@@ -0,0 +1,201 @@
|
||||
<!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" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.6"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>2 Dimensional Ising Model: src/phase_transition.cpp 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="navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="resize.js"></script>
|
||||
<script type="text/javascript" src="navtreedata.js"></script>
|
||||
<script type="text/javascript" src="navtree.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>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-awesome.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 id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">2 Dimensional Ising Model
|
||||
</div>
|
||||
<div id="projectbrief">Simulate the change in energy and magnetization in a ferro magnet</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.6 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(document).ready(function(){initNavTree('phase__transition_8cpp_source.html',''); initResizable(); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- 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">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">phase_transition.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="phase__transition_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/** @file phase_transition.cpp</span></div>
|
||||
<div class="line"><span class="lineno"> 2</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 3</span><span class="comment"> * @author Cory Alexander Balaton (coryab)</span></div>
|
||||
<div class="line"><span class="lineno"> 4</span><span class="comment"> * @author Janita Ovidie Sandtrøen Willumsen (janitaws)</span></div>
|
||||
<div class="line"><span class="lineno"> 5</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 6</span><span class="comment"> * @version 1.0</span></div>
|
||||
<div class="line"><span class="lineno"> 7</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 8</span><span class="comment"> * @brief Sweep over different temperatures and generate data.</span></div>
|
||||
<div class="line"><span class="lineno"> 9</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 10</span><span class="comment"> * @details This program takes in 4 arguments: the start temperature,</span></div>
|
||||
<div class="line"><span class="lineno"> 11</span><span class="comment"> * the end temperature, the amount of temperature points to simulate, and</span></div>
|
||||
<div class="line"><span class="lineno"> 12</span><span class="comment"> * the amount of monte carlo samples to collect, in that order.</span></div>
|
||||
<div class="line"><span class="lineno"> 13</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 14</span><span class="comment"> * @bug No known bugs</span></div>
|
||||
<div class="line"><span class="lineno"> 15</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="data__type_8hpp.html" title="Header for the data_t type.">"data_type.hpp"</a></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="monte__carlo_8hpp.html" title="Functions for Monte Carlo simulations.">"monte_carlo.hpp"</a></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="utils_8hpp.html" title="Function prototypes and macros that are useful.">"utils.hpp"</a></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">getopt</span><span class="preprocessor">.</span><span class="preprocessor">h</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">omp</span><span class="preprocessor">.</span><span class="preprocessor">h</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">string</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">/** @brief A function that displays how to use the program and quits.*/</span></div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="phase__transition_8cpp.html#ac907e18135856c90366aaa599a9e10b1"> 25</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a>(std::string filename)</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>{</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> std::cout << <span class="stringliteral">"Usage: "</span> << filename</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> << <span class="stringliteral">" <start temperature> <end temperature> <points> "</span></div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="stringliteral">"<lattice size> <cycles> <burn-in-time> <output file>\n\n"</span></div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> << <span class="stringliteral">"\t[ -h | --help ]\n"</span>;</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> exit(-1);</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span>}</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="comment">/** @brief The main function.*/</span></div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="phase__transition_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 35</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span>{</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// Command options</span></div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">struct</span> option long_options[] = {{<span class="stringliteral">"help"</span>, 0, 0, 0}, {NULL, 0, NULL, 0}};</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="keywordtype">int</span> option_index = -1;</div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordtype">int</span> c;</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> c = getopt_long(argc, argv, <span class="stringliteral">"h"</span>, long_options, &option_index);</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">if</span> (c == -1)</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">switch</span> (c) {</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">case</span> 0:</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordflow">switch</span> (option_index) {</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">case</span> 0: <span class="comment">// Not a mistake. This just goes to the default.</span></div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> }</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordflow">case</span> <span class="stringliteral">'h'</span>:</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> }</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> }</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="comment">// Check that the number of arguments is at least 8.</span></div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="keywordflow">if</span> (argc < 8) {</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> }</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="comment">// Timing variables</span></div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keywordtype">double</span> t0, t1;</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> t0 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="comment">// Define/initialize variables</span></div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> <span class="keywordtype">double</span> start = atof(argv[1]), end = atof(argv[2]);</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordtype">int</span> points = atoi(argv[3]), cycles = atoi(argv[5]), L = atoi(argv[4]),</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> burn_in_time = atoi(argv[6]), N = L * L;</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> std::string outfile = argv[7];</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">phase_transition</a>(L, start, end, points, cycles,</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">mcmc_parallel</a>, outfile, burn_in_time);</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> t1 = omp_get_wtime();</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> std::cout << <span class="stringliteral">"Time: "</span> << t1 - t0 << <span class="stringliteral">" seconds\n"</span>;</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>}</div>
|
||||
<div class="ttc" id="amain_8cpp_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdoc">The main function.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00125">main.cpp:125</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_ac907e18135856c90366aaa599a9e10b1"><div class="ttname"><a href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a></div><div class="ttdeci">void usage(std::string filename)</div><div class="ttdoc">A function that displays how to use the program and quits.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00110">main.cpp:110</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_a34e9c3e24f26760693266b8a7b6b3d21"><div class="ttname"><a href="monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21">montecarlo::phase_transition</a></div><div class="ttdeci">void phase_transition(int L, double start_T, double end_T, int points_T, int cycles, std::function< data_t(int, double, int, int)> monte_carlo, std::string outfile, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Perform the MCMC algorithm using a range of temperatures.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00169">monte_carlo.cpp:169</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_ae1e7f904ecfc3d8f3c4dd1ef155dd771"><div class="ttname"><a href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">montecarlo::mcmc_parallel</a></div><div class="ttdeci">data_t mcmc_parallel(int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00141">monte_carlo.cpp:141</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="phase__transition_8cpp.html">phase_transition.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -109,17 +109,17 @@ $(document).ready(function(){initNavTree('phase__transition__mpi_8cpp.html','');
|
||||
<div class="textblock"><code>#include "<a class="el" href="data__type_8hpp_source.html">data_type.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="monte__carlo_8hpp_source.html">monte_carlo.hpp</a>"</code><br />
|
||||
<code>#include "<a class="el" href="utils_8hpp_source.html">utils.hpp</a>"</code><br />
|
||||
<code>#include <algorithm></code><br />
|
||||
<code>#include <fstream></code><br />
|
||||
<code>#include <iostream></code><br />
|
||||
<code>#include <iterator></code><br />
|
||||
<code>#include <getopt.h></code><br />
|
||||
<code>#include <mpi.h></code><br />
|
||||
<code>#include <sstream></code><br />
|
||||
<code>#include <string></code><br />
|
||||
</div>
|
||||
<p><a href="phase__transition__mpi_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ac907e18135856c90366aaa599a9e10b1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="phase__transition__mpi_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a> (std::string filename)</td></tr>
|
||||
<tr class="memdesc:ac907e18135856c90366aaa599a9e10b1"><td class="mdescLeft"> </td><td class="mdescRight">A function that displays how to use the program and quits. <br /></td></tr>
|
||||
<tr class="separator:ac907e18135856c90366aaa599a9e10b1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
|
||||
<tr class="memdesc:a3c04138a5bfe5d72780bb7e82a18e627"><td class="mdescLeft"> </td><td class="mdescRight">The main function. <br /></td></tr>
|
||||
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -130,6 +130,7 @@ Functions</h2></td></tr>
|
||||
<dd>
|
||||
Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
<dl class="section version"><dt>Version</dt><dd>1.0</dd></dl>
|
||||
<p>This program takes in 4 arguments: the start temperature, the end temperature, the amount of temperature points to simulate, and the amount of monte carlo samples to collect, in that order.</p>
|
||||
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000012">Bug:</a></b></dt><dd>No known bugs </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="phase__transition__mpi_8cpp_source.html">phase_transition_mpi.cpp</a>.</p>
|
||||
@@ -162,7 +163,29 @@ Janita Ovidie Sandtrøen Willumsen (janitaws)</dd></dl>
|
||||
|
||||
<p>The main function. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="phase__transition__mpi_8cpp_source.html#l00024">24</a> of file <a class="el" href="phase__transition__mpi_8cpp_source.html">phase_transition_mpi.cpp</a>.</p>
|
||||
<p class="definition">Definition at line <a class="el" href="phase__transition__mpi_8cpp_source.html#l00038">38</a> of file <a class="el" href="phase__transition__mpi_8cpp_source.html">phase_transition_mpi.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ac907e18135856c90366aaa599a9e10b1" name="ac907e18135856c90366aaa599a9e10b1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ac907e18135856c90366aaa599a9e10b1">◆ </a></span>usage()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void usage </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">std::string </td>
|
||||
<td class="paramname"><em>filename</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>A function that displays how to use the program and quits. </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="phase__transition__mpi_8cpp_source.html#l00025">25</a> of file <a class="el" href="phase__transition__mpi_8cpp_source.html">phase_transition_mpi.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
var phase__transition__mpi_8cpp =
|
||||
[
|
||||
[ "main", "phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627", null ]
|
||||
[ "main", "phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627", null ],
|
||||
[ "usage", "phase__transition__mpi_8cpp.html#ac907e18135856c90366aaa599a9e10b1", null ]
|
||||
];
|
||||
@@ -101,129 +101,188 @@ $(document).ready(function(){initNavTree('phase__transition__mpi_8cpp_source.htm
|
||||
<div class="headertitle"><div class="title">phase_transition_mpi.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="phase__transition__mpi_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#include "<a class="code" href="data__type_8hpp.html">data_type.hpp</a>"</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include "<a class="code" href="monte__carlo_8hpp.html">monte_carlo.hpp</a>"</span></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include "<a class="code" href="utils_8hpp.html">utils.hpp</a>"</span></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include <algorithm></span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include <fstream></span></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#include <iostream></span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include <iterator></span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include <mpi.h></span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include <sstream></span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> </div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 24</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span>{</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> <span class="keywordflow">if</span> (argc < 5) {</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> std::cout << <span class="stringliteral">"You need at least 4 arguments"</span> << std::endl;</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> abort();</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> }</div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordtype">double</span> t0, t1;</div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> t0 = MPI_Wtime();</div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordtype">double</span> start = atof(argv[1]), end = atof(argv[2]);</div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordtype">int</span> points = atoi(argv[3]), N;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordtype">int</span> lattice_sizes[] = {20, 40, 60, 80, 100};</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordtype">double</span> dt = (end - start) / points;</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordtype">int</span> cycles = atoi(argv[4]);</div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> std::ofstream ofile;</div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data[points];</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="comment">// MPI stuff</span></div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordtype">int</span> rank, cluster_size;</div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="comment">// Initialize MPI</span></div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> MPI_Init(&argc, &argv);</div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="comment">// Get the cluster size and rank</span></div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> MPI_Comm_size(MPI_COMM_WORLD, &cluster_size);</div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> MPI_Comm_rank(MPI_COMM_WORLD, &rank);</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> </div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keywordtype">int</span> remainder = points % cluster_size;</div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordtype">double</span> i_start;</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordtype">int</span> i_points;</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="comment">// Distribute temperature points</span></div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">if</span> (rank < remainder) {</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> i_points = points / cluster_size + 1;</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> i_start = start + dt * i_points * rank;</div>
|
||||
<a href="phase__transition__mpi_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/** @file phase_transition_mpi.cpp</span></div>
|
||||
<div class="line"><span class="lineno"> 2</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 3</span><span class="comment"> * @author Cory Alexander Balaton (coryab)</span></div>
|
||||
<div class="line"><span class="lineno"> 4</span><span class="comment"> * @author Janita Ovidie Sandtrøen Willumsen (janitaws)</span></div>
|
||||
<div class="line"><span class="lineno"> 5</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 6</span><span class="comment"> * @version 1.0</span></div>
|
||||
<div class="line"><span class="lineno"> 7</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 8</span><span class="comment"> * @brief Sweep over different temperatures and generate data.</span></div>
|
||||
<div class="line"><span class="lineno"> 9</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 10</span><span class="comment"> * @details This program takes in 4 arguments: the start temperature,</span></div>
|
||||
<div class="line"><span class="lineno"> 11</span><span class="comment"> * the end temperature, the amount of temperature points to simulate, and</span></div>
|
||||
<div class="line"><span class="lineno"> 12</span><span class="comment"> * the amount of monte carlo samples to collect, in that order.</span></div>
|
||||
<div class="line"><span class="lineno"> 13</span><span class="comment"> *</span></div>
|
||||
<div class="line"><span class="lineno"> 14</span><span class="comment"> * @bug No known bugs</span></div>
|
||||
<div class="line"><span class="lineno"> 15</span><span class="comment"> * */</span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="data__type_8hpp.html" title="Header for the data_t type.">"data_type.hpp"</a></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="monte__carlo_8hpp.html" title="Functions for Monte Carlo simulations.">"monte_carlo.hpp"</a></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="utils_8hpp.html" title="Function prototypes and macros that are useful.">"utils.hpp"</a></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">getopt</span><span class="preprocessor">.</span><span class="preprocessor">h</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">mpi</span><span class="preprocessor">.</span><span class="preprocessor">h</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#</span><span class="preprocessor">include</span> <span class="preprocessor"><</span><span class="preprocessor">string</span><span class="preprocessor">></span></div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">/** @brief A function that displays how to use the program and quits.*/</span></div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="phase__transition__mpi_8cpp.html#ac907e18135856c90366aaa599a9e10b1"> 25</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a>(std::string filename)</div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span>{</div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> std::cout</div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> << <span class="stringliteral">"Usage: "</span> << filename</div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> << <span class="stringliteral">" <start temperature> <end temperature> <lattice size> "</span></div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="stringliteral">"<points> <cycles> <burn-in-time> <output file>\n"</span></div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> << <span class="stringliteral">"This should be used with mpiexec or mpirun for maximum "</span></div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="stringliteral">"performance\n\n"</span></div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> << <span class="stringliteral">"\t[ -h | --help ]\n"</span>;</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> exit(-1);</div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span>}</div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="comment">/** @brief The main function.*/</span></div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627"> 38</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span>{</div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> <span class="comment">// Command options</span></div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">struct</span> option long_options[] = {{<span class="stringliteral">"help"</span>, 0, 0, 0}, {NULL, 0, NULL, 0}};</div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordtype">int</span> option_index = -1;</div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordtype">int</span> c;</div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">while</span> (<span class="keyword">true</span>) {</div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> c = getopt_long(argc, argv, <span class="stringliteral">"h"</span>, long_options, &option_index);</div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">if</span> (c == -1)</div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">switch</span> (c) {</div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">case</span> 0:</div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keywordflow">switch</span> (option_index) {</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keywordflow">case</span> 0: <span class="comment">// Not a mistake. This just goes to the default.</span></div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> }</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> i_points = points / cluster_size;</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> i_start = start + dt * (i_points * rank + remainder);</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> }</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <a class="code hl_class" href="classdata__t.html">data_t</a> i_data[i_points];</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> std::cout << <span class="stringliteral">"Rank "</span> << rank << <span class="stringliteral">": "</span> << i_points << <span class="charliteral">','</span> << i_start << <span class="charliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> L : lattice_sizes) {</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> N = L * L;</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < i_points; i++) {</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> i_data[i] = <a class="code hl_function" href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a>(L, i_start + dt * i, cycles);</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">if</span> (rank == 0) {</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> std::copy_n(i_data, i_points, data);</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 1; i < cluster_size; i++) {</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordflow">if</span> (rank < remainder) {</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> MPI_Recv((<span class="keywordtype">void</span> *)i_data,</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keyword">sizeof</span>(<a class="code hl_class" href="classdata__t.html">data_t</a>) * (points / cluster_size + 1),</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> MPI_CHAR, i, MPI_ANY_TAG, MPI_COMM_WORLD,</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> MPI_STATUS_IGNORE);</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> std::copy_n(i_data, points / cluster_size + 1,</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> data + (points / cluster_size) * i);</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> }</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> MPI_Recv((<span class="keywordtype">void</span> *)i_data,</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keyword">sizeof</span>(<a class="code hl_class" href="classdata__t.html">data_t</a>) * (points / cluster_size), MPI_CHAR,</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> i, MPI_ANY_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE);</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> std::copy_n(i_data, points / cluster_size,</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> data + (points / cluster_size) * i + remainder);</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> }</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> }</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> std::stringstream outfile;</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> outfile << <span class="stringliteral">"output/phase_transition/size_"</span> << L << <span class="stringliteral">".txt"</span>;</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> utils::mkpath(utils::dirname(outfile.str()));</div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> ofile.open(outfile.str());</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keywordflow">break</span>;</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keywordflow">case</span> <span class="stringliteral">'h'</span>:</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">default</span>:</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> }</div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> }</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="comment">// Check that the number of arguments is at least 8.</span></div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordflow">if</span> (argc < 8) {</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> usage(argv[0]);</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> }</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="comment">// Timing variables</span></div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordtype">double</span> t0, t1;</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> t0 = MPI_Wtime();</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="comment">// Define/initialize variables</span></div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <span class="keywordtype">double</span> start = atof(argv[1]), end = atof(argv[2]);</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="keywordtype">int</span> points = atoi(argv[3]), cycles = atoi(argv[5]), L = atoi(argv[4]),</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> burn_in_time = atoi(argv[6]), N = L * L;</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordtype">double</span> dt = (end - start) / points;</div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> std::ofstream ofile;</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> std::string outfile = argv[7];</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data[points];</div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> </div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="comment">// MPI specific variables</span></div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="keywordtype">int</span> rank, cluster_size;</div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="comment">// Initialize MPI</span></div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> MPI_Init(&argc, &argv);</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> </div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="comment">// Get the cluster size and rank</span></div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> MPI_Comm_size(MPI_COMM_WORLD, &cluster_size);</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> MPI_Comm_rank(MPI_COMM_WORLD, &rank);</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> </div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordtype">int</span> remainder = points % cluster_size;</div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordtype">double</span> i_start; <span class="comment">// What temperature to start from</span></div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordtype">int</span> i_points; <span class="comment">// How many points to simulate</span></div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> </div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordtype">double</span> temp, CV, X;</div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keyword">using </span>utils::scientific_format;</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < points; i++) {</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> temp = start + dt * i;</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> CV = (data[i].E2 - data[i].E * data[i].E)</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> / ((<span class="keywordtype">double</span>)N * temp * temp);</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> X = (data[i].M2 - data[i].M_abs * data[i].M_abs)</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> / ((<span class="keywordtype">double</span>)N * temp);</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="comment">// Distribute temperature points</span></div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">if</span> (rank < remainder) {</div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> i_points = points / cluster_size + 1;</div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> i_start = start + dt * i_points * rank;</div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> }</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> i_points = points / cluster_size;</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> i_start = start + dt * (i_points * rank + remainder);</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> }</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> </div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> ofile << scientific_format(temp) << <span class="charliteral">','</span></div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> << scientific_format(data[i].E / N) << <span class="charliteral">','</span></div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> << scientific_format(data[i].M_abs / N) << <span class="charliteral">','</span></div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> << scientific_format(CV) << <span class="charliteral">','</span> << scientific_format(X)</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> << <span class="charliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> }</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> ofile.close();</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="comment">// Initialize array to contains data for each temperature point</span></div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <a class="code hl_class" href="classdata__t.html">data_t</a> i_data[i_points];</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="comment">// Simulate and save data to array</span></div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordflow">for</span> (size_t i = 0; i < i_points; i++) {</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> i_data[i] = montecarlo<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">::</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">mcmc_parallel</a><a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">(</a>L<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">,</a> i_start + dt * i<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">,</a> cycles<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">,</a></div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> burn_in_time<a class="code hl_function" href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">)</a>;</div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> }</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> MPI_Send(i_data, i_points * <span class="keyword">sizeof</span>(<a class="code hl_class" href="classdata__t.html">data_t</a>), MPI_CHAR, 0, rank,</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> MPI_COMM_WORLD);</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> }</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> }</div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> t1 = MPI_Wtime();</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> </div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">if</span> (rank == 0) {</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> std::cout << <span class="stringliteral">"Time: "</span> << t1 - t0 << <span class="stringliteral">" seconds\n"</span>;</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> }</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> MPI_Finalize();</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span>}</div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00018">data_type.hpp:18</a></div></div>
|
||||
<div class="ttc" id="adata__type_8hpp_html"><div class="ttname"><a href="data__type_8hpp.html">data_type.hpp</a></div><div class="ttdoc">Header for the data_t type.</div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html"><div class="ttname"><a href="monte__carlo_8hpp.html">monte_carlo.hpp</a></div><div class="ttdoc">Functions for monte carlo simulations.</div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_acc34e2049a5030874f6f548f3adab958"><div class="ttname"><a href="monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958">monte_carlo_parallel</a></div><div class="ttdeci">data_t monte_carlo_parallel(int L, double T, int cycles)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00128">monte_carlo.cpp:128</a></div></div>
|
||||
<div class="ttc" id="atest__suite_8cpp_html_ae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">The main function.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00148">test_suite.cpp:148</a></div></div>
|
||||
<div class="ttc" id="autils_8hpp_html"><div class="ttname"><a href="utils_8hpp.html">utils.hpp</a></div><div class="ttdoc">Function prototypes and macros that are useful.</div></div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="comment">// Rank 0 collects all the data and copies it to the "master"</span></div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="comment">// data array.</span></div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordflow">if</span> (rank == 0) {</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="comment">// Copy its own i_data to the data array</span></div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> std::copy_n(i_data, i_points, data);</div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> </div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="comment">// Collect i_data from other ranks in order and copy to data.</span></div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <span class="keywordflow">for</span> (size_t i = 1; i < cluster_size; i++) {</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">if</span> (rank < remainder) {</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> MPI_Recv((<span class="keywordtype">void</span> *)i_data,</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> <span class="keyword">sizeof</span>(data_t) * (points / cluster_size + 1), MPI_CHAR,</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> i, MPI_ANY_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE);</div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> std::copy_n(i_data, points / cluster_size + 1,</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> data + (points / cluster_size) * i);</div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> }</div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> MPI_Recv((<span class="keywordtype">void</span> *)i_data,</div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="keyword">sizeof</span>(data_t) * (points / cluster_size), MPI_CHAR, i,</div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> MPI_ANY_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE);</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> std::copy_n(i_data, points / cluster_size,</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> data + (points / cluster_size) * i + remainder);</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> }</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> }</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="comment">// Write everything from data to file</span></div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> utils<a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">::</a><a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">mkpath</a><a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">(</a>utils<a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">::</a><a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">dirname</a><a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">(</a>outfile<a class="code hl_function" href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">)</a><a class="code hl_function" href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">)</a>;</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> ofile.open(outfile);</div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> </div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordtype">double</span> temp, CV, X;</div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> </div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> <span class="keyword">using</span> utils::scientific_format;</div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <span class="keywordflow">for</span> (size_t i = 0; i < points; i++) {</div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> temp = start + dt * i;</div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> CV = (data[i].E2 - data[i].E * data[i].E)</div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> / ((<span class="keywordtype">double</span>)N * temp * temp);</div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> X = (data[i].M2 - data[i].M_abs * data[i].M_abs)</div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> / ((<span class="keywordtype">double</span>)N * temp);</div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> ofile << <a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">scientific_format</a><a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">(</a>temp<a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">)</a> << <span class="stringliteral">','</span></div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> << scientific_format(data[i].E / N) << <span class="stringliteral">','</span></div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> << scientific_format(data[i].M_abs / N) << <span class="stringliteral">','</span></div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> << <a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">scientific_format</a><a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">(</a>CV<a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">)</a> << <span class="stringliteral">','</span> << <a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">scientific_format</a><a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">(</a>X<a class="code hl_function" href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">)</a></div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> << <span class="stringliteral">'\n'</span>;</div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> }</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> ofile.close();</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> }</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="comment">// For all other ranks, send the data to rank 0</span></div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> MPI_Send(i_data, i_points * <span class="keyword">sizeof</span>(data_t), MPI_CHAR, 0, rank,</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> MPI_COMM_WORLD);</div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> }</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> </div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> t1 = MPI_Wtime();</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> </div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordflow">if</span> (rank == 0) {</div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> std::cout << <span class="stringliteral">"Time: "</span> << t1 - t0 << <span class="stringliteral">" seconds\n"</span>;</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> }</div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> </div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> MPI_Finalize();</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span>}</div>
|
||||
<div class="ttc" id="aclassdata__t_html"><div class="ttname"><a href="classdata__t.html">data_t</a></div><div class="ttdoc">Type to use with the IsingModel class and montecarlo module.</div><div class="ttdef"><b>Definition:</b> <a href="data__type_8hpp_source.html#l00019">data_type.hpp:19</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdoc">The main function.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00125">main.cpp:125</a></div></div>
|
||||
<div class="ttc" id="amain_8cpp_html_ac907e18135856c90366aaa599a9e10b1"><div class="ttname"><a href="main_8cpp.html#ac907e18135856c90366aaa599a9e10b1">usage</a></div><div class="ttdeci">void usage(std::string filename)</div><div class="ttdoc">A function that displays how to use the program and quits.</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.html#l00110">main.cpp:110</a></div></div>
|
||||
<div class="ttc" id="amonte__carlo_8hpp_html_ae1e7f904ecfc3d8f3c4dd1ef155dd771"><div class="ttname"><a href="monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771">montecarlo::mcmc_parallel</a></div><div class="ttdeci">data_t mcmc_parallel(int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)</div><div class="ttdoc">Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel.</div><div class="ttdef"><b>Definition:</b> <a href="monte__carlo_8cpp_source.html#l00141">monte_carlo.cpp:141</a></div></div>
|
||||
<div class="ttc" id="autils_8hpp_html_a2b45adc86b70f42021582994e83fa00d"><div class="ttname"><a href="utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d">utils::mkpath</a></div><div class="ttdeci">bool mkpath(std::string path, int mode=0777)</div><div class="ttdoc">Make path given.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00032">utils.cpp:32</a></div></div>
|
||||
<div class="ttc" id="autils_8hpp_html_a3529a74fd2a25d24de73d9d4e1c90835"><div class="ttname"><a href="utils_8hpp.html#a3529a74fd2a25d24de73d9d4e1c90835">utils::scientific_format</a></div><div class="ttdeci">std::string scientific_format(double d, int width=20, int prec=10)</div><div class="ttdoc">Turns a double into a string written in scientific format.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00016">utils.cpp:16</a></div></div>
|
||||
<div class="ttc" id="autils_8hpp_html_aed026119193a9bbe076671809ff0f430"><div class="ttname"><a href="utils_8hpp.html#aed026119193a9bbe076671809ff0f430">utils::dirname</a></div><div class="ttdeci">std::string dirname(const std::string &path)</div><div class="ttdoc">Get the directory name of the path.</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00058">utils.cpp:58</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['assert_0',['ASSERT',['../testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9',1,'testlib.hpp']]]
|
||||
['assert_0',['ASSERT',['../testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9',1,'testlib.hpp']]],
|
||||
['assert_5feach_1',['assert_each',['../testlib_8hpp.html#ab6585c8aa8c276a3442c67a57c8de6fb',1,'testlib']]]
|
||||
];
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['utils_2ecpp_0',['utils.cpp',['../utils_8cpp.html',1,'']]],
|
||||
['utils_2ehpp_1',['utils.hpp',['../utils_8hpp.html',1,'']]]
|
||||
['x_5f2_0',['X_2',['../test__suite_8cpp.html#ad27c84dda71475ffd365c649b525199e',1,'test_suite.cpp']]]
|
||||
];
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
var searchData=
|
||||
[
|
||||
['constants_2ehpp_0',['constants.hpp',['../constants_8hpp.html',1,'']]]
|
||||
['close_5fto_0',['close_to',['../testlib_8hpp.html#a2cbf3a45367e903de6efbdbea3344cea',1,'testlib::close_to(arma::Mat< T > &a, arma::Mat< T > &b, double tol=1e-8)'],['../testlib_8hpp.html#a44f47fa3c8654c09712572d75c0ffa7f',1,'testlib::close_to(T a, T b, double tol=1e-8)']]],
|
||||
['concatpath_1',['concatpath',['../utils_8hpp.html#ae91fad89394d745d544737e43524bde6',1,'utils']]],
|
||||
['create_5fburn_5fin_5ftime_5fdata_2',['create_burn_in_time_data',['../main_8cpp.html#a68406fc2dd8de5849c3984658c171f32',1,'main.cpp']]],
|
||||
['create_5fpd_5festimate_5fdata_3',['create_pd_estimate_data',['../main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b',1,'main.cpp']]],
|
||||
['create_5fphase_5ftransition_5fdata_4',['create_phase_transition_data',['../main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d',1,'main.cpp']]],
|
||||
['cv_5f2_5',['CV_2',['../test__suite_8cpp.html#af02dd88b4d495baf7af5826d1481634c',1,'test_suite.cpp']]]
|
||||
];
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
var searchData=
|
||||
[
|
||||
['data_5ft_0',['data_t',['../classdata__t.html',1,'']]],
|
||||
['data_5ft_0',['data_t',['../classdata__t.html',1,'data_t'],['../classdata__t.html#aa2690d3e5d711b4baf3c8f8b9095faf7',1,'data_t::data_t()'],['../classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83',1,'data_t::data_t(double E, double E2, double M, double M2, double M_abs)']]],
|
||||
['data_5ftype_2ecpp_1',['data_type.cpp',['../data__type_8cpp.html',1,'']]],
|
||||
['data_5ftype_2ehpp_2',['data_type.hpp',['../data__type_8hpp.html',1,'']]],
|
||||
['debug_3',['DEBUG',['../utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b',1,'utils.hpp']]],
|
||||
['dirname_4',['dirname',['../utils_8hpp.html#aed026119193a9bbe076671809ff0f430',1,'utils']]]
|
||||
['dirname_4',['dirname',['../utils_8hpp.html#aed026119193a9bbe076671809ff0f430',1,'utils']]],
|
||||
['down_5',['DOWN',['../IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f',1,'IsingModel.hpp']]]
|
||||
];
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
var searchData=
|
||||
[
|
||||
['e_0',['E',['../classIsingModel.html#ae9f872ca2054992161d53306119979dd',1,'IsingModel']]],
|
||||
['energy_5fdiff_1',['energy_diff',['../classIsingModel.html#a1a4ceb1bb2593dbd20c51ed04100cbcd',1,'IsingModel']]]
|
||||
['e_0',['E',['../classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e',1,'data_t::E()'],['../classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9',1,'IsingModel::E()']]],
|
||||
['e2_1',['E2',['../classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72',1,'data_t']]],
|
||||
['energy_5fdiff_2',['energy_diff',['../classIsingModel.html#a7112dd6433b1bb9512150cbdc1a0b77e',1,'IsingModel']]],
|
||||
['engine_3',['engine',['../classIsingModel.html#a1bbe0cb10abee98058e7b45b22b9cd0a',1,'IsingModel']]],
|
||||
['eps_5f2_4',['EPS_2',['../test__suite_8cpp.html#a00367775d110a9537bd06bde2e630471',1,'test_suite.cpp']]]
|
||||
];
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
var searchData=
|
||||
[
|
||||
['get_5fe_0',['get_E',['../classIsingModel.html#aaa0787d964b004a17869811a5e947ff5',1,'IsingModel']]],
|
||||
['get_5fm_1',['get_M',['../classIsingModel.html#aa5701496e6483bc4668c486d6d3af625',1,'IsingModel']]]
|
||||
['index_0',['INDEX',['../IsingModel_8hpp.html#a3039ac753f46401767c38f867787fae6',1,'IsingModel.hpp']]],
|
||||
['initialize_5fenergy_1',['initialize_energy',['../classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1',1,'IsingModel']]],
|
||||
['initialize_5fenergy_5fdiff_2',['initialize_energy_diff',['../classIsingModel.html#aff9a1201933fd5408845a1447e4895b4',1,'IsingModel']]],
|
||||
['initialize_5fengine_3',['initialize_engine',['../classIsingModel.html#aaedc25b7284e04849269f31291590bf5',1,'IsingModel']]],
|
||||
['initialize_5flattice_4',['initialize_lattice',['../classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a',1,'IsingModel::initialize_lattice()'],['../classIsingModel.html#acc86effd6889bea199a3d70a9f38dc78',1,'IsingModel::initialize_lattice(int val)']]],
|
||||
['initialize_5fmagnetization_5',['initialize_magnetization',['../classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4',1,'IsingModel']]],
|
||||
['initialize_5fneighbors_6',['initialize_neighbors',['../classIsingModel.html#a6776109105051597c275670dabd0054a',1,'IsingModel']]],
|
||||
['is_5fequal_7',['is_equal',['../testlib_8hpp.html#a3db67d8721d2f3cd626526b43186bcf3',1,'testlib']]],
|
||||
['ising_20model_8',['Ising Model',['../index.html',1,'']]],
|
||||
['isingmodel_9',['IsingModel',['../classIsingModel.html#acf281f6f5ed02911ca6ab07004449864',1,'IsingModel::IsingModel()'],['../classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5',1,'IsingModel::IsingModel(int L, double T)'],['../classIsingModel.html#a46c9446e94854452f715d307c77c1c15',1,'IsingModel::IsingModel(int L, double T, int val)'],['../classIsingModel.html',1,'IsingModel']]],
|
||||
['isingmodel_2ecpp_10',['IsingModel.cpp',['../IsingModel_8cpp.html',1,'']]],
|
||||
['isingmodel_2ehpp_11',['IsingModel.hpp',['../IsingModel_8hpp.html',1,'']]],
|
||||
['isingmodeltest_12',['IsingModelTest',['../classIsingModel.html#a2b1cf104e0bda1fce78ed366e1ec7287',1,'IsingModel::IsingModelTest()'],['../classIsingModelTest.html',1,'IsingModelTest']]]
|
||||
];
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
var searchData=
|
||||
[
|
||||
['initialize_5fenergy_0',['initialize_energy',['../classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1',1,'IsingModel']]],
|
||||
['initialize_5fenergy_5fdiff_1',['initialize_energy_diff',['../classIsingModel.html#aff9a1201933fd5408845a1447e4895b4',1,'IsingModel']]],
|
||||
['initialize_5flattice_2',['initialize_lattice',['../classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a',1,'IsingModel']]],
|
||||
['initialize_5fmagnetization_3',['initialize_magnetization',['../classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4',1,'IsingModel']]],
|
||||
['initialize_5fneighbors_4',['initialize_neighbors',['../classIsingModel.html#a6776109105051597c275670dabd0054a',1,'IsingModel']]],
|
||||
['ising_20model_5',['Ising Model',['../index.html',1,'']]],
|
||||
['isingmodel_6',['IsingModel',['../classIsingModel.html',1,'IsingModel'],['../classIsingModel.html#acf281f6f5ed02911ca6ab07004449864',1,'IsingModel::IsingModel()'],['../classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5',1,'IsingModel::IsingModel(int L, double T)'],['../classIsingModel.html#a46c9446e94854452f715d307c77c1c15',1,'IsingModel::IsingModel(int L, double T, int val)']]],
|
||||
['isingmodel_2ecpp_7',['IsingModel.cpp',['../IsingModel_8cpp.html',1,'']]],
|
||||
['isingmodel_2ehpp_8',['IsingModel.hpp',['../IsingModel_8hpp.html',1,'']]],
|
||||
['isingmodeltest_9',['IsingModelTest',['../classIsingModelTest.html',1,'']]]
|
||||
['l_0',['L',['../classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348',1,'IsingModel']]],
|
||||
['lattice_1',['lattice',['../classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41',1,'IsingModel']]],
|
||||
['left_2',['LEFT',['../IsingModel_8hpp.html#a437ef08681e7210d6678427030446a54',1,'IsingModel.hpp']]]
|
||||
];
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
var searchData=
|
||||
[
|
||||
['k_5fb_0',['k_B',['../constants_8hpp.html#abfa7d6668c777f9516606394bbc9c414',1,'constants.hpp']]]
|
||||
['m_0',['M',['../classdata__t.html#ad08d2488bf913c626157471cf6e8a46a',1,'data_t::M()'],['../classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738',1,'IsingModel::M()']]],
|
||||
['m2_1',['M2',['../classdata__t.html#a71ae3cd4460f2c66239500c11804e70b',1,'data_t']]],
|
||||
['m_5fabs_2',['M_abs',['../classdata__t.html#a586475e0f71322dffda2e75f228ab24b',1,'data_t']]],
|
||||
['m_5fassert_3',['m_assert',['../testlib_8hpp.html#a39abb7cba0535176ed62aae136d2fcc7',1,'details']]],
|
||||
['mag_5f2_4',['MAG_2',['../test__suite_8cpp.html#a9fd092d930430eb4693d93e0c9066605',1,'test_suite.cpp']]],
|
||||
['main_5',['main',['../time_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): time.cpp'],['../test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4',1,'main(): test_suite.cpp'],['../phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): phase_transition_mpi.cpp'],['../phase__transition_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): phase_transition.cpp'],['../main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): main.cpp'],['../mcmc__progression_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): mcmc_progression.cpp'],['../pd__estimate_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): pd_estimate.cpp']]],
|
||||
['main_2ecpp_6',['main.cpp',['../main_8cpp.html',1,'']]],
|
||||
['mcmc_5fparallel_7',['mcmc_parallel',['../monte__carlo_8hpp.html#ae1e7f904ecfc3d8f3c4dd1ef155dd771',1,'montecarlo']]],
|
||||
['mcmc_5fprogression_2ecpp_8',['mcmc_progression.cpp',['../mcmc__progression_8cpp.html',1,'']]],
|
||||
['mcmc_5fserial_9',['mcmc_serial',['../monte__carlo_8hpp.html#ae67483ff00d1b0594d543261c8283ffd',1,'montecarlo']]],
|
||||
['methodname_10',['methodName',['../utils_8hpp.html#a178c4922157666a6e9c127c2ffd96346',1,'details']]],
|
||||
['metropolis_11',['Metropolis',['../classIsingModel.html#a56559d68dc9aaff1976d84b157f43488',1,'IsingModel']]],
|
||||
['mkpath_12',['mkpath',['../utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d',1,'utils']]],
|
||||
['monte_5fcarlo_2ecpp_13',['monte_carlo.cpp',['../monte__carlo_8cpp.html',1,'']]],
|
||||
['monte_5fcarlo_2ehpp_14',['monte_carlo.hpp',['../monte__carlo_8hpp.html',1,'']]]
|
||||
];
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['l_0',['L',['../classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348',1,'IsingModel']]],
|
||||
['lattice_1',['lattice',['../classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41',1,'IsingModel']]]
|
||||
['neighbors_0',['neighbors',['../classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd',1,'IsingModel']]]
|
||||
];
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
var searchData=
|
||||
[
|
||||
['m_0',['M',['../classIsingModel.html#a0d373a61baca6b0faa607bb12d82cc47',1,'IsingModel']]],
|
||||
['m_5fassert_1',['m_assert',['../testlib_8hpp.html#a39abb7cba0535176ed62aae136d2fcc7',1,'details']]],
|
||||
['main_2',['main',['../test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4',1,'main(): test_suite.cpp'],['../phase__transition__mpi_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): phase_transition_mpi.cpp'],['../main_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): main.cpp']]],
|
||||
['main_2ecpp_3',['main.cpp',['../main_8cpp.html',1,'']]],
|
||||
['methodname_4',['methodName',['../utils_8hpp.html#a178c4922157666a6e9c127c2ffd96346',1,'details']]],
|
||||
['metropolis_5',['Metropolis',['../classIsingModel.html#a56559d68dc9aaff1976d84b157f43488',1,'IsingModel']]],
|
||||
['mkpath_6',['mkpath',['../utils_8hpp.html#a2b45adc86b70f42021582994e83fa00d',1,'utils']]],
|
||||
['monte_5fcarlo_2ecpp_7',['monte_carlo.cpp',['../monte__carlo_8cpp.html',1,'']]],
|
||||
['monte_5fcarlo_2ehpp_8',['monte_carlo.hpp',['../monte__carlo_8hpp.html',1,'']]],
|
||||
['monte_5fcarlo_5fparallel_9',['monte_carlo_parallel',['../monte__carlo_8hpp.html#acc34e2049a5030874f6f548f3adab958',1,'monte_carlo_parallel(int L, double T, int cycles): monte_carlo.cpp'],['../monte__carlo_8cpp.html#acc34e2049a5030874f6f548f3adab958',1,'monte_carlo_parallel(int L, double T, int cycles): monte_carlo.cpp']]],
|
||||
['monte_5fcarlo_5fprogression_10',['monte_carlo_progression',['../monte__carlo_8hpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826',1,'monte_carlo_progression(double T, int L, int cycles, const std::string filename): monte_carlo.cpp'],['../monte__carlo_8hpp.html#a89ddd777796c65eb2b289af11fc0ce09',1,'monte_carlo_progression(double T, int L, int cycles, int value, const std::string filename): monte_carlo.cpp'],['../monte__carlo_8cpp.html#ac97d0de27f2f0d50fc6ecf3a79f32826',1,'monte_carlo_progression(double T, int L, int cycles, const std::string filename): monte_carlo.cpp'],['../monte__carlo_8cpp.html#a89ddd777796c65eb2b289af11fc0ce09',1,'monte_carlo_progression(double T, int L, int cycles, int value, const std::string filename): monte_carlo.cpp']]],
|
||||
['monte_5fcarlo_5fserial_11',['monte_carlo_serial',['../monte__carlo_8hpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed',1,'monte_carlo_serial(int L, double T, int cycles): monte_carlo.cpp'],['../monte__carlo_8cpp.html#a8f8d4c5e032ed8565a3ac518b32c6aed',1,'monte_carlo_serial(int L, double T, int cycles): monte_carlo.cpp']]]
|
||||
['operator_2a_0',['operator*',['../classdata__t.html#a7954efc97086ea50e10c33113b203085',1,'data_t']]],
|
||||
['operator_2a_3d_1',['operator*=',['../classdata__t.html#a6ddf3a7372730ef2393aee8bbcb34992',1,'data_t']]],
|
||||
['operator_2b_2',['operator+',['../classdata__t.html#a13bc1d73eadeb39c507e89f5872d726f',1,'data_t']]],
|
||||
['operator_2b_3d_3',['operator+=',['../classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb',1,'data_t']]],
|
||||
['operator_2f_4',['operator/',['../classdata__t.html#a429a11c53ee7fe08f6a4e75db524521d',1,'data_t']]],
|
||||
['operator_2f_3d_5',['operator/=',['../classdata__t.html#a88da5be78439fbdecfa473ec007dffd8',1,'data_t']]]
|
||||
];
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
var searchData=
|
||||
[
|
||||
['neighbors_0',['neighbors',['../classIsingModel.html#a94093aaf30facca62737f2ac381fdbcd',1,'IsingModel']]]
|
||||
['pd_5festimate_0',['pd_estimate',['../monte__carlo_8hpp.html#aea2dd1b5fac7c45633bc6f8dc4541226',1,'montecarlo']]],
|
||||
['pd_5festimate_2ecpp_1',['pd_estimate.cpp',['../pd__estimate_8cpp.html',1,'']]],
|
||||
['phase_5ftransition_2',['phase_transition',['../monte__carlo_8hpp.html#a34e9c3e24f26760693266b8a7b6b3d21',1,'montecarlo']]],
|
||||
['phase_5ftransition_2ecpp_3',['phase_transition.cpp',['../phase__transition_8cpp.html',1,'']]],
|
||||
['phase_5ftransition_5fmpi_2ecpp_4',['phase_transition_mpi.cpp',['../phase__transition__mpi_8cpp.html',1,'']]],
|
||||
['progression_5',['progression',['../monte__carlo_8hpp.html#a781d946de16211ba18ad6671a5b6838d',1,'montecarlo::progression(double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)'],['../monte__carlo_8hpp.html#a1549fc386bd3cdd1cdbe0261b9dd8415',1,'montecarlo::progression(double T, int L, int cycles, int value, const std::string filename, int burn_in_time=BURN_IN_TIME)']]]
|
||||
];
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['pd_5festimate_0',['pd_estimate',['../monte__carlo_8hpp.html#a962f704ab35208bf6541eb3b707a9559',1,'pd_estimate(double T, int L, int cycles, const std::string filename): monte_carlo.cpp'],['../monte__carlo_8cpp.html#a962f704ab35208bf6541eb3b707a9559',1,'pd_estimate(double T, int L, int cycles, const std::string filename): monte_carlo.cpp']]],
|
||||
['phase_5ftransition_1',['phase_transition',['../monte__carlo_8hpp.html#a2dfe843fbb80e10a763f3260131a148e',1,'phase_transition(int L, double start_T, double end_T, int points_T, std::function< data_t(int, double, int)> monte_carlo, std::string outfile): monte_carlo.cpp'],['../monte__carlo_8cpp.html#a7df22ace588b4d229d1029ce766d0009',1,'phase_transition(int L, double start, double end, int points, std::function< data_t(int, double, int)> monte_carlo, std::string outfile): monte_carlo.cpp']]],
|
||||
['phase_5ftransition_5fmpi_2ecpp_2',['phase_transition_mpi.cpp',['../phase__transition__mpi_8cpp.html',1,'']]]
|
||||
['right_0',['RIGHT',['../IsingModel_8hpp.html#a80fb826a684cf3f0d306b22aa100ddac',1,'IsingModel.hpp']]]
|
||||
];
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
var searchData=
|
||||
[
|
||||
['t_0',['T',['../classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c',1,'IsingModel']]],
|
||||
['test_5f2x2_5flattice_1',['test_2x2_lattice',['../classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de',1,'IsingModelTest::test_2x2_lattice()'],['../monte__carlo_8hpp.html#aa8b4fc86b26f0e3e253ba5556d2d14dc',1,'test_2x2_lattice(): monte_carlo.hpp']]],
|
||||
['test_5finit_5ffunctions_2',['test_init_functions',['../classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931',1,'IsingModelTest']]],
|
||||
['test_5fsuite_2ecpp_3',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]],
|
||||
['testlib_2ecpp_4',['testlib.cpp',['../testlib_8cpp.html',1,'']]],
|
||||
['testlib_2ehpp_5',['testlib.hpp',['../testlib_8hpp.html',1,'']]],
|
||||
['typedefs_2ehpp_6',['typedefs.hpp',['../typedefs_8hpp.html',1,'']]]
|
||||
['test_5f2x2_5flattice_1',['test_2x2_lattice',['../classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de',1,'IsingModelTest']]],
|
||||
['test_5fburn_5fin_5ftime_2',['test_burn_in_time',['../main_8cpp.html#a746d8dc451b2b2536abbb1ff1acaf861',1,'main.cpp']]],
|
||||
['test_5finit_5ffunctions_3',['test_init_functions',['../classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931',1,'IsingModelTest']]],
|
||||
['test_5fparallel_5fspeedup_4',['test_parallel_speedup',['../main_8cpp.html#a0dfa85080578dffff23b68e372cece95',1,'main.cpp']]],
|
||||
['test_5fsuite_2ecpp_5',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]],
|
||||
['testlib_2ecpp_6',['testlib.cpp',['../testlib_8cpp.html',1,'']]],
|
||||
['testlib_2ehpp_7',['testlib.hpp',['../testlib_8hpp.html',1,'']]],
|
||||
['time_2ecpp_8',['time.cpp',['../time_8cpp.html',1,'']]],
|
||||
['time_5flattice_5fsizes_9',['time_lattice_sizes',['../time_8cpp.html#aa224066f42c47cae5fbd457c1948e4a5',1,'time.cpp']]],
|
||||
['time_5fsample_5fsizes_10',['time_sample_sizes',['../time_8cpp.html#ace9eb0821fe4edf19cf2e7d8ffe6efb4',1,'time.cpp']]]
|
||||
];
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
var searchData=
|
||||
[
|
||||
['utils_2ecpp_0',['utils.cpp',['../utils_8cpp.html',1,'']]],
|
||||
['utils_2ehpp_1',['utils.hpp',['../utils_8hpp.html',1,'']]]
|
||||
['up_0',['UP',['../IsingModel_8hpp.html#a1965eaca47dbf3f87acdafc2208f04eb',1,'IsingModel.hpp']]],
|
||||
['usage_1',['usage',['../main_8cpp.html#ac907e18135856c90366aaa599a9e10b1',1,'usage(std::string filename): main.cpp'],['../mcmc__progression_8cpp.html#ac907e18135856c90366aaa599a9e10b1',1,'usage(std::string filename): mcmc_progression.cpp'],['../pd__estimate_8cpp.html#ac907e18135856c90366aaa599a9e10b1',1,'usage(std::string filename): pd_estimate.cpp'],['../phase__transition_8cpp.html#ac907e18135856c90366aaa599a9e10b1',1,'usage(std::string filename): phase_transition.cpp'],['../phase__transition__mpi_8cpp.html#ac907e18135856c90366aaa599a9e10b1',1,'usage(std::string filename): phase_transition_mpi.cpp'],['../time_8cpp.html#ac907e18135856c90366aaa599a9e10b1',1,'usage(std::string filename): time.cpp']]],
|
||||
['utils_2ecpp_2',['utils.cpp',['../utils_8cpp.html',1,'']]],
|
||||
['utils_2ehpp_3',['utils.hpp',['../utils_8hpp.html',1,'']]]
|
||||
];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['debug_0',['DEBUG',['../utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b',1,'utils.hpp']]]
|
||||
['cv_5f2_0',['CV_2',['../test__suite_8cpp.html#af02dd88b4d495baf7af5826d1481634c',1,'test_suite.cpp']]]
|
||||
];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['k_5fb_0',['k_B',['../constants_8hpp.html#abfa7d6668c777f9516606394bbc9c414',1,'constants.hpp']]]
|
||||
['debug_0',['DEBUG',['../utils_8hpp.html#aecc1f7a8a2493b9e021e5bff76a00a5b',1,'utils.hpp']]],
|
||||
['down_1',['DOWN',['../IsingModel_8hpp.html#a4193cd1c8c2e6ebd0e056fa2364a663f',1,'IsingModel.hpp']]]
|
||||
];
|
||||
|
||||
4
docs/search/defines_4.js
Normal file
4
docs/search/defines_4.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['eps_5f2_0',['EPS_2',['../test__suite_8cpp.html#a00367775d110a9537bd06bde2e630471',1,'test_suite.cpp']]]
|
||||
];
|
||||
4
docs/search/defines_5.js
Normal file
4
docs/search/defines_5.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['index_0',['INDEX',['../IsingModel_8hpp.html#a3039ac753f46401767c38f867787fae6',1,'IsingModel.hpp']]]
|
||||
];
|
||||
4
docs/search/defines_6.js
Normal file
4
docs/search/defines_6.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['left_0',['LEFT',['../IsingModel_8hpp.html#a437ef08681e7210d6678427030446a54',1,'IsingModel.hpp']]]
|
||||
];
|
||||
4
docs/search/defines_7.js
Normal file
4
docs/search/defines_7.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['mag_5f2_0',['MAG_2',['../test__suite_8cpp.html#a9fd092d930430eb4693d93e0c9066605',1,'test_suite.cpp']]]
|
||||
];
|
||||
4
docs/search/defines_8.js
Normal file
4
docs/search/defines_8.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['right_0',['RIGHT',['../IsingModel_8hpp.html#a80fb826a684cf3f0d306b22aa100ddac',1,'IsingModel.hpp']]]
|
||||
];
|
||||
4
docs/search/defines_9.js
Normal file
4
docs/search/defines_9.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['up_0',['UP',['../IsingModel_8hpp.html#a1965eaca47dbf3f87acdafc2208f04eb',1,'IsingModel.hpp']]]
|
||||
];
|
||||
4
docs/search/defines_a.js
Normal file
4
docs/search/defines_a.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['x_5f2_0',['X_2',['../test__suite_8cpp.html#ad27c84dda71475ffd365c649b525199e',1,'test_suite.cpp']]]
|
||||
];
|
||||
4
docs/search/defines_b.js
Normal file
4
docs/search/defines_b.js
Normal file
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['x_5f2_0',['X_2',['../test__suite_8cpp.html#ad27c84dda71475ffd365c649b525199e',1,'test_suite.cpp']]]
|
||||
];
|
||||
@@ -1,4 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['constants_2ehpp_0',['constants.hpp',['../constants_8hpp.html',1,'']]]
|
||||
['data_5ftype_2ecpp_0',['data_type.cpp',['../data__type_8cpp.html',1,'']]],
|
||||
['data_5ftype_2ehpp_1',['data_type.hpp',['../data__type_8hpp.html',1,'']]]
|
||||
];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['data_5ftype_2ecpp_0',['data_type.cpp',['../data__type_8cpp.html',1,'']]],
|
||||
['data_5ftype_2ehpp_1',['data_type.hpp',['../data__type_8hpp.html',1,'']]]
|
||||
['isingmodel_2ecpp_0',['IsingModel.cpp',['../IsingModel_8cpp.html',1,'']]],
|
||||
['isingmodel_2ehpp_1',['IsingModel.hpp',['../IsingModel_8hpp.html',1,'']]]
|
||||
];
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
var searchData=
|
||||
[
|
||||
['isingmodel_2ecpp_0',['IsingModel.cpp',['../IsingModel_8cpp.html',1,'']]],
|
||||
['isingmodel_2ehpp_1',['IsingModel.hpp',['../IsingModel_8hpp.html',1,'']]]
|
||||
['main_2ecpp_0',['main.cpp',['../main_8cpp.html',1,'']]],
|
||||
['mcmc_5fprogression_2ecpp_1',['mcmc_progression.cpp',['../mcmc__progression_8cpp.html',1,'']]],
|
||||
['monte_5fcarlo_2ecpp_2',['monte_carlo.cpp',['../monte__carlo_8cpp.html',1,'']]],
|
||||
['monte_5fcarlo_2ehpp_3',['monte_carlo.hpp',['../monte__carlo_8hpp.html',1,'']]]
|
||||
];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var searchData=
|
||||
[
|
||||
['main_2ecpp_0',['main.cpp',['../main_8cpp.html',1,'']]],
|
||||
['monte_5fcarlo_2ecpp_1',['monte_carlo.cpp',['../monte__carlo_8cpp.html',1,'']]],
|
||||
['monte_5fcarlo_2ehpp_2',['monte_carlo.hpp',['../monte__carlo_8hpp.html',1,'']]]
|
||||
['pd_5festimate_2ecpp_0',['pd_estimate.cpp',['../pd__estimate_8cpp.html',1,'']]],
|
||||
['phase_5ftransition_2ecpp_1',['phase_transition.cpp',['../phase__transition_8cpp.html',1,'']]],
|
||||
['phase_5ftransition_5fmpi_2ecpp_2',['phase_transition_mpi.cpp',['../phase__transition__mpi_8cpp.html',1,'']]]
|
||||
];
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
var searchData=
|
||||
[
|
||||
['phase_5ftransition_5fmpi_2ecpp_0',['phase_transition_mpi.cpp',['../phase__transition__mpi_8cpp.html',1,'']]]
|
||||
['test_5fsuite_2ecpp_0',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]],
|
||||
['testlib_2ecpp_1',['testlib.cpp',['../testlib_8cpp.html',1,'']]],
|
||||
['testlib_2ehpp_2',['testlib.hpp',['../testlib_8hpp.html',1,'']]],
|
||||
['time_2ecpp_3',['time.cpp',['../time_8cpp.html',1,'']]]
|
||||
];
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['test_5fsuite_2ecpp_0',['test_suite.cpp',['../test__suite_8cpp.html',1,'']]],
|
||||
['testlib_2ecpp_1',['testlib.cpp',['../testlib_8cpp.html',1,'']]],
|
||||
['testlib_2ehpp_2',['testlib.hpp',['../testlib_8hpp.html',1,'']]],
|
||||
['typedefs_2ehpp_3',['typedefs.hpp',['../typedefs_8hpp.html',1,'']]]
|
||||
['utils_2ecpp_0',['utils.cpp',['../utils_8cpp.html',1,'']]],
|
||||
['utils_2ehpp_1',['utils.hpp',['../utils_8hpp.html',1,'']]]
|
||||
];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['dirname_0',['dirname',['../utils_8hpp.html#aed026119193a9bbe076671809ff0f430',1,'utils']]]
|
||||
['assert_5feach_0',['assert_each',['../testlib_8hpp.html#ab6585c8aa8c276a3442c67a57c8de6fb',1,'testlib']]]
|
||||
];
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
var searchData=
|
||||
[
|
||||
['get_5fe_0',['get_E',['../classIsingModel.html#aaa0787d964b004a17869811a5e947ff5',1,'IsingModel']]],
|
||||
['get_5fm_1',['get_M',['../classIsingModel.html#aa5701496e6483bc4668c486d6d3af625',1,'IsingModel']]]
|
||||
['close_5fto_0',['close_to',['../testlib_8hpp.html#a2cbf3a45367e903de6efbdbea3344cea',1,'testlib::close_to(arma::Mat< T > &a, arma::Mat< T > &b, double tol=1e-8)'],['../testlib_8hpp.html#a44f47fa3c8654c09712572d75c0ffa7f',1,'testlib::close_to(T a, T b, double tol=1e-8)']]],
|
||||
['concatpath_1',['concatpath',['../utils_8hpp.html#ae91fad89394d745d544737e43524bde6',1,'utils']]],
|
||||
['create_5fburn_5fin_5ftime_5fdata_2',['create_burn_in_time_data',['../main_8cpp.html#a68406fc2dd8de5849c3984658c171f32',1,'main.cpp']]],
|
||||
['create_5fpd_5festimate_5fdata_3',['create_pd_estimate_data',['../main_8cpp.html#a4f8ea24364d72024915d3753a572cc5b',1,'main.cpp']]],
|
||||
['create_5fphase_5ftransition_5fdata_4',['create_phase_transition_data',['../main_8cpp.html#a9d62cf1399596f4c5a39abdd3196d76d',1,'main.cpp']]]
|
||||
];
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['initialize_5fenergy_0',['initialize_energy',['../classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1',1,'IsingModel']]],
|
||||
['initialize_5fenergy_5fdiff_1',['initialize_energy_diff',['../classIsingModel.html#aff9a1201933fd5408845a1447e4895b4',1,'IsingModel']]],
|
||||
['initialize_5flattice_2',['initialize_lattice',['../classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a',1,'IsingModel']]],
|
||||
['initialize_5fmagnetization_3',['initialize_magnetization',['../classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4',1,'IsingModel']]],
|
||||
['initialize_5fneighbors_4',['initialize_neighbors',['../classIsingModel.html#a6776109105051597c275670dabd0054a',1,'IsingModel']]],
|
||||
['isingmodel_5',['IsingModel',['../classIsingModel.html#acf281f6f5ed02911ca6ab07004449864',1,'IsingModel::IsingModel()'],['../classIsingModel.html#a4a39ee7fbfbbf566f75bc28900ca9ea5',1,'IsingModel::IsingModel(int L, double T)'],['../classIsingModel.html#a46c9446e94854452f715d307c77c1c15',1,'IsingModel::IsingModel(int L, double T, int val)']]]
|
||||
['data_5ft_0',['data_t',['../classdata__t.html#aa2690d3e5d711b4baf3c8f8b9095faf7',1,'data_t::data_t()'],['../classdata__t.html#a3f2d19ab309e696ba91a2000479bcb83',1,'data_t::data_t(double E, double E2, double M, double M2, double M_abs)']]],
|
||||
['dirname_1',['dirname',['../utils_8hpp.html#aed026119193a9bbe076671809ff0f430',1,'utils']]]
|
||||
];
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user