mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-12 03:28:29 +08:00
Documentation for 8b1eab204b
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<!-- HTML header for doxygen 1.12.0-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
@@ -5,10 +6,15 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.12.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: numerical_methods/ode_forward_euler.cpp File Reference</title>
|
||||
<title>TheAlgorithms/C++: numerical_methods/ode_forward_euler.cpp File Reference</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
<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>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
</script>
|
||||
<script type="text/javascript" src="../../clipboard.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
@@ -18,14 +24,24 @@
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
|
||||
jax: ["input/TeX","output/HTML-CSS"],
|
||||
});
|
||||
<script type="text/javascript">
|
||||
window.MathJax = {
|
||||
options: {
|
||||
ignoreHtmlClass: 'tex2jax_ignore',
|
||||
processHtmlClass: 'tex2jax_process'
|
||||
},
|
||||
loader: {
|
||||
load: ['[tex]/ams']
|
||||
},
|
||||
tex: {
|
||||
macros: {},
|
||||
packages: ['base','configmacros','ams']
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
|
||||
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
@@ -33,10 +49,11 @@ MathJax.Hub.Config({
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
|
||||
<td id="projectalign">
|
||||
<div id="projectname">Algorithms_in_C++<span id="projectnumber"> 1.0.0</span>
|
||||
<div id="projectname">TheAlgorithms/C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">Set of algorithms implemented in C++.</div>
|
||||
<div id="projectbrief">All the algorithms implemented in C++</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -122,22 +139,24 @@ Include dependency graph for ode_forward_euler.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../dc/dc5/ode__forward__euler_8cpp__incl.svg" width="423" height="126"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
</div><table class="memberdecls">
|
||||
</div>
|
||||
<p><a href="../../db/dd3/ode__forward__euler_8cpp_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:abaeae8f62a018d197f0187a1c80a90fe" id="r_abaeae8f62a018d197f0187a1c80a90fe"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#abaeae8f62a018d197f0187a1c80a90fe">problem</a> (const double &x, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a>< double > *y, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a>< double > *dy)</td></tr>
|
||||
<tr class="memitem:abaeae8f62a018d197f0187a1c80a90fe" id="r_abaeae8f62a018d197f0187a1c80a90fe"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#abaeae8f62a018d197f0187a1c80a90fe">problem</a> (const double &x, std::valarray< double > *y, std::valarray< double > *dy)</td></tr>
|
||||
<tr class="memdesc:abaeae8f62a018d197f0187a1c80a90fe"><td class="mdescLeft"> </td><td class="mdescRight">Problem statement for a system with first-order differential equations. Updates the system differential variables. <br /></td></tr>
|
||||
<tr class="separator:abaeae8f62a018d197f0187a1c80a90fe"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:af3adf7b092a87868917ee5fb4255192b" id="r_af3adf7b092a87868917ee5fb4255192b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#af3adf7b092a87868917ee5fb4255192b">exact_solution</a> (const double &x, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a>< double > *y)</td></tr>
|
||||
<tr class="memitem:af3adf7b092a87868917ee5fb4255192b" id="r_af3adf7b092a87868917ee5fb4255192b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#af3adf7b092a87868917ee5fb4255192b">exact_solution</a> (const double &x, std::valarray< double > *y)</td></tr>
|
||||
<tr class="memdesc:af3adf7b092a87868917ee5fb4255192b"><td class="mdescLeft"> </td><td class="mdescRight">Exact solution of the problem. Used for solution comparison. <br /></td></tr>
|
||||
<tr class="separator:af3adf7b092a87868917ee5fb4255192b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga195d23bbdfcb80e83c9cda45c9ad5723" id="r_ga195d23bbdfcb80e83c9cda45c9ad5723"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d60/group__ode.html#ga195d23bbdfcb80e83c9cda45c9ad5723">forward_euler_step</a> (const double dx, const double x, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a>< double > *y, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a>< double > *dy)</td></tr>
|
||||
<tr class="memitem:ga195d23bbdfcb80e83c9cda45c9ad5723" id="r_ga195d23bbdfcb80e83c9cda45c9ad5723"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d60/group__ode.html#ga195d23bbdfcb80e83c9cda45c9ad5723">forward_euler_step</a> (const double dx, const double x, std::valarray< double > *y, std::valarray< double > *dy)</td></tr>
|
||||
<tr class="memdesc:ga195d23bbdfcb80e83c9cda45c9ad5723"><td class="mdescLeft"> </td><td class="mdescRight">Compute next step approximation using the forward-Euler method. <br /></td></tr>
|
||||
<tr class="separator:ga195d23bbdfcb80e83c9cda45c9ad5723"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae0509f8843e2bc42de2abbd00a14b7b9" id="r_gae0509f8843e2bc42de2abbd00a14b7b9"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d60/group__ode.html#gae0509f8843e2bc42de2abbd00a14b7b9">forward_euler</a> (double dx, double x0, double x_max, <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a>< double > *y, bool save_to_file=false)</td></tr>
|
||||
<tr class="memitem:gae0509f8843e2bc42de2abbd00a14b7b9" id="r_gae0509f8843e2bc42de2abbd00a14b7b9"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d60/group__ode.html#gae0509f8843e2bc42de2abbd00a14b7b9">forward_euler</a> (double dx, double x0, double x_max, std::valarray< double > *y, bool save_to_file=false)</td></tr>
|
||||
<tr class="memdesc:gae0509f8843e2bc42de2abbd00a14b7b9"><td class="mdescLeft"> </td><td class="mdescRight">Compute approximation using the forward-Euler method in the given limits. <br /></td></tr>
|
||||
<tr class="separator:gae0509f8843e2bc42de2abbd00a14b7b9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:aa13517b8e5de1b75592052db7f7e237f" id="r_aa13517b8e5de1b75592052db7f7e237f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa13517b8e5de1b75592052db7f7e237f">save_exact_solution</a> (const double &X0, const double &X_MAX, const double &step_size, const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a>< double > &Y0)</td></tr>
|
||||
<tr class="memitem:aa13517b8e5de1b75592052db7f7e237f" id="r_aa13517b8e5de1b75592052db7f7e237f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa13517b8e5de1b75592052db7f7e237f">save_exact_solution</a> (const double &X0, const double &X_MAX, const double &step_size, const std::valarray< double > &Y0)</td></tr>
|
||||
<tr class="separator:aa13517b8e5de1b75592052db7f7e237f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a0ddf1224851353fc92bfbff6f499fa97" id="r_a0ddf1224851353fc92bfbff6f499fa97"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="#a0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr>
|
||||
<tr class="separator:a0ddf1224851353fc92bfbff6f499fa97"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
@@ -164,6 +183,8 @@ Functions</h2></td></tr>
|
||||
<div class="line">dy[0] = y[1];</div>
|
||||
<div class="line">dy[1] = mu * (1.f - y[0] * y[0]) * y[1] - y[0];</div>
|
||||
</div><!-- fragment --> <dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d6/dd3/ode__midpoint__euler_8cpp.html" title="Solve a multivariable first order ordinary differential equation (ODEs) using midpoint Euler method">ode_midpoint_euler.cpp</a>, <a class="el" href="../../d3/d06/ode__semi__implicit__euler_8cpp.html" title="Solve a multivariable first order ordinary differential equation (ODEs) using semi implicit Euler met...">ode_semi_implicit_euler.cpp</a> </dd></dl>
|
||||
|
||||
<p class="definition">Definition in file <a class="el" href="../../db/dd3/ode__forward__euler_8cpp_source.html">ode_forward_euler.cpp</a>.</p>
|
||||
</div><h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="af3adf7b092a87868917ee5fb4255192b" name="af3adf7b092a87868917ee5fb4255192b"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af3adf7b092a87868917ee5fb4255192b">◆ </a></span>exact_solution()</h2>
|
||||
@@ -179,7 +200,7 @@ Functions</h2></td></tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a>< double > *</td> <td class="paramname"><span class="paramname"><em>y</em></span> )</td>
|
||||
<td class="paramtype">std::valarray< double > *</td> <td class="paramname"><span class="paramname"><em>y</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -192,18 +213,13 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 67</span> {</div>
|
||||
<div class="line"><span class="lineno"> 68</span> y[0][0] = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/cos.html">std::cos</a>(x);</div>
|
||||
<div class="line"><span class="lineno"> 69</span> y[0][1] = -<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/sin.html">std::sin</a>(x);</div>
|
||||
<div class="line"><span class="lineno"> 70</span>}</div>
|
||||
<div class="ttc" id="acos_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/cos.html">std::cos</a></div><div class="ttdeci">T cos(T... args)</div></div>
|
||||
<div class="ttc" id="asin_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/sin.html">std::sin</a></div><div class="ttdeci">T sin(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../db/dd3/ode__forward__euler_8cpp_af3adf7b092a87868917ee5fb4255192b_cgraph.svg" width="232" height="86"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../db/dd3/ode__forward__euler_8cpp_source.html#l00067">67</a> of file <a class="el" href="../../db/dd3/ode__forward__euler_8cpp_source.html">ode_forward_euler.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 67</span> {</div>
|
||||
<div class="line"><span class="lineno"> 68</span> y[0][0] = std::cos(x);</div>
|
||||
<div class="line"><span class="lineno"> 69</span> y[0][1] = -std::sin(x);</div>
|
||||
<div class="line"><span class="lineno"> 70</span>}</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="a0ddf1224851353fc92bfbff6f499fa97" name="a0ddf1224851353fc92bfbff6f499fa97"></a>
|
||||
@@ -225,41 +241,34 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p>Main Function </p>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../db/dd3/ode__forward__euler_8cpp_source.html#l00189">189</a> of file <a class="el" href="../../db/dd3/ode__forward__euler_8cpp_source.html">ode_forward_euler.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 189</span> {</div>
|
||||
<div class="line"><span class="lineno"> 190</span> <span class="keywordtype">double</span> X0 = 0.f; <span class="comment">/* initial value of x0 */</span></div>
|
||||
<div class="line"><span class="lineno"> 191</span> <span class="keywordtype">double</span> X_MAX = 10.F; <span class="comment">/* upper limit of integration */</span></div>
|
||||
<div class="line"><span class="lineno"> 192</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray<double></a> Y0{1.f, 0.f}; <span class="comment">/* initial value Y = y(x = x_0) */</span></div>
|
||||
<div class="line"><span class="lineno"> 192</span> std::valarray<double> Y0{1.f, 0.f}; <span class="comment">/* initial value Y = y(x = x_0) */</span></div>
|
||||
<div class="line"><span class="lineno"> 193</span> <span class="keywordtype">double</span> step_size = NAN;</div>
|
||||
<div class="line"><span class="lineno"> 194</span> </div>
|
||||
<div class="line"><span class="lineno"> 195</span> <span class="keywordflow">if</span> (argc == 1) {</div>
|
||||
<div class="line"><span class="lineno"> 196</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\nEnter the step size: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 197</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a> >> step_size;</div>
|
||||
<div class="line"><span class="lineno"> 196</span> std::cout << <span class="stringliteral">"\nEnter the step size: "</span>;</div>
|
||||
<div class="line"><span class="lineno"> 197</span> std::cin >> step_size;</div>
|
||||
<div class="line"><span class="lineno"> 198</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><span class="lineno"> 199</span> <span class="comment">// use commandline argument as independent variable step size</span></div>
|
||||
<div class="line"><span class="lineno"> 200</span> step_size = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/string/byte/atof.html">std::atof</a>(argv[1]);</div>
|
||||
<div class="line"><span class="lineno"> 200</span> step_size = std::atof(argv[1]);</div>
|
||||
<div class="line"><span class="lineno"> 201</span> }</div>
|
||||
<div class="line"><span class="lineno"> 202</span> </div>
|
||||
<div class="line"><span class="lineno"> 203</span> <span class="comment">// get approximate solution</span></div>
|
||||
<div class="line"><span class="lineno"> 204</span> <span class="keywordtype">double</span> total_time = <a class="code hl_function" href="../../d6/d60/group__ode.html#gae0509f8843e2bc42de2abbd00a14b7b9">forward_euler</a>(step_size, X0, X_MAX, &Y0, <span class="keyword">true</span>);</div>
|
||||
<div class="line"><span class="lineno"> 205</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\tTime = "</span> << total_time << <span class="stringliteral">" ms\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 205</span> std::cout << <span class="stringliteral">"\tTime = "</span> << total_time << <span class="stringliteral">" ms\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 206</span> </div>
|
||||
<div class="line"><span class="lineno"> 207</span> <span class="comment">/* compute exact solution for comparion */</span></div>
|
||||
<div class="line"><span class="lineno"> 208</span> <a class="code hl_function" href="#aa13517b8e5de1b75592052db7f7e237f">save_exact_solution</a>(X0, X_MAX, step_size, Y0);</div>
|
||||
<div class="line"><span class="lineno"> 209</span> </div>
|
||||
<div class="line"><span class="lineno"> 210</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><span class="lineno"> 211</span>}</div>
|
||||
<div class="ttc" id="aatof_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/byte/atof.html">std::atof</a></div><div class="ttdeci">T atof(T... args)</div></div>
|
||||
<div class="ttc" id="abasic_istream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_istream.html">std::cin</a></div></div>
|
||||
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
|
||||
<div class="ttc" id="agroup__ode_html_gae0509f8843e2bc42de2abbd00a14b7b9"><div class="ttname"><a href="../../d6/d60/group__ode.html#gae0509f8843e2bc42de2abbd00a14b7b9">forward_euler</a></div><div class="ttdeci">double forward_euler(double dx, double x0, double x_max, std::valarray< double > *y, bool save_to_file=false)</div><div class="ttdoc">Compute approximation using the forward-Euler method in the given limits.</div><div class="ttdef"><b>Definition</b> ode_forward_euler.cpp:102</div></div>
|
||||
<div class="ttc" id="aode__forward__euler_8cpp_html_aa13517b8e5de1b75592052db7f7e237f"><div class="ttname"><a href="#aa13517b8e5de1b75592052db7f7e237f">save_exact_solution</a></div><div class="ttdeci">void save_exact_solution(const double &X0, const double &X_MAX, const double &step_size, const std::valarray< double > &Y0)</div><div class="ttdef"><b>Definition</b> ode_forward_euler.cpp:153</div></div>
|
||||
<div class="ttc" id="avalarray_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a></div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../db/dd3/ode__forward__euler_8cpp_a0ddf1224851353fc92bfbff6f499fa97_cgraph.svg" width="564" height="356"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
<div class="ttc" id="agroup__ode_html_gae0509f8843e2bc42de2abbd00a14b7b9"><div class="ttname"><a href="../../d6/d60/group__ode.html#gae0509f8843e2bc42de2abbd00a14b7b9">forward_euler</a></div><div class="ttdeci">double forward_euler(double dx, double x0, double x_max, std::valarray< double > *y, bool save_to_file=false)</div><div class="ttdoc">Compute approximation using the forward-Euler method in the given limits.</div><div class="ttdef"><b>Definition</b> <a href="../../db/dd3/ode__forward__euler_8cpp_source.html#l00102">ode_forward_euler.cpp:102</a></div></div>
|
||||
<div class="ttc" id="aode__forward__euler_8cpp_html_aa13517b8e5de1b75592052db7f7e237f"><div class="ttname"><a href="#aa13517b8e5de1b75592052db7f7e237f">save_exact_solution</a></div><div class="ttdeci">void save_exact_solution(const double &X0, const double &X_MAX, const double &step_size, const std::valarray< double > &Y0)</div><div class="ttdef"><b>Definition</b> <a href="../../db/dd3/ode__forward__euler_8cpp_source.html#l00153">ode_forward_euler.cpp:153</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
<a id="abaeae8f62a018d197f0187a1c80a90fe" name="abaeae8f62a018d197f0187a1c80a90fe"></a>
|
||||
@@ -276,12 +285,12 @@ Here is the call graph for this function:</div>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a>< double > *</td> <td class="paramname"><span class="paramname"><em>y</em></span>, </td>
|
||||
<td class="paramtype">std::valarray< double > *</td> <td class="paramname"><span class="paramname"><em>y</em></span>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a>< double > *</td> <td class="paramname"><span class="paramname"><em>dy</em></span> )</td>
|
||||
<td class="paramtype">std::valarray< double > *</td> <td class="paramname"><span class="paramname"><em>dy</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -296,6 +305,8 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../db/dd3/ode__forward__euler_8cpp_source.html#l00054">54</a> of file <a class="el" href="../../db/dd3/ode__forward__euler_8cpp_source.html">ode_forward_euler.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 55</span> {</div>
|
||||
<div class="line"><span class="lineno"> 56</span> <span class="keyword">const</span> <span class="keywordtype">double</span> omega = 1.F; <span class="comment">// some const for the problem</span></div>
|
||||
<div class="line"><span class="lineno"> 57</span> (*dy)[0] = (*y)[1]; <span class="comment">// x dot // NOLINT</span></div>
|
||||
@@ -328,7 +339,7 @@ Here is the call graph for this function:</div>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const <a class="elRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray</a>< double > &</td> <td class="paramname"><span class="paramname"><em>Y0</em></span> )</td>
|
||||
<td class="paramtype">const std::valarray< double > &</td> <td class="paramname"><span class="paramname"><em>Y0</em></span> )</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
@@ -342,18 +353,20 @@ Here is the call graph for this function:</div>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<p class="definition">Definition at line <a class="el" href="../../db/dd3/ode__forward__euler_8cpp_source.html#l00153">153</a> of file <a class="el" href="../../db/dd3/ode__forward__euler_8cpp_source.html">ode_forward_euler.cpp</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="lineno"> 155</span> {</div>
|
||||
<div class="line"><span class="lineno"> 156</span> <span class="keywordtype">double</span> x = X0;</div>
|
||||
<div class="line"><span class="lineno"> 157</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/valarray.html">std::valarray<double></a> y(Y0);</div>
|
||||
<div class="line"><span class="lineno"> 157</span> std::valarray<double> y(Y0);</div>
|
||||
<div class="line"><span class="lineno"> 158</span> </div>
|
||||
<div class="line"><span class="lineno"> 159</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ofstream.html">std::ofstream</a> fp(<span class="stringliteral">"exact.csv"</span>, std::ostream::out);</div>
|
||||
<div class="line"><span class="lineno"> 159</span> std::ofstream fp(<span class="stringliteral">"exact.csv"</span>, std::ostream::out);</div>
|
||||
<div class="line"><span class="lineno"> 160</span> <span class="keywordflow">if</span> (!fp.is_open()) {</div>
|
||||
<div class="line"><span class="lineno"> 161</span> <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/c/perror.html">std::perror</a>(<span class="stringliteral">"Error! "</span>);</div>
|
||||
<div class="line"><span class="lineno"> 161</span> std::perror(<span class="stringliteral">"Error! "</span>);</div>
|
||||
<div class="line"><span class="lineno"> 162</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><span class="lineno"> 163</span> }</div>
|
||||
<div class="line"><span class="lineno"> 164</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"Finding exact solution\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 164</span> std::cout << <span class="stringliteral">"Finding exact solution\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 165</span> </div>
|
||||
<div class="line"><span class="lineno"> 166</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/clock_t.html">std::clock_t</a> t1 = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/clock.html">std::clock</a>();</div>
|
||||
<div class="line"><span class="lineno"> 166</span> std::clock_t t1 = std::clock();</div>
|
||||
<div class="line"><span class="lineno"> 167</span> <span class="keywordflow">do</span> {</div>
|
||||
<div class="line"><span class="lineno"> 168</span> fp << x << <span class="stringliteral">","</span>;</div>
|
||||
<div class="line"><span class="lineno"> 169</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < y.size() - 1; i++) {</div>
|
||||
@@ -366,23 +379,14 @@ Here is the call graph for this function:</div>
|
||||
<div class="line"><span class="lineno"> 176</span> x += step_size;</div>
|
||||
<div class="line"><span class="lineno"> 177</span> } <span class="keywordflow">while</span> (x <= X_MAX);</div>
|
||||
<div class="line"><span class="lineno"> 178</span> </div>
|
||||
<div class="line"><span class="lineno"> 179</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/clock_t.html">std::clock_t</a> t2 = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/chrono/c/clock.html">std::clock</a>();</div>
|
||||
<div class="line"><span class="lineno"> 179</span> std::clock_t t2 = std::clock();</div>
|
||||
<div class="line"><span class="lineno"> 180</span> <span class="keywordtype">double</span> total_time = <span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(t2 - t1) / CLOCKS_PER_SEC;</div>
|
||||
<div class="line"><span class="lineno"> 181</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> << <span class="stringliteral">"\tTime = "</span> << total_time << <span class="stringliteral">" ms\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 181</span> std::cout << <span class="stringliteral">"\tTime = "</span> << total_time << <span class="stringliteral">" ms\n"</span>;</div>
|
||||
<div class="line"><span class="lineno"> 182</span> </div>
|
||||
<div class="line"><span class="lineno"> 183</span> fp.close();</div>
|
||||
<div class="line"><span class="lineno"> 184</span>}</div>
|
||||
<div class="ttc" id="abasic_ofstream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ofstream.html">std::ofstream</a></div></div>
|
||||
<div class="ttc" id="aclock_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/c/clock.html">std::clock</a></div><div class="ttdeci">T clock(T... args)</div></div>
|
||||
<div class="ttc" id="aclock_t_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/chrono/c/clock_t.html">std::clock_t</a></div></div>
|
||||
<div class="ttc" id="aode__forward__euler_8cpp_html_af3adf7b092a87868917ee5fb4255192b"><div class="ttname"><a href="#af3adf7b092a87868917ee5fb4255192b">exact_solution</a></div><div class="ttdeci">void exact_solution(const double &x, std::valarray< double > *y)</div><div class="ttdoc">Exact solution of the problem. Used for solution comparison.</div><div class="ttdef"><b>Definition</b> ode_forward_euler.cpp:67</div></div>
|
||||
<div class="ttc" id="aperror_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/c/perror.html">std::perror</a></div><div class="ttdeci">T perror(T... args)</div></div>
|
||||
</div><!-- fragment --><div class="dynheader">
|
||||
Here is the call graph for this function:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../db/dd3/ode__forward__euler_8cpp_aa13517b8e5de1b75592052db7f7e237f_cgraph.svg" width="467" height="234"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
|
||||
</div>
|
||||
|
||||
<div class="ttc" id="aode__forward__euler_8cpp_html_af3adf7b092a87868917ee5fb4255192b"><div class="ttname"><a href="#af3adf7b092a87868917ee5fb4255192b">exact_solution</a></div><div class="ttdeci">void exact_solution(const double &x, std::valarray< double > *y)</div><div class="ttdoc">Exact solution of the problem. Used for solution comparison.</div><div class="ttdef"><b>Definition</b> <a href="../../db/dd3/ode__forward__euler_8cpp_source.html#l00067">ode_forward_euler.cpp:67</a></div></div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
<map id="main" name="main">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,128,55,154"/>
|
||||
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/string/byte/atof.html#" title=" " alt="" coords="138,79,208,104"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="54,130,102,113,123,106,124,111,104,118,56,135"/>
|
||||
<area shape="rect" id="Node000003" href="$d6/d60/group__ode.html#gae0509f8843e2bc42de2abbd00a14b7b9" title="Compute approximation using the forward-Euler method in the given limits." alt="" coords="123,177,222,203"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="56,147,104,164,120,169,118,174,102,169,54,152"/>
|
||||
<area shape="rect" id="Node000011" href="$db/dd3/ode__forward__euler_8cpp.html#aa13517b8e5de1b75592052db7f7e237f" title=" " alt="" coords="103,128,243,154"/>
|
||||
<area shape="poly" id="edge10_Node000001_Node000011" title=" " alt="" coords="55,138,87,138,87,144,55,144"/>
|
||||
<area shape="rect" id="Node000004" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/chrono/c/clock.html#" title=" " alt="" coords="328,227,406,252"/>
|
||||
<area shape="poly" id="edge3_Node000003_Node000004" title=" " alt="" coords="224,200,313,223,311,228,222,205"/>
|
||||
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/basic_ofstream/close.html#" title=" " alt="" coords="298,79,435,104"/>
|
||||
<area shape="poly" id="edge4_Node000003_Node000005" title=" " alt="" coords="221,174,242,164,256,152,265,139,274,126,289,113,297,109,300,113,293,118,278,130,269,142,260,155,244,168,223,179"/>
|
||||
<area shape="rect" id="Node000006" href="$d6/d60/group__ode.html#ga195d23bbdfcb80e83c9cda45c9ad5723" title="Compute next step approximation using the forward-Euler method." alt="" coords="301,325,432,351"/>
|
||||
<area shape="poly" id="edge5_Node000003_Node000006" title=" " alt="" coords="185,202,228,255,258,286,292,312,300,316,297,321,290,316,255,290,224,259,181,205"/>
|
||||
<area shape="rect" id="Node000008" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/basic_ofstream/is_open.html#" title=" " alt="" coords="291,128,442,154"/>
|
||||
<area shape="poly" id="edge7_Node000003_Node000008" title=" " alt="" coords="222,175,298,155,299,161,224,180"/>
|
||||
<area shape="rect" id="Node000009" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/basic_ofstream/open.html#" title=" " alt="" coords="300,276,434,302"/>
|
||||
<area shape="poly" id="edge8_Node000003_Node000009" title=" " alt="" coords="193,201,237,231,292,262,304,268,302,273,290,267,234,236,190,206"/>
|
||||
<area shape="rect" id="Node000010" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/c/perror.html#" title=" " alt="" coords="326,177,407,203"/>
|
||||
<area shape="poly" id="edge9_Node000003_Node000010" title=" " alt="" coords="223,188,311,188,311,193,223,193"/>
|
||||
<area shape="rect" id="Node000007" href="$db/dd3/ode__forward__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe" title="Problem statement for a system with first-order differential equations. Updates the system differenti..." alt="" coords="491,325,558,351"/>
|
||||
<area shape="poly" id="edge6_Node000006_Node000007" title=" " alt="" coords="433,336,475,336,475,341,433,341"/>
|
||||
<area shape="poly" id="edge11_Node000011_Node000004" title=" " alt="" coords="223,152,244,163,260,176,269,189,278,201,292,213,314,224,311,229,290,218,274,205,265,192,256,179,242,167,221,157"/>
|
||||
<area shape="poly" id="edge12_Node000011_Node000005" title=" " alt="" coords="226,125,298,106,299,111,227,130"/>
|
||||
<area shape="poly" id="edge16_Node000011_Node000008" title=" " alt="" coords="243,138,275,138,275,144,243,144"/>
|
||||
<area shape="poly" id="edge17_Node000011_Node000010" title=" " alt="" coords="227,152,312,174,311,179,226,157"/>
|
||||
<area shape="rect" id="Node000012" href="$db/dd3/ode__forward__euler_8cpp.html#af3adf7b092a87868917ee5fb4255192b" title="Exact solution of the problem. Used for solution comparison." alt="" coords="314,29,419,55"/>
|
||||
<area shape="poly" id="edge13_Node000011_Node000012" title=" " alt="" coords="221,125,242,115,256,102,265,90,274,77,289,64,298,59,301,64,293,68,278,81,269,93,260,106,244,119,223,130"/>
|
||||
<area shape="rect" id="Node000013" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/cos.html#" title=" " alt="" coords="490,55,559,80"/>
|
||||
<area shape="poly" id="edge14_Node000012_Node000013" title=" " alt="" coords="420,48,475,57,475,62,419,53"/>
|
||||
<area shape="rect" id="Node000014" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sin.html#" title=" " alt="" coords="492,5,557,31"/>
|
||||
<area shape="poly" id="edge15_Node000012_Node000014" title=" " alt="" coords="419,32,477,23,477,28,420,37"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
8c25254ae2a11884d140ade79e6a902c
|
||||
@@ -1,317 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="423pt" height="267pt"
|
||||
viewBox="0.00 0.00 423.00 267.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
|
||||
<style type="text/css"><![CDATA[
|
||||
.node, .edge {opacity: 0.7;}
|
||||
.node.selected, .edge.selected {opacity: 1;}
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 263.25)">
|
||||
<title>main</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="37,-167.25 0,-167.25 0,-148 37,-148 37,-167.25"/>
|
||||
<text text-anchor="middle" x="18.5" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/byte/atof.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="151.62,-204.25 99.62,-204.25 99.62,-185 151.62,-185 151.62,-204.25"/>
|
||||
<text text-anchor="middle" x="125.62" y="-190.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::atof</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.32,-163.98C47.72,-167.69 61.1,-172.44 73,-176.62 78.05,-178.4 83.38,-180.27 88.62,-182.1"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="87.12,-185.28 97.72,-185.27 89.43,-178.68 87.12,-185.28"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:href="../../d6/d60/group__ode.html#gae0509f8843e2bc42de2abbd00a14b7b9" target="_top" xlink:title="Compute approximation using the forward-Euler method in the given limits.">
|
||||
<polygon fill="white" stroke="#666666" points="162.88,-130.25 88.38,-130.25 88.38,-111 162.88,-111 162.88,-130.25"/>
|
||||
<text text-anchor="middle" x="125.62" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">forward_euler</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.32,-151.27C47.72,-147.56 61.1,-142.81 73,-138.62 76.9,-137.25 80.97,-135.83 85.03,-134.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="85.96,-137.79 94.24,-131.19 83.65,-131.18 85.96,-137.79"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><a xlink:href="../../db/dd3/ode__forward__euler_8cpp.html#aa13517b8e5de1b75592052db7f7e237f" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="178.25,-167.25 73,-167.25 73,-148 178.25,-148 178.25,-167.25"/>
|
||||
<text text-anchor="middle" x="125.62" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">save_exact_solution</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node11 -->
|
||||
<g id="edge10_Node000001_Node000011" class="edge">
|
||||
<title>Node1->Node11</title>
|
||||
<g id="a_edge10_Node000001_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.33,-157.62C44.25,-157.62 52.63,-157.62 61.41,-157.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.17,-161.13 71.17,-157.63 61.17,-154.13 61.17,-161.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/chrono/c/clock.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="300.38,-93.25 241.62,-93.25 241.62,-74 300.38,-74 300.38,-93.25"/>
|
||||
<text text-anchor="middle" x="271" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::clock</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3_Node000003_Node000004" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M163.18,-111.19C183.62,-105.92 209.12,-99.34 230.08,-93.93"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="230.93,-97.32 239.73,-91.44 229.18,-90.55 230.93,-97.32"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/basic_ofstream/close.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="322.5,-204.25 219.5,-204.25 219.5,-185 322.5,-185 322.5,-204.25"/>
|
||||
<text text-anchor="middle" x="271" y="-190.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::ofstream::close</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node5 -->
|
||||
<g id="edge4_Node000003_Node000005" class="edge">
|
||||
<title>Node3->Node5</title>
|
||||
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M162.66,-130.68C168.09,-132.9 173.47,-135.53 178.25,-138.62 197.79,-151.26 194.57,-164.22 214.25,-176.62 216.09,-177.78 218.01,-178.88 219.99,-179.9"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="218.27,-182.97 228.82,-183.89 221.14,-176.58 218.27,-182.97"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a xlink:href="../../d6/d60/group__ode.html#ga195d23bbdfcb80e83c9cda45c9ad5723" target="_top" xlink:title="Compute next step approximation using the forward-Euler method.">
|
||||
<polygon fill="white" stroke="#666666" points="320.25,-19.25 221.75,-19.25 221.75,0 320.25,0 320.25,-19.25"/>
|
||||
<text text-anchor="middle" x="271" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">forward_euler_step</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node6 -->
|
||||
<g id="edge5_Node000003_Node000006" class="edge">
|
||||
<title>Node3->Node6</title>
|
||||
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M133.36,-110.66C146.63,-91.74 178.06,-50.5 214.25,-27.62 216.09,-26.46 218.01,-25.37 219.98,-24.34"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="221.14,-27.66 228.81,-20.35 218.26,-21.28 221.14,-27.66"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/basic_ofstream/is_open.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="327.75,-167.25 214.25,-167.25 214.25,-148 327.75,-148 327.75,-167.25"/>
|
||||
<text text-anchor="middle" x="271" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::ofstream::is_open</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node8 -->
|
||||
<g id="edge7_Node000003_Node000008" class="edge">
|
||||
<title>Node3->Node8</title>
|
||||
<g id="a_edge7_Node000003_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M163.18,-130.06C180.43,-134.51 201.3,-139.9 219.99,-144.72"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="218.98,-148.07 229.54,-147.18 220.73,-141.3 218.98,-148.07"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/basic_ofstream/open.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="321.38,-56.25 220.62,-56.25 220.62,-37 321.38,-37 321.38,-56.25"/>
|
||||
<text text-anchor="middle" x="271" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::ofstream::open</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node9 -->
|
||||
<g id="edge8_Node000003_Node000009" class="edge">
|
||||
<title>Node3->Node9</title>
|
||||
<g id="a_edge8_Node000003_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M139.95,-110.56C156.61,-98.35 186.32,-77.79 214.25,-64.62 217.18,-63.24 220.25,-61.93 223.37,-60.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="224.5,-63.99 232.66,-57.24 222.07,-57.43 224.5,-63.99"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/c/perror.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="301.12,-130.25 240.88,-130.25 240.88,-111 301.12,-111 301.12,-130.25"/>
|
||||
<text text-anchor="middle" x="271" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::perror</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node10 -->
|
||||
<g id="edge9_Node000003_Node000010" class="edge">
|
||||
<title>Node3->Node10</title>
|
||||
<g id="a_edge9_Node000003_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M163.18,-120.62C183.38,-120.62 208.54,-120.62 229.36,-120.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="229.22,-124.13 239.22,-120.63 229.22,-117.13 229.22,-124.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a xlink:href="../../db/dd3/ode__forward__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe" target="_top" xlink:title="Problem statement for a system with first-order differential equations. Updates the system differenti...">
|
||||
<polygon fill="white" stroke="#666666" points="414.62,-19.25 364.12,-19.25 364.12,0 414.62,0 414.62,-19.25"/>
|
||||
<text text-anchor="middle" x="389.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">problem</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6->Node7 -->
|
||||
<g id="edge6_Node000006_Node000007" class="edge">
|
||||
<title>Node6->Node7</title>
|
||||
<g id="a_edge6_Node000006_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M320.68,-9.62C331.33,-9.62 342.43,-9.62 352.47,-9.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="352.19,-13.13 362.19,-9.63 352.19,-6.13 352.19,-13.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node4 -->
|
||||
<g id="edge11_Node000011_Node000004" class="edge">
|
||||
<title>Node11->Node4</title>
|
||||
<g id="a_edge11_Node000011_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M162.66,-147.57C168.09,-145.35 173.47,-142.72 178.25,-139.62 197.79,-126.99 194.57,-114.03 214.25,-101.62 219.23,-98.49 224.81,-95.85 230.46,-93.64"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="231.54,-96.97 239.85,-90.41 229.26,-90.35 231.54,-96.97"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node5 -->
|
||||
<g id="edge12_Node000011_Node000005" class="edge">
|
||||
<title>Node11->Node5</title>
|
||||
<g id="a_edge12_Node000011_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M165.8,-167.74C182.48,-172.04 202.13,-177.11 219.85,-181.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="218.85,-185.04 229.4,-184.15 220.6,-178.26 218.85,-185.04"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node8 -->
|
||||
<g id="edge16_Node000011_Node000008" class="edge">
|
||||
<title>Node11->Node8</title>
|
||||
<g id="a_edge16_Node000011_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M178.39,-157.62C186.24,-157.62 194.43,-157.62 202.56,-157.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="202.44,-161.13 212.44,-157.63 202.44,-154.13 202.44,-161.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node10 -->
|
||||
<g id="edge17_Node000011_Node000010" class="edge">
|
||||
<title>Node11->Node10</title>
|
||||
<g id="a_edge17_Node000011_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M165.8,-147.51C185.58,-142.41 209.54,-136.23 229.5,-131.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="230.15,-134.52 238.96,-128.64 228.4,-127.75 230.15,-134.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><a xlink:href="../../db/dd3/ode__forward__euler_8cpp.html#af3adf7b092a87868917ee5fb4255192b" target="_top" xlink:title="Exact solution of the problem. Used for solution comparison.">
|
||||
<polygon fill="white" stroke="#666666" points="310.5,-241.25 231.5,-241.25 231.5,-222 310.5,-222 310.5,-241.25"/>
|
||||
<text text-anchor="middle" x="271" y="-227.75" font-family="Helvetica,sans-Serif" font-size="10.00">exact_solution</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node12 -->
|
||||
<g id="edge13_Node000011_Node000012" class="edge">
|
||||
<title>Node11->Node12</title>
|
||||
<g id="a_edge13_Node000011_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M162.66,-167.68C168.09,-169.9 173.47,-172.53 178.25,-175.62 197.79,-188.26 194.57,-201.22 214.25,-213.62 216.27,-214.9 218.38,-216.09 220.56,-217.2"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="219.14,-220.39 229.7,-221.24 221.97,-213.99 219.14,-220.39"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/cos.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="415,-222.25 363.75,-222.25 363.75,-203 415,-203 415,-222.25"/>
|
||||
<text text-anchor="middle" x="389.38" y="-208.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::cos</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge14_Node000012_Node000013" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<g id="a_edge14_Node000012_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M310.75,-225.3C324.15,-223.11 339.1,-220.67 352.28,-218.52"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="352.52,-222.03 361.82,-216.96 351.39,-215.12 352.52,-222.03"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sin.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="413.5,-259.25 365.25,-259.25 365.25,-240 413.5,-240 413.5,-259.25"/>
|
||||
<text text-anchor="middle" x="389.38" y="-245.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::sin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node14 -->
|
||||
<g id="edge15_Node000012_Node000014" class="edge">
|
||||
<title>Node12->Node14</title>
|
||||
<g id="a_edge15_Node000012_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M310.75,-237.62C324.66,-239.77 340.25,-242.18 353.78,-244.27"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="353.14,-247.72 363.56,-245.79 354.21,-240.8 353.14,-247.72"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
<style type='text/css'>
|
||||
<![CDATA[
|
||||
[data-mouse-over-selected='false'] { opacity: 0.7; }
|
||||
[data-mouse-over-selected='true'] { opacity: 1.0; }
|
||||
]]>
|
||||
</style>
|
||||
<script type="application/ecmascript"><![CDATA[
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
highlightEdges();
|
||||
highlightAdjacentNodes();
|
||||
});
|
||||
]]></script>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 15 KiB |
@@ -1,291 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: main Pages: 1 -->
|
||||
<svg width="423pt" height="267pt"
|
||||
viewBox="0.00 0.00 423.00 267.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 263.25)">
|
||||
<title>main</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="37,-167.25 0,-167.25 0,-148 37,-148 37,-167.25"/>
|
||||
<text text-anchor="middle" x="18.5" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">main</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/string/byte/atof.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="151.62,-204.25 99.62,-204.25 99.62,-185 151.62,-185 151.62,-204.25"/>
|
||||
<text text-anchor="middle" x="125.62" y="-190.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::atof</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.32,-163.98C47.72,-167.69 61.1,-172.44 73,-176.62 78.05,-178.4 83.38,-180.27 88.62,-182.1"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="87.12,-185.28 97.72,-185.27 89.43,-178.68 87.12,-185.28"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a xlink:href="../../d6/d60/group__ode.html#gae0509f8843e2bc42de2abbd00a14b7b9" target="_top" xlink:title="Compute approximation using the forward-Euler method in the given limits.">
|
||||
<polygon fill="white" stroke="#666666" points="162.88,-130.25 88.38,-130.25 88.38,-111 162.88,-111 162.88,-130.25"/>
|
||||
<text text-anchor="middle" x="125.62" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">forward_euler</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.32,-151.27C47.72,-147.56 61.1,-142.81 73,-138.62 76.9,-137.25 80.97,-135.83 85.03,-134.4"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="85.96,-137.79 94.24,-131.19 83.65,-131.18 85.96,-137.79"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11 -->
|
||||
<g id="Node000011" class="node">
|
||||
<title>Node11</title>
|
||||
<g id="a_Node000011"><a xlink:href="../../db/dd3/ode__forward__euler_8cpp.html#aa13517b8e5de1b75592052db7f7e237f" target="_top" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="178.25,-167.25 73,-167.25 73,-148 178.25,-148 178.25,-167.25"/>
|
||||
<text text-anchor="middle" x="125.62" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">save_exact_solution</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node11 -->
|
||||
<g id="edge10_Node000001_Node000011" class="edge">
|
||||
<title>Node1->Node11</title>
|
||||
<g id="a_edge10_Node000001_Node000011"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M37.33,-157.62C44.25,-157.62 52.63,-157.62 61.41,-157.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="61.17,-161.13 71.17,-157.63 61.17,-154.13 61.17,-161.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/chrono/c/clock.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="300.38,-93.25 241.62,-93.25 241.62,-74 300.38,-74 300.38,-93.25"/>
|
||||
<text text-anchor="middle" x="271" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::clock</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node4 -->
|
||||
<g id="edge3_Node000003_Node000004" class="edge">
|
||||
<title>Node3->Node4</title>
|
||||
<g id="a_edge3_Node000003_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M163.18,-111.19C183.62,-105.92 209.12,-99.34 230.08,-93.93"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="230.93,-97.32 239.73,-91.44 229.18,-90.55 230.93,-97.32"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/basic_ofstream/close.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="322.5,-204.25 219.5,-204.25 219.5,-185 322.5,-185 322.5,-204.25"/>
|
||||
<text text-anchor="middle" x="271" y="-190.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::ofstream::close</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node5 -->
|
||||
<g id="edge4_Node000003_Node000005" class="edge">
|
||||
<title>Node3->Node5</title>
|
||||
<g id="a_edge4_Node000003_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M162.66,-130.68C168.09,-132.9 173.47,-135.53 178.25,-138.62 197.79,-151.26 194.57,-164.22 214.25,-176.62 216.09,-177.78 218.01,-178.88 219.99,-179.9"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="218.27,-182.97 228.82,-183.89 221.14,-176.58 218.27,-182.97"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a xlink:href="../../d6/d60/group__ode.html#ga195d23bbdfcb80e83c9cda45c9ad5723" target="_top" xlink:title="Compute next step approximation using the forward-Euler method.">
|
||||
<polygon fill="white" stroke="#666666" points="320.25,-19.25 221.75,-19.25 221.75,0 320.25,0 320.25,-19.25"/>
|
||||
<text text-anchor="middle" x="271" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">forward_euler_step</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node6 -->
|
||||
<g id="edge5_Node000003_Node000006" class="edge">
|
||||
<title>Node3->Node6</title>
|
||||
<g id="a_edge5_Node000003_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M133.36,-110.66C146.63,-91.74 178.06,-50.5 214.25,-27.62 216.09,-26.46 218.01,-25.37 219.98,-24.34"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="221.14,-27.66 228.81,-20.35 218.26,-21.28 221.14,-27.66"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/basic_ofstream/is_open.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="327.75,-167.25 214.25,-167.25 214.25,-148 327.75,-148 327.75,-167.25"/>
|
||||
<text text-anchor="middle" x="271" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::ofstream::is_open</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node8 -->
|
||||
<g id="edge7_Node000003_Node000008" class="edge">
|
||||
<title>Node3->Node8</title>
|
||||
<g id="a_edge7_Node000003_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M163.18,-130.06C180.43,-134.51 201.3,-139.9 219.99,-144.72"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="218.98,-148.07 229.54,-147.18 220.73,-141.3 218.98,-148.07"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node9 -->
|
||||
<g id="Node000009" class="node">
|
||||
<title>Node9</title>
|
||||
<g id="a_Node000009"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/basic_ofstream/open.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="321.38,-56.25 220.62,-56.25 220.62,-37 321.38,-37 321.38,-56.25"/>
|
||||
<text text-anchor="middle" x="271" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::ofstream::open</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node9 -->
|
||||
<g id="edge8_Node000003_Node000009" class="edge">
|
||||
<title>Node3->Node9</title>
|
||||
<g id="a_edge8_Node000003_Node000009"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M139.95,-110.56C156.61,-98.35 186.32,-77.79 214.25,-64.62 217.18,-63.24 220.25,-61.93 223.37,-60.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="224.5,-63.99 232.66,-57.24 222.07,-57.43 224.5,-63.99"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node10 -->
|
||||
<g id="Node000010" class="node">
|
||||
<title>Node10</title>
|
||||
<g id="a_Node000010"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/c/perror.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="301.12,-130.25 240.88,-130.25 240.88,-111 301.12,-111 301.12,-130.25"/>
|
||||
<text text-anchor="middle" x="271" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::perror</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3->Node10 -->
|
||||
<g id="edge9_Node000003_Node000010" class="edge">
|
||||
<title>Node3->Node10</title>
|
||||
<g id="a_edge9_Node000003_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M163.18,-120.62C183.38,-120.62 208.54,-120.62 229.36,-120.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="229.22,-124.13 239.22,-120.63 229.22,-117.13 229.22,-124.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a xlink:href="../../db/dd3/ode__forward__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe" target="_top" xlink:title="Problem statement for a system with first-order differential equations. Updates the system differenti...">
|
||||
<polygon fill="white" stroke="#666666" points="414.62,-19.25 364.12,-19.25 364.12,0 414.62,0 414.62,-19.25"/>
|
||||
<text text-anchor="middle" x="389.38" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">problem</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6->Node7 -->
|
||||
<g id="edge6_Node000006_Node000007" class="edge">
|
||||
<title>Node6->Node7</title>
|
||||
<g id="a_edge6_Node000006_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M320.68,-9.62C331.33,-9.62 342.43,-9.62 352.47,-9.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="352.19,-13.13 362.19,-9.63 352.19,-6.13 352.19,-13.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node4 -->
|
||||
<g id="edge11_Node000011_Node000004" class="edge">
|
||||
<title>Node11->Node4</title>
|
||||
<g id="a_edge11_Node000011_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M162.66,-147.57C168.09,-145.35 173.47,-142.72 178.25,-139.62 197.79,-126.99 194.57,-114.03 214.25,-101.62 219.23,-98.49 224.81,-95.85 230.46,-93.64"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="231.54,-96.97 239.85,-90.41 229.26,-90.35 231.54,-96.97"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node5 -->
|
||||
<g id="edge12_Node000011_Node000005" class="edge">
|
||||
<title>Node11->Node5</title>
|
||||
<g id="a_edge12_Node000011_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M165.8,-167.74C182.48,-172.04 202.13,-177.11 219.85,-181.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="218.85,-185.04 229.4,-184.15 220.6,-178.26 218.85,-185.04"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node8 -->
|
||||
<g id="edge16_Node000011_Node000008" class="edge">
|
||||
<title>Node11->Node8</title>
|
||||
<g id="a_edge16_Node000011_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M178.39,-157.62C186.24,-157.62 194.43,-157.62 202.56,-157.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="202.44,-161.13 212.44,-157.63 202.44,-154.13 202.44,-161.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node10 -->
|
||||
<g id="edge17_Node000011_Node000010" class="edge">
|
||||
<title>Node11->Node10</title>
|
||||
<g id="a_edge17_Node000011_Node000010"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M165.8,-147.51C185.58,-142.41 209.54,-136.23 229.5,-131.08"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="230.15,-134.52 238.96,-128.64 228.4,-127.75 230.15,-134.52"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12 -->
|
||||
<g id="Node000012" class="node">
|
||||
<title>Node12</title>
|
||||
<g id="a_Node000012"><a xlink:href="../../db/dd3/ode__forward__euler_8cpp.html#af3adf7b092a87868917ee5fb4255192b" target="_top" xlink:title="Exact solution of the problem. Used for solution comparison.">
|
||||
<polygon fill="white" stroke="#666666" points="310.5,-241.25 231.5,-241.25 231.5,-222 310.5,-222 310.5,-241.25"/>
|
||||
<text text-anchor="middle" x="271" y="-227.75" font-family="Helvetica,sans-Serif" font-size="10.00">exact_solution</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node11->Node12 -->
|
||||
<g id="edge13_Node000011_Node000012" class="edge">
|
||||
<title>Node11->Node12</title>
|
||||
<g id="a_edge13_Node000011_Node000012"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M162.66,-167.68C168.09,-169.9 173.47,-172.53 178.25,-175.62 197.79,-188.26 194.57,-201.22 214.25,-213.62 216.27,-214.9 218.38,-216.09 220.56,-217.2"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="219.14,-220.39 229.7,-221.24 221.97,-213.99 219.14,-220.39"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node13 -->
|
||||
<g id="Node000013" class="node">
|
||||
<title>Node13</title>
|
||||
<g id="a_Node000013"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/cos.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="415,-222.25 363.75,-222.25 363.75,-203 415,-203 415,-222.25"/>
|
||||
<text text-anchor="middle" x="389.38" y="-208.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::cos</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node13 -->
|
||||
<g id="edge14_Node000012_Node000013" class="edge">
|
||||
<title>Node12->Node13</title>
|
||||
<g id="a_edge14_Node000012_Node000013"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M310.75,-225.3C324.15,-223.11 339.1,-220.67 352.28,-218.52"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="352.52,-222.03 361.82,-216.96 351.39,-215.12 352.52,-222.03"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node14 -->
|
||||
<g id="Node000014" class="node">
|
||||
<title>Node14</title>
|
||||
<g id="a_Node000014"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sin.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="413.5,-259.25 365.25,-259.25 365.25,-240 413.5,-240 413.5,-259.25"/>
|
||||
<text text-anchor="middle" x="389.38" y="-245.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::sin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node12->Node14 -->
|
||||
<g id="edge15_Node000012_Node000014" class="edge">
|
||||
<title>Node12->Node14</title>
|
||||
<g id="a_edge15_Node000012_Node000014"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M310.75,-237.62C324.66,-239.77 340.25,-242.18 353.78,-244.27"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="353.14,-247.72 363.56,-245.79 354.21,-240.8 353.14,-247.72"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 14 KiB |
@@ -1,17 +0,0 @@
|
||||
<map id="save_exact_solution" name="save_exact_solution">
|
||||
<area shape="rect" id="Node000001" title=" " alt="" coords="5,104,146,130"/>
|
||||
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/chrono/c/clock.html#" title=" " alt="" coords="230,5,308,31"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="93,101,137,71,193,40,215,31,217,36,195,45,140,76,96,106"/>
|
||||
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/basic_ofstream/close.html#" title=" " alt="" coords="201,55,338,80"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="128,101,200,82,202,87,130,106"/>
|
||||
<area shape="rect" id="Node000004" href="$db/dd3/ode__forward__euler_8cpp.html#af3adf7b092a87868917ee5fb4255192b" title="Exact solution of the problem. Used for solution comparison." alt="" coords="217,104,322,130"/>
|
||||
<area shape="poly" id="edge3_Node000001_Node000004" title=" " alt="" coords="146,114,201,114,201,120,146,120"/>
|
||||
<area shape="rect" id="Node000007" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/basic_ofstream/is_open.html#" title=" " alt="" coords="194,153,345,179"/>
|
||||
<area shape="poly" id="edge6_Node000001_Node000007" title=" " alt="" coords="130,128,202,146,200,151,128,133"/>
|
||||
<area shape="rect" id="Node000008" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/io/c/perror.html#" title=" " alt="" coords="229,203,310,228"/>
|
||||
<area shape="poly" id="edge7_Node000001_Node000008" title=" " alt="" coords="96,128,140,158,195,189,215,198,213,202,193,194,137,163,93,132"/>
|
||||
<area shape="rect" id="Node000005" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/cos.html#" title=" " alt="" coords="393,80,461,106"/>
|
||||
<area shape="poly" id="edge4_Node000004_Node000005" title=" " alt="" coords="322,106,377,98,378,103,323,111"/>
|
||||
<area shape="rect" id="Node000006" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sin.html#" title=" " alt="" coords="395,129,459,155"/>
|
||||
<area shape="poly" id="edge5_Node000004_Node000006" title=" " alt="" coords="323,123,380,132,379,137,322,128"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
06ba2372c65249339fc942bfa3a5055a
|
||||
@@ -1,173 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: save_exact_solution Pages: 1 -->
|
||||
<svg width="350pt" height="175pt"
|
||||
viewBox="0.00 0.00 350.00 175.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
|
||||
<style type="text/css"><![CDATA[
|
||||
.node, .edge {opacity: 0.7;}
|
||||
.node.selected, .edge.selected {opacity: 1;}
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 171.25)">
|
||||
<title>save_exact_solution</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="105.25,-93.25 0,-93.25 0,-74 105.25,-74 105.25,-93.25"/>
|
||||
<text text-anchor="middle" x="52.62" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">save_exact_solution</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/chrono/c/clock.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="227.38,-167.25 168.62,-167.25 168.62,-148 227.38,-148 227.38,-167.25"/>
|
||||
<text text-anchor="middle" x="198" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::clock</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M66.95,-93.69C83.61,-105.9 113.32,-126.46 141.25,-139.62 146.46,-142.08 152.1,-144.33 157.72,-146.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="156.35,-149.58 166.95,-149.45 158.58,-142.95 156.35,-149.58"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/basic_ofstream/close.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="249.5,-130.25 146.5,-130.25 146.5,-111 249.5,-111 249.5,-130.25"/>
|
||||
<text text-anchor="middle" x="198" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::ofstream::close</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M92.8,-93.74C109.48,-98.04 129.13,-103.11 146.85,-107.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="145.85,-111.04 156.4,-110.15 147.6,-104.26 145.85,-111.04"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:href="../../db/dd3/ode__forward__euler_8cpp.html#af3adf7b092a87868917ee5fb4255192b" target="_top" xlink:title="Exact solution of the problem. Used for solution comparison.">
|
||||
<polygon fill="white" stroke="#666666" points="237.5,-93.25 158.5,-93.25 158.5,-74 237.5,-74 237.5,-93.25"/>
|
||||
<text text-anchor="middle" x="198" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">exact_solution</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.39,-83.62C118.91,-83.62 133.46,-83.62 146.9,-83.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="146.85,-87.13 156.85,-83.63 146.85,-80.13 146.85,-87.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/basic_ofstream/is_open.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="254.75,-56.25 141.25,-56.25 141.25,-37 254.75,-37 254.75,-56.25"/>
|
||||
<text text-anchor="middle" x="198" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::ofstream::is_open</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node7 -->
|
||||
<g id="edge6_Node000001_Node000007" class="edge">
|
||||
<title>Node1->Node7</title>
|
||||
<g id="a_edge6_Node000001_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M92.8,-73.51C109.48,-69.21 129.13,-64.14 146.85,-59.57"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="147.6,-62.99 156.4,-57.1 145.85,-56.21 147.6,-62.99"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/c/perror.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="228.12,-19.25 167.88,-19.25 167.88,0 228.12,0 228.12,-19.25"/>
|
||||
<text text-anchor="middle" x="198" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::perror</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node8 -->
|
||||
<g id="edge7_Node000001_Node000008" class="edge">
|
||||
<title>Node1->Node8</title>
|
||||
<g id="a_edge7_Node000001_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M66.95,-73.56C83.61,-61.35 113.32,-40.79 141.25,-27.62 146.17,-25.31 151.46,-23.17 156.76,-21.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="157.74,-24.61 166.09,-18.08 155.49,-17.98 157.74,-24.61"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/cos.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="342,-111.25 290.75,-111.25 290.75,-92 342,-92 342,-111.25"/>
|
||||
<text text-anchor="middle" x="316.38" y="-97.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::cos</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4_Node000004_Node000005" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<g id="a_edge4_Node000004_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M237.75,-89.62C251.15,-91.69 266.1,-94 279.28,-96.04"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="278.4,-99.45 288.82,-97.52 279.47,-92.53 278.4,-99.45"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sin.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="340.5,-74.25 292.25,-74.25 292.25,-55 340.5,-55 340.5,-74.25"/>
|
||||
<text text-anchor="middle" x="316.38" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::sin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5_Node000004_Node000006" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<g id="a_edge5_Node000004_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M237.75,-77.3C251.66,-75.03 267.25,-72.48 280.78,-70.27"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="281.25,-73.74 290.56,-68.68 280.13,-66.83 281.25,-73.74"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
<style type='text/css'>
|
||||
<![CDATA[
|
||||
[data-mouse-over-selected='false'] { opacity: 0.7; }
|
||||
[data-mouse-over-selected='true'] { opacity: 1.0; }
|
||||
]]>
|
||||
</style>
|
||||
<script type="application/ecmascript"><![CDATA[
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
highlightEdges();
|
||||
highlightAdjacentNodes();
|
||||
});
|
||||
]]></script>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 7.5 KiB |
@@ -1,147 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: save_exact_solution Pages: 1 -->
|
||||
<svg width="350pt" height="175pt"
|
||||
viewBox="0.00 0.00 350.00 175.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 171.25)">
|
||||
<title>save_exact_solution</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title=" ">
|
||||
<polygon fill="#999999" stroke="#666666" points="105.25,-93.25 0,-93.25 0,-74 105.25,-74 105.25,-93.25"/>
|
||||
<text text-anchor="middle" x="52.62" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">save_exact_solution</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/chrono/c/clock.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="227.38,-167.25 168.62,-167.25 168.62,-148 227.38,-148 227.38,-167.25"/>
|
||||
<text text-anchor="middle" x="198" y="-153.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::clock</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M66.95,-93.69C83.61,-105.9 113.32,-126.46 141.25,-139.62 146.46,-142.08 152.1,-144.33 157.72,-146.35"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="156.35,-149.58 166.95,-149.45 158.58,-142.95 156.35,-149.58"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/basic_ofstream/close.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="249.5,-130.25 146.5,-130.25 146.5,-111 249.5,-111 249.5,-130.25"/>
|
||||
<text text-anchor="middle" x="198" y="-116.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::ofstream::close</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M92.8,-93.74C109.48,-98.04 129.13,-103.11 146.85,-107.68"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="145.85,-111.04 156.4,-110.15 147.6,-104.26 145.85,-111.04"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4 -->
|
||||
<g id="Node000004" class="node">
|
||||
<title>Node4</title>
|
||||
<g id="a_Node000004"><a xlink:href="../../db/dd3/ode__forward__euler_8cpp.html#af3adf7b092a87868917ee5fb4255192b" target="_top" xlink:title="Exact solution of the problem. Used for solution comparison.">
|
||||
<polygon fill="white" stroke="#666666" points="237.5,-93.25 158.5,-93.25 158.5,-74 237.5,-74 237.5,-93.25"/>
|
||||
<text text-anchor="middle" x="198" y="-79.75" font-family="Helvetica,sans-Serif" font-size="10.00">exact_solution</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node4 -->
|
||||
<g id="edge3_Node000001_Node000004" class="edge">
|
||||
<title>Node1->Node4</title>
|
||||
<g id="a_edge3_Node000001_Node000004"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M105.39,-83.62C118.91,-83.62 133.46,-83.62 146.9,-83.62"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="146.85,-87.13 156.85,-83.63 146.85,-80.13 146.85,-87.13"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node7 -->
|
||||
<g id="Node000007" class="node">
|
||||
<title>Node7</title>
|
||||
<g id="a_Node000007"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/basic_ofstream/is_open.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="254.75,-56.25 141.25,-56.25 141.25,-37 254.75,-37 254.75,-56.25"/>
|
||||
<text text-anchor="middle" x="198" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::ofstream::is_open</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node7 -->
|
||||
<g id="edge6_Node000001_Node000007" class="edge">
|
||||
<title>Node1->Node7</title>
|
||||
<g id="a_edge6_Node000001_Node000007"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M92.8,-73.51C109.48,-69.21 129.13,-64.14 146.85,-59.57"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="147.6,-62.99 156.4,-57.1 145.85,-56.21 147.6,-62.99"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node8 -->
|
||||
<g id="Node000008" class="node">
|
||||
<title>Node8</title>
|
||||
<g id="a_Node000008"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/io/c/perror.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="228.12,-19.25 167.88,-19.25 167.88,0 228.12,0 228.12,-19.25"/>
|
||||
<text text-anchor="middle" x="198" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::perror</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node8 -->
|
||||
<g id="edge7_Node000001_Node000008" class="edge">
|
||||
<title>Node1->Node8</title>
|
||||
<g id="a_edge7_Node000001_Node000008"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M66.95,-73.56C83.61,-61.35 113.32,-40.79 141.25,-27.62 146.17,-25.31 151.46,-23.17 156.76,-21.25"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="157.74,-24.61 166.09,-18.08 155.49,-17.98 157.74,-24.61"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node5 -->
|
||||
<g id="Node000005" class="node">
|
||||
<title>Node5</title>
|
||||
<g id="a_Node000005"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/cos.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="342,-111.25 290.75,-111.25 290.75,-92 342,-92 342,-111.25"/>
|
||||
<text text-anchor="middle" x="316.38" y="-97.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::cos</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node5 -->
|
||||
<g id="edge4_Node000004_Node000005" class="edge">
|
||||
<title>Node4->Node5</title>
|
||||
<g id="a_edge4_Node000004_Node000005"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M237.75,-89.62C251.15,-91.69 266.1,-94 279.28,-96.04"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="278.4,-99.45 288.82,-97.52 279.47,-92.53 278.4,-99.45"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node6 -->
|
||||
<g id="Node000006" class="node">
|
||||
<title>Node6</title>
|
||||
<g id="a_Node000006"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sin.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="340.5,-74.25 292.25,-74.25 292.25,-55 340.5,-55 340.5,-74.25"/>
|
||||
<text text-anchor="middle" x="316.38" y="-60.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::sin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node4->Node6 -->
|
||||
<g id="edge5_Node000004_Node000006" class="edge">
|
||||
<title>Node4->Node6</title>
|
||||
<g id="a_edge5_Node000004_Node000006"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M237.75,-77.3C251.66,-75.03 267.25,-72.48 280.78,-70.27"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="281.25,-73.74 290.56,-68.68 280.13,-66.83 281.25,-73.74"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 6.8 KiB |
@@ -1,7 +0,0 @@
|
||||
<map id="exact_solution" name="exact_solution">
|
||||
<area shape="rect" id="Node000001" title="Exact solution of the problem. Used for solution comparison." alt="" coords="5,31,111,56"/>
|
||||
<area shape="rect" id="Node000002" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/cos.html#" title=" " alt="" coords="159,5,227,31"/>
|
||||
<area shape="poly" id="edge1_Node000001_Node000002" title=" " alt="" coords="111,31,143,25,144,30,112,36"/>
|
||||
<area shape="rect" id="Node000003" href="/Users/runner/work/C-Plus-Plus/C-Plus-Plus/doc/cppreference-doxygen-web.tag.xml$cpp/numeric/math/sin.html#" title=" " alt="" coords="161,55,225,80"/>
|
||||
<area shape="poly" id="edge2_Node000001_Node000003" title=" " alt="" coords="112,50,146,56,145,62,111,56"/>
|
||||
</map>
|
||||
@@ -1 +0,0 @@
|
||||
775f69ca4eafdff6467315705aafdd17
|
||||
@@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: exact_solution Pages: 1 -->
|
||||
<svg width="174pt" height="64pt"
|
||||
viewBox="0.00 0.00 174.25 64.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
||||
<svg id="main" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
|
||||
|
||||
<style type="text/css"><![CDATA[
|
||||
.node, .edge {opacity: 0.7;}
|
||||
.node.selected, .edge.selected {opacity: 1;}
|
||||
.edge:hover path { stroke: red; }
|
||||
.edge:hover polygon { stroke: red; fill: red; }
|
||||
]]></style>
|
||||
<script type="application/ecmascript" xlink:href="../../svg.min.js"/>
|
||||
<svg id="graph" class="graph">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 60.25)">
|
||||
<title>exact_solution</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Exact solution of the problem. Used for solution comparison.">
|
||||
<polygon fill="#999999" stroke="#666666" points="79,-37.25 0,-37.25 0,-18 79,-18 79,-37.25"/>
|
||||
<text text-anchor="middle" x="39.5" y="-23.75" font-family="Helvetica,sans-Serif" font-size="10.00">exact_solution</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/cos.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="166.25,-56.25 115,-56.25 115,-37 166.25,-37 166.25,-56.25"/>
|
||||
<text text-anchor="middle" x="140.62" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::cos</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M79.39,-35.08C87.34,-36.6 95.66,-38.2 103.51,-39.7"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="102.58,-43.09 113.06,-41.53 103.9,-36.21 102.58,-43.09"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sin.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="164.75,-19.25 116.5,-19.25 116.5,0 164.75,0 164.75,-19.25"/>
|
||||
<text text-anchor="middle" x="140.62" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::sin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M79.39,-20.56C87.8,-19.04 96.63,-17.43 104.87,-15.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="105.3,-19.42 114.51,-14.19 104.05,-12.53 105.3,-19.42"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
||||
<style type='text/css'>
|
||||
<![CDATA[
|
||||
[data-mouse-over-selected='false'] { opacity: 0.7; }
|
||||
[data-mouse-over-selected='true'] { opacity: 1.0; }
|
||||
]]>
|
||||
</style>
|
||||
<script type="application/ecmascript"><![CDATA[
|
||||
document.addEventListener('DOMContentLoaded', (event) => {
|
||||
highlightEdges();
|
||||
highlightAdjacentNodes();
|
||||
});
|
||||
]]></script>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.3 KiB |
@@ -1,57 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 12.1.2 (20240928.0832)
|
||||
-->
|
||||
<!-- Title: exact_solution Pages: 1 -->
|
||||
<svg width="174pt" height="64pt"
|
||||
viewBox="0.00 0.00 174.25 64.25" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 60.25)">
|
||||
<title>exact_solution</title>
|
||||
<!-- Node1 -->
|
||||
<g id="Node000001" class="node">
|
||||
<title>Node1</title>
|
||||
<g id="a_Node000001"><a xlink:title="Exact solution of the problem. Used for solution comparison.">
|
||||
<polygon fill="#999999" stroke="#666666" points="79,-37.25 0,-37.25 0,-18 79,-18 79,-37.25"/>
|
||||
<text text-anchor="middle" x="39.5" y="-23.75" font-family="Helvetica,sans-Serif" font-size="10.00">exact_solution</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node2 -->
|
||||
<g id="Node000002" class="node">
|
||||
<title>Node2</title>
|
||||
<g id="a_Node000002"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/cos.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="166.25,-56.25 115,-56.25 115,-37 166.25,-37 166.25,-56.25"/>
|
||||
<text text-anchor="middle" x="140.62" y="-42.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::cos</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node2 -->
|
||||
<g id="edge1_Node000001_Node000002" class="edge">
|
||||
<title>Node1->Node2</title>
|
||||
<g id="a_edge1_Node000001_Node000002"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M79.39,-35.08C87.34,-36.6 95.66,-38.2 103.51,-39.7"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="102.58,-43.09 113.06,-41.53 103.9,-36.21 102.58,-43.09"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node3 -->
|
||||
<g id="Node000003" class="node">
|
||||
<title>Node3</title>
|
||||
<g id="a_Node000003"><a target="_blank" xlink:href="http://en.cppreference.com/w/cpp/numeric/math/sin.html#" xlink:title=" ">
|
||||
<polygon fill="white" stroke="#666666" points="164.75,-19.25 116.5,-19.25 116.5,0 164.75,0 164.75,-19.25"/>
|
||||
<text text-anchor="middle" x="140.62" y="-5.75" font-family="Helvetica,sans-Serif" font-size="10.00">std::sin</text>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
<!-- Node1->Node3 -->
|
||||
<g id="edge2_Node000001_Node000003" class="edge">
|
||||
<title>Node1->Node3</title>
|
||||
<g id="a_edge2_Node000001_Node000003"><a xlink:title=" ">
|
||||
<path fill="none" stroke="#63b8ff" d="M79.39,-20.56C87.8,-19.04 96.63,-17.43 104.87,-15.94"/>
|
||||
<polygon fill="#63b8ff" stroke="#63b8ff" points="105.3,-19.42 114.51,-14.19 104.05,-12.53 105.3,-19.42"/>
|
||||
</a>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.5 KiB |
277
db/dd3/ode__forward__euler_8cpp_source.html
Normal file
277
db/dd3/ode__forward__euler_8cpp_source.html
Normal file
@@ -0,0 +1,277 @@
|
||||
<!-- HTML header for doxygen 1.12.0-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.12.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>TheAlgorithms/C++: numerical_methods/ode_forward_euler.cpp Source File</title>
|
||||
<link rel="icon" href="../../favicon.svg" type="image/x-icon" />
|
||||
<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>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@xpack-3rd-party/doxygen-awesome-css@2.2.0-1/doxygen-awesome-darkmode-toggle.js"></script>
|
||||
<script type="text/javascript">
|
||||
DoxygenAwesomeDarkModeToggle.init()
|
||||
</script>
|
||||
<script type="text/javascript" src="../../clipboard.js"></script>
|
||||
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../navtreedata.js"></script>
|
||||
<script type="text/javascript" src="../../navtree.js"></script>
|
||||
<script type="text/javascript" src="../../resize.js"></script>
|
||||
<script type="text/javascript" src="../../cookie.js"></script>
|
||||
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="../../search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="../../search/search.js"></script>
|
||||
<script type="text/javascript">
|
||||
window.MathJax = {
|
||||
options: {
|
||||
ignoreHtmlClass: 'tex2jax_ignore',
|
||||
processHtmlClass: 'tex2jax_process'
|
||||
},
|
||||
loader: {
|
||||
load: ['[tex]/ams']
|
||||
},
|
||||
tex: {
|
||||
macros: {},
|
||||
packages: ['base','configmacros','ams']
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript" id="MathJax-script" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
|
||||
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectlogo"><img alt="Logo" src="../../project_logo.png"/></td>
|
||||
<td id="projectalign">
|
||||
<div id="projectname">TheAlgorithms/C++<span id="projectnumber"> 1.0.0</span>
|
||||
</div>
|
||||
<div id="projectbrief">All the algorithms implemented in C++</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.12.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(1); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
<script type="text/javascript" src="../../menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('../../',true,false,'search.php','Search',true);
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
||||
<div id="nav-tree">
|
||||
<div id="nav-tree-contents">
|
||||
<div id="nav-sync" class="sync"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="splitbar" style="-moz-user-select:none;"
|
||||
class="ui-resizable-handle">
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function(){initNavTree('db/dd3/ode__forward__euler_8cpp_source.html','../../'); initResizable(true); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="doc-content">
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">ode_forward_euler.cpp</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="../../db/dd3/ode__forward__euler_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="preprocessor">#include <cmath></span></div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="preprocessor">#include <ctime></span></div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="preprocessor">#include <fstream></span></div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="preprocessor">#include <iostream></span></div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="preprocessor">#include <valarray></span></div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
|
||||
<div class="foldopen" id="foldopen00054" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="../../db/dd3/ode__forward__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe"> 54</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../db/dd3/ode__forward__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe">problem</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> &x, std::valarray<double> *y,</div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> std::valarray<double> *dy) {</div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">const</span> <span class="keywordtype">double</span> omega = 1.F; <span class="comment">// some const for the problem</span></div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> (*dy)[0] = (*y)[1]; <span class="comment">// x dot // NOLINT</span></div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> (*dy)[1] = -omega * omega * (*y)[0]; <span class="comment">// y dot // NOLINT</span></div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
|
||||
<div class="foldopen" id="foldopen00067" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="../../db/dd3/ode__forward__euler_8cpp.html#af3adf7b092a87868917ee5fb4255192b"> 67</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../db/dd3/ode__forward__euler_8cpp.html#af3adf7b092a87868917ee5fb4255192b">exact_solution</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> &x, std::valarray<double> *y) {</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> y[0][0] = std::cos(x);</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> y[0][1] = -std::sin(x);</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
|
||||
<div class="foldopen" id="foldopen00086" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="../../d6/d60/group__ode.html#ga195d23bbdfcb80e83c9cda45c9ad5723"> 86</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d6/d60/group__ode.html#ga195d23bbdfcb80e83c9cda45c9ad5723">forward_euler_step</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> dx, <span class="keyword">const</span> <span class="keywordtype">double</span> x,</div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> std::valarray<double> *y, std::valarray<double> *dy) {</div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_function" href="../../db/dd3/ode__forward__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe">problem</a>(x, y, dy);</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> *y += *dy * dx;</div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
|
||||
<div class="foldopen" id="foldopen00102" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="../../d6/d60/group__ode.html#gae0509f8843e2bc42de2abbd00a14b7b9"> 102</a></span><span class="keywordtype">double</span> <a class="code hl_function" href="../../d6/d60/group__ode.html#gae0509f8843e2bc42de2abbd00a14b7b9">forward_euler</a>(<span class="keywordtype">double</span> dx, <span class="keywordtype">double</span> x0, <span class="keywordtype">double</span> x_max,</div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> std::valarray<double> *y, <span class="keywordtype">bool</span> save_to_file = <span class="keyword">false</span>) {</div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> std::valarray<double> dy = *y;</div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> </div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> std::ofstream fp;</div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keywordflow">if</span> (save_to_file) {</div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> fp.open(<span class="stringliteral">"forward_euler.csv"</span>, std::ofstream::out);</div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keywordflow">if</span> (!fp.is_open()) {</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> std::perror(<span class="stringliteral">"Error! "</span>);</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> }</div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> }</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> std::size_t L = y->size();</div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> <span class="comment">/* start integration */</span></div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> std::clock_t t1 = std::clock();</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="keywordtype">double</span> x = x0;</div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="keywordflow">do</span> { <span class="comment">// iterate for each step of independent variable</span></div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordflow">if</span> (save_to_file && fp.is_open()) {</div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="comment">// write to file</span></div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> fp << x << <span class="stringliteral">","</span>;</div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < L - 1; i++) {</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> fp << y[0][i] << <span class="stringliteral">","</span>; <span class="comment">// NOLINT</span></div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> }</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> fp << y[0][L - 1] << <span class="stringliteral">"\n"</span>; <span class="comment">// NOLINT</span></div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> }</div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <a class="code hl_function" href="../../d6/d60/group__ode.html#ga195d23bbdfcb80e83c9cda45c9ad5723">forward_euler_step</a>(dx, x, y, &dy); <span class="comment">// perform integration</span></div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> x += dx; <span class="comment">// update step</span></div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> } <span class="keywordflow">while</span> (x <= x_max); <span class="comment">// till upper limit of independent variable</span></div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> <span class="comment">/* end of integration */</span></div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> std::clock_t t2 = std::clock();</div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> </div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> <span class="keywordflow">if</span> (fp.is_open()) {</div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> fp.close();</div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> }</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(t2 - t1) / CLOCKS_PER_SEC;</div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> </div>
|
||||
<div class="foldopen" id="foldopen00153" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"><a class="line" href="../../db/dd3/ode__forward__euler_8cpp.html#aa13517b8e5de1b75592052db7f7e237f"> 153</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../db/dd3/ode__forward__euler_8cpp.html#aa13517b8e5de1b75592052db7f7e237f">save_exact_solution</a>(<span class="keyword">const</span> <span class="keywordtype">double</span> &X0, <span class="keyword">const</span> <span class="keywordtype">double</span> &X_MAX,</div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="keyword">const</span> <span class="keywordtype">double</span> &step_size,</div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keyword">const</span> std::valarray<double> &Y0) {</div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keywordtype">double</span> x = X0;</div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> std::valarray<double> y(Y0);</div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> </div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> std::ofstream fp(<span class="stringliteral">"exact.csv"</span>, std::ostream::out);</div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> <span class="keywordflow">if</span> (!fp.is_open()) {</div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> std::perror(<span class="stringliteral">"Error! "</span>);</div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">return</span>;</div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> }</div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> std::cout << <span class="stringliteral">"Finding exact solution\n"</span>;</div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> std::clock_t t1 = std::clock();</div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <span class="keywordflow">do</span> {</div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> fp << x << <span class="stringliteral">","</span>;</div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < y.size() - 1; i++) {</div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> fp << y[i] << <span class="stringliteral">","</span>; <span class="comment">// NOLINT</span></div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> }</div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> fp << y[y.size() - 1] << <span class="stringliteral">"\n"</span>; <span class="comment">// NOLINT</span></div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> </div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <a class="code hl_function" href="../../db/dd3/ode__forward__euler_8cpp.html#af3adf7b092a87868917ee5fb4255192b">exact_solution</a>(x, &y);</div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> </div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> x += step_size;</div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> } <span class="keywordflow">while</span> (x <= X_MAX);</div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> </div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> std::clock_t t2 = std::clock();</div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> <span class="keywordtype">double</span> total_time = <span class="keyword">static_cast<</span><span class="keywordtype">double</span><span class="keyword">></span>(t2 - t1) / CLOCKS_PER_SEC;</div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span> std::cout << <span class="stringliteral">"\tTime = "</span> << total_time << <span class="stringliteral">" ms\n"</span>;</div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> </div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> fp.close();</div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span>}</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> </div>
|
||||
<div class="foldopen" id="foldopen00189" data-start="{" data-end="}">
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"><a class="line" href="../../db/dd3/ode__forward__euler_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97"> 189</a></span><span class="keywordtype">int</span> <a class="code hl_function" href="../../dd/d1e/generate__parentheses_8cpp.html#gae66f6b31b5ad750f1fe042a706a4e3d4">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[]) {</div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> <span class="keywordtype">double</span> X0 = 0.f; <span class="comment">/* initial value of x0 */</span></div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> <span class="keywordtype">double</span> X_MAX = 10.F; <span class="comment">/* upper limit of integration */</span></div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> std::valarray<double> Y0{1.f, 0.f}; <span class="comment">/* initial value Y = y(x = x_0) */</span></div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> <span class="keywordtype">double</span> step_size = NAN;</div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> </div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <span class="keywordflow">if</span> (argc == 1) {</div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> std::cout << <span class="stringliteral">"\nEnter the step size: "</span>;</div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> std::cin >> step_size;</div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span> } <span class="keywordflow">else</span> {</div>
|
||||
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span> <span class="comment">// use commandline argument as independent variable step size</span></div>
|
||||
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"> 200</span> step_size = std::atof(argv[1]);</div>
|
||||
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"> 201</span> }</div>
|
||||
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"> 202</span> </div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span> <span class="comment">// get approximate solution</span></div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> <span class="keywordtype">double</span> total_time = <a class="code hl_function" href="../../d6/d60/group__ode.html#gae0509f8843e2bc42de2abbd00a14b7b9">forward_euler</a>(step_size, X0, X_MAX, &Y0, <span class="keyword">true</span>);</div>
|
||||
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"> 205</span> std::cout << <span class="stringliteral">"\tTime = "</span> << total_time << <span class="stringliteral">" ms\n"</span>;</div>
|
||||
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"> 206</span> </div>
|
||||
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno"> 207</span> <span class="comment">/* compute exact solution for comparion */</span></div>
|
||||
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"> 208</span> <a class="code hl_function" href="../../db/dd3/ode__forward__euler_8cpp.html#aa13517b8e5de1b75592052db7f7e237f">save_exact_solution</a>(X0, X_MAX, step_size, Y0);</div>
|
||||
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"> 209</span> </div>
|
||||
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"> 210</span> <span class="keywordflow">return</span> 0;</div>
|
||||
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"> 211</span>}</div>
|
||||
</div>
|
||||
<div class="ttc" id="agenerate__parentheses_8cpp_html_gae66f6b31b5ad750f1fe042a706a4e3d4"><div class="ttname"><a href="../../dd/d1e/generate__parentheses_8cpp.html#gae66f6b31b5ad750f1fe042a706a4e3d4">main</a></div><div class="ttdeci">int main()</div><div class="ttdoc">Main function.</div><div class="ttdef"><b>Definition</b> <a href="../../dd/d1e/generate__parentheses_8cpp_source.html#l00110">generate_parentheses.cpp:110</a></div></div>
|
||||
<div class="ttc" id="agroup__ode_html_ga195d23bbdfcb80e83c9cda45c9ad5723"><div class="ttname"><a href="../../d6/d60/group__ode.html#ga195d23bbdfcb80e83c9cda45c9ad5723">forward_euler_step</a></div><div class="ttdeci">void forward_euler_step(const double dx, const double x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Compute next step approximation using the forward-Euler method.</div><div class="ttdef"><b>Definition</b> <a href="#l00086">ode_forward_euler.cpp:86</a></div></div>
|
||||
<div class="ttc" id="agroup__ode_html_gae0509f8843e2bc42de2abbd00a14b7b9"><div class="ttname"><a href="../../d6/d60/group__ode.html#gae0509f8843e2bc42de2abbd00a14b7b9">forward_euler</a></div><div class="ttdeci">double forward_euler(double dx, double x0, double x_max, std::valarray< double > *y, bool save_to_file=false)</div><div class="ttdoc">Compute approximation using the forward-Euler method in the given limits.</div><div class="ttdef"><b>Definition</b> <a href="#l00102">ode_forward_euler.cpp:102</a></div></div>
|
||||
<div class="ttc" id="aode__forward__euler_8cpp_html_aa13517b8e5de1b75592052db7f7e237f"><div class="ttname"><a href="../../db/dd3/ode__forward__euler_8cpp.html#aa13517b8e5de1b75592052db7f7e237f">save_exact_solution</a></div><div class="ttdeci">void save_exact_solution(const double &X0, const double &X_MAX, const double &step_size, const std::valarray< double > &Y0)</div><div class="ttdef"><b>Definition</b> <a href="#l00153">ode_forward_euler.cpp:153</a></div></div>
|
||||
<div class="ttc" id="aode__forward__euler_8cpp_html_abaeae8f62a018d197f0187a1c80a90fe"><div class="ttname"><a href="../../db/dd3/ode__forward__euler_8cpp.html#abaeae8f62a018d197f0187a1c80a90fe">problem</a></div><div class="ttdeci">void problem(const double &x, std::valarray< double > *y, std::valarray< double > *dy)</div><div class="ttdoc">Problem statement for a system with first-order differential equations. Updates the system differenti...</div><div class="ttdef"><b>Definition</b> <a href="#l00054">ode_forward_euler.cpp:54</a></div></div>
|
||||
<div class="ttc" id="aode__forward__euler_8cpp_html_af3adf7b092a87868917ee5fb4255192b"><div class="ttname"><a href="../../db/dd3/ode__forward__euler_8cpp.html#af3adf7b092a87868917ee5fb4255192b">exact_solution</a></div><div class="ttdeci">void exact_solution(const double &x, std::valarray< double > *y)</div><div class="ttdoc">Exact solution of the problem. Used for solution comparison.</div><div class="ttdef"><b>Definition</b> <a href="#l00067">ode_forward_euler.cpp:67</a></div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
</div><!-- doc-content -->
|
||||
<!-- start footer part -->
|
||||
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="../../dir_9c6faab82c22511b50177aa2e38e2780.html">numerical_methods</a></li><li class="navelem"><a class="el" href="../../db/dd3/ode__forward__euler_8cpp.html">ode_forward_euler.cpp</a></li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user