195 lines
26 KiB
HTML
195 lines
26 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" 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>Simulating the Schrödinger wave equation using the Crank-Nicolson method in 2+1 dimensions: include/WaveSimulation.hpp 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">Simulating the Schrödinger wave equation using the Crank-Nicolson method in 2+1 dimensions
|
|
</div>
|
|
<div id="projectbrief">Simulating the Schrödinger wave equation using the Crank-Nicolson method in 2+1 dimensions</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('WaveSimulation_8hpp_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">WaveSimulation.hpp</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="WaveSimulation_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 __WAVE_SIMULATION__</span></div>
|
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#define __WAVE_SIMULATION__</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="literals_8hpp.html">literals.hpp</a>"</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="preprocessor">#include <armadillo></span></div>
|
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="preprocessor">#include <cstdint></span></div>
|
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
|
|
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="classWaveSimulation.html"> 22</a></span><span class="keyword">class </span><a class="code hl_class" href="classWaveSimulation.html">WaveSimulation</a> {</div>
|
|
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="keyword">private</span>:</div>
|
|
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#a2e7becba595a864b5754be9e858ac3e9"> 24</a></span> int32_t <a class="code hl_variable" href="classWaveSimulation.html#a2e7becba595a864b5754be9e858ac3e9">M</a>; </div>
|
|
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#a36dda9ea37cc41e36c27f9729831786d"> 25</a></span> int32_t <a class="code hl_variable" href="classWaveSimulation.html#a36dda9ea37cc41e36c27f9729831786d">N</a>; </div>
|
|
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#ac40056e5c4b7ae3a022195cb447439b6"> 26</a></span> arma::cx_mat <a class="code hl_variable" href="classWaveSimulation.html#ac40056e5c4b7ae3a022195cb447439b6">V</a>; </div>
|
|
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#a02052a447cf7fb49001e231d3a856814"> 27</a></span> arma::cx_mat <a class="code hl_variable" href="classWaveSimulation.html#a02052a447cf7fb49001e231d3a856814">U</a>; </div>
|
|
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#a3e7fa7128020c39d51fa933aa7706fd1"> 28</a></span> arma::sp_cx_mat <a class="code hl_variable" href="classWaveSimulation.html#a3e7fa7128020c39d51fa933aa7706fd1">B</a>; </div>
|
|
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#a09e997b44ad67b6e3497d77704cd47e7"> 29</a></span> arma::sp_cx_mat <a class="code hl_variable" href="classWaveSimulation.html#a09e997b44ad67b6e3497d77704cd47e7">A</a>; </div>
|
|
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#a66f2d3a7d278888687822bc20df97f38"> 30</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classWaveSimulation.html#a66f2d3a7d278888687822bc20df97f38">h</a>; </div>
|
|
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#a07dbefef86c9ed894d526eea4b039be6"> 31</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classWaveSimulation.html#a07dbefef86c9ed894d526eea4b039be6">dt</a>; </div>
|
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#aebd53edf928035c7a2438cdd3b1d7d7e"> 32</a></span> <span class="keywordtype">double</span> <a class="code hl_variable" href="classWaveSimulation.html#aebd53edf928035c7a2438cdd3b1d7d7e">T</a>; </div>
|
|
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
|
|
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#aed4433e3c80ceaad874471a994b6bf0e"> 44</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classWaveSimulation.html#aed4433e3c80ceaad874471a994b6bf0e">initialize_U</a>(<span class="keywordtype">double</span> x_c, <span class="keywordtype">double</span> y_c, <span class="keywordtype">double</span> sigma_x, <span class="keywordtype">double</span> sigma_y,</div>
|
|
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordtype">double</span> p_x, <span class="keywordtype">double</span> p_y);</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"><a class="line" href="classWaveSimulation.html#a657df266bf09298fcb1b901b25fb2498"> 55</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classWaveSimulation.html#a657df266bf09298fcb1b901b25fb2498">initialize_V</a>(<span class="keywordtype">double</span> thickness, <span class="keywordtype">double</span> pos_x,</div>
|
|
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keywordtype">double</span> aperture_separation, <span class="keywordtype">double</span> aperture,</div>
|
|
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> uint32_t slits);</div>
|
|
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
|
|
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#aad9e34b8466636b0a346dd30aef35eca"> 61</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classWaveSimulation.html#aad9e34b8466636b0a346dd30aef35eca">initialize_V</a>();</div>
|
|
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
|
|
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#a6c1e7fb0526a7f7947beaedeb383d4c0"> 65</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classWaveSimulation.html#a6c1e7fb0526a7f7947beaedeb383d4c0">initialize_A</a>();</div>
|
|
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
|
|
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#a25100ad1ffbb0ba16e4928f0c2d58ae7"> 69</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classWaveSimulation.html#a25100ad1ffbb0ba16e4928f0c2d58ae7">initialize_B</a>();</div>
|
|
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
|
|
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#acb893267a27945645510d736cba2939d"> 75</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classWaveSimulation.html#acb893267a27945645510d736cba2939d">write_U</a>(std::ofstream &ofile);</div>
|
|
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="keyword">public</span>:</div>
|
|
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#acb9ed0a8b77ef23ad8682fdef00b5076"> 94</a></span> <a class="code hl_function" href="classWaveSimulation.html#acb9ed0a8b77ef23ad8682fdef00b5076">WaveSimulation</a>(<span class="keywordtype">double</span> <a class="code hl_variable" href="classWaveSimulation.html#a66f2d3a7d278888687822bc20df97f38">h</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classWaveSimulation.html#a07dbefef86c9ed894d526eea4b039be6">dt</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classWaveSimulation.html#aebd53edf928035c7a2438cdd3b1d7d7e">T</a>, <span class="keywordtype">double</span> x_c, <span class="keywordtype">double</span> y_c,</div>
|
|
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="keywordtype">double</span> sigma_x, <span class="keywordtype">double</span> sigma_y, <span class="keywordtype">double</span> p_x, <span class="keywordtype">double</span> p_y,</div>
|
|
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keywordtype">double</span> thickness, <span class="keywordtype">double</span> pos_x, <span class="keywordtype">double</span> ap_sep, <span class="keywordtype">double</span> ap,</div>
|
|
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> uint32_t slits);</div>
|
|
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
|
|
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#a94cf5bb27a79ceefdcc1456704ba17e4"> 111</a></span> <a class="code hl_function" href="classWaveSimulation.html#a94cf5bb27a79ceefdcc1456704ba17e4">WaveSimulation</a>(<span class="keywordtype">double</span> <a class="code hl_variable" href="classWaveSimulation.html#a66f2d3a7d278888687822bc20df97f38">h</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classWaveSimulation.html#a07dbefef86c9ed894d526eea4b039be6">dt</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="classWaveSimulation.html#aebd53edf928035c7a2438cdd3b1d7d7e">T</a>, <span class="keywordtype">double</span> x_c, <span class="keywordtype">double</span> y_c,</div>
|
|
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keywordtype">double</span> sigma_x, <span class="keywordtype">double</span> sigma_y, <span class="keywordtype">double</span> p_x, <span class="keywordtype">double</span> p_y);</div>
|
|
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
|
|
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#af9d988b741c59e6de3a32d506538019f"> 116</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classWaveSimulation.html#af9d988b741c59e6de3a32d506538019f">step</a>();</div>
|
|
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> </div>
|
|
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#a82742cffc7c344d705c6a532ed605b0c"> 125</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classWaveSimulation.html#a82742cffc7c344d705c6a532ed605b0c">simulate</a>(std::string outfile, <span class="keywordtype">bool</span> write_each_step = <span class="keyword">false</span>);</div>
|
|
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
|
|
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#ab142a9563a302f6cd4b015e3a388c1a4"> 133</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classWaveSimulation.html#ab142a9563a302f6cd4b015e3a388c1a4">simulate</a>(std::string outfile, std::vector<double> &steps);</div>
|
|
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> </div>
|
|
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"><a class="line" href="classWaveSimulation.html#af0752a10a110644d99ef5c6cab7421c9"> 139</a></span> <span class="keywordtype">void</span> <a class="code hl_function" href="classWaveSimulation.html#af0752a10a110644d99ef5c6cab7421c9">probability_deviation</a>(std::string outfile,</div>
|
|
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keywordtype">bool</span> write_each_step = <span class="keyword">false</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> </div>
|
|
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span><span class="preprocessor">#endif</span></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html"><div class="ttname"><a href="classWaveSimulation.html">WaveSimulation</a></div><div class="ttdoc">Simulate the evolution of a wave packet in 2 + 1 domensions.</div><div class="ttdef"><b>Definition:</b> <a href="WaveSimulation_8hpp_source.html#l00022">WaveSimulation.hpp:22</a></div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_a02052a447cf7fb49001e231d3a856814"><div class="ttname"><a href="classWaveSimulation.html#a02052a447cf7fb49001e231d3a856814">WaveSimulation::U</a></div><div class="ttdeci">arma::cx_mat U</div><div class="ttdoc">The particle wave matrix.</div><div class="ttdef"><b>Definition:</b> <a href="WaveSimulation_8hpp_source.html#l00027">WaveSimulation.hpp:27</a></div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_a07dbefef86c9ed894d526eea4b039be6"><div class="ttname"><a href="classWaveSimulation.html#a07dbefef86c9ed894d526eea4b039be6">WaveSimulation::dt</a></div><div class="ttdeci">double dt</div><div class="ttdoc">The step size int the time direction.</div><div class="ttdef"><b>Definition:</b> <a href="WaveSimulation_8hpp_source.html#l00031">WaveSimulation.hpp:31</a></div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_a09e997b44ad67b6e3497d77704cd47e7"><div class="ttname"><a href="classWaveSimulation.html#a09e997b44ad67b6e3497d77704cd47e7">WaveSimulation::A</a></div><div class="ttdeci">arma::sp_cx_mat A</div><div class="ttdoc">The A matrix.</div><div class="ttdef"><b>Definition:</b> <a href="WaveSimulation_8hpp_source.html#l00029">WaveSimulation.hpp:29</a></div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_a25100ad1ffbb0ba16e4928f0c2d58ae7"><div class="ttname"><a href="classWaveSimulation.html#a25100ad1ffbb0ba16e4928f0c2d58ae7">WaveSimulation::initialize_B</a></div><div class="ttdeci">void initialize_B()</div><div class="ttdoc">Initialize the B matrix according to the Crank-Nicolson method.</div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_a2e7becba595a864b5754be9e858ac3e9"><div class="ttname"><a href="classWaveSimulation.html#a2e7becba595a864b5754be9e858ac3e9">WaveSimulation::M</a></div><div class="ttdeci">int32_t M</div><div class="ttdoc">The size.</div><div class="ttdef"><b>Definition:</b> <a href="WaveSimulation_8hpp_source.html#l00024">WaveSimulation.hpp:24</a></div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_a36dda9ea37cc41e36c27f9729831786d"><div class="ttname"><a href="classWaveSimulation.html#a36dda9ea37cc41e36c27f9729831786d">WaveSimulation::N</a></div><div class="ttdeci">int32_t N</div><div class="ttdoc">The size of the inner part.</div><div class="ttdef"><b>Definition:</b> <a href="WaveSimulation_8hpp_source.html#l00025">WaveSimulation.hpp:25</a></div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_a3e7fa7128020c39d51fa933aa7706fd1"><div class="ttname"><a href="classWaveSimulation.html#a3e7fa7128020c39d51fa933aa7706fd1">WaveSimulation::B</a></div><div class="ttdeci">arma::sp_cx_mat B</div><div class="ttdoc">The B matrix.</div><div class="ttdef"><b>Definition:</b> <a href="WaveSimulation_8hpp_source.html#l00028">WaveSimulation.hpp:28</a></div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_a657df266bf09298fcb1b901b25fb2498"><div class="ttname"><a href="classWaveSimulation.html#a657df266bf09298fcb1b901b25fb2498">WaveSimulation::initialize_V</a></div><div class="ttdeci">void initialize_V(double thickness, double pos_x, double aperture_separation, double aperture, uint32_t slits)</div><div class="ttdoc">Initialize the V matrix.</div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_a66f2d3a7d278888687822bc20df97f38"><div class="ttname"><a href="classWaveSimulation.html#a66f2d3a7d278888687822bc20df97f38">WaveSimulation::h</a></div><div class="ttdeci">double h</div><div class="ttdoc">The step size in both x and y direction.</div><div class="ttdef"><b>Definition:</b> <a href="WaveSimulation_8hpp_source.html#l00030">WaveSimulation.hpp:30</a></div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_a6c1e7fb0526a7f7947beaedeb383d4c0"><div class="ttname"><a href="classWaveSimulation.html#a6c1e7fb0526a7f7947beaedeb383d4c0">WaveSimulation::initialize_A</a></div><div class="ttdeci">void initialize_A()</div><div class="ttdoc">Initialize the A matrix according to the Crank-Nicolson method.</div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_a82742cffc7c344d705c6a532ed605b0c"><div class="ttname"><a href="classWaveSimulation.html#a82742cffc7c344d705c6a532ed605b0c">WaveSimulation::simulate</a></div><div class="ttdeci">void simulate(std::string outfile, bool write_each_step=false)</div><div class="ttdoc">Evolve the wave packet until the time T has been reached and write U to file.</div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_a94cf5bb27a79ceefdcc1456704ba17e4"><div class="ttname"><a href="classWaveSimulation.html#a94cf5bb27a79ceefdcc1456704ba17e4">WaveSimulation::WaveSimulation</a></div><div class="ttdeci">WaveSimulation(double h, double dt, double T, double x_c, double y_c, double sigma_x, double sigma_y, double p_x, double p_y)</div><div class="ttdoc">Constructor for the WaveSimulation class with no wall.</div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_aad9e34b8466636b0a346dd30aef35eca"><div class="ttname"><a href="classWaveSimulation.html#aad9e34b8466636b0a346dd30aef35eca">WaveSimulation::initialize_V</a></div><div class="ttdeci">void initialize_V()</div><div class="ttdoc">Initialize the V matrix with no wall.</div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_ab142a9563a302f6cd4b015e3a388c1a4"><div class="ttname"><a href="classWaveSimulation.html#ab142a9563a302f6cd4b015e3a388c1a4">WaveSimulation::simulate</a></div><div class="ttdeci">void simulate(std::string outfile, std::vector< double > &steps)</div><div class="ttdoc">Evolve the wave packet and write U to fileto file at each time step in the vector given.</div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_ac40056e5c4b7ae3a022195cb447439b6"><div class="ttname"><a href="classWaveSimulation.html#ac40056e5c4b7ae3a022195cb447439b6">WaveSimulation::V</a></div><div class="ttdeci">arma::cx_mat V</div><div class="ttdoc">The potential matrix.</div><div class="ttdef"><b>Definition:</b> <a href="WaveSimulation_8hpp_source.html#l00026">WaveSimulation.hpp:26</a></div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_acb893267a27945645510d736cba2939d"><div class="ttname"><a href="classWaveSimulation.html#acb893267a27945645510d736cba2939d">WaveSimulation::write_U</a></div><div class="ttdeci">void write_U(std::ofstream &ofile)</div><div class="ttdoc">Write the U matrix in a single line to the file buffer given.</div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_acb9ed0a8b77ef23ad8682fdef00b5076"><div class="ttname"><a href="classWaveSimulation.html#acb9ed0a8b77ef23ad8682fdef00b5076">WaveSimulation::WaveSimulation</a></div><div class="ttdeci">WaveSimulation(double h, double dt, double T, double x_c, double y_c, double sigma_x, double sigma_y, double p_x, double p_y, double thickness, double pos_x, double ap_sep, double ap, uint32_t slits)</div><div class="ttdoc">Constructor for the WaveSimulation class.</div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_aebd53edf928035c7a2438cdd3b1d7d7e"><div class="ttname"><a href="classWaveSimulation.html#aebd53edf928035c7a2438cdd3b1d7d7e">WaveSimulation::T</a></div><div class="ttdeci">double T</div><div class="ttdoc">The end time.</div><div class="ttdef"><b>Definition:</b> <a href="WaveSimulation_8hpp_source.html#l00032">WaveSimulation.hpp:32</a></div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_aed4433e3c80ceaad874471a994b6bf0e"><div class="ttname"><a href="classWaveSimulation.html#aed4433e3c80ceaad874471a994b6bf0e">WaveSimulation::initialize_U</a></div><div class="ttdeci">void initialize_U(double x_c, double y_c, double sigma_x, double sigma_y, double p_x, double p_y)</div><div class="ttdoc">Initialize the U matrix using an unormalized Gaussian wave packet.</div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_af0752a10a110644d99ef5c6cab7421c9"><div class="ttname"><a href="classWaveSimulation.html#af0752a10a110644d99ef5c6cab7421c9">WaveSimulation::probability_deviation</a></div><div class="ttdeci">void probability_deviation(std::string outfile, bool write_each_step=false)</div><div class="ttdoc">Write the deviation of the sum of the probability of U from 1.</div></div>
|
|
<div class="ttc" id="aclassWaveSimulation_html_af9d988b741c59e6de3a32d506538019f"><div class="ttname"><a href="classWaveSimulation.html#af9d988b741c59e6de3a32d506538019f">WaveSimulation::step</a></div><div class="ttdeci">void step()</div><div class="ttdoc">Evolve a step forward in time.</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="aliterals_8hpp_html"><div class="ttname"><a href="literals_8hpp.html">literals.hpp</a></div><div class="ttdoc">Useful literals.</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_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="WaveSimulation_8hpp.html">WaveSimulation.hpp</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>
|