mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-03-24 13:53:35 +08:00
Documentation for db149bf3b7
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<!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">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Algorithms_in_C++: numerical_methods/ode_semi_implicit_euler.cpp File Reference</title>
|
||||
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -41,10 +41,10 @@ MathJax.Hub.Config({
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
|
||||
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="../../menudata.js"></script>
|
||||
@@ -84,9 +84,16 @@ $(document).ready(function(){initNavTree('d3/d06/ode__semi__implicit__euler_8cpp
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
<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">
|
||||
@@ -106,7 +113,7 @@ $(document).ready(function(){initNavTree('d3/d06/ode__semi__implicit__euler_8cpp
|
||||
</div><div class="textblock"><div class="dynheader">
|
||||
Include dependency graph for ode_semi_implicit_euler.cpp:</div>
|
||||
<div class="dyncontent">
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/db4/ode__semi__implicit__euler_8cpp__incl.svg" width="430" height="127"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d6/db4/ode__semi__implicit__euler_8cpp__incl.svg" width="430" height="124"><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">
|
||||
@@ -131,8 +138,8 @@ Functions</h2></td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p >Solve a multivariable first order <a href="https://en.wikipedia.org/wiki/Ordinary_differential_equation" target="_blank">ordinary differential equation (ODEs)</a> using <a href="https://en.wikipedia.org/wiki/Semi-implicit_Euler_method" target="_blank">semi implicit Euler method</a> </p>
|
||||
<dl class="section author"><dt>Authors</dt><dd><a href="https://github.com/kvedala" target="_blank">Krishna Vedala</a></dd></dl>
|
||||
<p>The ODE being solved is: </p><p class="formulaDsp">
|
||||
<dl class="section author"><dt>Authors</dt><dd><a href="https://github.com/kvedala" target="_blank">Krishna Vedala</a> </dd></dl>
|
||||
<p>The ODE being solved is: </p><p class="formulaDsp">
|
||||
\begin{eqnarray*}
|
||||
\dot{u} &=& v\\
|
||||
\dot{v} &=& -\omega^2 u\\
|
||||
@@ -140,7 +147,7 @@ Functions</h2></td></tr>
|
||||
[x_0, u_0, v_0] &=& [0,1,0]\qquad\ldots\text{(initial values)}
|
||||
\end{eqnarray*}
|
||||
</p>
|
||||
<p> The exact solution for the above problem is: </p><p class="formulaDsp">
|
||||
<p> The exact solution for the above problem is: </p><p class="formulaDsp">
|
||||
\begin{eqnarray*}
|
||||
u(x) &=& \cos(x)\\
|
||||
v(x) &=& -\sin(x)\\
|
||||
@@ -153,7 +160,7 @@ v(x) &=& -\sin(x)\\
|
||||
</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="../../db/dd3/ode__forward__euler_8cpp.html" title="Solve a multivariable first order ordinary differential equation (ODEs) using forward Euler method">ode_forward_euler.cpp</a> </dd></dl>
|
||||
</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>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#af3adf7b092a87868917ee5fb4255192b">◆ </a></span>exact_solution()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -195,14 +202,14 @@ v(x) &=& -\sin(x)\\
|
||||
</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="../../d3/d06/ode__semi__implicit__euler_8cpp_af3adf7b092a87868917ee5fb4255192b_cgraph.svg" width="235" height="88"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/d06/ode__semi__implicit__euler_8cpp_af3adf7b092a87868917ee5fb4255192b_cgraph.svg" width="235" height="86"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="a0ddf1224851353fc92bfbff6f499fa97" name="a0ddf1224851353fc92bfbff6f499fa97"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a0ddf1224851353fc92bfbff6f499fa97">◆ </a></span>main()</h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#a0ddf1224851353fc92bfbff6f499fa97">◆ </a></span>main()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -255,18 +262,18 @@ Here is the call graph for this function:</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_ga3874d294ab00fe9ce8731c5b7991a089"><div class="ttname"><a href="../../d6/d60/group__ode.html#ga3874d294ab00fe9ce8731c5b7991a089">semi_implicit_euler</a></div><div class="ttdeci">double semi_implicit_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 semi-implicit-Euler method in the given limits.</div><div class="ttdef"><b>Definition:</b> ode_semi_implicit_euler.cpp:103</div></div>
|
||||
<div class="ttc" id="aode__semi__implicit__euler_8cpp_html_aa13517b8e5de1b75592052db7f7e237f"><div class="ttname"><a href="../../d3/d06/ode__semi__implicit__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> ode_semi_implicit_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< double ></a></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="../../d3/d06/ode__semi__implicit__euler_8cpp_a0ddf1224851353fc92bfbff6f499fa97_cgraph.svg" width="582" height="367"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/d06/ode__semi__implicit__euler_8cpp_a0ddf1224851353fc92bfbff6f499fa97_cgraph.svg" width="582" 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>
|
||||
</div>
|
||||
<a id="abaeae8f62a018d197f0187a1c80a90fe" name="abaeae8f62a018d197f0187a1c80a90fe"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#abaeae8f62a018d197f0187a1c80a90fe">◆ </a></span>problem()</h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#abaeae8f62a018d197f0187a1c80a90fe">◆ </a></span>problem()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -316,7 +323,7 @@ Here is the call graph for this function:</div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="aa13517b8e5de1b75592052db7f7e237f" name="aa13517b8e5de1b75592052db7f7e237f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa13517b8e5de1b75592052db7f7e237f">◆ </a></span>save_exact_solution()</h2>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#aa13517b8e5de1b75592052db7f7e237f">◆ </a></span>save_exact_solution()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -400,7 +407,7 @@ Here is the call graph for this function:</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="../../d3/d06/ode__semi__implicit__euler_8cpp_aa13517b8e5de1b75592052db7f7e237f_cgraph.svg" width="470" height="240"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
<div class="center"><iframe scrolling="no" frameborder="0" src="../../d3/d06/ode__semi__implicit__euler_8cpp_aa13517b8e5de1b75592052db7f7e237f_cgraph.svg" width="470" height="234"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -412,7 +419,7 @@ Here is the call graph for this function:</div>
|
||||
<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="../../d3/d06/ode__semi__implicit__euler_8cpp.html">ode_semi_implicit_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.9.4 </li>
|
||||
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5 </li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user