Skip to content

Commit

Permalink
Deploying to gh-pages from @ b356bfe 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanwm committed Jul 25, 2024
1 parent 998a43e commit 30f813c
Show file tree
Hide file tree
Showing 13 changed files with 437 additions and 431 deletions.
26 changes: 12 additions & 14 deletions base-matter-solver_8hpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,19 @@
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160; </div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="preprocessor">#include &lt;nuTens/tensors/tensor.hpp&gt;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160; </div>
<div class="line"><a name="l00005"></a><span class="lineno"><a class="line" href="classBaseMatterSolver.html"> 5</a></span>&#160;<span class="keyword">class </span><a class="code" href="classBaseMatterSolver.html">BaseMatterSolver</a> {</div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160; </div>
<div class="line"><a name="l00005"></a><span class="lineno"><a class="line" href="classBaseMatterSolver.html"> 5</a></span>&#160;<span class="keyword">class </span><a class="code" href="classBaseMatterSolver.html">BaseMatterSolver</a></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;{</div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160; </div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160; </div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> setPMNS(<span class="keyword">const</span> <a class="code" href="classTensor.html">Tensor</a> &amp;newPMNS) = 0;</div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; </div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> setMasses(<span class="keyword">const</span> <a class="code" href="classTensor.html">Tensor</a> &amp;newMasses) = 0;</div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> calculateEigenvalues(<span class="keyword">const</span> <a class="code" href="classTensor.html">Tensor</a> &amp;energies, <a class="code" href="classTensor.html">Tensor</a> &amp;eigenvectors, <a class="code" href="classTensor.html">Tensor</a> &amp;eigenvalues) = 0;</div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; </div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;};</div>
<div class="ttc" id="aclassBaseMatterSolver_html"><div class="ttname"><a href="classBaseMatterSolver.html">BaseMatterSolver</a></div><div class="ttdoc">Abstract base class for matter effect solvers.</div><div class="ttdef"><b>Definition:</b> base-matter-solver.hpp:5</div></div>
<div class="ttc" id="aclassTensor_html"><div class="ttname"><a href="classTensor.html">Tensor</a></div><div class="ttdoc">Basic tensor class.</div><div class="ttdef"><b>Definition:</b> tensor.hpp:15</div></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> setPMNS(<span class="keyword">const</span> <a class="code" href="classTensor.html">Tensor</a> &amp;newPMNS) = 0;</div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> setMasses(<span class="keyword">const</span> <a class="code" href="classTensor.html">Tensor</a> &amp;newMasses) = 0;</div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160; </div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160; <span class="keyword">virtual</span> <span class="keywordtype">void</span> calculateEigenvalues(<span class="keyword">const</span> <a class="code" href="classTensor.html">Tensor</a> &amp;energies, <a class="code" href="classTensor.html">Tensor</a> &amp;eigenvectors, <a class="code" href="classTensor.html">Tensor</a> &amp;eigenvalues) = 0;</div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;};</div>
<div class="ttc" id="aclassBaseMatterSolver_html"><div class="ttname"><a href="classBaseMatterSolver.html">BaseMatterSolver</a></div><div class="ttdoc">Abstract base class for matter effect solvers.</div><div class="ttdef"><b>Definition:</b> base-matter-solver.hpp:6</div></div>
<div class="ttc" id="aclassTensor_html"><div class="ttname"><a href="classTensor.html">Tensor</a></div><div class="ttdoc">Basic tensor class.</div><div class="ttdef"><b>Definition:</b> tensor.hpp:16</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Expand Down
6 changes: 2 additions & 4 deletions classConstDensityMatterSolver.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a8a7d9238e40bb5d6f6984626
<p>Constructor. </p>
<ul>
<li>nGenerations The number of neutrino generations this propagator should expect </li>
<li>density The electron density of the material to propagate in <br />
</li>
<li>density The electron density of the material to propagate in </li>
</ul>

</div>
Expand Down Expand Up @@ -205,8 +204,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#aa845ecff2b50e3ff0c6e73fc
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">energies</td><td><a class="el" href="classTensor.html" title="Basic tensor class.">Tensor</a> of energies, expected to have a batch dimension and two further dimensions to make casting unambiguous i.e. shape should look like {Nbatches, 1, 1}. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">eigenvectors</td><td>The returned eigenvectors </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">eigenvalues</td><td>The corresponding eigenvalues <br />
</td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">eigenvalues</td><td>The corresponding eigenvalues </td></tr>
</table>
</dd>
</dl>
Expand Down
3 changes: 1 addition & 2 deletions classPropagator.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a7dbf99562e01684d1fb2fc6d
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>Should add a check to tensors supplied to the setters to see how many dimensions they have, and if missing a batch dimension, add one. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">newMasses</td><td>The new masses to use. This tensor is expected to have a batch dimension + 1 more dimensions of size nGenerations. The batch dimension can (and probably should) be 1 and it will be broadcast to match the batch dimension of the energies supplied to <a class="el" href="classPropagator.html#a198abad0231f55413b1a337a1b01b7bf" title="Calculate the oscillation probabilities.">calculateProbs()</a>. So dimension should be {1, nGenerations}. <br />
</td></tr>
<tr><td class="paramname">newMasses</td><td>The new masses to use. This tensor is expected to have a batch dimension + 1 more dimensions of size nGenerations. The batch dimension can (and probably should) be 1 and it will be broadcast to match the batch dimension of the energies supplied to <a class="el" href="classPropagator.html#a198abad0231f55413b1a337a1b01b7bf" title="Calculate the oscillation probabilities.">calculateProbs()</a>. So dimension should be {1, nGenerations}. </td></tr>
</table>
</dd>
</dl>
Expand Down
9 changes: 4 additions & 5 deletions classTensor.html
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@
<p><a class="el" href="classTensor.html" title="Basic tensor class.">Tensor</a> defines a basic interface for creating and manipulating tensors. To create tensors you should use the Initialisers. These can be used on their own or chained together with the Setters to create the desired tensor.</p>
<p>For example </p><div class="fragment"><div class="line"><a class="code" href="classTensor.html">Tensor</a> t;</div>
<div class="line">t.<a class="code" href="classTensor.html#a6df303cfa5b246020b4cf0922e447b9c">ones</a>({3,3}).dType(NTdtypes::kFloat).<a class="code" href="classTensor.html#a54b317bee953ffa8463122635afcd369">device</a>(NTdtypes::kGPU);</div>
<div class="ttc" id="aclassTensor_html"><div class="ttname"><a href="classTensor.html">Tensor</a></div><div class="ttdoc">Basic tensor class.</div><div class="ttdef"><b>Definition:</b> tensor.hpp:15</div></div>
<div class="ttc" id="aclassTensor_html_a54b317bee953ffa8463122635afcd369"><div class="ttname"><a href="classTensor.html#a54b317bee953ffa8463122635afcd369">Tensor::device</a></div><div class="ttdeci">Tensor &amp; device(NTdtypes::deviceType device)</div><div class="ttdoc">Set the device that this tensor lives on.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:62</div></div>
<div class="ttc" id="aclassTensor_html_a6df303cfa5b246020b4cf0922e447b9c"><div class="ttname"><a href="classTensor.html#a6df303cfa5b246020b4cf0922e447b9c">Tensor::ones</a></div><div class="ttdeci">Tensor &amp; ones(int length, NTdtypes::scalarType type, NTdtypes::deviceType device=NTdtypes::kCPU, bool requiresGrad=true)</div><div class="ttdoc">Initialise this tensor with ones.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:24</div></div>
<div class="ttc" id="aclassTensor_html"><div class="ttname"><a href="classTensor.html">Tensor</a></div><div class="ttdoc">Basic tensor class.</div><div class="ttdef"><b>Definition:</b> tensor.hpp:16</div></div>
<div class="ttc" id="aclassTensor_html_a54b317bee953ffa8463122635afcd369"><div class="ttname"><a href="classTensor.html#a54b317bee953ffa8463122635afcd369">Tensor::device</a></div><div class="ttdeci">Tensor &amp; device(NTdtypes::deviceType device)</div><div class="ttdoc">Set the device that this tensor lives on.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:56</div></div>
<div class="ttc" id="aclassTensor_html_a6df303cfa5b246020b4cf0922e447b9c"><div class="ttname"><a href="classTensor.html#a6df303cfa5b246020b4cf0922e447b9c">Tensor::ones</a></div><div class="ttdeci">Tensor &amp; ones(int length, NTdtypes::scalarType type, NTdtypes::deviceType device=NTdtypes::kCPU, bool requiresGrad=true)</div><div class="ttdoc">Initialise this tensor with ones.</div><div class="ttdef"><b>Definition:</b> torch-tensor.cpp:19</div></div>
</div><!-- fragment --><p> will get you a 3x3 tensor of floats that lives on the GPU. This is equivalent to </p><div class="fragment"><div class="line"><a class="code" href="classTensor.html">Tensor</a> t;</div>
<div class="line">t.<a class="code" href="classTensor.html#a6df303cfa5b246020b4cf0922e447b9c">ones</a>({3,3}, NTdtypes::kFloat, NTdtypes::kGPU);</div>
</div><!-- fragment --> </div><h2 class="groupheader">Member Function Documentation</h2>
Expand Down Expand Up @@ -527,8 +527,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a09aececd96cf2472beba69b8
<p>Get the value at a certain entry in the tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">indices</td><td>The index of the entry to get <br />
</td></tr>
<tr><td class="paramname">indices</td><td>The index of the entry to get </td></tr>
</table>
</dd>
</dl>
Expand Down
Loading

0 comments on commit 30f813c

Please sign in to comment.