Page MenuHomec4science

class_solution.html
No OneTemporary

File Metadata

Created
Thu, Jul 10, 09:49

class_solution.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>VectorialODE: Solution Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</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>
<link href="doxygen.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 style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">VectorialODE
&#160;<span id="projectnumber">https://c4science.ch/source/Group15/repository/master/</span>
</div>
<div id="projectbrief">Caroline Violot and Nicolas Lesimple</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_solution.html','');});
/* @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">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_solution-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Solution Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>This class allows the saving in the memory and the writing in a output file of the solution of the ODE system. The constructor need the input object defining the system to create a consistent format for the solution. In this class, method allowing the retrieve, the modification and the writing of the solution are implemented. The attributes of this class are the the solution matrix and two integer defining the size of this solution.
<a href="class_solution.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_solution_8h_source.html">Solution.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab55bd4b023d596ce11aaf737b9a6123b"><td class="memItemLeft" align="right" valign="top"><a id="ab55bd4b023d596ce11aaf737b9a6123b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_solution.html#ab55bd4b023d596ce11aaf737b9a6123b">Solution</a> ()</td></tr>
<tr class="memdesc:ab55bd4b023d596ce11aaf737b9a6123b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <br /></td></tr>
<tr class="separator:ab55bd4b023d596ce11aaf737b9a6123b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd7dde6fe8cc748968a215f14c30bbcd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_solution.html#abd7dde6fe8cc748968a215f14c30bbcd">Solution</a> (unsigned long rows, int columns)</td></tr>
<tr class="memdesc:abd7dde6fe8cc748968a215f14c30bbcd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor to initialized properly the size of the solution with the input object. This overwritten constructor allows the declaration of the solution matrix with the corresponding size and the initialisation of all elements to 0. <a href="#abd7dde6fe8cc748968a215f14c30bbcd">More...</a><br /></td></tr>
<tr class="separator:abd7dde6fe8cc748968a215f14c30bbcd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef3f82ea25c9c6bb6b489dac8b3fa7fb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_solution.html#aef3f82ea25c9c6bb6b489dac8b3fa7fb">Solution</a> (const <a class="el" href="class_input.html">Input</a> &amp;input)</td></tr>
<tr class="memdesc:aef3f82ea25c9c6bb6b489dac8b3fa7fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor to initialized properly the size of the solution with the input object. This overwritten constructor allows the declaration of the solution matrix with the corresponding size and the initialisation of all elements to 0. <a href="#aef3f82ea25c9c6bb6b489dac8b3fa7fb">More...</a><br /></td></tr>
<tr class="separator:aef3f82ea25c9c6bb6b489dac8b3fa7fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae986f163f432f412873a46534fb613b7"><td class="memItemLeft" align="right" valign="top">const double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_solution.html#ae986f163f432f412873a46534fb613b7">GetSolutionValueFromIndex</a> (int rowsIndex, int columnsIndex) const</td></tr>
<tr class="memdesc:ae986f163f432f412873a46534fb613b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Getter allowing the access to one particular element of the matrix solution given two indexes. <a href="#ae986f163f432f412873a46534fb613b7">More...</a><br /></td></tr>
<tr class="separator:ae986f163f432f412873a46534fb613b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e15412dd197d6b9fa0505ebc2b0b5d2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_solution.html#a6e15412dd197d6b9fa0505ebc2b0b5d2">ModifySolutionByColumns</a> (vector&lt; double &gt; &amp;vector, int position)</td></tr>
<tr class="memdesc:a6e15412dd197d6b9fa0505ebc2b0b5d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Method that modify the solution matrix by reference given a columns index. This method only modify the solution by columns, which means that the selected columns is erase and replace by the vector of our choice. <a href="#a6e15412dd197d6b9fa0505ebc2b0b5d2">More...</a><br /></td></tr>
<tr class="separator:a6e15412dd197d6b9fa0505ebc2b0b5d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb46fd70c953b6391523257da02ac22d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_solution.html#abb46fd70c953b6391523257da02ac22d">SolutionToFile</a> (const string &amp;filename) const</td></tr>
<tr class="memdesc:abb46fd70c953b6391523257da02ac22d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Method allowing the writing of the solution in a output file. This method write the solution matrix into the file corresponding to the given filename. <a href="#abb46fd70c953b6391523257da02ac22d">More...</a><br /></td></tr>
<tr class="separator:abb46fd70c953b6391523257da02ac22d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5fff21443386017ec0017286c014743"><td class="memItemLeft" align="right" valign="top"><a id="ad5fff21443386017ec0017286c014743"></a>
vector&lt; vector&lt; double &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>GetSolutionODE</b> ()</td></tr>
<tr class="separator:ad5fff21443386017ec0017286c014743"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d245f7409aacf6ace5e965b7879a580"><td class="memItemLeft" align="right" valign="top"><a id="a5d245f7409aacf6ace5e965b7879a580"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_solution.html#a5d245f7409aacf6ace5e965b7879a580">~Solution</a> ()</td></tr>
<tr class="memdesc:a5d245f7409aacf6ace5e965b7879a580"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor by default. <br /></td></tr>
<tr class="separator:a5d245f7409aacf6ace5e965b7879a580"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class allows the saving in the memory and the writing in a output file of the solution of the ODE system. The constructor need the input object defining the system to create a consistent format for the solution. In this class, method allowing the retrieve, the modification and the writing of the solution are implemented. The attributes of this class are the the solution matrix and two integer defining the size of this solution. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="abd7dde6fe8cc748968a215f14c30bbcd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd7dde6fe8cc748968a215f14c30bbcd">&#9670;&nbsp;</a></span>Solution() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">Solution::Solution </td>
<td>(</td>
<td class="paramtype">unsigned long&#160;</td>
<td class="paramname"><em>rows</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>columns</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor to initialized properly the size of the solution with the input object. This overwritten constructor allows the declaration of the solution matrix with the corresponding size and the initialisation of all elements to 0. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">rows</td><td>: Integer defining the number of rows in the solution matrix. </td></tr>
<tr><td class="paramname">columns</td><td>: Integer defining the number of columns in the solution matrix. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aef3f82ea25c9c6bb6b489dac8b3fa7fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aef3f82ea25c9c6bb6b489dac8b3fa7fb">&#9670;&nbsp;</a></span>Solution() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">Solution::Solution </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_input.html">Input</a> &amp;&#160;</td>
<td class="paramname"><em>input</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor to initialized properly the size of the solution with the input object. This overwritten constructor allows the declaration of the solution matrix with the corresponding size and the initialisation of all elements to 0. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">input</td><td>: <a class="el" href="class_input.html" title="Class allowing the saving of all the variables to define the system we want to solve. In fact, it takes as input variable (integer or double): Timestep, Dimension, Order, NumberSteps, WriteOutputTimestep. Moreover, Input object needs 3 matrix to define the system : InitialConditionMatrix, CoefficientMatrix, FunctionMatrix. Matrix are defined to be vector of vector of double. Input variables are given to the input class by the constructor. The other methods are getter allowing the access to theses private attributes. ">Input</a> object containing all information to define the system and thus allowing the access to theses variables thanks to getter to define our solution matrix </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ae986f163f432f412873a46534fb613b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae986f163f432f412873a46534fb613b7">&#9670;&nbsp;</a></span>GetSolutionValueFromIndex()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const double Solution::GetSolutionValueFromIndex </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>rowsIndex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>columnsIndex</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Getter allowing the access to one particular element of the matrix solution given two indexes. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">RowsIndex</td><td>: Integer defining the rows where we want to get the value of the element </td></tr>
<tr><td class="paramname">ColumnsIndex</td><td>: Integer defining the columns where we want to get the value of the element </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Double corresponding to the defined element of the solution matrix </dd></dl>
</div>
</div>
<a id="a6e15412dd197d6b9fa0505ebc2b0b5d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e15412dd197d6b9fa0505ebc2b0b5d2">&#9670;&nbsp;</a></span>ModifySolutionByColumns()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Solution::ModifySolutionByColumns </td>
<td>(</td>
<td class="paramtype">vector&lt; double &gt; &amp;&#160;</td>
<td class="paramname"><em>vector</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>position</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Method that modify the solution matrix by reference given a columns index. This method only modify the solution by columns, which means that the selected columns is erase and replace by the vector of our choice. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vector</td><td>: Vector of double use to modify the solution matrix. The value of this vector will be put in the selected columns of the solution matrix </td></tr>
<tr><td class="paramname">position</td><td>: Integer defining the index of the columns of the matrix solution we want to modify </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="abb46fd70c953b6391523257da02ac22d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb46fd70c953b6391523257da02ac22d">&#9670;&nbsp;</a></span>SolutionToFile()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Solution::SolutionToFile </td>
<td>(</td>
<td class="paramtype">const string &amp;&#160;</td>
<td class="paramname"><em>filename</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Method allowing the writing of the solution in a output file. This method write the solution matrix into the file corresponding to the given filename. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">filename</td><td>: String corresponding to the entire path and filename of the file of destination. The filename needs to have the extension. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_solution_8h_source.html">Solution.h</a></li>
<li>Solution.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="class_solution.html">Solution</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
</ul>
</div>
</body>
</html>

Event Timeline