Update docs

This commit is contained in:
2023-12-05 19:32:43 +01:00
parent 53900b1205
commit 5eff0b0d37
33 changed files with 564 additions and 1159 deletions

View File

@@ -101,88 +101,59 @@ $(document).ready(function(){initNavTree('test__suite_8cpp_source.html',''); ini
<div class="headertitle"><div class="title">test_suite.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="test__suite_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 test_suite.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"> * @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.">&quot;IsingModel.hpp&quot;</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="testlib_8hpp.html" title="A small test library.">&quot;testlib.hpp&quot;</a></div>
<a href="test__suite_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 &quot;<a class="code" href="IsingModel_8hpp.html">IsingModel.hpp</a>&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &quot;<a class="code" href="testlib_8hpp.html">testlib.hpp</a>&quot;</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="comment">/** @brief The analytic expected energy for a \f$ 2 \times 2 \f$ lattice.</span></div>
<div class="line"><span class="lineno"> 16</span><span class="comment"> * */</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="test__suite_8cpp.html#a00367775d110a9537bd06bde2e630471"> 17</a></span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">EPS_2</span> <span class="preprocessor">(</span><span class="preprocessor">-</span>2 <span class="preprocessor">*</span> <span class="preprocessor">std</span><span class="preprocessor">::</span><span class="preprocessor">sinh</span><span class="preprocessor">(</span>8.<span class="preprocessor">)</span><span class="preprocessor">)</span> <span class="preprocessor">/</span> <span class="preprocessor">(</span><span class="preprocessor">std</span><span class="preprocessor">::</span><span class="preprocessor">cosh</span><span class="preprocessor">(</span>8.<span class="preprocessor">)</span> <span class="preprocessor">+</span> 3<span class="preprocessor">)</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"><a class="line" href="test__suite_8cpp.html#a00367775d110a9537bd06bde2e630471"> 17</a></span><span class="preprocessor">#define EPS_2 (-2 * std::sinh(8.)) / (std::cosh(8.) + 3)</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"> 19</span><span class="comment">/** @brief The analytic expected magnetization for a \f$ 2 \times 2 \f$</span></div>
<div class="line"><span class="lineno"> 20</span><span class="comment"> * lattice.</span></div>
<div class="line"><span class="lineno"> 21</span><span class="comment"> * */</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="test__suite_8cpp.html#a9fd092d930430eb4693d93e0c9066605"> 22</a></span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">MAG_2</span> <span class="preprocessor">(</span><span class="preprocessor">std</span><span class="preprocessor">::</span><span class="preprocessor">exp</span><span class="preprocessor">(</span>8.<span class="preprocessor">)</span> <span class="preprocessor">+</span> 1<span class="preprocessor">)</span> <span class="preprocessor">/</span> <span class="preprocessor">(</span>2 <span class="preprocessor">*</span> <span class="preprocessor">(</span><span class="preprocessor">cosh</span><span class="preprocessor">(</span>8.<span class="preprocessor">)</span> <span class="preprocessor">+</span> 3<span class="preprocessor">)</span><span class="preprocessor">)</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="test__suite_8cpp.html#a9fd092d930430eb4693d93e0c9066605"> 22</a></span><span class="preprocessor">#define MAG_2 (std::exp(8.) + 1) / (2 * (cosh(8.) + 3))</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 The analytic heat capacity for a \f$ 2 \times 2 \f$ lattice.</span></div>
<div class="line"><span class="lineno"> 25</span><span class="comment"> * */</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="test__suite_8cpp.html#af02dd88b4d495baf7af5826d1481634c"> 26</a></span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">CV_2</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> 16 <span class="preprocessor">*</span> <span class="preprocessor">(</span>3 <span class="preprocessor">*</span> <span class="preprocessor">std</span><span class="preprocessor">::</span><span class="preprocessor">cosh</span><span class="preprocessor">(</span>8.<span class="preprocessor">)</span> <span class="preprocessor">+</span> 1<span class="preprocessor">)</span> <span class="preprocessor">/</span> <span class="preprocessor">(</span><span class="preprocessor">(</span><span class="preprocessor">std</span><span class="preprocessor">::</span><span class="preprocessor">cosh</span><span class="preprocessor">(</span>8.<span class="preprocessor">)</span> <span class="preprocessor">+</span> 3<span class="preprocessor">)</span> <span class="preprocessor">*</span> <span class="preprocessor">(</span><span class="preprocessor">std</span><span class="preprocessor">::</span><span class="preprocessor">cosh</span><span class="preprocessor">(</span>8.<span class="preprocessor">)</span> <span class="preprocessor">+</span> 3<span class="preprocessor">)</span><span class="preprocessor">)</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="test__suite_8cpp.html#af02dd88b4d495baf7af5826d1481634c"> 26</a></span><span class="preprocessor">#define CV_2 \</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor"> 16 * (3 * std::cosh(8.) + 1) / ((std::cosh(8.) + 3) * (std::cosh(8.) + 3))</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">/** @brief The analytic susceptibility for a \f$ 2 \times 2 \f$ lattice.*/</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="test__suite_8cpp.html#ad27c84dda71475ffd365c649b525199e"> 30</a></span><span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">X_2</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">(</span>3 <span class="preprocessor">*</span> <span class="preprocessor">std</span><span class="preprocessor">::</span><span class="preprocessor">exp</span><span class="preprocessor">(</span>8.<span class="preprocessor">)</span> <span class="preprocessor">+</span> <span class="preprocessor">std</span><span class="preprocessor">::</span><span class="preprocessor">exp</span><span class="preprocessor">(</span><span class="preprocessor">-</span>8.<span class="preprocessor">)</span> <span class="preprocessor">+</span> 3<span class="preprocessor">)</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">/</span> <span class="preprocessor">(</span><span class="preprocessor">(</span><span class="preprocessor">std</span><span class="preprocessor">::</span><span class="preprocessor">cosh</span><span class="preprocessor">(</span>8.<span class="preprocessor">)</span> <span class="preprocessor">+</span> 3<span class="preprocessor">)</span> <span class="preprocessor">*</span> <span class="preprocessor">(</span><span class="preprocessor">std</span><span class="preprocessor">::</span><span class="preprocessor">cosh</span><span class="preprocessor">(</span>8.<span class="preprocessor">)</span> <span class="preprocessor">+</span> 3<span class="preprocessor">)</span><span class="preprocessor">)</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="test__suite_8cpp.html#ad27c84dda71475ffd365c649b525199e"> 30</a></span><span class="preprocessor">#define X_2 \</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor"> (3 * std::exp(8.) + std::exp(-8.) + 3) \</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor"> / ((std::cosh(8.) + 3) * (std::cosh(8.) + 3))</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 Test class for the Ising model</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="classIsingModelTest.html"> 36</a></span><span class="keyword">class</span> <a class="code hl_class" href="classIsingModelTest.html">IsingModelTest</a> {</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="classIsingModelTest.html"> 36</a></span><span class="keyword">class </span><a class="code hl_class" href="classIsingModelTest.html">IsingModelTest</a> {</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <span class="comment">/** @brief Test that initializing works as intended.</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="classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931"> 40</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931">test_init_functions</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> <a class="code hl_class" href="classIsingModel.html">IsingModel</a> test;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> test<a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">.</a><a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a> = 3;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> test<a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">.</a><a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a> = 1.;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> test.<a class="code hl_variable" href="classIsingModel.html#a2b8ac43baefeb386186266d5aa4de348">L</a> = 3;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> test.<a class="code hl_variable" href="classIsingModel.html#a20fc4c0c99d8a119f70a1614784d4e5c">T</a> = 1.;</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">// Test that initializing the lattice only yields 1s and -1s.</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> test<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="l00048" name="l00048"></a><span class="lineno"> 48</span> std::function&lt;<span class="keywordtype">bool</span>(<span class="keywordtype">int</span>)&gt; f = [](<span class="keywordtype">int</span> x) { <span class="keywordflow">return</span> x == 1 || x == -1; };</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_define" href="testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(testlib::assert_each(f, test.lattice),</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> test.<a class="code hl_function" href="classIsingModel.html#a34a4710949b4a70f3e37ca223aefcf8a">initialize_lattice</a>();</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> std::function&lt;bool(<span class="keywordtype">int</span>)&gt; f = [](<span class="keywordtype">int</span> x) { <span class="keywordflow">return</span> x == 1 || x == -1; };</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <a class="code hl_define" href="testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(testlib::assert_each(f, test.<a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>),</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="stringliteral">&quot;Test lattice initialization.&quot;</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> test<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="l00053" name="l00053"></a><span class="lineno"> 53</span> arma::Mat&lt;<span class="keywordtype">int</span>&gt; neighbor_matrix(<span class="stringliteral">&quot;2, 1 ; 0, 2 ; 1, 0&quot;</span>);</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <a class="code hl_define" href="testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(testlib::is_equal(neighbor_matrix, test.neighbors),</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> test.<a class="code hl_function" href="classIsingModel.html#a6776109105051597c275670dabd0054a">initialize_neighbors</a>();</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> arma::Mat&lt;int&gt; neighbor_matrix(<span class="stringliteral">&quot;2, 1 ; 0, 2 ; 1, 0&quot;</span>);</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <a class="code hl_define" href="testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(testlib::is_equal(neighbor_matrix, test.<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> <span class="stringliteral">&quot;Test neighbor matrix.&quot;</span>);</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="comment">// Fill the lattice with 1s to be able to test the next functions.</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> test.lattice.fill(1);</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> test.<a class="code hl_variable" href="classIsingModel.html#a2c3c76c79717c968d7c227c58b46df41">lattice</a>.fill(1);</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">// Test the initial magnetization.</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> test<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="l00062" name="l00062"></a><span class="lineno"> 62</span> <a class="code hl_define" href="testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(std::fabs(test<a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">.</a><a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">M</a> - 9.) &lt; 1e-8, <span class="stringliteral">&quot;Test intial magnetization&quot;</span>);</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> test.<a class="code hl_function" href="classIsingModel.html#a926cf4964d190d2ce23e5a17201787a4">initialize_magnetization</a>();</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <a class="code hl_define" href="testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(std::fabs(test.<a class="code hl_variable" href="classIsingModel.html#aef7232b28df08e064ef58eb5ef32f738">M</a> - 9.) &lt; 1e-8, <span class="stringliteral">&quot;Test intial magnetization&quot;</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">// Test that the initial energy is correct</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> test<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="l00066" name="l00066"></a><span class="lineno"> 66</span> <a class="code hl_define" href="testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(std::fabs(test<a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">.</a><a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">E</a> - (-18)) &lt; 1e-8, <span class="stringliteral">&quot;Test initial energy.&quot;</span>);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> test.<a class="code hl_function" href="classIsingModel.html#a59fced38c695e2fa647f53be81b9d2a1">initialize_energy</a>();</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <a class="code hl_define" href="testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a>(std::fabs(test.<a class="code hl_variable" href="classIsingModel.html#a1c8a2a4331c7e60c3e1350c0cf8300b9">E</a> - (-18)) &lt; 1e-8, <span class="stringliteral">&quot;Test initial energy.&quot;</span>);</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> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="comment">/** @brief Test numerical data with analytical data.</span></div>
<div class="line"><span class="lineno"> 70</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 71</span><span class="comment"> * @param tol The tolerance between the analytical and numerical solution.</span></div>
<div class="line"><span class="lineno"> 72</span><span class="comment"> * @param max_cycles The max number of Monte Carlo cycles.</span></div>
<div class="line"><span class="lineno"> 73</span><span class="comment"> *</span></div>
<div class="line"><span class="lineno"> 74</span><span class="comment"> * return int</span></div>
<div class="line"><span class="lineno"> 75</span><span class="comment"> * */</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de"> 76</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de">test_2x2_lattice</a>(<span class="keywordtype">double</span> tol, <span class="keywordtype">int</span> max_cycles)</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> {</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <a class="code hl_class" href="classdata__t.html">data_t</a> data, tmp;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> size_t L = 2;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> size_t n_spins = L * L;</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordtype">size_t</span> L = 2;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <span class="keywordtype">size_t</span> n_spins = L * L;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordtype">double</span> T = 1.;</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> size_t cycles = 0;</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="keywordtype">size_t</span> cycles = 0;</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">// Create random engine using the mersenne twister</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> std::random_device rd;</div>
@@ -194,14 +165,14 @@ $(document).ready(function(){initNavTree('test__suite_8cpp_source.html',''); ini
<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="comment">// Loop through cycles</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordflow">while</span> (cycles++ &lt; max_cycles) {</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> data <a class="code hl_function" href="classdata__t.html#a6cb96b4ff750ab29041038ca53f307cb">+=</a> test<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="l00094" name="l00094"></a><span class="lineno"> 94</span> data += test.<a class="code hl_function" href="classIsingModel.html#a56559d68dc9aaff1976d84b157f43488">Metropolis</a>();</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> tmp = data / cycles;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">if</span> (testlib::close_to(<a class="code hl_define" href="test__suite_8cpp.html#a00367775d110a9537bd06bde2e630471">EPS_2</a>, tmp<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> / n_spins, tol)</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> &amp;&amp; testlib::close_to(<a class="code hl_define" href="test__suite_8cpp.html#a9fd092d930430eb4693d93e0c9066605">MAG_2</a>, 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> / n_spins, tol)</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordflow">if</span> (testlib::close_to(<a class="code hl_define" href="test__suite_8cpp.html#a00367775d110a9537bd06bde2e630471">EPS_2</a>, tmp.<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> / n_spins, tol)</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> &amp;&amp; testlib::close_to(<a class="code hl_define" href="test__suite_8cpp.html#a9fd092d930430eb4693d93e0c9066605">MAG_2</a>, tmp.<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> / n_spins, tol)</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> &amp;&amp; testlib::close_to(</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <a class="code hl_define" href="test__suite_8cpp.html#af02dd88b4d495baf7af5826d1481634c">CV_2</a>, (tmp<a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">.</a><a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> - tmp<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> * tmp<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">.</a><a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a>) / (T * T) / n_spins, tol)</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <a class="code hl_define" href="test__suite_8cpp.html#af02dd88b4d495baf7af5826d1481634c">CV_2</a>, (tmp.<a class="code hl_variable" href="classdata__t.html#abb622f9c6cc5ffb9dddb151d2e202f72">E2</a> - tmp.<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a> * tmp.<a class="code hl_variable" href="classdata__t.html#a6c1a196d96e177b11ca98c61fae35a2e">E</a>) / (T * T) / n_spins, tol)</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> &amp;&amp; testlib::close_to(</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <a class="code hl_define" href="test__suite_8cpp.html#ad27c84dda71475ffd365c649b525199e">X_2</a>, (tmp<a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">.</a><a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> - 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> * 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>) / T / n_spins, tol)) {</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <a class="code hl_define" href="test__suite_8cpp.html#ad27c84dda71475ffd365c649b525199e">X_2</a>, (tmp.<a class="code hl_variable" href="classdata__t.html#a71ae3cd4460f2c66239500c11804e70b">M2</a> - tmp.<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a> * tmp.<a class="code hl_variable" href="classdata__t.html#a586475e0f71322dffda2e75f228ab24b">M_abs</a>) / T / n_spins, tol)) {</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">return</span> cycles;</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> }</div>
@@ -209,12 +180,11 @@ $(document).ready(function(){initNavTree('test__suite_8cpp_source.html',''); ini
<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><span class="comment">/** @brief The main function.*/</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"><a class="line" href="test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4"> 110</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="test__suite_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4">main</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> <a class="code hl_class" href="classIsingModelTest.html">IsingModelTest</a> test;</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> test<a class="code hl_function" href="classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931">.</a><a class="code hl_function" href="classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931">test_init_functions</a><a class="code hl_function" href="classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931">(</a><a class="code hl_function" href="classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931">)</a>;</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> test.<a class="code hl_function" href="classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931">test_init_functions</a>();</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="keywordtype">int</span> res = 0;</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordtype">int</span> tmp;</div>
@@ -222,8 +192,8 @@ $(document).ready(function(){initNavTree('test__suite_8cpp_source.html',''); ini
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordtype">int</span> accepted_values = 0;</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">// Run through the test multiple times to get a better estimate.</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">for</span> (size_t i = 0; i &lt; iterations; i++) {</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> tmp = test<a class="code hl_function" href="classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de">.</a><a class="code hl_function" href="classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de">test_2x2_lattice</a><a class="code hl_function" href="classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de">(</a>1e-2<a class="code hl_function" href="classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de">,</a> 1e5<a class="code hl_function" href="classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de">)</a>;</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; iterations; i++) {</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> tmp = test.<a class="code hl_function" href="classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de">test_2x2_lattice</a>(1e-2, 1e5);</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">if</span> (tmp == 0) {</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <span class="keywordflow">continue</span>;</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> }</div>
@@ -235,6 +205,7 @@ $(document).ready(function(){initNavTree('test__suite_8cpp_source.html',''); ini
<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="keywordflow">return</span> 0;</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</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="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="aclassIsingModelTest_html_a4ace7013fa2d257ad1747961da6bc4de"><div class="ttname"><a href="classIsingModelTest.html#a4ace7013fa2d257ad1747961da6bc4de">IsingModelTest::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 class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00076">test_suite.cpp:76</a></div></div>
<div class="ttc" id="aclassIsingModelTest_html_a717e5852ca51432a61fb6ed38da37931"><div class="ttname"><a href="classIsingModelTest.html#a717e5852ca51432a61fb6ed38da37931">IsingModelTest::test_init_functions</a></div><div class="ttdeci">void test_init_functions()</div><div class="ttdoc">Test that initializing works as intended.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00040">test_suite.cpp:40</a></div></div>
@@ -242,16 +213,17 @@ $(document).ready(function(){initNavTree('test__suite_8cpp_source.html',''); ini
<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&lt; int &gt; 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_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_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&lt; int &gt; 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_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="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 &amp; operator+=(const data_t &amp;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="atest__suite_8cpp_html_a00367775d110a9537bd06bde2e630471"><div class="ttname"><a href="test__suite_8cpp.html#a00367775d110a9537bd06bde2e630471">EPS_2</a></div><div class="ttdeci">#define EPS_2</div><div class="ttdoc">The analytic expected energy for a lattice.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00017">test_suite.cpp:17</a></div></div>
@@ -259,6 +231,7 @@ $(document).ready(function(){initNavTree('test__suite_8cpp_source.html',''); ini
<div class="ttc" id="atest__suite_8cpp_html_ad27c84dda71475ffd365c649b525199e"><div class="ttname"><a href="test__suite_8cpp.html#ad27c84dda71475ffd365c649b525199e">X_2</a></div><div class="ttdeci">#define X_2</div><div class="ttdoc">The analytic susceptibility for a lattice.</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="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#l00110">test_suite.cpp:110</a></div></div>
<div class="ttc" id="atest__suite_8cpp_html_af02dd88b4d495baf7af5826d1481634c"><div class="ttname"><a href="test__suite_8cpp.html#af02dd88b4d495baf7af5826d1481634c">CV_2</a></div><div class="ttdeci">#define CV_2</div><div class="ttdoc">The analytic heat capacity for a lattice.</div><div class="ttdef"><b>Definition:</b> <a href="test__suite_8cpp_source.html#l00026">test_suite.cpp:26</a></div></div>
<div class="ttc" id="atestlib_8hpp_html"><div class="ttname"><a href="testlib_8hpp.html">testlib.hpp</a></div><div class="ttdoc">A small test library.</div></div>
<div class="ttc" id="atestlib_8hpp_html_a73d4f21ad937dbc50a0c0538c78fd4f9"><div class="ttname"><a href="testlib_8hpp.html#a73d4f21ad937dbc50a0c0538c78fd4f9">ASSERT</a></div><div class="ttdeci">#define ASSERT(expr, msg)</div><div class="ttdoc">A prettier assertion function.</div><div class="ttdef"><b>Definition:</b> <a href="testlib_8hpp_source.html#l00031">testlib.hpp:31</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->