Compare commits

..

No commits in common. "aa5746b2a6878a906561537283d1655edb10ac95" and "3b1c42cf2db7834e3b9bd4f7f5f36f1938fc45a4" have entirely different histories.

24 changed files with 273 additions and 371 deletions

View File

@ -4,48 +4,41 @@
- [Project](https://anderkve.github.io/FYS3150/book/projects/project2.html)
## Requirements
To compile the C++ programs, you need to have these packages installed:
- Armadillo
- Openmp
To run the Python scripts, you need to have these packages:
- numpy
- matplotlib
- pandas
- seaborn
## Compile and run C++ programs
Compiling and linking is done using Make, make sure you are in the root directory.
Compiling and linking is done using Make, make sure you are in the root folder. To create executable files, run shell commands
There are two alternative ways to compile the code. The first alternative is to change
directory to `src/` and compile
```shell
cd src/
make
```
To run `script-name`
```shell
./main
```
There are two ways of compiling the code.
The first way is to go into the src directory and compile
```shell
cd src && make
```
The second alternative does not involve changing directory to `src/`, use
make in the projects root directory
or you could use make in the project directory
```shell
make code
```
You can run any of the compiled programs by changing directory to `src/`, then
and it will compile everything with you needing to move into **src**.
You can run any of the compiled programs by going into the src directory
and then doing
```shell
./test_suite
./main
```
Remove object files and executables from `src/`
```shell
make clean
./program-name
```
@ -71,7 +64,7 @@ If you want to generate the documentation you can do
make docs
```
in the project root, and the documentation will be made into the `docs/`
in the project root, and the documentation will be made into the **docs**
directory.
## Generate project document
@ -82,4 +75,4 @@ If you want to recompile the Pdf file, you can do
make latex
```
and a Pdf file will be produced inside the `latex/` directory.
and a Pdf file will be produced inside the **latex** directory.

View File

@ -79,10 +79,7 @@ $(function() {
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;cassert&gt;</code><br />
<code>#include &lt;cmath&gt;</code><br />
<code>#include &lt;ctime&gt;</code><br />
<code>#include &lt;iostream&gt;</code><br />
<code>#include &lt;omp.h&gt;</code><br />
<code>#include &lt;ostream&gt;</code><br />
<code>#include &quot;<a class="el" href="utils_8hpp_source.html">utils.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="matrix_8hpp_source.html">matrix.hpp</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="jacobi_8hpp_source.html">jacobi.hpp</a>&quot;</code><br />
@ -104,7 +101,7 @@ int&#160;</td><td class="memItemRight" valign="bottom"><b>main</b> ()</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Main program for Project 2. </p>
<p>The program performs the Jacobi rotation method. The size of the matrix, and number of transformations performed are written to file. Eigenvector corresponding to the 3 smallest eigenvalues for matrices of size 6x6 and 100x100 are written to file.</p>
<p>The program performs the Jacobi rotation method. The size of the matrix, and number of transformations performed are written to file. Eigenvector correstonding to the 3 smallest eigenvalues for matrices of size 6x6 and 100x100 are written to file.</p>
<dl class="section author"><dt>Author</dt><dd>Cory Alexander Balaton (coryab) </dd>
<dd>
Janita Ovidie Sandtrøen Willumsen (janitaws) </dd></dl>

View File

@ -82,7 +82,6 @@ $(function() {
<p>Function prototypes for creating tridiagonal matrices.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;armadillo&gt;</code><br />
<code>#include &lt;omp.h&gt;</code><br />
</div>
<p><a href="matrix_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">

View File

@ -81,23 +81,22 @@ $(function() {
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#define __MATRIX__</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="preprocessor">#include &lt;armadillo&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#include &lt;omp.h&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span>arma::mat <a class="code hl_function" href="matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af">create_tridiagonal</a>(</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">const</span> arma::vec&amp; a, </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">const</span> arma::vec&amp; d, </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">const</span> arma::vec&amp; e);</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>arma::mat <a class="code hl_function" href="matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af">create_tridiagonal</a>(<span class="keywordtype">int</span> n, <span class="keywordtype">double</span> a, <span class="keywordtype">double</span> d, <span class="keywordtype">double</span> e);</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span>arma::mat <a class="code hl_function" href="matrix_8hpp.html#a564688c96a8e4282e995a0663545d627">create_symmetric_tridiagonal</a>(<span class="keywordtype">int</span> n, <span class="keywordtype">double</span> a, <span class="keywordtype">double</span> d);</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="keywordtype">double</span> <a class="code hl_function" href="matrix_8hpp.html#af42e501cbf71bec9c77ececc22723df9">max_offdiag_symmetric</a>(arma::mat&amp; A, <span class="keywordtype">int</span>&amp; k, <span class="keywordtype">int</span>&amp; l);</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><span class="preprocessor">#endif</span></div>
<div class="ttc" id="amatrix_8hpp_html_a564688c96a8e4282e995a0663545d627"><div class="ttname"><a href="matrix_8hpp.html#a564688c96a8e4282e995a0663545d627">create_symmetric_tridiagonal</a></div><div class="ttdeci">arma::mat create_symmetric_tridiagonal(int n, double a, double d)</div><div class="ttdoc">Create a symmetric tridiagonal matrix.</div><div class="ttdef"><b>Definition:</b> matrix.cpp:45</div></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>arma::mat <a class="code hl_function" href="matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af">create_tridiagonal</a>(</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">const</span> arma::vec&amp; a, </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">const</span> arma::vec&amp; d, </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keyword">const</span> arma::vec&amp; e);</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>arma::mat <a class="code hl_function" href="matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af">create_tridiagonal</a>(<span class="keywordtype">int</span> n, <span class="keywordtype">double</span> a, <span class="keywordtype">double</span> d, <span class="keywordtype">double</span> e);</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span>arma::mat <a class="code hl_function" href="matrix_8hpp.html#a564688c96a8e4282e995a0663545d627">create_symmetric_tridiagonal</a>(<span class="keywordtype">int</span> n, <span class="keywordtype">double</span> a, <span class="keywordtype">double</span> d);</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="keywordtype">double</span> <a class="code hl_function" href="matrix_8hpp.html#af42e501cbf71bec9c77ececc22723df9">max_offdiag_symmetric</a>(arma::mat&amp; A, <span class="keywordtype">int</span>&amp; k, <span class="keywordtype">int</span>&amp; l);</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="preprocessor">#endif</span></div>
<div class="ttc" id="amatrix_8hpp_html_a564688c96a8e4282e995a0663545d627"><div class="ttname"><a href="matrix_8hpp.html#a564688c96a8e4282e995a0663545d627">create_symmetric_tridiagonal</a></div><div class="ttdeci">arma::mat create_symmetric_tridiagonal(int n, double a, double d)</div><div class="ttdoc">Create a symmetric tridiagonal matrix.</div><div class="ttdef"><b>Definition:</b> matrix.cpp:44</div></div>
<div class="ttc" id="amatrix_8hpp_html_aa524feaf9f44790470df4cb99bb714af"><div class="ttname"><a href="matrix_8hpp.html#aa524feaf9f44790470df4cb99bb714af">create_tridiagonal</a></div><div class="ttdeci">arma::mat create_tridiagonal(const arma::vec &amp;a, const arma::vec &amp;d, const arma::vec &amp;e)</div><div class="ttdoc">Create a tridiagonal matrix.</div><div class="ttdef"><b>Definition:</b> matrix.cpp:12</div></div>
<div class="ttc" id="amatrix_8hpp_html_af42e501cbf71bec9c77ececc22723df9"><div class="ttname"><a href="matrix_8hpp.html#af42e501cbf71bec9c77ececc22723df9">max_offdiag_symmetric</a></div><div class="ttdeci">double max_offdiag_symmetric(arma::mat &amp;A, int &amp;k, int &amp;l)</div><div class="ttdoc">Find the off-diagonal element with the largest absolute value.</div><div class="ttdef"><b>Definition:</b> matrix.cpp:50</div></div>
<div class="ttc" id="amatrix_8hpp_html_af42e501cbf71bec9c77ececc22723df9"><div class="ttname"><a href="matrix_8hpp.html#af42e501cbf71bec9c77ececc22723df9">max_offdiag_symmetric</a></div><div class="ttdeci">double max_offdiag_symmetric(arma::mat &amp;A, int &amp;k, int &amp;l)</div><div class="ttdoc">Find the off-diagonal element with the largest absolute value.</div><div class="ttdef"><b>Definition:</b> matrix.cpp:49</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>

View File

@ -11,7 +11,6 @@
#define __MATRIX__
#include <armadillo>
#include <omp.h>
/** @brief Create a tridiagonal matrix.
*

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +0,0 @@
x,Vector 1,Vector 2,Vector 3,Analytic 1,Analytic 2,Analytic 3
0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
9.0909090909e-02,1.2013116562e-01,2.3053001908e-01,3.2225269916e-01,1.2013116588e-01,2.3053001915e-01,3.2225270128e-01
1.8181818182e-01,2.3053002022e-01,3.8786838557e-01,4.2206128116e-01,2.3053001915e-01,3.8786838606e-01,4.2206128095e-01
2.7272727273e-01,3.2225270064e-01,4.2206128186e-01,2.3053002150e-01,3.2225270128e-01,4.2206128095e-01,2.3053001915e-01
3.6363636364e-01,3.8786838571e-01,3.2225270018e-01,-1.2013116730e-01,3.8786838606e-01,3.2225270128e-01,-1.2013116588e-01
4.5454545455e-01,4.2206128199e-01,1.2013116659e-01,-3.8786838753e-01,4.2206128095e-01,1.2013116588e-01,-3.8786838606e-01
5.4545454545e-01,4.2206128029e-01,-1.2013116676e-01,-3.8786838497e-01,4.2206128095e-01,-1.2013116588e-01,-3.8786838606e-01
6.3636363636e-01,3.8786838601e-01,-3.2225270035e-01,-1.2013116452e-01,3.8786838606e-01,-3.2225270128e-01,-1.2013116588e-01
7.2727272727e-01,3.2225270138e-01,-4.2206128196e-01,2.3053001725e-01,3.2225270128e-01,-4.2206128095e-01,2.3053001915e-01
8.1818181818e-01,2.3053001839e-01,-3.8786838569e-01,4.2206128036e-01,2.3053001915e-01,-3.8786838606e-01,4.2206128095e-01
9.0909090909e-01,1.2013116693e-01,-2.3053001912e-01,3.2225270306e-01,1.2013116588e-01,-2.3053001915e-01,3.2225270128e-01
1.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
1 x Vector 1 Vector 2 Vector 3 Analytic 1 Analytic 2 Analytic 3
2 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
3 9.0909090909e-02 1.2013116562e-01 2.3053001908e-01 3.2225269916e-01 1.2013116588e-01 2.3053001915e-01 3.2225270128e-01
4 1.8181818182e-01 2.3053002022e-01 3.8786838557e-01 4.2206128116e-01 2.3053001915e-01 3.8786838606e-01 4.2206128095e-01
5 2.7272727273e-01 3.2225270064e-01 4.2206128186e-01 2.3053002150e-01 3.2225270128e-01 4.2206128095e-01 2.3053001915e-01
6 3.6363636364e-01 3.8786838571e-01 3.2225270018e-01 -1.2013116730e-01 3.8786838606e-01 3.2225270128e-01 -1.2013116588e-01
7 4.5454545455e-01 4.2206128199e-01 1.2013116659e-01 -3.8786838753e-01 4.2206128095e-01 1.2013116588e-01 -3.8786838606e-01
8 5.4545454545e-01 4.2206128029e-01 -1.2013116676e-01 -3.8786838497e-01 4.2206128095e-01 -1.2013116588e-01 -3.8786838606e-01
9 6.3636363636e-01 3.8786838601e-01 -3.2225270035e-01 -1.2013116452e-01 3.8786838606e-01 -3.2225270128e-01 -1.2013116588e-01
10 7.2727272727e-01 3.2225270138e-01 -4.2206128196e-01 2.3053001725e-01 3.2225270128e-01 -4.2206128095e-01 2.3053001915e-01
11 8.1818181818e-01 2.3053001839e-01 -3.8786838569e-01 4.2206128036e-01 2.3053001915e-01 -3.8786838606e-01 4.2206128095e-01
12 9.0909090909e-01 1.2013116693e-01 -2.3053001912e-01 3.2225270306e-01 1.2013116588e-01 -2.3053001915e-01 3.2225270128e-01
13 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00

View File

@ -1,103 +1,103 @@
x,Vector 1,Vector 2,Vector 3,Analytic 1,Analytic 2,Analytic 3
0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
9.9009900990e-03,4.3763580486e-03,-8.7484808732e-03,-1.3112140868e-02,4.3763573469e-03,-8.7484808507e-03,-1.3112140764e-02
1.9801980198e-02,8.7484805374e-03,-1.7463118426e-02,-2.6110190173e-02,8.7484808507e-03,-1.7463115529e-02,-2.6110188805e-02
2.9702970297e-02,1.3112137258e-02,-2.6110188342e-02,-3.8881042300e-02,1.3112140764e-02,-2.6110188805e-02,-3.8881044154e-02
3.9603960396e-02,1.7463113948e-02,-3.4656251014e-02,-5.1313582739e-02,1.7463115529e-02,-3.4656246833e-02,-5.1313583715e-02
4.9504950495e-02,2.1797194330e-02,-4.3068225457e-02,-6.3299631766e-02,2.1797195856e-02,-4.3068226575e-02,-6.3299628182e-02
5.9405940594e-02,2.6110192331e-02,-5.1313581763e-02,-7.4734880361e-02,2.6110188805e-02,-5.1313583715e-02,-7.4734883337e-02
6.9306930693e-02,3.0397918929e-02,-5.9360418816e-02,-8.5519850123e-02,3.0397921832e-02,-5.9360418568e-02,-8.5519847548e-02
7.9207920792e-02,3.4656246898e-02,-6.7177598362e-02,-9.5560679417e-02,3.4656246833e-02,-6.7177599493e-02,-9.5560677562e-02
8.9108910891e-02,3.8881042315e-02,-7.4734886241e-02,-1.0477000717e-01,3.8881044154e-02,-7.4734883337e-02,-1.0477000506e-01
9.9009900990e-02,4.3068230096e-02,-8.2003031501e-02,-1.1306769719e-01,4.3068226575e-02,-8.2003032435e-02,-1.1306769690e-01
1.0891089109e-01,4.7213744503e-02,-8.8953927224e-02,-1.2038155127e-01,4.7213743269e-02,-8.8953927731e-02,-1.2038155232e-01
1.1881188119e-01,5.1313588425e-02,-9.5560676214e-02,-1.2664793098e-01,5.1313583715e-02,-9.5560677562e-02,-1.2664793125e-01
1.2871287129e-01,5.5363780001e-02,-1.0179771917e-01,-1.3181231002e-01,5.5363781583e-02,-1.0179772170e-01,-1.3181230802e-01
1.3861386139e-01,5.9360419789e-02,-1.0764092918e-01,-1.3582974462e-01,5.9360418568e-02,-1.0764093022e-01,-1.3582974582e-01
1.4851485149e-01,6.3299627984e-02,-1.1306769819e-01,-1.3866528556e-01,6.3299628182e-02,-1.1306769690e-01,-1.3866528771e-01
1.5841584158e-01,6.7177601217e-02,-1.1805702763e-01,-1.4029426114e-01,6.7177599493e-02,-1.1805702662e-01,-1.4029426076e-01
1.6831683168e-01,7.0990579025e-02,-1.2258961789e-01,-1.4070249027e-01,7.0990580816e-02,-1.2258961664e-01,-1.4070249079e-01
1.7821782178e-01,7.4734880844e-02,-1.2664793546e-01,-1.3988642874e-01,7.4734883337e-02,-1.2664793125e-01,-1.3988642566e-01
1.8811881188e-01,7.8406882603e-02,-1.3021626991e-01,-1.3785316434e-01,7.8406884685e-02,-1.3021626962e-01,-1.3785316621e-01
1.9801980198e-01,8.2003032834e-02,-1.3328082864e-01,-1.3462040439e-01,8.2003032435e-02,-1.3328082653e-01,-1.3462040445e-01
2.0792079208e-01,8.5519846919e-02,-1.3582974378e-01,-1.3021627110e-01,8.5519847548e-02,-1.3582974582e-01,-1.3021626962e-01
2.1782178218e-01,8.8953926852e-02,-1.3785316224e-01,-1.2467908375e-01,8.8953927731e-02,-1.3785316621e-01,-1.2467908343e-01
2.2772277228e-01,9.2301946409e-02,-1.3934326062e-01,-1.1805702523e-01,9.2301950735e-02,-1.3934325949e-01,-1.1805702662e-01
2.3762376238e-01,9.5560676953e-02,-1.4029425672e-01,-1.1040771966e-01,9.5560677562e-02,-1.4029426076e-01,-1.1040771973e-01
2.4752475248e-01,9.8726957572e-02,-1.4070249295e-01,-1.0179772068e-01,9.8726955606e-02,-1.4070249079e-01,-1.0179772170e-01
2.5742574257e-01,1.0179772036e-01,-1.4056637044e-01,-9.2301949636e-02,1.0179772170e-01,-1.4056637021e-01,-9.2301950735e-02
2.6732673267e-01,1.0477000527e-01,-1.3988642578e-01,-8.2003032107e-02,1.0477000506e-01,-1.3988642566e-01,-8.2003032435e-02
2.7722772277e-01,1.0764093290e-01,-1.3866528965e-01,-7.0990578930e-02,1.0764093022e-01,-1.3866528771e-01,-7.0990580816e-02
2.8712871287e-01,1.1040771987e-01,-1.3690767831e-01,-5.9360423847e-02,1.1040771973e-01,-1.3690768069e-01,-5.9360418568e-02
2.9702970297e-01,1.1306770152e-01,-1.3462040609e-01,-4.7213742425e-02,1.1306769690e-01,-1.3462040445e-01,-4.7213743269e-02
3.0693069307e-01,1.1561828862e-01,-1.3181230529e-01,-3.4656247048e-02,1.1561828837e-01,-1.3181230802e-01,-3.4656246833e-02
3.1683168317e-01,1.1805702504e-01,-1.2849425366e-01,-2.1797195258e-02,1.1805702662e-01,-1.2849425538e-01,-2.1797195856e-02
3.2673267327e-01,1.2038155014e-01,-1.2467908448e-01,-8.7484830929e-03,1.2038155232e-01,-1.2467908343e-01,-8.7484808507e-03
3.3663366337e-01,1.2258961573e-01,-1.2038155323e-01,4.3763575797e-03,1.2258961664e-01,-1.2038155232e-01,4.3763573469e-03
3.4653465347e-01,1.2467908410e-01,-1.1561829169e-01,1.7463115474e-02,1.2467908343e-01,-1.1561828837e-01,1.7463115529e-02
3.5643564356e-01,1.2664793338e-01,-1.1040771926e-01,3.0397924158e-02,1.2664793125e-01,-1.1040771973e-01,3.0397921832e-02
3.6633663366e-01,1.2849425248e-01,-1.0477000407e-01,4.3068226361e-02,1.2849425538e-01,-1.0477000506e-01,4.3068226575e-02
3.7623762376e-01,1.3021626897e-01,-9.8726953501e-02,5.5363781149e-02,1.3021626962e-01,-9.8726955606e-02,5.5363781583e-02
3.8613861386e-01,1.3181230641e-01,-9.2301949069e-02,6.7177599971e-02,1.3181230802e-01,-9.2301950735e-02,6.7177599493e-02
3.9603960396e-01,1.3328082420e-01,-8.5519846476e-02,7.8406881225e-02,1.3328082653e-01,-8.5519847548e-02,7.8406884685e-02
4.0594059406e-01,1.3462040441e-01,-7.8406886916e-02,8.8953928507e-02,1.3462040445e-01,-7.8406884685e-02,8.8953927731e-02
4.1584158416e-01,1.3582974237e-01,-7.0990582377e-02,9.8726952665e-02,1.3582974582e-01,-7.0990580816e-02,9.8726955606e-02
4.2574257426e-01,1.3690768207e-01,-6.3299628825e-02,1.0764092847e-01,1.3690768069e-01,-6.3299628182e-02,1.0764093022e-01
4.3564356436e-01,1.3785316922e-01,-5.5363784270e-02,1.1561828790e-01,1.3785316621e-01,-5.5363781583e-02,1.1561828837e-01
4.4554455446e-01,1.3866529183e-01,-4.7213741970e-02,1.2258961490e-01,1.3866528771e-01,-4.7213743269e-02,1.2258961664e-01
4.5544554455e-01,1.3934325896e-01,-3.8881046285e-02,1.2849425510e-01,1.3934325949e-01,-3.8881044154e-02,1.2849425538e-01
4.6534653465e-01,1.3988642934e-01,-3.0397919107e-02,1.3328083063e-01,1.3988642566e-01,-3.0397921832e-02,1.3328082653e-01
4.7524752475e-01,1.4029425867e-01,-2.1797194223e-02,1.3690767978e-01,1.4029426076e-01,-2.1797195856e-02,1.3690768069e-01
4.8514851485e-01,1.4056637371e-01,-1.3112142627e-02,1.3934326030e-01,1.4056637021e-01,-1.3112140764e-02,1.3934325949e-01
4.9504950495e-01,1.4070249059e-01,-4.3763545931e-03,1.4056637087e-01,1.4070249079e-01,-4.3763573469e-03,1.4056637021e-01
5.0495049505e-01,1.4070249237e-01,4.3763553240e-03,1.4056636855e-01,1.4070249079e-01,4.3763573469e-03,1.4056637021e-01
5.1485148515e-01,1.4056636701e-01,1.3112141424e-02,1.3934326274e-01,1.4056637021e-01,1.3112140764e-02,1.3934325949e-01
5.2475247525e-01,1.4029426479e-01,2.1797196040e-02,1.3690767734e-01,1.4029426076e-01,2.1797195856e-02,1.3690768069e-01
5.3465346535e-01,1.3988642418e-01,3.0397922181e-02,1.3328082645e-01,1.3988642566e-01,3.0397921832e-02,1.3328082653e-01
5.4455445545e-01,1.3934325818e-01,3.8881045170e-02,1.2849425588e-01,1.3934325949e-01,3.8881044154e-02,1.2849425538e-01
5.5445544554e-01,1.3866528548e-01,4.7213739894e-02,1.2258961529e-01,1.3866528771e-01,4.7213743269e-02,1.2258961664e-01
5.6435643564e-01,1.3785316347e-01,5.5363782200e-02,1.1561828838e-01,1.3785316621e-01,5.5363781583e-02,1.1561828837e-01
5.7425742574e-01,1.3690767808e-01,6.3299625555e-02,1.0764093012e-01,1.3690768069e-01,6.3299628182e-02,1.0764093022e-01
5.8415841584e-01,1.3582975080e-01,7.0990579118e-02,9.8726956974e-02,1.3582974582e-01,7.0990580816e-02,9.8726955606e-02
5.9405940594e-01,1.3462040473e-01,7.8406883764e-02,8.8953931156e-02,1.3462040445e-01,7.8406884685e-02,8.8953927731e-02
6.0396039604e-01,1.3328082628e-01,8.5519847508e-02,7.8406882521e-02,1.3328082653e-01,8.5519847548e-02,7.8406884685e-02
6.1386138614e-01,1.3181231043e-01,9.2301955750e-02,6.7177597738e-02,1.3181230802e-01,9.2301950735e-02,6.7177599493e-02
6.2376237624e-01,1.3021627254e-01,9.8726959125e-02,5.5363781584e-02,1.3021626962e-01,9.8726955606e-02,5.5363781583e-02
6.3366336634e-01,1.2849425843e-01,1.0477000685e-01,4.3068225262e-02,1.2849425538e-01,1.0477000506e-01,4.3068226575e-02
6.4356435644e-01,1.2664792968e-01,1.1040772008e-01,3.0397923775e-02,1.2664793125e-01,1.1040771973e-01,3.0397921832e-02
6.5346534653e-01,1.2467908233e-01,1.1561828667e-01,1.7463112100e-02,1.2467908343e-01,1.1561828837e-01,1.7463115529e-02
6.6336633663e-01,1.2258961618e-01,1.2038154892e-01,4.3763558959e-03,1.2258961664e-01,1.2038155232e-01,4.3763573469e-03
6.7326732673e-01,1.2038155509e-01,1.2467908434e-01,-8.7484791158e-03,1.2038155232e-01,1.2467908343e-01,-8.7484808507e-03
6.8316831683e-01,1.1805702847e-01,1.2849425619e-01,-2.1797195967e-02,1.1805702662e-01,1.2849425538e-01,-2.1797195856e-02
6.9306930693e-01,1.1561828622e-01,1.3181230822e-01,-3.4656246425e-02,1.1561828837e-01,1.3181230802e-01,-3.4656246833e-02
7.0297029703e-01,1.1306768997e-01,1.3462040633e-01,-4.7213742058e-02,1.1306769690e-01,1.3462040445e-01,-4.7213743269e-02
7.1287128713e-01,1.1040771799e-01,1.3690767691e-01,-5.9360418526e-02,1.1040771973e-01,1.3690768069e-01,-5.9360418568e-02
7.2277227723e-01,1.0764092776e-01,1.3866528979e-01,-7.0990581227e-02,1.0764093022e-01,1.3866528771e-01,-7.0990580816e-02
7.3267326733e-01,1.0477000620e-01,1.3988642119e-01,-8.2003033815e-02,1.0477000506e-01,1.3988642566e-01,-8.2003032435e-02
7.4257425743e-01,1.0179772152e-01,1.4056636623e-01,-9.2301952893e-02,1.0179772170e-01,1.4056637021e-01,-9.2301950735e-02
7.5247524752e-01,9.8726952848e-02,1.4070249392e-01,-1.0179771955e-01,9.8726955606e-02,1.4070249079e-01,-1.0179772170e-01
7.6237623762e-01,9.5560678408e-02,1.4029425948e-01,-1.1040772236e-01,9.5560677562e-02,1.4029426076e-01,-1.1040771973e-01
7.7227722772e-01,9.2301954838e-02,1.3934326416e-01,-1.1805702951e-01,9.2301950735e-02,1.3934325949e-01,-1.1805702662e-01
7.8217821782e-01,8.8953928903e-02,1.3785316849e-01,-1.2467908256e-01,8.8953927731e-02,1.3785316621e-01,-1.2467908343e-01
7.9207920792e-01,8.5519848124e-02,1.3582974727e-01,-1.3021626851e-01,8.5519847548e-02,1.3582974582e-01,-1.3021626962e-01
8.0198019802e-01,8.2003030909e-02,1.3328082828e-01,-1.3462040327e-01,8.2003032435e-02,1.3328082653e-01,-1.3462040445e-01
8.1188118812e-01,7.8406885186e-02,1.3021626587e-01,-1.3785316474e-01,7.8406884685e-02,1.3021626962e-01,-1.3785316621e-01
8.2178217822e-01,7.4734885540e-02,1.2664793089e-01,-1.3988642777e-01,7.4734883337e-02,1.2664793125e-01,-1.3988642566e-01
8.3168316832e-01,7.0990582072e-02,1.2258961409e-01,-1.4070248742e-01,7.0990580816e-02,1.2258961664e-01,-1.4070249079e-01
8.4158415842e-01,6.7177598843e-02,1.1805702585e-01,-1.4029426160e-01,6.7177599493e-02,1.1805702662e-01,-1.4029426076e-01
8.5148514851e-01,6.3299627125e-02,1.1306769708e-01,-1.3866528902e-01,6.3299628182e-02,1.1306769690e-01,-1.3866528771e-01
8.6138613861e-01,5.9360415245e-02,1.0764093150e-01,-1.3582974369e-01,5.9360418568e-02,1.0764093022e-01,-1.3582974582e-01
8.7128712871e-01,5.5363784218e-02,1.0179772269e-01,-1.3181231038e-01,5.5363781583e-02,1.0179772170e-01,-1.3181230802e-01
8.8118811881e-01,5.1313579361e-02,9.5560678437e-02,-1.2664793139e-01,5.1313583715e-02,9.5560677562e-02,-1.2664793125e-01
8.9108910891e-01,4.7213741091e-02,8.8953928103e-02,-1.2038155214e-01,4.7213743269e-02,8.8953927731e-02,-1.2038155232e-01
9.0099009901e-01,4.3068225595e-02,8.2003031564e-02,-1.1306769867e-01,4.3068226575e-02,8.2003032435e-02,-1.1306769690e-01
9.1089108911e-01,3.8881045999e-02,7.4734883659e-02,-1.0477000196e-01,3.8881044154e-02,7.4734883337e-02,-1.0477000506e-01
9.2079207921e-01,3.4656245355e-02,6.7177597583e-02,-9.5560676903e-02,3.4656246833e-02,6.7177599493e-02,-9.5560677562e-02
9.3069306931e-01,3.0397926577e-02,5.9360420731e-02,-8.5519850964e-02,3.0397921832e-02,5.9360418568e-02,-8.5519847548e-02
9.4059405941e-01,2.6110186824e-02,5.1313584318e-02,-7.4734880388e-02,2.6110188805e-02,5.1313583715e-02,-7.4734883337e-02
9.5049504950e-01,2.1797196485e-02,4.3068226072e-02,-6.3299628759e-02,2.1797195856e-02,4.3068226575e-02,-6.3299628182e-02
9.6039603960e-01,1.7463116664e-02,3.4656247119e-02,-5.1313584252e-02,1.7463115529e-02,3.4656246833e-02,-5.1313583715e-02
9.7029702970e-01,1.3112143651e-02,2.6110184365e-02,-3.8881045879e-02,1.3112140764e-02,2.6110188805e-02,-3.8881044154e-02
9.8019801980e-01,8.7484791764e-03,1.7463117510e-02,-2.6110190428e-02,8.7484808507e-03,1.7463115529e-02,-2.6110188805e-02
9.9009900990e-01,4.3763588619e-03,8.7484790494e-03,-1.3112138188e-02,4.3763573469e-03,8.7484808507e-03,-1.3112140764e-02
1.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
x,Vector 1,Vector 2,Vector 3
0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
9.9009900990e-03,4.3763580486e-03,-8.7484808732e-03,-1.3112140868e-02
1.9801980198e-02,8.7484805374e-03,-1.7463118426e-02,-2.6110190173e-02
2.9702970297e-02,1.3112137258e-02,-2.6110188342e-02,-3.8881042300e-02
3.9603960396e-02,1.7463113948e-02,-3.4656251014e-02,-5.1313582739e-02
4.9504950495e-02,2.1797194330e-02,-4.3068225457e-02,-6.3299631766e-02
5.9405940594e-02,2.6110192331e-02,-5.1313581763e-02,-7.4734880361e-02
6.9306930693e-02,3.0397918929e-02,-5.9360418816e-02,-8.5519850123e-02
7.9207920792e-02,3.4656246898e-02,-6.7177598362e-02,-9.5560679417e-02
8.9108910891e-02,3.8881042315e-02,-7.4734886241e-02,-1.0477000717e-01
9.9009900990e-02,4.3068230096e-02,-8.2003031501e-02,-1.1306769719e-01
1.0891089109e-01,4.7213744503e-02,-8.8953927224e-02,-1.2038155127e-01
1.1881188119e-01,5.1313588425e-02,-9.5560676214e-02,-1.2664793098e-01
1.2871287129e-01,5.5363780001e-02,-1.0179771917e-01,-1.3181231002e-01
1.3861386139e-01,5.9360419789e-02,-1.0764092918e-01,-1.3582974462e-01
1.4851485149e-01,6.3299627984e-02,-1.1306769819e-01,-1.3866528556e-01
1.5841584158e-01,6.7177601217e-02,-1.1805702763e-01,-1.4029426114e-01
1.6831683168e-01,7.0990579025e-02,-1.2258961789e-01,-1.4070249027e-01
1.7821782178e-01,7.4734880844e-02,-1.2664793546e-01,-1.3988642874e-01
1.8811881188e-01,7.8406882603e-02,-1.3021626991e-01,-1.3785316434e-01
1.9801980198e-01,8.2003032834e-02,-1.3328082864e-01,-1.3462040439e-01
2.0792079208e-01,8.5519846919e-02,-1.3582974378e-01,-1.3021627110e-01
2.1782178218e-01,8.8953926852e-02,-1.3785316224e-01,-1.2467908375e-01
2.2772277228e-01,9.2301946409e-02,-1.3934326062e-01,-1.1805702523e-01
2.3762376238e-01,9.5560676953e-02,-1.4029425672e-01,-1.1040771966e-01
2.4752475248e-01,9.8726957572e-02,-1.4070249295e-01,-1.0179772068e-01
2.5742574257e-01,1.0179772036e-01,-1.4056637044e-01,-9.2301949636e-02
2.6732673267e-01,1.0477000527e-01,-1.3988642578e-01,-8.2003032107e-02
2.7722772277e-01,1.0764093290e-01,-1.3866528965e-01,-7.0990578930e-02
2.8712871287e-01,1.1040771987e-01,-1.3690767831e-01,-5.9360423847e-02
2.9702970297e-01,1.1306770152e-01,-1.3462040609e-01,-4.7213742425e-02
3.0693069307e-01,1.1561828862e-01,-1.3181230529e-01,-3.4656247048e-02
3.1683168317e-01,1.1805702504e-01,-1.2849425366e-01,-2.1797195258e-02
3.2673267327e-01,1.2038155014e-01,-1.2467908448e-01,-8.7484830929e-03
3.3663366337e-01,1.2258961573e-01,-1.2038155323e-01,4.3763575797e-03
3.4653465347e-01,1.2467908410e-01,-1.1561829169e-01,1.7463115474e-02
3.5643564356e-01,1.2664793338e-01,-1.1040771926e-01,3.0397924158e-02
3.6633663366e-01,1.2849425248e-01,-1.0477000407e-01,4.3068226361e-02
3.7623762376e-01,1.3021626897e-01,-9.8726953501e-02,5.5363781149e-02
3.8613861386e-01,1.3181230641e-01,-9.2301949069e-02,6.7177599971e-02
3.9603960396e-01,1.3328082420e-01,-8.5519846476e-02,7.8406881225e-02
4.0594059406e-01,1.3462040441e-01,-7.8406886916e-02,8.8953928507e-02
4.1584158416e-01,1.3582974237e-01,-7.0990582377e-02,9.8726952665e-02
4.2574257426e-01,1.3690768207e-01,-6.3299628825e-02,1.0764092847e-01
4.3564356436e-01,1.3785316922e-01,-5.5363784270e-02,1.1561828790e-01
4.4554455446e-01,1.3866529183e-01,-4.7213741970e-02,1.2258961490e-01
4.5544554455e-01,1.3934325896e-01,-3.8881046285e-02,1.2849425510e-01
4.6534653465e-01,1.3988642934e-01,-3.0397919107e-02,1.3328083063e-01
4.7524752475e-01,1.4029425867e-01,-2.1797194223e-02,1.3690767978e-01
4.8514851485e-01,1.4056637371e-01,-1.3112142627e-02,1.3934326030e-01
4.9504950495e-01,1.4070249059e-01,-4.3763545931e-03,1.4056637087e-01
5.0495049505e-01,1.4070249237e-01,4.3763553240e-03,1.4056636855e-01
5.1485148515e-01,1.4056636701e-01,1.3112141424e-02,1.3934326274e-01
5.2475247525e-01,1.4029426479e-01,2.1797196040e-02,1.3690767734e-01
5.3465346535e-01,1.3988642418e-01,3.0397922181e-02,1.3328082645e-01
5.4455445545e-01,1.3934325818e-01,3.8881045170e-02,1.2849425588e-01
5.5445544554e-01,1.3866528548e-01,4.7213739894e-02,1.2258961529e-01
5.6435643564e-01,1.3785316347e-01,5.5363782200e-02,1.1561828838e-01
5.7425742574e-01,1.3690767808e-01,6.3299625555e-02,1.0764093012e-01
5.8415841584e-01,1.3582975080e-01,7.0990579118e-02,9.8726956974e-02
5.9405940594e-01,1.3462040473e-01,7.8406883764e-02,8.8953931156e-02
6.0396039604e-01,1.3328082628e-01,8.5519847508e-02,7.8406882521e-02
6.1386138614e-01,1.3181231043e-01,9.2301955750e-02,6.7177597738e-02
6.2376237624e-01,1.3021627254e-01,9.8726959125e-02,5.5363781584e-02
6.3366336634e-01,1.2849425843e-01,1.0477000685e-01,4.3068225262e-02
6.4356435644e-01,1.2664792968e-01,1.1040772008e-01,3.0397923775e-02
6.5346534653e-01,1.2467908233e-01,1.1561828667e-01,1.7463112100e-02
6.6336633663e-01,1.2258961618e-01,1.2038154892e-01,4.3763558959e-03
6.7326732673e-01,1.2038155509e-01,1.2467908434e-01,-8.7484791158e-03
6.8316831683e-01,1.1805702847e-01,1.2849425619e-01,-2.1797195967e-02
6.9306930693e-01,1.1561828622e-01,1.3181230822e-01,-3.4656246425e-02
7.0297029703e-01,1.1306768997e-01,1.3462040633e-01,-4.7213742058e-02
7.1287128713e-01,1.1040771799e-01,1.3690767691e-01,-5.9360418526e-02
7.2277227723e-01,1.0764092776e-01,1.3866528979e-01,-7.0990581227e-02
7.3267326733e-01,1.0477000620e-01,1.3988642119e-01,-8.2003033815e-02
7.4257425743e-01,1.0179772152e-01,1.4056636623e-01,-9.2301952893e-02
7.5247524752e-01,9.8726952848e-02,1.4070249392e-01,-1.0179771955e-01
7.6237623762e-01,9.5560678408e-02,1.4029425948e-01,-1.1040772236e-01
7.7227722772e-01,9.2301954838e-02,1.3934326416e-01,-1.1805702951e-01
7.8217821782e-01,8.8953928903e-02,1.3785316849e-01,-1.2467908256e-01
7.9207920792e-01,8.5519848124e-02,1.3582974727e-01,-1.3021626851e-01
8.0198019802e-01,8.2003030909e-02,1.3328082828e-01,-1.3462040327e-01
8.1188118812e-01,7.8406885186e-02,1.3021626587e-01,-1.3785316474e-01
8.2178217822e-01,7.4734885540e-02,1.2664793089e-01,-1.3988642777e-01
8.3168316832e-01,7.0990582072e-02,1.2258961409e-01,-1.4070248742e-01
8.4158415842e-01,6.7177598843e-02,1.1805702585e-01,-1.4029426160e-01
8.5148514851e-01,6.3299627125e-02,1.1306769708e-01,-1.3866528902e-01
8.6138613861e-01,5.9360415245e-02,1.0764093150e-01,-1.3582974369e-01
8.7128712871e-01,5.5363784218e-02,1.0179772269e-01,-1.3181231038e-01
8.8118811881e-01,5.1313579361e-02,9.5560678437e-02,-1.2664793139e-01
8.9108910891e-01,4.7213741091e-02,8.8953928103e-02,-1.2038155214e-01
9.0099009901e-01,4.3068225595e-02,8.2003031564e-02,-1.1306769867e-01
9.1089108911e-01,3.8881045999e-02,7.4734883659e-02,-1.0477000196e-01
9.2079207921e-01,3.4656245355e-02,6.7177597583e-02,-9.5560676903e-02
9.3069306931e-01,3.0397926577e-02,5.9360420731e-02,-8.5519850964e-02
9.4059405941e-01,2.6110186824e-02,5.1313584318e-02,-7.4734880388e-02
9.5049504950e-01,2.1797196485e-02,4.3068226072e-02,-6.3299628759e-02
9.6039603960e-01,1.7463116664e-02,3.4656247119e-02,-5.1313584252e-02
9.7029702970e-01,1.3112143651e-02,2.6110184365e-02,-3.8881045879e-02
9.8019801980e-01,8.7484791764e-03,1.7463117510e-02,-2.6110190428e-02
9.9009900990e-01,4.3763588619e-03,8.7484790494e-03,-1.3112138188e-02
1.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00

1 x Vector 1 Vector 2 Vector 3 Analytic 1 Analytic 2 Analytic 3
2 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
3 9.9009900990e-03 4.3763580486e-03 -8.7484808732e-03 -1.3112140868e-02 4.3763573469e-03 -8.7484808507e-03 -1.3112140764e-02
4 1.9801980198e-02 8.7484805374e-03 -1.7463118426e-02 -2.6110190173e-02 8.7484808507e-03 -1.7463115529e-02 -2.6110188805e-02
5 2.9702970297e-02 1.3112137258e-02 -2.6110188342e-02 -3.8881042300e-02 1.3112140764e-02 -2.6110188805e-02 -3.8881044154e-02
6 3.9603960396e-02 1.7463113948e-02 -3.4656251014e-02 -5.1313582739e-02 1.7463115529e-02 -3.4656246833e-02 -5.1313583715e-02
7 4.9504950495e-02 2.1797194330e-02 -4.3068225457e-02 -6.3299631766e-02 2.1797195856e-02 -4.3068226575e-02 -6.3299628182e-02
8 5.9405940594e-02 2.6110192331e-02 -5.1313581763e-02 -7.4734880361e-02 2.6110188805e-02 -5.1313583715e-02 -7.4734883337e-02
9 6.9306930693e-02 3.0397918929e-02 -5.9360418816e-02 -8.5519850123e-02 3.0397921832e-02 -5.9360418568e-02 -8.5519847548e-02
10 7.9207920792e-02 3.4656246898e-02 -6.7177598362e-02 -9.5560679417e-02 3.4656246833e-02 -6.7177599493e-02 -9.5560677562e-02
11 8.9108910891e-02 3.8881042315e-02 -7.4734886241e-02 -1.0477000717e-01 3.8881044154e-02 -7.4734883337e-02 -1.0477000506e-01
12 9.9009900990e-02 4.3068230096e-02 -8.2003031501e-02 -1.1306769719e-01 4.3068226575e-02 -8.2003032435e-02 -1.1306769690e-01
13 1.0891089109e-01 4.7213744503e-02 -8.8953927224e-02 -1.2038155127e-01 4.7213743269e-02 -8.8953927731e-02 -1.2038155232e-01
14 1.1881188119e-01 5.1313588425e-02 -9.5560676214e-02 -1.2664793098e-01 5.1313583715e-02 -9.5560677562e-02 -1.2664793125e-01
15 1.2871287129e-01 5.5363780001e-02 -1.0179771917e-01 -1.3181231002e-01 5.5363781583e-02 -1.0179772170e-01 -1.3181230802e-01
16 1.3861386139e-01 5.9360419789e-02 -1.0764092918e-01 -1.3582974462e-01 5.9360418568e-02 -1.0764093022e-01 -1.3582974582e-01
17 1.4851485149e-01 6.3299627984e-02 -1.1306769819e-01 -1.3866528556e-01 6.3299628182e-02 -1.1306769690e-01 -1.3866528771e-01
18 1.5841584158e-01 6.7177601217e-02 -1.1805702763e-01 -1.4029426114e-01 6.7177599493e-02 -1.1805702662e-01 -1.4029426076e-01
19 1.6831683168e-01 7.0990579025e-02 -1.2258961789e-01 -1.4070249027e-01 7.0990580816e-02 -1.2258961664e-01 -1.4070249079e-01
20 1.7821782178e-01 7.4734880844e-02 -1.2664793546e-01 -1.3988642874e-01 7.4734883337e-02 -1.2664793125e-01 -1.3988642566e-01
21 1.8811881188e-01 7.8406882603e-02 -1.3021626991e-01 -1.3785316434e-01 7.8406884685e-02 -1.3021626962e-01 -1.3785316621e-01
22 1.9801980198e-01 8.2003032834e-02 -1.3328082864e-01 -1.3462040439e-01 8.2003032435e-02 -1.3328082653e-01 -1.3462040445e-01
23 2.0792079208e-01 8.5519846919e-02 -1.3582974378e-01 -1.3021627110e-01 8.5519847548e-02 -1.3582974582e-01 -1.3021626962e-01
24 2.1782178218e-01 8.8953926852e-02 -1.3785316224e-01 -1.2467908375e-01 8.8953927731e-02 -1.3785316621e-01 -1.2467908343e-01
25 2.2772277228e-01 9.2301946409e-02 -1.3934326062e-01 -1.1805702523e-01 9.2301950735e-02 -1.3934325949e-01 -1.1805702662e-01
26 2.3762376238e-01 9.5560676953e-02 -1.4029425672e-01 -1.1040771966e-01 9.5560677562e-02 -1.4029426076e-01 -1.1040771973e-01
27 2.4752475248e-01 9.8726957572e-02 -1.4070249295e-01 -1.0179772068e-01 9.8726955606e-02 -1.4070249079e-01 -1.0179772170e-01
28 2.5742574257e-01 1.0179772036e-01 -1.4056637044e-01 -9.2301949636e-02 1.0179772170e-01 -1.4056637021e-01 -9.2301950735e-02
29 2.6732673267e-01 1.0477000527e-01 -1.3988642578e-01 -8.2003032107e-02 1.0477000506e-01 -1.3988642566e-01 -8.2003032435e-02
30 2.7722772277e-01 1.0764093290e-01 -1.3866528965e-01 -7.0990578930e-02 1.0764093022e-01 -1.3866528771e-01 -7.0990580816e-02
31 2.8712871287e-01 1.1040771987e-01 -1.3690767831e-01 -5.9360423847e-02 1.1040771973e-01 -1.3690768069e-01 -5.9360418568e-02
32 2.9702970297e-01 1.1306770152e-01 -1.3462040609e-01 -4.7213742425e-02 1.1306769690e-01 -1.3462040445e-01 -4.7213743269e-02
33 3.0693069307e-01 1.1561828862e-01 -1.3181230529e-01 -3.4656247048e-02 1.1561828837e-01 -1.3181230802e-01 -3.4656246833e-02
34 3.1683168317e-01 1.1805702504e-01 -1.2849425366e-01 -2.1797195258e-02 1.1805702662e-01 -1.2849425538e-01 -2.1797195856e-02
35 3.2673267327e-01 1.2038155014e-01 -1.2467908448e-01 -8.7484830929e-03 1.2038155232e-01 -1.2467908343e-01 -8.7484808507e-03
36 3.3663366337e-01 1.2258961573e-01 -1.2038155323e-01 4.3763575797e-03 1.2258961664e-01 -1.2038155232e-01 4.3763573469e-03
37 3.4653465347e-01 1.2467908410e-01 -1.1561829169e-01 1.7463115474e-02 1.2467908343e-01 -1.1561828837e-01 1.7463115529e-02
38 3.5643564356e-01 1.2664793338e-01 -1.1040771926e-01 3.0397924158e-02 1.2664793125e-01 -1.1040771973e-01 3.0397921832e-02
39 3.6633663366e-01 1.2849425248e-01 -1.0477000407e-01 4.3068226361e-02 1.2849425538e-01 -1.0477000506e-01 4.3068226575e-02
40 3.7623762376e-01 1.3021626897e-01 -9.8726953501e-02 5.5363781149e-02 1.3021626962e-01 -9.8726955606e-02 5.5363781583e-02
41 3.8613861386e-01 1.3181230641e-01 -9.2301949069e-02 6.7177599971e-02 1.3181230802e-01 -9.2301950735e-02 6.7177599493e-02
42 3.9603960396e-01 1.3328082420e-01 -8.5519846476e-02 7.8406881225e-02 1.3328082653e-01 -8.5519847548e-02 7.8406884685e-02
43 4.0594059406e-01 1.3462040441e-01 -7.8406886916e-02 8.8953928507e-02 1.3462040445e-01 -7.8406884685e-02 8.8953927731e-02
44 4.1584158416e-01 1.3582974237e-01 -7.0990582377e-02 9.8726952665e-02 1.3582974582e-01 -7.0990580816e-02 9.8726955606e-02
45 4.2574257426e-01 1.3690768207e-01 -6.3299628825e-02 1.0764092847e-01 1.3690768069e-01 -6.3299628182e-02 1.0764093022e-01
46 4.3564356436e-01 1.3785316922e-01 -5.5363784270e-02 1.1561828790e-01 1.3785316621e-01 -5.5363781583e-02 1.1561828837e-01
47 4.4554455446e-01 1.3866529183e-01 -4.7213741970e-02 1.2258961490e-01 1.3866528771e-01 -4.7213743269e-02 1.2258961664e-01
48 4.5544554455e-01 1.3934325896e-01 -3.8881046285e-02 1.2849425510e-01 1.3934325949e-01 -3.8881044154e-02 1.2849425538e-01
49 4.6534653465e-01 1.3988642934e-01 -3.0397919107e-02 1.3328083063e-01 1.3988642566e-01 -3.0397921832e-02 1.3328082653e-01
50 4.7524752475e-01 1.4029425867e-01 -2.1797194223e-02 1.3690767978e-01 1.4029426076e-01 -2.1797195856e-02 1.3690768069e-01
51 4.8514851485e-01 1.4056637371e-01 -1.3112142627e-02 1.3934326030e-01 1.4056637021e-01 -1.3112140764e-02 1.3934325949e-01
52 4.9504950495e-01 1.4070249059e-01 -4.3763545931e-03 1.4056637087e-01 1.4070249079e-01 -4.3763573469e-03 1.4056637021e-01
53 5.0495049505e-01 1.4070249237e-01 4.3763553240e-03 1.4056636855e-01 1.4070249079e-01 4.3763573469e-03 1.4056637021e-01
54 5.1485148515e-01 1.4056636701e-01 1.3112141424e-02 1.3934326274e-01 1.4056637021e-01 1.3112140764e-02 1.3934325949e-01
55 5.2475247525e-01 1.4029426479e-01 2.1797196040e-02 1.3690767734e-01 1.4029426076e-01 2.1797195856e-02 1.3690768069e-01
56 5.3465346535e-01 1.3988642418e-01 3.0397922181e-02 1.3328082645e-01 1.3988642566e-01 3.0397921832e-02 1.3328082653e-01
57 5.4455445545e-01 1.3934325818e-01 3.8881045170e-02 1.2849425588e-01 1.3934325949e-01 3.8881044154e-02 1.2849425538e-01
58 5.5445544554e-01 1.3866528548e-01 4.7213739894e-02 1.2258961529e-01 1.3866528771e-01 4.7213743269e-02 1.2258961664e-01
59 5.6435643564e-01 1.3785316347e-01 5.5363782200e-02 1.1561828838e-01 1.3785316621e-01 5.5363781583e-02 1.1561828837e-01
60 5.7425742574e-01 1.3690767808e-01 6.3299625555e-02 1.0764093012e-01 1.3690768069e-01 6.3299628182e-02 1.0764093022e-01
61 5.8415841584e-01 1.3582975080e-01 7.0990579118e-02 9.8726956974e-02 1.3582974582e-01 7.0990580816e-02 9.8726955606e-02
62 5.9405940594e-01 1.3462040473e-01 7.8406883764e-02 8.8953931156e-02 1.3462040445e-01 7.8406884685e-02 8.8953927731e-02
63 6.0396039604e-01 1.3328082628e-01 8.5519847508e-02 7.8406882521e-02 1.3328082653e-01 8.5519847548e-02 7.8406884685e-02
64 6.1386138614e-01 1.3181231043e-01 9.2301955750e-02 6.7177597738e-02 1.3181230802e-01 9.2301950735e-02 6.7177599493e-02
65 6.2376237624e-01 1.3021627254e-01 9.8726959125e-02 5.5363781584e-02 1.3021626962e-01 9.8726955606e-02 5.5363781583e-02
66 6.3366336634e-01 1.2849425843e-01 1.0477000685e-01 4.3068225262e-02 1.2849425538e-01 1.0477000506e-01 4.3068226575e-02
67 6.4356435644e-01 1.2664792968e-01 1.1040772008e-01 3.0397923775e-02 1.2664793125e-01 1.1040771973e-01 3.0397921832e-02
68 6.5346534653e-01 1.2467908233e-01 1.1561828667e-01 1.7463112100e-02 1.2467908343e-01 1.1561828837e-01 1.7463115529e-02
69 6.6336633663e-01 1.2258961618e-01 1.2038154892e-01 4.3763558959e-03 1.2258961664e-01 1.2038155232e-01 4.3763573469e-03
70 6.7326732673e-01 1.2038155509e-01 1.2467908434e-01 -8.7484791158e-03 1.2038155232e-01 1.2467908343e-01 -8.7484808507e-03
71 6.8316831683e-01 1.1805702847e-01 1.2849425619e-01 -2.1797195967e-02 1.1805702662e-01 1.2849425538e-01 -2.1797195856e-02
72 6.9306930693e-01 1.1561828622e-01 1.3181230822e-01 -3.4656246425e-02 1.1561828837e-01 1.3181230802e-01 -3.4656246833e-02
73 7.0297029703e-01 1.1306768997e-01 1.3462040633e-01 -4.7213742058e-02 1.1306769690e-01 1.3462040445e-01 -4.7213743269e-02
74 7.1287128713e-01 1.1040771799e-01 1.3690767691e-01 -5.9360418526e-02 1.1040771973e-01 1.3690768069e-01 -5.9360418568e-02
75 7.2277227723e-01 1.0764092776e-01 1.3866528979e-01 -7.0990581227e-02 1.0764093022e-01 1.3866528771e-01 -7.0990580816e-02
76 7.3267326733e-01 1.0477000620e-01 1.3988642119e-01 -8.2003033815e-02 1.0477000506e-01 1.3988642566e-01 -8.2003032435e-02
77 7.4257425743e-01 1.0179772152e-01 1.4056636623e-01 -9.2301952893e-02 1.0179772170e-01 1.4056637021e-01 -9.2301950735e-02
78 7.5247524752e-01 9.8726952848e-02 1.4070249392e-01 -1.0179771955e-01 9.8726955606e-02 1.4070249079e-01 -1.0179772170e-01
79 7.6237623762e-01 9.5560678408e-02 1.4029425948e-01 -1.1040772236e-01 9.5560677562e-02 1.4029426076e-01 -1.1040771973e-01
80 7.7227722772e-01 9.2301954838e-02 1.3934326416e-01 -1.1805702951e-01 9.2301950735e-02 1.3934325949e-01 -1.1805702662e-01
81 7.8217821782e-01 8.8953928903e-02 1.3785316849e-01 -1.2467908256e-01 8.8953927731e-02 1.3785316621e-01 -1.2467908343e-01
82 7.9207920792e-01 8.5519848124e-02 1.3582974727e-01 -1.3021626851e-01 8.5519847548e-02 1.3582974582e-01 -1.3021626962e-01
83 8.0198019802e-01 8.2003030909e-02 1.3328082828e-01 -1.3462040327e-01 8.2003032435e-02 1.3328082653e-01 -1.3462040445e-01
84 8.1188118812e-01 7.8406885186e-02 1.3021626587e-01 -1.3785316474e-01 7.8406884685e-02 1.3021626962e-01 -1.3785316621e-01
85 8.2178217822e-01 7.4734885540e-02 1.2664793089e-01 -1.3988642777e-01 7.4734883337e-02 1.2664793125e-01 -1.3988642566e-01
86 8.3168316832e-01 7.0990582072e-02 1.2258961409e-01 -1.4070248742e-01 7.0990580816e-02 1.2258961664e-01 -1.4070249079e-01
87 8.4158415842e-01 6.7177598843e-02 1.1805702585e-01 -1.4029426160e-01 6.7177599493e-02 1.1805702662e-01 -1.4029426076e-01
88 8.5148514851e-01 6.3299627125e-02 1.1306769708e-01 -1.3866528902e-01 6.3299628182e-02 1.1306769690e-01 -1.3866528771e-01
89 8.6138613861e-01 5.9360415245e-02 1.0764093150e-01 -1.3582974369e-01 5.9360418568e-02 1.0764093022e-01 -1.3582974582e-01
90 8.7128712871e-01 5.5363784218e-02 1.0179772269e-01 -1.3181231038e-01 5.5363781583e-02 1.0179772170e-01 -1.3181230802e-01
91 8.8118811881e-01 5.1313579361e-02 9.5560678437e-02 -1.2664793139e-01 5.1313583715e-02 9.5560677562e-02 -1.2664793125e-01
92 8.9108910891e-01 4.7213741091e-02 8.8953928103e-02 -1.2038155214e-01 4.7213743269e-02 8.8953927731e-02 -1.2038155232e-01
93 9.0099009901e-01 4.3068225595e-02 8.2003031564e-02 -1.1306769867e-01 4.3068226575e-02 8.2003032435e-02 -1.1306769690e-01
94 9.1089108911e-01 3.8881045999e-02 7.4734883659e-02 -1.0477000196e-01 3.8881044154e-02 7.4734883337e-02 -1.0477000506e-01
95 9.2079207921e-01 3.4656245355e-02 6.7177597583e-02 -9.5560676903e-02 3.4656246833e-02 6.7177599493e-02 -9.5560677562e-02
96 9.3069306931e-01 3.0397926577e-02 5.9360420731e-02 -8.5519850964e-02 3.0397921832e-02 5.9360418568e-02 -8.5519847548e-02
97 9.4059405941e-01 2.6110186824e-02 5.1313584318e-02 -7.4734880388e-02 2.6110188805e-02 5.1313583715e-02 -7.4734883337e-02
98 9.5049504950e-01 2.1797196485e-02 4.3068226072e-02 -6.3299628759e-02 2.1797195856e-02 4.3068226575e-02 -6.3299628182e-02
99 9.6039603960e-01 1.7463116664e-02 3.4656247119e-02 -5.1313584252e-02 1.7463115529e-02 3.4656246833e-02 -5.1313583715e-02
100 9.7029702970e-01 1.3112143651e-02 2.6110184365e-02 -3.8881045879e-02 1.3112140764e-02 2.6110188805e-02 -3.8881044154e-02
101 9.8019801980e-01 8.7484791764e-03 1.7463117510e-02 -2.6110190428e-02 8.7484808507e-03 1.7463115529e-02 -2.6110188805e-02
102 9.9009900990e-01 4.3763588619e-03 8.7484790494e-03 -1.3112138188e-02 4.3763573469e-03 8.7484808507e-03 -1.3112140764e-02
103 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00

View File

@ -0,0 +1,9 @@
x,Vector 1,Vector 2,Vector 3
0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
1.4285714286e-01,2.3192061397e-01,-4.1790650593e-01,-5.2112088916e-01
2.8571428571e-01,4.1790650598e-01,-5.2112088916e-01,-2.3192061388e-01
4.2857142857e-01,5.2112088920e-01,-2.3192061385e-01,4.1790650595e-01
5.7142857143e-01,5.2112088915e-01,2.3192061400e-01,4.1790650592e-01
7.1428571429e-01,4.1790650588e-01,5.2112088921e-01,-2.3192061394e-01
8.5714285714e-01,2.3192061389e-01,4.1790650591e-01,-5.2112088921e-01
1.0000000000e+00,0.0000000000e+00,0.0000000000e+00,0.0000000000e+00
1 x Vector 1 Vector 2 Vector 3
2 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00
3 1.4285714286e-01 2.3192061397e-01 -4.1790650593e-01 -5.2112088916e-01
4 2.8571428571e-01 4.1790650598e-01 -5.2112088916e-01 -2.3192061388e-01
5 4.2857142857e-01 5.2112088920e-01 -2.3192061385e-01 4.1790650595e-01
6 5.7142857143e-01 5.2112088915e-01 2.3192061400e-01 4.1790650592e-01
7 7.1428571429e-01 4.1790650588e-01 5.2112088921e-01 -2.3192061394e-01
8 8.5714285714e-01 2.3192061389e-01 4.1790650591e-01 -5.2112088921e-01
9 1.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00

View File

@ -1,97 +1,97 @@
N,T
5,32
6,51
7,68
8,103
9,127
10,160
11,199
12,248
13,281
14,346
15,406
16,459
17,530
18,593
19,659
20,742
21,839
22,892
23,982
24,1087
25,1168
26,1264
27,1385
28,1463
29,1615
30,1715
31,1850
32,1971
33,2106
34,2211
35,2384
36,2501
37,2674
38,2836
39,3007
40,3118
41,3262
42,3476
43,3616
44,3836
45,3987
46,4219
47,4360
48,4593
49,4747
50,4957
51,5185
52,5344
53,5602
54,5790
55,6069
56,6271
57,6473
58,6764
6,53
7,73
8,98
9,130
10,157
11,201
12,254
13,293
14,349
15,394
16,458
17,518
18,587
19,649
20,740
21,827
22,911
23,999
24,1073
25,1187
26,1299
27,1410
28,1502
29,1604
30,1725
31,1856
32,1979
33,2089
34,2227
35,2383
36,2536
37,2644
38,2810
39,3000
40,3138
41,3299
42,3445
43,3638
44,3828
45,4015
46,4143
47,4348
48,4611
49,4773
50,4994
51,5163
52,5363
53,5586
54,5784
55,6075
56,6275
57,6550
58,6711
59,6957
60,7235
61,7514
62,7675
63,7985
64,8242
65,8534
66,8718
67,8997
68,9330
69,9602
70,9930
71,10181
72,10451
73,10812
74,11076
75,11364
76,11719
77,12054
78,12368
79,12654
80,13032
81,13392
82,13736
83,14043
84,14408
85,14682
86,15134
87,15503
88,15850
89,16246
90,16565
91,16993
92,17336
93,17636
94,18073
95,18461
96,18968
97,19335
98,19709
99,20207
100,20593
60,7225
61,7483
62,7782
63,7952
64,8265
65,8531
66,8764
67,9060
68,9331
69,9686
70,9913
71,10098
72,10417
73,10795
74,11108
75,11342
76,11703
77,12104
78,12356
79,12623
80,13066
81,13513
82,13706
83,13998
84,14333
85,14694
86,15160
87,15470
88,15845
89,16211
90,16551
91,17047
92,17237
93,17669
94,18055
95,18614
96,18838
97,19253
98,19868
99,20092
100,20517

1 N T
2 5 32
3 6 51 53
4 7 68 73
5 8 103 98
6 9 127 130
7 10 160 157
8 11 199 201
9 12 248 254
10 13 281 293
11 14 346 349
12 15 406 394
13 16 459 458
14 17 530 518
15 18 593 587
16 19 659 649
17 20 742 740
18 21 839 827
19 22 892 911
20 23 982 999
21 24 1087 1073
22 25 1168 1187
23 26 1264 1299
24 27 1385 1410
25 28 1463 1502
26 29 1615 1604
27 30 1715 1725
28 31 1850 1856
29 32 1971 1979
30 33 2106 2089
31 34 2211 2227
32 35 2384 2383
33 36 2501 2536
34 37 2674 2644
35 38 2836 2810
36 39 3007 3000
37 40 3118 3138
38 41 3262 3299
39 42 3476 3445
40 43 3616 3638
41 44 3836 3828
42 45 3987 4015
43 46 4219 4143
44 47 4360 4348
45 48 4593 4611
46 49 4747 4773
47 50 4957 4994
48 51 5185 5163
49 52 5344 5363
50 53 5602 5586
51 54 5790 5784
52 55 6069 6075
53 56 6271 6275
54 57 6473 6550
55 58 6764 6711
56 59 6957
57 60 7235 7225
58 61 7514 7483
59 62 7675 7782
60 63 7985 7952
61 64 8242 8265
62 65 8534 8531
63 66 8718 8764
64 67 8997 9060
65 68 9330 9331
66 69 9602 9686
67 70 9930 9913
68 71 10181 10098
69 72 10451 10417
70 73 10812 10795
71 74 11076 11108
72 75 11364 11342
73 76 11719 11703
74 77 12054 12104
75 78 12368 12356
76 79 12654 12623
77 80 13032 13066
78 81 13392 13513
79 82 13736 13706
80 83 14043 13998
81 84 14408 14333
82 85 14682 14694
83 86 15134 15160
84 87 15503 15470
85 88 15850 15845
86 89 16246 16211
87 90 16565 16551
88 91 16993 17047
89 92 17336 17237
90 93 17636 17669
91 94 18073 18055
92 95 18461 18614
93 96 18968 18838
94 97 19335 19253
95 98 19709 19868
96 99 20207 20092
97 100 20593 20517

View File

@ -6,7 +6,7 @@ N,T
9,135
10,177
11,222
12,264
12,238
13,305
14,335
15,417

1 N T
6 9 135
7 10 177
8 11 222
9 12 264 238
10 13 305
11 14 335
12 15 417

View File

@ -12,5 +12,5 @@ Scaling will result in a dimensionless variable $\hat{x} = \frac{1}{L}$.
\end{align*}
Now we insert the expression into the original equation
\begin{align*}
\frac{d u(\hat{x})}{d\hat{x}^{2}} &= - \frac{F L^{2}}{\gamma} u(\hat{x}). \\
\frac{d u(\hat{x})}{d\hat{x}^{2}} &= - \frac{F L^{2}}{\gamma} u(\hat{x}) \\
\end{align*}

View File

@ -2,7 +2,7 @@
\subsection*{a)}
The function to find the largest off-diagonal can be found in
The function for found the largest off-diagonal can be found in
\textbf{matrix.hpp} and \textbf{matrix.cpp}.
\subsection*{b)}

View File

@ -1,20 +1 @@
\section*{Problem 5}
\subsection*{a)}
We used the Jacobi's rotation method to solve $\boldsymbol{A} \vec{v} = \lambda \vec{v}$, for $\boldsymbol{A}_{(N \cross N)}$ with $N \in [5, 100]$,
and increased the matrix size by $3$ rows and columns for every new matrix generated. The number of similarity transformations performed for a tridiagonal matrix
of is presented in Figure \ref{fig:transform}. We chose to run the program using dense matrices of same size as the tridiagonal matrices, to compare the scaling data.
What we see is that the number of similarity transformations necessary to solve the system is proportional to the matrix size.
\begin{figure}[h]
\centering
\includegraphics[width=0.8\textwidth]{images/transform.pdf}
\caption{Similarity transformations performed as a function of matrix size (N), data is presented in a logarithmic scale.}
\label{fig:transform}
\end{figure}
\subsection*{b)}
For both the tridiagonal and dense matrices we are checking off-diagonal elements above the main diagonal, since these are symmetric matrices.
The max value is found at index $(k,l)$ and for every rotation of the matrix, we update the remaining elements along row $k$ and $l$. This can lead to an increased
value of off-diagonal elements, that previously were close to zero, and extra rotations has to be performed due to these elements. Which suggest that the
number of similarity transformations perfomed on a matrix does not depend on its initial number of non-zero elements, making the Jacobi's rotation algorithm as
computationally expensive for both dense and tridiagonal matrices of size $N \cross N$.

View File

@ -1,21 +1 @@
\section*{Problem 6}
\subsection*{a)}
The plot in Figure \ref{fig:eigenvector_10} is showing the discretization of $\hat{x}$ with $n=10$.
The eigenvectors and corresponding analytical eigenvectors have a complete overlap suggesting the implementation of the algorithm is correct.
We have included the boundary points for each vector to show a complete solution.
\begin{figure}[h]
\centering
\includegraphics[width=0.8\textwidth]{images/eigenvector_10.pdf}
\caption{The plot is showing the elements of eigenvector $\vec{v}_{1}, \vec{v}_{2}, \vec{v}_{3}$, corresponding to the three lowest eigenvalues of matrix $\boldsymbol{A} (10 \cross 10)$, against the position $\hat{x}$. The analytical eigenvectors $\vec{v}^{(1)}, \vec{v}^{(2)}, \vec{v}^{(3)}$ are also included in the plot.}
\label{fig:eigenvector_10}
\end{figure}
\subsection*{b)}
For the discretization with $n=100$ the solution is visually close to a continuous curve, with a complete overlap of the analytical eigenvectors, presented in Figure \ref{fig:eigenvector_100}.
\begin{figure}
\centering
\includegraphics[width=0.8\textwidth]{images/eigenvector_100.pdf}
\caption{The plot is showing the elements of eigenvector $\vec{v}_{1}, \vec{v}_{2}, \vec{v}_{3}$, corresponding to the three lowest eigenvalues of matrix $\boldsymbol{A} (100 \cross 100)$, against the position $\hat{x}$. The analytical eigenvectors $\vec{v}^{(1)}, \vec{v}^{(2)}, \vec{v}^{(3)}$ are also included in the plot.}
\label{fig:eigenvector_100}
\end{figure}

View File

@ -6,7 +6,6 @@ LIBOBJS=$(LIBSRCS:.cpp=.o)
INCLUDE=../include
CFLAGS=-larmadillo -llapack -std=c++11
OPENMP=-fopenmp
# Add a debug flag when compiling (For the DEBUG macro in utils.hpp)
DEBUG ?= 0
@ -23,14 +22,14 @@ all: test_suite main
# Rules for executables
main: main.o $(LIBOBJS)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE) $(OPENMP)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE)
test_suite: test_suite.o $(LIBOBJS)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE) $(OPENMP)
$(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) -I$(INCLUDE)
# Rule for object files
%.o: %.cpp
$(CC) -c $^ -o $@ $(DBGFLAG) -I$(INCLUDE) $(OPENMP)
$(CC) -c $^ -o $@ $(DBGFLAG) -I$(INCLUDE)
# Make documentation
doxygen:

View File

@ -4,8 +4,8 @@
* The program performs the Jacobi rotation method.
* The size of the matrix, and number of transformations
* performed are written to file.
* Eigenvector corresponding to the 3 smallest eigenvalues
* for matrices of size 10x10 and 100x100 are written to file.
* Eigenvector correstonding to the 3 smallest eigenvalues
* for matrices of size 6x6 and 100x100 are written to file.
*
* @author Cory Alexander Balaton (coryab)
* @author Janita Ovidie Sandtrøen Willumsen (janitaws)
@ -13,10 +13,7 @@
*/
#include <cassert>
#include <cmath>
#include <ctime>
#include <iostream>
#include <omp.h>
#include <ostream>
#include "utils.hpp"
#include "matrix.hpp"
@ -31,7 +28,6 @@ void write_transformation_dense(int N)
ofile << "N,T" << std::endl;
// Increase size of matrix, start at 5 to avoid logic_error of N=4
#pragma omp parallel for ordered schedule(static, 1)
for (int i = 5; i <= N; i++) {
arma::mat A = arma::mat(i, i).randn();
A = arma::symmatu(A);
@ -44,11 +40,8 @@ void write_transformation_dense(int N)
jacobi_eigensolver(A, 10e-14, eigval, eigvec, 100000, iters, converged);
// Write size, and number of iterations to file
#pragma omp ordered
{
ofile << i << "," << iters << std::endl;
}
}
ofile.close();
}
@ -65,7 +58,6 @@ void write_transformation_tridiag(int N)
ofile << "N,T" << std::endl;
// Increase size of matrix, start at 5 to avoid logic_error of N=4
#pragma omp parallel for ordered schedule(static, 1)
for (int i = 5; i <= N; i++) {
h = 1. / (double) (i+1);
a = -1. / (h*h), d = 2. / (h*h);
@ -80,11 +72,8 @@ void write_transformation_tridiag(int N)
jacobi_eigensolver(A, 10e-14, eigval, eigvec, 100000, iters, converged);
// Write size, and number of iterations to file
#pragma omp ordered
{
ofile << i << "," << iters << std::endl;
}
}
ofile.close();
}
@ -98,7 +87,6 @@ void write_eigenvec(int N)
// Create tridiagonal matrix
arma::mat A = create_symmetric_tridiagonal(N, a, d);
arma::mat analytic = arma::mat(N, N);
arma::vec eigval;
arma::mat eigvec;
@ -108,36 +96,13 @@ void write_eigenvec(int N)
// Solve using Jacobi rotation method
jacobi_eigensolver(A, 10e-14, eigval, eigvec, 100000, iters, converged);
// Build analytic eigenvectors
arma::vec v, analytic_vec = arma::vec(N);
for (int i=0; i < N; i++) {
v = eigvec.col(i);
for (int j=0; j < N; j++) {
analytic_vec(j) = std::sin(((j+1.)*(i+1.)*M_PI) / (N+1.));
}
analytic_vec = arma::normalise(analytic_vec);
// Flip the sign of the analytic vector if they are different
if (analytic_vec(0)*v(0) < 0.) {
analytic_vec *= -1;
}
analytic.col(i) = analytic_vec;
}
std::ofstream ofile;
// Create file based on matrix size, and write header line to file
ofile.open("../latex/output/eigenvector_" + std::to_string(N) + ".csv");
ofile << "x,"
<< "Vector 1,Vector 2,Vector 3,"
<< "Analytic 1,Analytic 2,Analytic 3" << std::endl;
ofile << "x,Vector 1,Vector 2,Vector 3" << std::endl;
// Add boundary value for x=0
ofile << scientific_format(0., 16) << ","
<< scientific_format(0., 16) << ","
<< scientific_format(0., 16) << ","
<< scientific_format(0., 16) << ","
<< scientific_format(0., 16) << ","
<< scientific_format(0., 16) << ","
<< scientific_format(0., 16) << std::endl;
@ -148,16 +113,10 @@ void write_eigenvec(int N)
ofile << scientific_format(x, 16)<< ","
<< scientific_format(eigvec(i,0), 16) << ","
<< scientific_format(eigvec(i,1), 16) << ","
<< scientific_format(eigvec(i,2), 16) << ","
<< scientific_format(analytic(i,0), 16) << ","
<< scientific_format(analytic(i,1), 16) << ","
<< scientific_format(analytic(i,2), 16) << std::endl;
<< scientific_format(eigvec(i,2), 16) << std::endl;
}
// Add boundary value for x=1
ofile << scientific_format(1., 16) << ","
<< scientific_format(0., 16) << ","
<< scientific_format(0., 16) << ","
<< scientific_format(0., 16) << ","
<< scientific_format(0., 16) << ","
<< scientific_format(0., 16) << ","
<< scientific_format(0., 16) << std::endl;
@ -169,7 +128,7 @@ int main()
{
write_transformation_tridiag(100);
write_transformation_dense(100);
write_eigenvec(10);
write_eigenvec(6);
write_eigenvec(100);
return 0;
}

View File

@ -20,7 +20,6 @@ arma::mat create_tridiagonal(
A(0, 0) = d(0);
A(0, 1) = e(0);
#pragma omp parallel for if(n > 50)
for (int i = 1; i < n-1; i++) {
A(i, i-1) = a(i-1);
A(i, i) = d(i);

View File

@ -24,28 +24,29 @@ def plot_transformations(save: bool=False) -> None:
fig.savefig("../latex/images/transform.pdf")
def plot_eigenvectors(N: int, save: bool=False) -> None:
# Load data based on matrix size
path = f"../latex/output/eigenvector_{N}.csv"
eigvec = pd.read_csv(path, header=0)
fig, ax = plt.subplots()
ax.plot(eigvec['x'], eigvec['Vector 1'], label=r'$\vec{v}_{1}$')
ax.plot(eigvec['x'], eigvec['Vector 2'], label=r'$\vec{v}_{2}$')
ax.plot(eigvec['x'], eigvec['Vector 3'], label=r'$\vec{v}_{3}$')
ax.plot(eigvec['x'], eigvec['Analytic 1'], '--', label=r'$\vec{v}^{(1)}$')
ax.plot(eigvec['x'], eigvec['Analytic 2'], '--', label=r'$\vec{v}^{(2)}$')
ax.plot(eigvec['x'], eigvec['Analytic 3'], '--', label=r'$\vec{v}^{(3)}$')
ax.plot(eigvec['x'], eigvec['Vector 1'], label='Vector 1')
ax.plot(eigvec['x'], eigvec['Vector 2'], label='Vector 2')
ax.plot(eigvec['x'], eigvec['Vector 3'], label='Vector 3')
ax.set_xlabel(r'Element $\hat{x}_{i}$')
ax.set_ylabel(r'Element $v_{i}$')
ax.legend(loc='upper left')
ax.set_ylabel(r'Value of element $v_{i}$')
ax.legend()
# Save to file
if save is True:
fig.savefig(f"../latex/images/eigenvector_{N}.pdf")
if __name__ == '__main__':
plot_transformations(True)
plot_eigenvectors(10, True)
plot_eigenvectors(6, True)
plot_eigenvectors(100, True)
# plt.show()