PageRenderTime 138ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 1ms

/doc/html/meshSudo_8cpp_source.html

https://bitbucket.org/slawton/windturbinemdo-stevebitb
HTML | 3717 lines | 3704 code | 12 blank | 1 comment | 0 complexity | b77d66e5778b7f52f622863cb6f876b9 MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <title>WindTurbineMDO: structural/CAD_Calc/source/ver_1/meshSudo.cpp Source File</title>
  6. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  7. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  8. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="resize.js"></script>
  11. <script type="text/javascript" src="navtree.js"></script>
  12. <script type="text/javascript">
  13. $(document).ready(initResizable);
  14. </script>
  15. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  16. <script type="text/javascript" src="search/search.js"></script>
  17. <script type="text/javascript">
  18. $(document).ready(function() { searchBox.OnSelectItem(0); });
  19. </script>
  20. </head>
  21. <body>
  22. <div id="top"><!-- do not remove this div! -->
  23. <div id="titlearea">
  24. <table cellspacing="0" cellpadding="0">
  25. <tbody>
  26. <tr style="height: 56px;">
  27. <td style="padding-left: 0.5em;">
  28. <div id="projectname">WindTurbineMDO
  29. </div>
  30. </td>
  31. </tr>
  32. </tbody>
  33. </table>
  34. </div>
  35. <!-- Generated by Doxygen 1.7.5.1 -->
  36. <script type="text/javascript">
  37. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  38. </script>
  39. <div id="navrow1" class="tabs">
  40. <ul class="tablist">
  41. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  42. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  43. <li><a href="annotated.html"><span>Classes</span></a></li>
  44. <li class="current"><a href="files.html"><span>Files</span></a></li>
  45. <li>
  46. <div id="MSearchBox" class="MSearchBoxInactive">
  47. <span class="left">
  48. <img id="MSearchSelect" src="search/mag_sel.png"
  49. onmouseover="return searchBox.OnSearchSelectShow()"
  50. onmouseout="return searchBox.OnSearchSelectHide()"
  51. alt=""/>
  52. <input type="text" id="MSearchField" value="Search" accesskey="S"
  53. onfocus="searchBox.OnSearchFieldFocus(true)"
  54. onblur="searchBox.OnSearchFieldFocus(false)"
  55. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  56. </span><span class="right">
  57. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  58. </span>
  59. </div>
  60. </li>
  61. </ul>
  62. </div>
  63. <div id="navrow2" class="tabs2">
  64. <ul class="tablist">
  65. <li><a href="files.html"><span>File&#160;List</span></a></li>
  66. <li><a href="globals.html"><span>File&#160;Members</span></a></li>
  67. </ul>
  68. </div>
  69. </div>
  70. <div id="side-nav" class="ui-resizable side-nav-resizable">
  71. <div id="nav-tree">
  72. <div id="nav-tree-contents">
  73. </div>
  74. </div>
  75. <div id="splitbar" style="-moz-user-select:none;"
  76. class="ui-resizable-handle">
  77. </div>
  78. </div>
  79. <script type="text/javascript">
  80. initNavTree('meshSudo_8cpp.html','');
  81. </script>
  82. <div id="doc-content">
  83. <div class="header">
  84. <div class="headertitle">
  85. <div class="title">structural/CAD_Calc/source/ver_1/meshSudo.cpp</div> </div>
  86. </div>
  87. <div class="contents">
  88. <a href="meshSudo_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
  89. <a name="l00002"></a>00002 <span class="preprocessor">#include &lt;vector&gt;</span>
  90. <a name="l00003"></a>00003 <span class="preprocessor">#include &lt;list&gt;</span>
  91. <a name="l00004"></a>00004 <span class="preprocessor">#include &lt;ostream&gt;</span>
  92. <a name="l00005"></a>00005 <span class="comment">// #include &quot;geom.h&quot;</span>
  93. <a name="l00006"></a>00006 <span class="comment">// #include &quot;matrix/matrixClass.h&quot;</span>
  94. <a name="l00007"></a>00007 <span class="comment">// #include &quot;/home/mike/work/UVic/NonlinearBeam/VABS_Calc/source/ver_2/material.cpp&quot;</span>
  95. <a name="l00008"></a>00008 <span class="comment">// #include &quot;../../../matrix_Solver/source/ver_1/matrixSolverSudo.cpp&quot;</span>
  96. <a name="l00009"></a>00009
  97. <a name="l00010"></a>00010 <span class="comment">// #include &quot;curveOffsetSudo.cpp&quot;</span>
  98. <a name="l00011"></a>00011
  99. <a name="l00012"></a>00012 <span class="preprocessor">#ifndef PI_VALUE</span>
  100. <a name="l00013"></a><a class="code" href="meshSudo_8cpp.html#a6b7092bccd226a790f3fd4cd6c29419e">00013</a> <span class="preprocessor"></span><span class="preprocessor">#define PI_VALUE</span>
  101. <a name="l00014"></a><a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">00014</a> <span class="preprocessor"></span><span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>=3.14159265358979323846264338327950288419716939937510;
  102. <a name="l00015"></a>00015 <span class="preprocessor">#endif</span>
  103. <a name="l00016"></a>00016 <span class="preprocessor"></span>
  104. <a name="l00017"></a>00017 <span class="comment">// lets say there is a curve</span>
  105. <a name="l00018"></a>00018
  106. <a name="l00019"></a>00019 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  107. <a name="l00020"></a><a class="code" href="classcurvePointData.html">00020</a> <span class="keyword">class </span><a class="code" href="classcurvePointData.html">curvePointData</a>
  108. <a name="l00021"></a>00021 {
  109. <a name="l00022"></a>00022 <span class="keyword">public</span>:
  110. <a name="l00023"></a>00023
  111. <a name="l00024"></a><a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">00024</a> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>;
  112. <a name="l00025"></a><a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">00025</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>;
  113. <a name="l00026"></a><a class="code" href="classcurvePointData.html#a8a6d5fff4e06528adf91c68e285a1edb">00026</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcurvePointData.html#a8a6d5fff4e06528adf91c68e285a1edb">sEstimate</a>; <span class="comment">// In the case of intersection-defined, this s value does not necessisarily correspond to position</span>
  114. <a name="l00027"></a>00027
  115. <a name="l00028"></a><a class="code" href="classcurvePointData.html#ac7e4603f4659413fa219a99e9c18c84f">00028</a> <a class="code" href="classcurvePointData.html#ac7e4603f4659413fa219a99e9c18c84f">curvePointData</a>(<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> position_in=<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(0.0,0.0),<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> angle_in=0.0,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sEstimate_in=0.0) : <a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>(position_in) , <a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>(angle_in) , <a class="code" href="classcurvePointData.html#a8a6d5fff4e06528adf91c68e285a1edb">sEstimate</a>(sEstimate_in)
  116. <a name="l00029"></a>00029 {}
  117. <a name="l00030"></a>00030 };
  118. <a name="l00031"></a>00031
  119. <a name="l00032"></a>00032 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  120. <a name="l00033"></a><a class="code" href="classcurve.html">00033</a> <span class="keyword">class </span><a class="code" href="classcurve.html">curve</a>
  121. <a name="l00034"></a>00034 {
  122. <a name="l00035"></a>00035 <span class="keyword">public</span>:
  123. <a name="l00036"></a>00036
  124. <a name="l00037"></a><a class="code" href="classcurve.html#a2fefa3279b926e63336b8ce5a21cc7a0">00037</a> <a class="code" href="classcurve.html#a2fefa3279b926e63336b8ce5a21cc7a0">curve</a>()
  125. <a name="l00038"></a>00038 {}
  126. <a name="l00039"></a>00039
  127. <a name="l00040"></a><a class="code" href="classcurve.html#ad11809ad614ce3993d3bc2d2ebfba16e">00040</a> <span class="keyword">virtual</span> <a class="code" href="classcurve.html#ad11809ad614ce3993d3bc2d2ebfba16e">~curve</a>()
  128. <a name="l00041"></a>00041 {}
  129. <a name="l00042"></a>00042
  130. <a name="l00043"></a>00043 <span class="comment">// methods for meshing </span>
  131. <a name="l00044"></a>00044 <span class="keyword">virtual</span> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="classcurve.html#ad8e2c2bf619816412eafb5bd8f9dd260">getPosition</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s) <span class="keyword">const</span>=0;
  132. <a name="l00045"></a>00045 <span class="keyword">virtual</span> <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> <a class="code" href="classcurve.html#a92ca2b6aada5dfea9dab8c6ccbc98ab7">getPointData</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s) <span class="keyword">const</span>=0;
  133. <a name="l00046"></a>00046 <span class="keyword">virtual</span> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="classcurve.html#aabb98878481aad1c84b1b2e9d6b0b5c0">intersectFirst</a>(<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg) <span class="keyword">const</span>=0;
  134. <a name="l00047"></a>00047 <span class="keyword">virtual</span> <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> <a class="code" href="classcurve.html#a0f79a2d3330cfc9b6a69ff6e65e0e4b4">intersectFirstData</a>(<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg) <span class="keyword">const</span>=0;
  135. <a name="l00048"></a>00048 <span class="keyword">virtual</span> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="classcurve.html#ac8f7c771e200d407cf8785109039d916">intersectAverage</a>(<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg) <span class="keyword">const</span>=0;
  136. <a name="l00049"></a>00049 <span class="keyword">virtual</span> <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> <a class="code" href="classcurve.html#a0a2abad5b19cd97af4faaf5d935c6bfc">intersectAverageData</a>(<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg) <span class="keyword">const</span>=0;
  137. <a name="l00050"></a>00050
  138. <a name="l00051"></a>00051 <span class="comment">// this is other info... this gives the local jacobian for the curve</span>
  139. <a name="l00052"></a>00052 <span class="keyword">virtual</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcurve.html#ae2d18100cf0cba91b7f9c92e85ba62da">jacobian</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s) <span class="keyword">const</span> =0;
  140. <a name="l00053"></a>00053 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcurve.html#af06f868b6a21971365a2475e943534d2">boundingBox</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; xMin,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; yMin,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; xMax,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; yMax) <span class="keyword">const</span> =0;
  141. <a name="l00054"></a>00054 };
  142. <a name="l00055"></a>00055
  143. <a name="l00056"></a>00056 <span class="comment">// This is the data at a node that is specific to the element</span>
  144. <a name="l00057"></a>00057 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  145. <a name="l00058"></a><a class="code" href="classelementNodeData.html">00058</a> <span class="keyword">class </span><a class="code" href="classelementNodeData.html">elementNodeData</a>
  146. <a name="l00059"></a>00059 {
  147. <a name="l00060"></a>00060 <span class="keyword">public</span>:
  148. <a name="l00061"></a>00061
  149. <a name="l00062"></a><a class="code" href="classelementNodeData.html#a9cec7bd5b4047a5ee409fb0ebd5c29e6">00062</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classelementNodeData.html#a9cec7bd5b4047a5ee409fb0ebd5c29e6">angle</a>;
  150. <a name="l00063"></a><a class="code" href="classelementNodeData.html#aacb362ba67e9fb454bc8e3b4a7cad3b1">00063</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classelementNodeData.html#aacb362ba67e9fb454bc8e3b4a7cad3b1">h_over_H</a>;
  151. <a name="l00064"></a>00064
  152. <a name="l00065"></a><a class="code" href="classelementNodeData.html#a5af10523acff82a18324a2945ea2d23a">00065</a> <a class="code" href="classelementNodeData.html#a5af10523acff82a18324a2945ea2d23a">elementNodeData</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> angle_in=0.0,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> h_over_H_in=0.5) : <a class="code" href="classelementNodeData.html#a9cec7bd5b4047a5ee409fb0ebd5c29e6">angle</a>(angle_in) , <a class="code" href="classelementNodeData.html#aacb362ba67e9fb454bc8e3b4a7cad3b1">h_over_H</a>(h_over_H_in)
  153. <a name="l00066"></a>00066 {}
  154. <a name="l00067"></a>00067
  155. <a name="l00068"></a><a class="code" href="classelementNodeData.html#ab52fe67211176420a5737b87aaa96c35">00068</a> <a class="code" href="classelementNodeData.html#a5af10523acff82a18324a2945ea2d23a">elementNodeData</a>(<span class="keyword">const</span> <a class="code" href="classelementNodeData.html">elementNodeData&lt;dataType&gt;</a>&amp; asg) : <a class="code" href="classelementNodeData.html#a9cec7bd5b4047a5ee409fb0ebd5c29e6">angle</a>(asg.<a class="code" href="classelementNodeData.html#a9cec7bd5b4047a5ee409fb0ebd5c29e6">angle</a>) , <a class="code" href="classelementNodeData.html#aacb362ba67e9fb454bc8e3b4a7cad3b1">h_over_H</a>(asg.<a class="code" href="classelementNodeData.html#aacb362ba67e9fb454bc8e3b4a7cad3b1">h_over_H</a>)
  156. <a name="l00069"></a>00069 {}
  157. <a name="l00070"></a>00070
  158. <a name="l00071"></a><a class="code" href="classelementNodeData.html#ae7c95168cae355fb509223df2546392b">00071</a> <a class="code" href="classelementNodeData.html">elementNodeData&lt;dataType&gt;</a>&amp; <a class="code" href="classelementNodeData.html#ae7c95168cae355fb509223df2546392b">operator=</a>(<span class="keyword">const</span> <a class="code" href="classelementNodeData.html">elementNodeData&lt;dataType&gt;</a>&amp; asg)
  159. <a name="l00072"></a>00072 {
  160. <a name="l00073"></a>00073 <span class="keywordflow">if</span>(<span class="keyword">this</span>==&amp;asg)
  161. <a name="l00074"></a>00074 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  162. <a name="l00075"></a>00075
  163. <a name="l00076"></a>00076 this-&gt;<a class="code" href="classelementNodeData.html#a9cec7bd5b4047a5ee409fb0ebd5c29e6">angle</a>=asg.<a class="code" href="classelementNodeData.html#a9cec7bd5b4047a5ee409fb0ebd5c29e6">angle</a>;
  164. <a name="l00077"></a>00077 this-&gt;<a class="code" href="classelementNodeData.html#aacb362ba67e9fb454bc8e3b4a7cad3b1">h_over_H</a>=asg.<a class="code" href="classelementNodeData.html#aacb362ba67e9fb454bc8e3b4a7cad3b1">h_over_H</a>;
  165. <a name="l00078"></a>00078 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  166. <a name="l00079"></a>00079 }
  167. <a name="l00080"></a>00080 };
  168. <a name="l00081"></a>00081
  169. <a name="l00082"></a>00082 <span class="comment">// a node is merely a planePoint with some additional information</span>
  170. <a name="l00083"></a>00083 <span class="comment">// that information could be the data that was used to generate the position</span>
  171. <a name="l00084"></a>00084 <span class="comment">// other information could be the the through thickness position</span>
  172. <a name="l00085"></a>00085
  173. <a name="l00086"></a>00086 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  174. <a name="l00087"></a>00087 <span class="keyword">class </span><a class="code" href="classcxNode.html">cxNode</a>;
  175. <a name="l00088"></a>00088
  176. <a name="l00089"></a>00089 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  177. <a name="l00090"></a>00090 std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out,const cxNode&lt;dataType&gt;&amp; nd);
  178. <a name="l00091"></a>00091
  179. <a name="l00092"></a>00092 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  180. <a name="l00093"></a><a class="code" href="classcxNode.html">00093</a> <span class="keyword">class </span><a class="code" href="classcxNode.html">cxNode</a> : <span class="keyword">public</span> <a class="code" href="classplanePoint.html">planePoint</a>&lt;dataType&gt;
  181. <a name="l00094"></a>00094 {
  182. <a name="l00095"></a>00095 <span class="keyword">template</span>&lt;<span class="keyword">class</span> funcType&gt; <span class="keyword">friend</span> std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out,const cxNode&lt;funcType&gt;&amp; nd);
  183. <a name="l00096"></a>00096
  184. <a name="l00097"></a>00097 <span class="keyword">public</span>:
  185. <a name="l00098"></a>00098
  186. <a name="l00099"></a><a class="code" href="classcxNode.html#aae1886fc55db8932da99d39830ba0743">00099</a> std::vector&lt;elementNodeData&lt;dataType&gt; &gt; <a class="code" href="classcxNode.html#aae1886fc55db8932da99d39830ba0743">nodeData</a>;
  187. <a name="l00100"></a>00100
  188. <a name="l00101"></a><a class="code" href="classcxNode.html#a9e88ae7a2f01abc7854f9382d3718714">00101</a> <a class="code" href="classcxNode.html#a9e88ae7a2f01abc7854f9382d3718714">cxNode</a>() : <a class="code" href="classplanePoint.html">planePoint</a>&lt;<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&gt;(0.0,0.0) , <a class="code" href="classcxNode.html#aae1886fc55db8932da99d39830ba0743">nodeData</a>(0)
  189. <a name="l00102"></a>00102 {}
  190. <a name="l00103"></a>00103
  191. <a name="l00104"></a><a class="code" href="classcxNode.html#a6c86dba345b617cac4b392d8762b0796">00104</a> <a class="code" href="classcxNode.html#a9e88ae7a2f01abc7854f9382d3718714">cxNode</a>(<span class="keyword">const</span> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>&amp; pnt,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> angle_in=0.0,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> h_over_H_in=0.5) : <a class="code" href="classplanePoint.html">planePoint</a>&lt;<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&gt;(pnt) , <a class="code" href="classcxNode.html#aae1886fc55db8932da99d39830ba0743">nodeData</a>(1,<a class="code" href="classelementNodeData.html">elementNodeData</a>&lt;<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&gt;(angle_in,h_over_H_in))
  192. <a name="l00105"></a>00105 {}
  193. <a name="l00106"></a>00106
  194. <a name="l00107"></a><a class="code" href="classcxNode.html#a5d3523f55966fc3377b836e41b3ca92b">00107</a> <a class="code" href="classcxNode.html#a9e88ae7a2f01abc7854f9382d3718714">cxNode</a>(<span class="keyword">const</span> <a class="code" href="classcxNode.html">cxNode&lt;dataType&gt;</a>&amp; asg) : <a class="code" href="classplanePoint.html">planePoint</a>&lt;<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&gt;(asg) , <a class="code" href="classcxNode.html#aae1886fc55db8932da99d39830ba0743">nodeData</a>(asg.<a class="code" href="classcxNode.html#aae1886fc55db8932da99d39830ba0743">nodeData</a>)
  195. <a name="l00108"></a>00108 {}
  196. <a name="l00109"></a>00109
  197. <a name="l00110"></a><a class="code" href="classcxNode.html#a3015220a4e4dd70eb7a55d2d941edd88">00110</a> <a class="code" href="classcxNode.html">cxNode&lt;dataType&gt;</a>&amp; <a class="code" href="classcxNode.html#a3015220a4e4dd70eb7a55d2d941edd88">operator=</a>(<span class="keyword">const</span> <a class="code" href="classcxNode.html">cxNode&lt;dataType&gt;</a>&amp; asg)
  198. <a name="l00111"></a>00111 {
  199. <a name="l00112"></a>00112 <span class="keywordflow">if</span>(<span class="keyword">this</span>==&amp;asg)
  200. <a name="l00113"></a>00113 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  201. <a name="l00114"></a>00114
  202. <a name="l00115"></a>00115 <a class="code" href="classcxNode.html#a3015220a4e4dd70eb7a55d2d941edd88">planePoint&lt;dataType&gt;::operator=</a>(asg);
  203. <a name="l00116"></a>00116 this-&gt;<a class="code" href="classcxNode.html#aae1886fc55db8932da99d39830ba0743">nodeData</a>=asg.<a class="code" href="classcxNode.html#aae1886fc55db8932da99d39830ba0743">nodeData</a>;
  204. <a name="l00117"></a>00117 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  205. <a name="l00118"></a>00118 }
  206. <a name="l00119"></a>00119
  207. <a name="l00120"></a><a class="code" href="classcxNode.html#a6f5a603ffa25e0b9092734efedb753ab">00120</a> <span class="keywordtype">bool</span> <a class="code" href="classcxNode.html#a6f5a603ffa25e0b9092734efedb753ab">samePoint</a>(<span class="keyword">const</span> <a class="code" href="classcxNode.html">cxNode&lt;dataType&gt;</a>&amp; nd)<span class="keyword"> const</span>
  208. <a name="l00121"></a>00121 <span class="keyword"> </span>{
  209. <a name="l00122"></a>00122 <span class="keywordflow">return</span> this-&gt;<a class="code" href="classplanePoint.html#a66e9d183e41dfade635e77291110d014">planePoint&lt;dataType&gt;::operator==</a>(nd);
  210. <a name="l00123"></a>00123 }
  211. <a name="l00124"></a>00124
  212. <a name="l00125"></a><a class="code" href="classcxNode.html#a7ae40410458533ab40f196c3ec019eba">00125</a> <a class="code" href="classelementNodeData.html">elementNodeData&lt;dataType&gt;</a>&amp; <a class="code" href="classcxNode.html#a7ae40410458533ab40f196c3ec019eba">getNodeData</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at)
  213. <a name="l00126"></a>00126 {
  214. <a name="l00127"></a>00127 <span class="keywordflow">if</span>(at&gt;=<a class="code" href="classcxNode.html#aae1886fc55db8932da99d39830ba0743">nodeData</a>.size())
  215. <a name="l00128"></a>00128 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;cxNode::getNodeData(): The requested data does not exist&quot;</span>);
  216. <a name="l00129"></a>00129 <span class="keywordflow">return</span> <a class="code" href="classcxNode.html#aae1886fc55db8932da99d39830ba0743">nodeData</a>[at];
  217. <a name="l00130"></a>00130 }
  218. <a name="l00131"></a>00131
  219. <a name="l00132"></a><a class="code" href="classcxNode.html#abd25fb89eb6ee8bac053a5699f604ce9">00132</a> <span class="keyword">const</span> <a class="code" href="classelementNodeData.html">elementNodeData&lt;dataType&gt;</a>&amp; <a class="code" href="classcxNode.html#a7ae40410458533ab40f196c3ec019eba">getNodeData</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at)<span class="keyword"> const</span>
  220. <a name="l00133"></a>00133 <span class="keyword"> </span>{
  221. <a name="l00134"></a>00134 <span class="keywordflow">if</span>(at&gt;=<a class="code" href="classcxNode.html#aae1886fc55db8932da99d39830ba0743">nodeData</a>.size())
  222. <a name="l00135"></a>00135 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;cxNode::getNodeData(): The requested data does not exist&quot;</span>);
  223. <a name="l00136"></a>00136 <span class="keywordflow">return</span> <a class="code" href="classcxNode.html#aae1886fc55db8932da99d39830ba0743">nodeData</a>[at];
  224. <a name="l00137"></a>00137 }
  225. <a name="l00138"></a>00138 };
  226. <a name="l00139"></a>00139
  227. <a name="l00140"></a><a class="code" href="classelementNodeHandle.html">00140</a> <span class="keyword">class </span><a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>
  228. <a name="l00141"></a>00141 {
  229. <a name="l00142"></a>00142 <span class="keyword">public</span>:
  230. <a name="l00143"></a>00143
  231. <a name="l00144"></a><a class="code" href="classelementNodeHandle.html#a3e3f124ec2e48db9bc07c5c966a2f1c4">00144</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classelementNodeHandle.html#a3e3f124ec2e48db9bc07c5c966a2f1c4">nodeID</a>;
  232. <a name="l00145"></a><a class="code" href="classelementNodeHandle.html#a0097e445a2e681a288ee5249e7fad412">00145</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classelementNodeHandle.html#a0097e445a2e681a288ee5249e7fad412">dataID</a>;
  233. <a name="l00146"></a>00146
  234. <a name="l00147"></a><a class="code" href="classelementNodeHandle.html#a94e331ce51b73bdf5fbbc741cb2ca5b6">00147</a> <a class="code" href="classelementNodeHandle.html#a94e331ce51b73bdf5fbbc741cb2ca5b6">elementNodeHandle</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> nodeID_in=0,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> dataID_in=0) : <a class="code" href="classelementNodeHandle.html#a3e3f124ec2e48db9bc07c5c966a2f1c4">nodeID</a>(nodeID_in) , <a class="code" href="classelementNodeHandle.html#a0097e445a2e681a288ee5249e7fad412">dataID</a>(dataID_in)
  235. <a name="l00148"></a>00148 {}
  236. <a name="l00149"></a>00149
  237. <a name="l00150"></a><a class="code" href="classelementNodeHandle.html#a8dee7599f0af41e9a1a1e09bed931211">00150</a> <a class="code" href="classelementNodeHandle.html#a94e331ce51b73bdf5fbbc741cb2ca5b6">elementNodeHandle</a>(<span class="keyword">const</span> <a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>&amp; asg) : <a class="code" href="classelementNodeHandle.html#a3e3f124ec2e48db9bc07c5c966a2f1c4">nodeID</a>(asg.<a class="code" href="classelementNodeHandle.html#a3e3f124ec2e48db9bc07c5c966a2f1c4">nodeID</a>) , <a class="code" href="classelementNodeHandle.html#a0097e445a2e681a288ee5249e7fad412">dataID</a>(asg.<a class="code" href="classelementNodeHandle.html#a0097e445a2e681a288ee5249e7fad412">dataID</a>)
  238. <a name="l00151"></a>00151 {}
  239. <a name="l00152"></a>00152
  240. <a name="l00153"></a><a class="code" href="classelementNodeHandle.html#ac61760b946f4107c882f61a39abee6e1">00153</a> <a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>&amp; <a class="code" href="classelementNodeHandle.html#ac61760b946f4107c882f61a39abee6e1">operator=</a>(<span class="keyword">const</span> <a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>&amp; asg)
  241. <a name="l00154"></a>00154 {
  242. <a name="l00155"></a>00155 <span class="keywordflow">if</span>(<span class="keyword">this</span>==&amp;asg)
  243. <a name="l00156"></a>00156 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  244. <a name="l00157"></a>00157
  245. <a name="l00158"></a>00158 this-&gt;<a class="code" href="classelementNodeHandle.html#a3e3f124ec2e48db9bc07c5c966a2f1c4">nodeID</a>=asg.<a class="code" href="classelementNodeHandle.html#a3e3f124ec2e48db9bc07c5c966a2f1c4">nodeID</a>;
  246. <a name="l00159"></a>00159 this-&gt;<a class="code" href="classelementNodeHandle.html#a0097e445a2e681a288ee5249e7fad412">dataID</a>=asg.<a class="code" href="classelementNodeHandle.html#a0097e445a2e681a288ee5249e7fad412">dataID</a>;
  247. <a name="l00160"></a>00160
  248. <a name="l00161"></a>00161 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  249. <a name="l00162"></a>00162 }
  250. <a name="l00163"></a>00163 };
  251. <a name="l00164"></a>00164
  252. <a name="l00165"></a>00165 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  253. <a name="l00166"></a><a class="code" href="meshSudo_8cpp.html#ac2f9ab84e640002c0ca810c3ef39e4b8">00166</a> std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out,const cxNode&lt;dataType&gt;&amp; nd)
  254. <a name="l00167"></a>00167 {
  255. <a name="l00168"></a>00168 out &lt;&lt; nd.x &lt;&lt; <span class="charliteral">&#39;\t&#39;</span> &lt;&lt; nd.y &lt;&lt; std::endl;
  256. <a name="l00169"></a>00169 <span class="keywordflow">return</span> out;
  257. <a name="l00170"></a>00170 }
  258. <a name="l00171"></a>00171
  259. <a name="l00172"></a>00172 <span class="comment">// an element has four handles to nodes</span>
  260. <a name="l00173"></a>00173 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  261. <a name="l00174"></a><a class="code" href="classelement.html">00174</a> <span class="keyword">class </span><a class="code" href="classelement.html">element</a>
  262. <a name="l00175"></a>00175 {
  263. <a name="l00176"></a>00176 <span class="keyword">public</span>:
  264. <a name="l00177"></a>00177
  265. <a name="l00178"></a><a class="code" href="classelement.html#a2ad20d89339c633be50d1280e5af6ec0">00178</a> std::vector&lt;elementNodeHandle&gt; <a class="code" href="classelement.html#a2ad20d89339c633be50d1280e5af6ec0">nodeHndl</a>;
  266. <a name="l00179"></a><a class="code" href="classelement.html#a17261b8e9cfa2fbd22ad289e75ceb7e7">00179</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classelement.html#a17261b8e9cfa2fbd22ad289e75ceb7e7">material</a>;
  267. <a name="l00180"></a>00180
  268. <a name="l00181"></a><a class="code" href="classelement.html#a822e30ccd1311c4f15c25d64b5195030">00181</a> <a class="code" href="classelement.html#a822e30ccd1311c4f15c25d64b5195030">element</a>() : <a class="code" href="classelement.html#a2ad20d89339c633be50d1280e5af6ec0">nodeHndl</a>(4,<a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>(0,0))
  269. <a name="l00182"></a>00182 {}
  270. <a name="l00183"></a>00183
  271. <a name="l00184"></a><a class="code" href="classelement.html#a8bbc6c2c8a520c869c794dd97b1c7a44">00184</a> <a class="code" href="classelement.html#a822e30ccd1311c4f15c25d64b5195030">element</a>(<span class="keyword">const</span> <a class="code" href="classelement.html">element</a>&amp; asg) : <a class="code" href="classelement.html#a2ad20d89339c633be50d1280e5af6ec0">nodeHndl</a>(asg.<a class="code" href="classelement.html#a2ad20d89339c633be50d1280e5af6ec0">nodeHndl</a>) , <a class="code" href="classelement.html#a17261b8e9cfa2fbd22ad289e75ceb7e7">material</a>(asg.<a class="code" href="classelement.html#a17261b8e9cfa2fbd22ad289e75ceb7e7">material</a>)
  272. <a name="l00185"></a>00185 {}
  273. <a name="l00186"></a>00186
  274. <a name="l00187"></a><a class="code" href="classelement.html#a7cc5580b6d85248f6b56880ce3a1890f">00187</a> <a class="code" href="classelement.html">element&lt;dataType&gt;</a>&amp; <a class="code" href="classelement.html#a7cc5580b6d85248f6b56880ce3a1890f">operator=</a>(<span class="keyword">const</span> <a class="code" href="classelement.html">element&lt;dataType&gt;</a>&amp; asg)
  275. <a name="l00188"></a>00188 {
  276. <a name="l00189"></a>00189 <span class="keywordflow">if</span>(<span class="keyword">this</span>==&amp;asg)
  277. <a name="l00190"></a>00190 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  278. <a name="l00191"></a>00191
  279. <a name="l00192"></a>00192 this-&gt;<a class="code" href="classelement.html#a2ad20d89339c633be50d1280e5af6ec0">nodeHndl</a>=asg.<a class="code" href="classelement.html#a2ad20d89339c633be50d1280e5af6ec0">nodeHndl</a>;
  280. <a name="l00193"></a>00193 this-&gt;<a class="code" href="classelement.html#a17261b8e9cfa2fbd22ad289e75ceb7e7">material</a>=asg.<a class="code" href="classelement.html#a17261b8e9cfa2fbd22ad289e75ceb7e7">material</a>;
  281. <a name="l00194"></a>00194
  282. <a name="l00195"></a>00195 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  283. <a name="l00196"></a>00196 }
  284. <a name="l00197"></a>00197 };
  285. <a name="l00198"></a>00198
  286. <a name="l00199"></a>00199 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  287. <a name="l00200"></a><a class="code" href="classcxAreaIntProp.html">00200</a> <span class="keyword">class </span><a class="code" href="classcxAreaIntProp.html">cxAreaIntProp</a>
  288. <a name="l00201"></a>00201 {
  289. <a name="l00202"></a>00202 <span class="keyword">public</span>:
  290. <a name="l00203"></a>00203
  291. <a name="l00204"></a><a class="code" href="classcxAreaIntProp.html#a67b3030c37a6dbeac50536489bf29479">00204</a> <span class="keyword">virtual</span> <a class="code" href="classcxAreaIntProp.html#a67b3030c37a6dbeac50536489bf29479">~cxAreaIntProp</a>()
  292. <a name="l00205"></a>00205 {}
  293. <a name="l00206"></a>00206
  294. <a name="l00207"></a>00207 <span class="keyword">virtual</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp.html#ae76ad19e1ce32de8d2e1bf268bf1d400">getArea</a>() <span class="keyword">const</span> =0;
  295. <a name="l00208"></a>00208 <span class="keyword">virtual</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp.html#a1853d2f2754d26c6606dd673040086ce">getXBar</a>() <span class="keyword">const</span> =0;
  296. <a name="l00209"></a>00209 <span class="keyword">virtual</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp.html#af788beb81f1f0ff9878fb9d08a43dbad">getYBar</a>() <span class="keyword">const</span> =0;
  297. <a name="l00210"></a>00210 <span class="keyword">virtual</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp.html#a50a912173e153171e535548d1a8255e3">getIxx</a>() <span class="keyword">const</span> =0;
  298. <a name="l00211"></a>00211 <span class="keyword">virtual</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp.html#a5862ae8cd0d0ab1eb6d8c57fcaa9b184">getIxy</a>() <span class="keyword">const</span> =0;
  299. <a name="l00212"></a>00212 <span class="keyword">virtual</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp.html#a76e28c48c914b63d0d981a6279a793cc">getIyy</a>() <span class="keyword">const</span> =0;
  300. <a name="l00213"></a>00213 };
  301. <a name="l00214"></a>00214
  302. <a name="l00215"></a>00215 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  303. <a name="l00216"></a><a class="code" href="classcxAreaIntProp__Data.html">00216</a> <span class="keyword">class </span><a class="code" href="classcxAreaIntProp__Data.html">cxAreaIntProp_Data</a> : <span class="keyword">public</span> <a class="code" href="classcxAreaIntProp.html">cxAreaIntProp</a>&lt;dataType&gt;
  304. <a name="l00217"></a>00217 {
  305. <a name="l00218"></a>00218 <span class="keyword">public</span>:
  306. <a name="l00219"></a>00219
  307. <a name="l00220"></a><a class="code" href="classcxAreaIntProp__Data.html#a82c4f4eca875b355a6e29536068e3e6f">00220</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a82c4f4eca875b355a6e29536068e3e6f">area</a>;
  308. <a name="l00221"></a><a class="code" href="classcxAreaIntProp__Data.html#ab86f0909c220377d1061b9bf3929d0e7">00221</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#ab86f0909c220377d1061b9bf3929d0e7">xBar</a>;
  309. <a name="l00222"></a><a class="code" href="classcxAreaIntProp__Data.html#a63d4dfb4f8b34a79c499168bc16f3a8b">00222</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a63d4dfb4f8b34a79c499168bc16f3a8b">yBar</a>;
  310. <a name="l00223"></a><a class="code" href="classcxAreaIntProp__Data.html#a22676e2d1f0237e334098168c81099a2">00223</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a22676e2d1f0237e334098168c81099a2">Ixx</a>;
  311. <a name="l00224"></a><a class="code" href="classcxAreaIntProp__Data.html#a7c383866c65e682bc35a6ef77449e7b1">00224</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a7c383866c65e682bc35a6ef77449e7b1">Ixy</a>;
  312. <a name="l00225"></a><a class="code" href="classcxAreaIntProp__Data.html#a45805f2d23b775427190a00a4cbf9a9a">00225</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a45805f2d23b775427190a00a4cbf9a9a">Iyy</a>;
  313. <a name="l00226"></a>00226
  314. <a name="l00227"></a>00227 <a class="code" href="classcxAreaIntProp__Data.html#a749abd819f54eb68a73bf75b7ecac0fb">cxAreaIntProp_Data</a>();
  315. <a name="l00228"></a>00228 <a class="code" href="classcxAreaIntProp__Data.html#a749abd819f54eb68a73bf75b7ecac0fb">cxAreaIntProp_Data</a>(<span class="keyword">const</span> <a class="code" href="classcxAreaIntProp__Data.html">cxAreaIntProp_Data&lt;dataType&gt;</a>&amp; asg);
  316. <a name="l00229"></a>00229 <a class="code" href="classcxAreaIntProp__Data.html#a749abd819f54eb68a73bf75b7ecac0fb">cxAreaIntProp_Data</a>(<span class="keyword">const</span> <a class="code" href="classcxAreaIntProp.html">cxAreaIntProp&lt;dataType&gt;</a>&amp; asg);
  317. <a name="l00230"></a>00230 <span class="keyword">virtual</span> <a class="code" href="classcxAreaIntProp__Data.html#a8f950690ea9c19617e08159522631358">~cxAreaIntProp_Data</a>();
  318. <a name="l00231"></a>00231
  319. <a name="l00232"></a>00232 <a class="code" href="classcxAreaIntProp__Data.html">cxAreaIntProp_Data&lt;dataType&gt;</a>&amp; <a class="code" href="classcxAreaIntProp__Data.html#adda7c79e4d6d310672b248bc09891a37">operator=</a>(<span class="keyword">const</span> <a class="code" href="classcxAreaIntProp.html">cxAreaIntProp&lt;dataType&gt;</a>&amp; asg);
  320. <a name="l00233"></a>00233
  321. <a name="l00234"></a>00234 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a6409f46efd32e214ea4cd151acf1d8b4">getArea</a>() <span class="keyword">const</span>;
  322. <a name="l00235"></a>00235 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#aa15419615eff044cb203def9f8880916">getXBar</a>() <span class="keyword">const</span>;
  323. <a name="l00236"></a>00236 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#ac0e909647a50c080ae688247dfb69bca">getYBar</a>() <span class="keyword">const</span>;
  324. <a name="l00237"></a>00237 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a6c0172a976874e6af891b4842922276e">getIxx</a>() <span class="keyword">const</span>;
  325. <a name="l00238"></a>00238 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a7936b0a4ea324d1bc5de4e5b68b9d8c5">getIxy</a>() <span class="keyword">const</span>;
  326. <a name="l00239"></a>00239 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a8657a28777b2cdd28126e1325f23ba6a">getIyy</a>() <span class="keyword">const</span>;
  327. <a name="l00240"></a>00240 };
  328. <a name="l00241"></a>00241
  329. <a name="l00242"></a>00242 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  330. <a name="l00243"></a><a class="code" href="classcxAreaIntProp__Data.html#a6409f46efd32e214ea4cd151acf1d8b4">00243</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a6409f46efd32e214ea4cd151acf1d8b4">cxAreaIntProp_Data&lt;dataType&gt;::getArea</a>()<span class="keyword"> const</span>
  331. <a name="l00244"></a>00244 <span class="keyword"></span>{
  332. <a name="l00245"></a>00245 <span class="keywordflow">return</span> area;
  333. <a name="l00246"></a>00246 }
  334. <a name="l00247"></a>00247
  335. <a name="l00248"></a>00248 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  336. <a name="l00249"></a><a class="code" href="classcxAreaIntProp__Data.html#aa15419615eff044cb203def9f8880916">00249</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#aa15419615eff044cb203def9f8880916">cxAreaIntProp_Data&lt;dataType&gt;::getXBar</a>()<span class="keyword"> const</span>
  337. <a name="l00250"></a>00250 <span class="keyword"></span>{
  338. <a name="l00251"></a>00251 <span class="keywordflow">return</span> xBar;
  339. <a name="l00252"></a>00252 }
  340. <a name="l00253"></a>00253
  341. <a name="l00254"></a>00254 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  342. <a name="l00255"></a><a class="code" href="classcxAreaIntProp__Data.html#ac0e909647a50c080ae688247dfb69bca">00255</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#ac0e909647a50c080ae688247dfb69bca">cxAreaIntProp_Data&lt;dataType&gt;::getYBar</a>()<span class="keyword"> const</span>
  343. <a name="l00256"></a>00256 <span class="keyword"></span>{
  344. <a name="l00257"></a>00257 <span class="keywordflow">return</span> yBar;
  345. <a name="l00258"></a>00258 }
  346. <a name="l00259"></a>00259
  347. <a name="l00260"></a>00260 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  348. <a name="l00261"></a><a class="code" href="classcxAreaIntProp__Data.html#a6c0172a976874e6af891b4842922276e">00261</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a6c0172a976874e6af891b4842922276e">cxAreaIntProp_Data&lt;dataType&gt;::getIxx</a>()<span class="keyword"> const</span>
  349. <a name="l00262"></a>00262 <span class="keyword"></span>{
  350. <a name="l00263"></a>00263 <span class="keywordflow">return</span> Ixx;
  351. <a name="l00264"></a>00264 }
  352. <a name="l00265"></a>00265
  353. <a name="l00266"></a>00266 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  354. <a name="l00267"></a><a class="code" href="classcxAreaIntProp__Data.html#a7936b0a4ea324d1bc5de4e5b68b9d8c5">00267</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a7936b0a4ea324d1bc5de4e5b68b9d8c5">cxAreaIntProp_Data&lt;dataType&gt;::getIxy</a>()<span class="keyword"> const</span>
  355. <a name="l00268"></a>00268 <span class="keyword"></span>{
  356. <a name="l00269"></a>00269 <span class="keywordflow">return</span> Ixy;
  357. <a name="l00270"></a>00270 }
  358. <a name="l00271"></a>00271
  359. <a name="l00272"></a>00272 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  360. <a name="l00273"></a><a class="code" href="classcxAreaIntProp__Data.html#a8657a28777b2cdd28126e1325f23ba6a">00273</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcxAreaIntProp__Data.html#a8657a28777b2cdd28126e1325f23ba6a">cxAreaIntProp_Data&lt;dataType&gt;::getIyy</a>()<span class="keyword"> const</span>
  361. <a name="l00274"></a>00274 <span class="keyword"></span>{
  362. <a name="l00275"></a>00275 <span class="keywordflow">return</span> Iyy;
  363. <a name="l00276"></a>00276 }
  364. <a name="l00277"></a>00277
  365. <a name="l00278"></a>00278 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  366. <a name="l00279"></a><a class="code" href="classcxAreaIntProp__Data.html#a749abd819f54eb68a73bf75b7ecac0fb">00279</a> <a class="code" href="classcxAreaIntProp__Data.html#a749abd819f54eb68a73bf75b7ecac0fb">cxAreaIntProp_Data&lt;dataType&gt;::cxAreaIntProp_Data</a>() : area(0.0) , xBar(0.0) , yBar(0.0) , Ixx(0.0) , Ixy(0.0) , Iyy(0.0)
  367. <a name="l00280"></a>00280 {}
  368. <a name="l00281"></a>00281
  369. <a name="l00282"></a>00282 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  370. <a name="l00283"></a><a class="code" href="classcxAreaIntProp__Data.html#a9644439beaf38613276a431eb2c33e53">00283</a> <a class="code" href="classcxAreaIntProp__Data.html#a749abd819f54eb68a73bf75b7ecac0fb">cxAreaIntProp_Data&lt;dataType&gt;::cxAreaIntProp_Data</a>(<span class="keyword">const</span> <a class="code" href="classcxAreaIntProp__Data.html">cxAreaIntProp_Data&lt;dataType&gt;</a>&amp; asg) : area(asg.area) , xBar(asg.xBar) , yBar(asg.yBar) , Ixx(asg.Ixx) , Ixy(asg.Ixy) , Iyy(asg.Iyy)
  371. <a name="l00284"></a>00284 {}
  372. <a name="l00285"></a>00285
  373. <a name="l00286"></a>00286 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  374. <a name="l00287"></a><a class="code" href="classcxAreaIntProp__Data.html#ab7663de16ac9005ccb60f6247e390929">00287</a> <a class="code" href="classcxAreaIntProp__Data.html#a749abd819f54eb68a73bf75b7ecac0fb">cxAreaIntProp_Data&lt;dataType&gt;::cxAreaIntProp_Data</a>(<span class="keyword">const</span> <a class="code" href="classcxAreaIntProp.html">cxAreaIntProp&lt;dataType&gt;</a>&amp; asg)
  375. <a name="l00288"></a>00288 {
  376. <a name="l00289"></a>00289 this-&gt;area=asg.<a class="code" href="classcxAreaIntProp.html#ae76ad19e1ce32de8d2e1bf268bf1d400">getArea</a>();
  377. <a name="l00290"></a>00290 this-&gt;xBar=asg.<a class="code" href="classcxAreaIntProp.html#a1853d2f2754d26c6606dd673040086ce">getXBar</a>();
  378. <a name="l00291"></a>00291 this-&gt;yBar=asg.<a class="code" href="classcxAreaIntProp.html#af788beb81f1f0ff9878fb9d08a43dbad">getYBar</a>();
  379. <a name="l00292"></a>00292 this-&gt;Ixx=asg.<a class="code" href="classcxAreaIntProp.html#a50a912173e153171e535548d1a8255e3">getIxx</a>();
  380. <a name="l00293"></a>00293 this-&gt;Ixy=asg.<a class="code" href="classcxAreaIntProp.html#a5862ae8cd0d0ab1eb6d8c57fcaa9b184">getIxy</a>();
  381. <a name="l00294"></a>00294 this-&gt;Iyy=asg.<a class="code" href="classcxAreaIntProp.html#a76e28c48c914b63d0d981a6279a793cc">getIyy</a>();
  382. <a name="l00295"></a>00295 }
  383. <a name="l00296"></a>00296
  384. <a name="l00297"></a>00297 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  385. <a name="l00298"></a><a class="code" href="classcxAreaIntProp__Data.html#a8f950690ea9c19617e08159522631358">00298</a> <a class="code" href="classcxAreaIntProp__Data.html#a8f950690ea9c19617e08159522631358">cxAreaIntProp_Data&lt;dataType&gt;::~cxAreaIntProp_Data</a>()
  386. <a name="l00299"></a>00299 {}
  387. <a name="l00300"></a>00300
  388. <a name="l00301"></a>00301 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  389. <a name="l00302"></a><a class="code" href="classcxAreaIntProp__Data.html#adda7c79e4d6d310672b248bc09891a37">00302</a> <a class="code" href="classcxAreaIntProp__Data.html">cxAreaIntProp_Data&lt;dataType&gt;</a>&amp; <a class="code" href="classcxAreaIntProp__Data.html#adda7c79e4d6d310672b248bc09891a37">cxAreaIntProp_Data&lt;dataType&gt;::operator=</a>(<span class="keyword">const</span> <a class="code" href="classcxAreaIntProp.html">cxAreaIntProp&lt;dataType&gt;</a>&amp; asg)
  390. <a name="l00303"></a>00303 {
  391. <a name="l00304"></a>00304 this-&gt;area=asg.<a class="code" href="classcxAreaIntProp.html#ae76ad19e1ce32de8d2e1bf268bf1d400">getArea</a>();
  392. <a name="l00305"></a>00305 this-&gt;xBar=asg.<a class="code" href="classcxAreaIntProp.html#a1853d2f2754d26c6606dd673040086ce">getXBar</a>();
  393. <a name="l00306"></a>00306 this-&gt;yBar=asg.<a class="code" href="classcxAreaIntProp.html#af788beb81f1f0ff9878fb9d08a43dbad">getYBar</a>();
  394. <a name="l00307"></a>00307 this-&gt;Ixx=asg.<a class="code" href="classcxAreaIntProp.html#a50a912173e153171e535548d1a8255e3">getIxx</a>();
  395. <a name="l00308"></a>00308 this-&gt;Ixy=asg.<a class="code" href="classcxAreaIntProp.html#a5862ae8cd0d0ab1eb6d8c57fcaa9b184">getIxy</a>();
  396. <a name="l00309"></a>00309 this-&gt;Iyy=asg.<a class="code" href="classcxAreaIntProp.html#a76e28c48c914b63d0d981a6279a793cc">getIyy</a>();
  397. <a name="l00310"></a>00310 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  398. <a name="l00311"></a>00311 }
  399. <a name="l00312"></a>00312
  400. <a name="l00313"></a>00313 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt; <span class="keyword">class </span><a class="code" href="classmesh.html">mesh</a>;
  401. <a name="l00314"></a>00314
  402. <a name="l00315"></a>00315 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  403. <a name="l00316"></a>00316 std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out,const mesh&lt;dataType&gt;&amp; msh);
  404. <a name="l00317"></a>00317
  405. <a name="l00318"></a>00318 <span class="comment">// now lets have a mesh</span>
  406. <a name="l00319"></a>00319 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  407. <a name="l00320"></a><a class="code" href="classmesh.html">00320</a> <span class="keyword">class </span><a class="code" href="classmesh.html">mesh</a>
  408. <a name="l00321"></a>00321 {
  409. <a name="l00322"></a>00322 <span class="keyword">template</span>&lt;<span class="keyword">class</span> newType&gt;
  410. <a name="l00323"></a>00323 <span class="keyword">friend</span> std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out,const mesh&lt;newType&gt;&amp; msh);
  411. <a name="l00324"></a>00324
  412. <a name="l00325"></a>00325 <span class="keyword">private</span>:
  413. <a name="l00326"></a>00326
  414. <a name="l00327"></a>00327 std::vector&lt;cxNode&lt;dataType&gt; &gt; nds;
  415. <a name="l00328"></a>00328 std::vector&lt;element&lt;dataType&gt; &gt; elms;
  416. <a name="l00329"></a>00329
  417. <a name="l00330"></a>00330 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> N1(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="namespaceCPPL.html#ab544de2e0cfe3ab6180d91ac5febff72">t</a>);
  418. <a name="l00331"></a>00331 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> N2(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t);
  419. <a name="l00332"></a>00332 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> N3(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t);
  420. <a name="l00333"></a>00333 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> N4(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t);
  421. <a name="l00334"></a>00334 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> dN1dS(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t);
  422. <a name="l00335"></a>00335 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> dN2dS(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t);
  423. <a name="l00336"></a>00336 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> dN3dS(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t);
  424. <a name="l00337"></a>00337 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> dN4dS(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t);
  425. <a name="l00338"></a>00338 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> dN1dT(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t);
  426. <a name="l00339"></a>00339 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> dN2dT(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t);
  427. <a name="l00340"></a>00340 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> dN3dT(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t);
  428. <a name="l00341"></a>00341 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> dN4dT(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t);
  429. <a name="l00342"></a>00342 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> d_dS(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; nodeVals);
  430. <a name="l00343"></a>00343 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> d_dT(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; nodeVals);
  431. <a name="l00344"></a>00344 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> jacobian(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; xVals,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; yVals);
  432. <a name="l00345"></a>00345 <span class="keywordtype">void</span> quadConstants(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>,std::vector&lt;dataType&gt;&amp; X,std::vector&lt;dataType&gt;&amp; W);
  433. <a name="l00346"></a>00346 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classintegral.html">integral</a>(<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; X,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; W,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; xVals,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; yVals,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; nodeVals);
  434. <a name="l00347"></a>00347 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> integralSquare(<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; X,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; W,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; xVals,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; yVals,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; nodeValsA,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; nodeValsB);
  435. <a name="l00348"></a>00348
  436. <a name="l00349"></a>00349 <span class="keyword">public</span>:
  437. <a name="l00350"></a>00350
  438. <a name="l00351"></a><a class="code" href="classmesh.html#addeb702f57ddbe3df73a311d6f95435f">00351</a> <a class="code" href="classmesh.html#addeb702f57ddbe3df73a311d6f95435f">mesh</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ndCnt=0,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> elmCnt=0) : nds(ndCnt) , elms(elmCnt)
  439. <a name="l00352"></a>00352 {}
  440. <a name="l00353"></a>00353
  441. <a name="l00354"></a><a class="code" href="classmesh.html#a89ba23f3fb3bd3258e9a8d74dfec9f0f">00354</a> <span class="keywordtype">void</span> <a class="code" href="classmesh.html#a89ba23f3fb3bd3258e9a8d74dfec9f0f">resize</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ndCnt,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> elmCnt)
  442. <a name="l00355"></a>00355 {
  443. <a name="l00356"></a>00356 nds.resize(ndCnt);
  444. <a name="l00357"></a>00357 elms.resize(elmCnt);
  445. <a name="l00358"></a>00358 }
  446. <a name="l00359"></a>00359
  447. <a name="l00360"></a><a class="code" href="classmesh.html#a29af308711e22c1b68ab612c2acc5f9d">00360</a> <span class="keywordtype">void</span> <a class="code" href="classmesh.html#a29af308711e22c1b68ab612c2acc5f9d">size</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; ndCnt,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; elmCnt)<span class="keyword"> const</span>
  448. <a name="l00361"></a>00361 <span class="keyword"> </span>{
  449. <a name="l00362"></a>00362 ndCnt=nds.size();
  450. <a name="l00363"></a>00363 elmCnt=elms.size();
  451. <a name="l00364"></a>00364 <span class="keywordflow">return</span>;
  452. <a name="l00365"></a>00365 }
  453. <a name="l00366"></a>00366
  454. <a name="l00367"></a><a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">00367</a> <a class="code" href="classcxNode.html">cxNode&lt;dataType&gt;</a>&amp; <a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">getNode</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">id</span>)
  455. <a name="l00368"></a>00368 {
  456. <a name="l00369"></a>00369 <span class="keywordflow">if</span>(<span class="keywordtype">id</span>&gt;=nds.size())
  457. <a name="l00370"></a>00370 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;mesh::getNode(): The node does not exist&quot;</span>);
  458. <a name="l00371"></a>00371 <span class="keywordflow">return</span> nds[id];
  459. <a name="l00372"></a>00372 }
  460. <a name="l00373"></a>00373
  461. <a name="l00374"></a><a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">00374</a> <a class="code" href="classelement.html">element&lt;dataType&gt;</a>&amp; <a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">id</span>)
  462. <a name="l00375"></a>00375 {
  463. <a name="l00376"></a>00376 <span class="keywordflow">if</span>(<span class="keywordtype">id</span>&gt;=elms.size())
  464. <a name="l00377"></a>00377 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;mesh::getElement(): The element does not exist&quot;</span>);
  465. <a name="l00378"></a>00378 <span class="keywordflow">return</span> elms[id];
  466. <a name="l00379"></a>00379 }
  467. <a name="l00380"></a>00380
  468. <a name="l00381"></a><a class="code" href="classmesh.html#a55f0504476488e10f8ff082576eb11c4">00381</a> <span class="keyword">const</span> <a class="code" href="classcxNode.html">cxNode&lt;dataType&gt;</a>&amp; <a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">getNode</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">id</span>)<span class="keyword"> const</span>
  469. <a name="l00382"></a>00382 <span class="keyword"> </span>{
  470. <a name="l00383"></a>00383 <span class="keywordflow">if</span>(<span class="keywordtype">id</span>&gt;=nds.size())
  471. <a name="l00384"></a>00384 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;mesh::getNode(): The node does not exist&quot;</span>);
  472. <a name="l00385"></a>00385 <span class="keywordflow">return</span> nds[id];
  473. <a name="l00386"></a>00386 }
  474. <a name="l00387"></a>00387
  475. <a name="l00388"></a><a class="code" href="classmesh.html#a009b31942c44a9b1048b41e856253b0d">00388</a> <span class="keyword">const</span> <a class="code" href="classelement.html">element&lt;dataType&gt;</a>&amp; <a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">id</span>)<span class="keyword"> const</span>
  476. <a name="l00389"></a>00389 <span class="keyword"> </span>{
  477. <a name="l00390"></a>00390 <span class="keywordflow">if</span>(<span class="keywordtype">id</span>&gt;=elms.size())
  478. <a name="l00391"></a>00391 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;mesh::getElement(): The element does not exist&quot;</span>);
  479. <a name="l00392"></a>00392 <span class="keywordflow">return</span> elms[id];
  480. <a name="l00393"></a>00393 }
  481. <a name="l00394"></a>00394
  482. <a name="l00395"></a><a class="code" href="classmesh.html#a16f338040b8caf85f37a48d9eaa1c744">00395</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a>&amp; <a class="code" href="classmesh.html#a16f338040b8caf85f37a48d9eaa1c744">shift</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> deltaX,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> deltaY)
  483. <a name="l00396"></a>00396 {
  484. <a name="l00397"></a>00397 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;nds.size();i++)
  485. <a name="l00398"></a>00398 {
  486. <a name="l00399"></a>00399 nds[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].x+=deltaX;
  487. <a name="l00400"></a>00400 nds[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].y+=deltaY;
  488. <a name="l00401"></a>00401 }
  489. <a name="l00402"></a>00402 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  490. <a name="l00403"></a>00403 }
  491. <a name="l00404"></a>00404
  492. <a name="l00405"></a><a class="code" href="classmesh.html#a6e8277d4d6e90a55d384b6dce29c755f">00405</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a>&amp; <a class="code" href="classmesh.html#a6e8277d4d6e90a55d384b6dce29c755f">scale</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> scaleMag)
  493. <a name="l00406"></a>00406 {
  494. <a name="l00407"></a>00407 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;nds.size();i++)
  495. <a name="l00408"></a>00408 {
  496. <a name="l00409"></a>00409 nds[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].x*=scaleMag;
  497. <a name="l00410"></a>00410 nds[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].y*=scaleMag;
  498. <a name="l00411"></a>00411 }
  499. <a name="l00412"></a>00412 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  500. <a name="l00413"></a>00413 }
  501. <a name="l00414"></a>00414
  502. <a name="l00415"></a><a class="code" href="classmesh.html#a5a1537dc32069794a5295a4a5e506ce7">00415</a> <a class="code" href="classcxAreaIntProp__Data.html">cxAreaIntProp_Data&lt;dataType&gt;</a> <a class="code" href="classmesh.html#a5a1537dc32069794a5295a4a5e506ce7">getProperties</a>()
  503. <a name="l00416"></a>00416 {
  504. <a name="l00417"></a>00417 std::vector&lt;dataType&gt; X;
  505. <a name="l00418"></a>00418 std::vector&lt;dataType&gt; W;
  506. <a name="l00419"></a>00419 std::vector&lt;dataType&gt; oneVals=std::vector&lt;dataType&gt;(4,1.0);
  507. <a name="l00420"></a>00420 std::vector&lt;dataType&gt; xVals=std::vector&lt;dataType&gt;(4,1.0);
  508. <a name="l00421"></a>00421 std::vector&lt;dataType&gt; yVals=std::vector&lt;dataType&gt;(4,1.0);
  509. <a name="l00422"></a>00422 <a class="code" href="classcxAreaIntProp__Data.html">cxAreaIntProp_Data&lt;dataType&gt;</a> retVal;
  510. <a name="l00423"></a>00423
  511. <a name="l00424"></a>00424 <span class="comment">// retrieve the quadrature constants</span>
  512. <a name="l00425"></a>00425 quadConstants(1,X,W);
  513. <a name="l00426"></a>00426
  514. <a name="l00427"></a>00427 <span class="comment">// retrieve all the integral values</span>
  515. <a name="l00428"></a>00428 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;elms.size();i++)
  516. <a name="l00429"></a>00429 {
  517. <a name="l00430"></a>00430 <span class="comment">// retrieve the element and get the node position values</span>
  518. <a name="l00431"></a>00431 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;4;j++)
  519. <a name="l00432"></a>00432 {
  520. <a name="l00433"></a>00433 xVals[j]=nds[elms[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].nodeHndl[j].nodeID].x;
  521. <a name="l00434"></a>00434 yVals[j]=nds[elms[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].nodeHndl[j].nodeID].y;
  522. <a name="l00435"></a>00435 }
  523. <a name="l00436"></a>00436 <span class="comment">// get the area integral</span>
  524. <a name="l00437"></a>00437 retVal.<a class="code" href="classcxAreaIntProp__Data.html#a82c4f4eca875b355a6e29536068e3e6f">area</a>+=integral(X,W,xVals,yVals,oneVals);
  525. <a name="l00438"></a>00438 retVal.<a class="code" href="classcxAreaIntProp__Data.html#ab86f0909c220377d1061b9bf3929d0e7">xBar</a>+=integral(X,W,xVals,yVals,xVals);
  526. <a name="l00439"></a>00439 retVal.<a class="code" href="classcxAreaIntProp__Data.html#a63d4dfb4f8b34a79c499168bc16f3a8b">yBar</a>+=integral(X,W,xVals,yVals,yVals);
  527. <a name="l00440"></a>00440 retVal.<a class="code" href="classcxAreaIntProp__Data.html#a22676e2d1f0237e334098168c81099a2">Ixx</a>+=integralSquare(X,W,xVals,yVals,xVals,xVals);
  528. <a name="l00441"></a>00441 retVal.<a class="code" href="classcxAreaIntProp__Data.html#a7c383866c65e682bc35a6ef77449e7b1">Ixy</a>+=integralSquare(X,W,xVals,yVals,xVals,yVals);
  529. <a name="l00442"></a>00442 retVal.<a class="code" href="classcxAreaIntProp__Data.html#a45805f2d23b775427190a00a4cbf9a9a">Iyy</a>+=integralSquare(X,W,xVals,yVals,yVals,yVals);
  530. <a name="l00443"></a>00443 }
  531. <a name="l00444"></a>00444
  532. <a name="l00445"></a>00445 <span class="comment">// get the properties</span>
  533. <a name="l00446"></a>00446 retVal.<a class="code" href="classcxAreaIntProp__Data.html#ab86f0909c220377d1061b9bf3929d0e7">xBar</a>/=retVal.<a class="code" href="classcxAreaIntProp__Data.html#a82c4f4eca875b355a6e29536068e3e6f">area</a>;
  534. <a name="l00447"></a>00447 retVal.<a class="code" href="classcxAreaIntProp__Data.html#a63d4dfb4f8b34a79c499168bc16f3a8b">yBar</a>/=retVal.<a class="code" href="classcxAreaIntProp__Data.html#a82c4f4eca875b355a6e29536068e3e6f">area</a>;
  535. <a name="l00448"></a>00448 retVal.<a class="code" href="classcxAreaIntProp__Data.html#a22676e2d1f0237e334098168c81099a2">Ixx</a>-=retVal.<a class="code" href="classcxAreaIntProp__Data.html#ab86f0909c220377d1061b9bf3929d0e7">xBar</a>*retVal.<a class="code" href="classcxAreaIntProp__Data.html#ab86f0909c220377d1061b9bf3929d0e7">xBar</a>*retVal.<a class="code" href="classcxAreaIntProp__Data.html#a82c4f4eca875b355a6e29536068e3e6f">area</a>;
  536. <a name="l00449"></a>00449 retVal.<a class="code" href="classcxAreaIntProp__Data.html#a7c383866c65e682bc35a6ef77449e7b1">Ixy</a>-=retVal.<a class="code" href="classcxAreaIntProp__Data.html#ab86f0909c220377d1061b9bf3929d0e7">xBar</a>*retVal.<a class="code" href="classcxAreaIntProp__Data.html#a63d4dfb4f8b34a79c499168bc16f3a8b">yBar</a>*retVal.<a class="code" href="classcxAreaIntProp__Data.html#a82c4f4eca875b355a6e29536068e3e6f">area</a>;
  537. <a name="l00450"></a>00450 retVal.<a class="code" href="classcxAreaIntProp__Data.html#a45805f2d23b775427190a00a4cbf9a9a">Iyy</a>-=retVal.<a class="code" href="classcxAreaIntProp__Data.html#a63d4dfb4f8b34a79c499168bc16f3a8b">yBar</a>*retVal.<a class="code" href="classcxAreaIntProp__Data.html#a63d4dfb4f8b34a79c499168bc16f3a8b">yBar</a>*retVal.<a class="code" href="classcxAreaIntProp__Data.html#a82c4f4eca875b355a6e29536068e3e6f">area</a>;
  538. <a name="l00451"></a>00451
  539. <a name="l00452"></a>00452 <span class="comment">// return the results</span>
  540. <a name="l00453"></a>00453 <span class="keywordflow">return</span> retVal;
  541. <a name="l00454"></a>00454 }
  542. <a name="l00455"></a>00455
  543. <a name="l00456"></a><a class="code" href="classmesh.html#a895beb007b06e5cb856086c1218f097d">00456</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a>&amp; <a class="code" href="classmesh.html#a895beb007b06e5cb856086c1218f097d">operator=</a>(<span class="keyword">const</span> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a>&amp; rhs)
  544. <a name="l00457"></a>00457 {
  545. <a name="l00458"></a>00458 <span class="keywordflow">if</span>(<span class="keyword">this</span>==&amp;rhs)
  546. <a name="l00459"></a>00459 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  547. <a name="l00460"></a>00460
  548. <a name="l00461"></a>00461 this-&gt;nds=rhs.nds;
  549. <a name="l00462"></a>00462 this-&gt;elms=rhs.elms;
  550. <a name="l00463"></a>00463 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  551. <a name="l00464"></a>00464 }
  552. <a name="l00465"></a>00465
  553. <a name="l00466"></a><a class="code" href="classmesh.html#a087a8f69b54fe8e4bd76774f491e90c5">00466</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a>&amp; <a class="code" href="classmesh.html#a087a8f69b54fe8e4bd76774f491e90c5">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a>&amp; rhs)
  554. <a name="l00467"></a>00467 {
  555. <a name="l00468"></a>00468 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ndCnt=0;
  556. <a name="l00469"></a>00469 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> elmCnt=0;
  557. <a name="l00470"></a>00470 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> oldCnt=elms.size();
  558. <a name="l00471"></a>00471
  559. <a name="l00472"></a>00472 rhs.<a class="code" href="classmesh.html#a29af308711e22c1b68ab612c2acc5f9d">size</a>(ndCnt,elmCnt);
  560. <a name="l00473"></a>00473
  561. <a name="l00474"></a>00474 std::vector&lt;bool&gt; isNew(ndCnt,<span class="keyword">true</span>);
  562. <a name="l00475"></a>00475 std::vector&lt;unsigned long&gt; thisID(ndCnt,0);
  563. <a name="l00476"></a>00476 std::vector&lt;std::vector&lt;unsigned long&gt; &gt; thisData(ndCnt,std::vector&lt;unsigned long&gt;(0));
  564. <a name="l00477"></a>00477
  565. <a name="l00478"></a>00478 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at=nds.size();
  566. <a name="l00479"></a>00479
  567. <a name="l00480"></a>00480 <span class="comment">// loop through all the nodes of the argument mesh</span>
  568. <a name="l00481"></a>00481 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;ndCnt;i++)
  569. <a name="l00482"></a>00482 {
  570. <a name="l00483"></a>00483 thisData[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].resize(rhs.<a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">getNode</a>(i).nodeData.size());
  571. <a name="l00484"></a>00484 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> k=0;k&lt;thisData[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].size();k++)
  572. <a name="l00485"></a>00485 thisData[i][k]=k;
  573. <a name="l00486"></a>00486 <span class="comment">// loop through all of &quot;this&quot; nodes to determine if there are any copies</span>
  574. <a name="l00487"></a>00487 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;nds.size();j++)
  575. <a name="l00488"></a>00488 {
  576. <a name="l00489"></a>00489 <span class="keywordflow">if</span>(rhs.<a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">getNode</a>(i).samePoint(this-&gt;nds[j]))
  577. <a name="l00490"></a>00490 {
  578. <a name="l00491"></a>00491 isNew[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=<span class="keyword">false</span>;
  579. <a name="l00492"></a>00492 thisID[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=j;
  580. <a name="l00493"></a>00493 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> oldSize=this-&gt;nds[j].nodeData.size();
  581. <a name="l00494"></a>00494 <span class="comment">// resize the nodeData vector to accept data from more elements</span>
  582. <a name="l00495"></a>00495 this-&gt;nds[j].nodeData.resize(oldSize+thisData[i].<a class="code" href="classmesh.html#a29af308711e22c1b68ab612c2acc5f9d">size</a>());
  583. <a name="l00496"></a>00496 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> k=0;k&lt;thisData[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].size();k++)
  584. <a name="l00497"></a>00497 {
  585. <a name="l00498"></a>00498 <span class="comment">// copy over the nodeData from the argument nodes</span>
  586. <a name="l00499"></a>00499 this-&gt;nds[j].nodeData[oldSize+k]=rhs.<a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">getNode</a>(i).nodeData[k];
  587. <a name="l00500"></a>00500 <span class="comment">// store the location of this new node data</span>
  588. <a name="l00501"></a>00501 thisData[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>][k]=oldSize+k;
  589. <a name="l00502"></a>00502 }
  590. <a name="l00503"></a>00503 <span class="keywordflow">break</span>;
  591. <a name="l00504"></a>00504 }
  592. <a name="l00505"></a>00505 }
  593. <a name="l00506"></a>00506 <span class="keywordflow">if</span>(isNew[i])
  594. <a name="l00507"></a>00507 {
  595. <a name="l00508"></a>00508 thisID[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=at;
  596. <a name="l00509"></a>00509 at++;
  597. <a name="l00510"></a>00510 }
  598. <a name="l00511"></a>00511 }
  599. <a name="l00512"></a>00512 nds.resize(at);
  600. <a name="l00513"></a>00513 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;ndCnt;i++)
  601. <a name="l00514"></a>00514 {
  602. <a name="l00515"></a>00515 <span class="keywordflow">if</span>(isNew[i])
  603. <a name="l00516"></a>00516 nds[thisID[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]]=rhs.<a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">getNode</a>(i);
  604. <a name="l00517"></a>00517 }
  605. <a name="l00518"></a>00518 elms.resize(oldCnt+elmCnt);
  606. <a name="l00519"></a>00519 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;elmCnt;i++)
  607. <a name="l00520"></a>00520 {
  608. <a name="l00521"></a>00521 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;rhs.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i).nodeHndl.size();j++)
  609. <a name="l00522"></a>00522 {
  610. <a name="l00523"></a>00523 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; rhsNodeId=rhs.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i).nodeHndl[j].nodeID;
  611. <a name="l00524"></a>00524 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; rhsDataId=rhs.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i).nodeHndl[j].dataID;
  612. <a name="l00525"></a>00525 elms[oldCnt+<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].nodeHndl[j]=<a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>(thisID[rhsNodeId],thisData[rhsNodeId][rhsDataId]);
  613. <a name="l00526"></a>00526 }
  614. <a name="l00527"></a>00527 elms[oldCnt+<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].material=rhs.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i).material;
  615. <a name="l00528"></a>00528 }
  616. <a name="l00529"></a>00529
  617. <a name="l00530"></a>00530 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  618. <a name="l00531"></a>00531 }
  619. <a name="l00532"></a>00532
  620. <a name="l00533"></a><a class="code" href="classmesh.html#a1af77c2a8144b9f22d1305ae6a87288d">00533</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a> <a class="code" href="classmesh.html#a1af77c2a8144b9f22d1305ae6a87288d">operator+</a>(<span class="keyword">const</span> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a>&amp; rhs)
  621. <a name="l00534"></a>00534 {
  622. <a name="l00535"></a>00535 <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a> retVal;
  623. <a name="l00536"></a>00536 retVal=*<span class="keyword">this</span>;
  624. <a name="l00537"></a>00537 retVal+=rhs;
  625. <a name="l00538"></a>00538 <span class="keywordflow">return</span> retVal;
  626. <a name="l00539"></a>00539 }
  627. <a name="l00540"></a>00540
  628. <a name="l00541"></a>00541 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html#a64c1128d27c9557c9e92d6f8844308c4">value</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; nodeVals);
  629. <a name="l00542"></a>00542
  630. <a name="l00543"></a><a class="code" href="classmesh.html#a5ec4fdd5896d908df74952b202bfcde1">00543</a> <span class="keywordtype">void</span> <a class="code" href="classmesh.html#a5ec4fdd5896d908df74952b202bfcde1">print</a>()
  631. <a name="l00544"></a>00544 {
  632. <a name="l00545"></a>00545 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;elms.size();i++)
  633. <a name="l00546"></a>00546 {
  634. <a name="l00547"></a>00547 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;5;j++)
  635. <a name="l00548"></a>00548 std::cout &lt;&lt; nds[elms[i].nodeHndl[j%4].nodeID].x &lt;&lt; <span class="charliteral">&#39;\t&#39;</span> &lt;&lt; nds[elms[i].nodeHndl[j%4].nodeID].y &lt;&lt; std::endl;
  636. <a name="l00549"></a>00549 }
  637. <a name="l00550"></a>00550 }
  638. <a name="l00551"></a>00551 };
  639. <a name="l00552"></a>00552
  640. <a name="l00553"></a>00553 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  641. <a name="l00554"></a>00554 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::N1</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="namespaceCPPL.html#ab544de2e0cfe3ab6180d91ac5febff72">t</a>)
  642. <a name="l00555"></a>00555 {
  643. <a name="l00556"></a>00556 <span class="keywordflow">return</span> 0.25*(1.0-s)*(1.0-t);
  644. <a name="l00557"></a>00557 }
  645. <a name="l00558"></a>00558
  646. <a name="l00559"></a>00559 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  647. <a name="l00560"></a>00560 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::N2</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t)
  648. <a name="l00561"></a>00561 {
  649. <a name="l00562"></a>00562 <span class="keywordflow">return</span> 0.25*(1.0-s)*(1.0+t);
  650. <a name="l00563"></a>00563 }
  651. <a name="l00564"></a>00564
  652. <a name="l00565"></a>00565 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  653. <a name="l00566"></a>00566 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::N3</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t)
  654. <a name="l00567"></a>00567 {
  655. <a name="l00568"></a>00568 <span class="keywordflow">return</span> 0.25*(1.0+s)*(1.0+t);
  656. <a name="l00569"></a>00569 }
  657. <a name="l00570"></a>00570
  658. <a name="l00571"></a>00571 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  659. <a name="l00572"></a>00572 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::N4</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t)
  660. <a name="l00573"></a>00573 {
  661. <a name="l00574"></a>00574 <span class="keywordflow">return</span> 0.25*(1.0+s)*(1.0-t);
  662. <a name="l00575"></a>00575 }
  663. <a name="l00576"></a>00576
  664. <a name="l00577"></a>00577 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  665. <a name="l00578"></a>00578 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::dN1dS</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t)
  666. <a name="l00579"></a>00579 {
  667. <a name="l00580"></a>00580 <span class="keywordflow">return</span> -0.25*(1.0-<a class="code" href="namespaceCPPL.html#ab544de2e0cfe3ab6180d91ac5febff72">t</a>);
  668. <a name="l00581"></a>00581 }
  669. <a name="l00582"></a>00582
  670. <a name="l00583"></a>00583 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  671. <a name="l00584"></a>00584 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::dN2dS</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t)
  672. <a name="l00585"></a>00585 {
  673. <a name="l00586"></a>00586 <span class="keywordflow">return</span> -0.25*(1.0+<a class="code" href="namespaceCPPL.html#ab544de2e0cfe3ab6180d91ac5febff72">t</a>);
  674. <a name="l00587"></a>00587 }
  675. <a name="l00588"></a>00588
  676. <a name="l00589"></a>00589 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  677. <a name="l00590"></a>00590 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::dN3dS</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t)
  678. <a name="l00591"></a>00591 {
  679. <a name="l00592"></a>00592 <span class="keywordflow">return</span> 0.25*(1.0+<a class="code" href="namespaceCPPL.html#ab544de2e0cfe3ab6180d91ac5febff72">t</a>);
  680. <a name="l00593"></a>00593 }
  681. <a name="l00594"></a>00594
  682. <a name="l00595"></a>00595 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  683. <a name="l00596"></a>00596 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::dN4dS</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t)
  684. <a name="l00597"></a>00597 {
  685. <a name="l00598"></a>00598 <span class="keywordflow">return</span> 0.25*(1.0-<a class="code" href="namespaceCPPL.html#ab544de2e0cfe3ab6180d91ac5febff72">t</a>);
  686. <a name="l00599"></a>00599 }
  687. <a name="l00600"></a>00600
  688. <a name="l00601"></a>00601 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  689. <a name="l00602"></a>00602 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::dN1dT</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t)
  690. <a name="l00603"></a>00603 {
  691. <a name="l00604"></a>00604 <span class="keywordflow">return</span> -0.25*(1.0-s);
  692. <a name="l00605"></a>00605 }
  693. <a name="l00606"></a>00606
  694. <a name="l00607"></a>00607 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  695. <a name="l00608"></a>00608 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::dN2dT</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t)
  696. <a name="l00609"></a>00609 {
  697. <a name="l00610"></a>00610 <span class="keywordflow">return</span> 0.25*(1.0-s);
  698. <a name="l00611"></a>00611 }
  699. <a name="l00612"></a>00612
  700. <a name="l00613"></a>00613 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  701. <a name="l00614"></a>00614 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::dN3dT</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t)
  702. <a name="l00615"></a>00615 {
  703. <a name="l00616"></a>00616 <span class="keywordflow">return</span> 0.25*(1.0+s);
  704. <a name="l00617"></a>00617 }
  705. <a name="l00618"></a>00618
  706. <a name="l00619"></a>00619 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  707. <a name="l00620"></a>00620 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::dN4dT</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t)
  708. <a name="l00621"></a>00621 {
  709. <a name="l00622"></a>00622 <span class="keywordflow">return</span> -0.25*(1.0+s);
  710. <a name="l00623"></a>00623 }
  711. <a name="l00624"></a>00624
  712. <a name="l00625"></a>00625 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  713. <a name="l00626"></a><a class="code" href="classmesh.html#a64c1128d27c9557c9e92d6f8844308c4">00626</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html#a64c1128d27c9557c9e92d6f8844308c4">mesh&lt;dataType&gt;::value</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; nodeVals)
  714. <a name="l00627"></a>00627 {
  715. <a name="l00628"></a>00628 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> retVal=0.0;
  716. <a name="l00629"></a>00629
  717. <a name="l00630"></a>00630 retVal+=nodeVals[0]*N1(s,t);
  718. <a name="l00631"></a>00631 retVal+=nodeVals[1]*N2(s,t);
  719. <a name="l00632"></a>00632 retVal+=nodeVals[2]*N3(s,t);
  720. <a name="l00633"></a>00633 retVal+=nodeVals[3]*N4(s,t);
  721. <a name="l00634"></a>00634
  722. <a name="l00635"></a>00635 <span class="keywordflow">return</span> retVal;
  723. <a name="l00636"></a>00636 }
  724. <a name="l00637"></a>00637
  725. <a name="l00638"></a>00638 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  726. <a name="l00639"></a>00639 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::d_dS</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; nodeVals)
  727. <a name="l00640"></a>00640 {
  728. <a name="l00641"></a>00641 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> retVal=0.0;
  729. <a name="l00642"></a>00642
  730. <a name="l00643"></a>00643 retVal+=nodeVals[0]*dN1dS(s,t);
  731. <a name="l00644"></a>00644 retVal+=nodeVals[1]*dN2dS(s,t);
  732. <a name="l00645"></a>00645 retVal+=nodeVals[2]*dN3dS(s,t);
  733. <a name="l00646"></a>00646 retVal+=nodeVals[3]*dN4dS(s,t);
  734. <a name="l00647"></a>00647
  735. <a name="l00648"></a>00648 <span class="keywordflow">return</span> retVal;
  736. <a name="l00649"></a>00649 }
  737. <a name="l00650"></a>00650
  738. <a name="l00651"></a>00651 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  739. <a name="l00652"></a>00652 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::d_dT</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; nodeVals)
  740. <a name="l00653"></a>00653 {
  741. <a name="l00654"></a>00654 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> retVal=0.0;
  742. <a name="l00655"></a>00655
  743. <a name="l00656"></a>00656 retVal+=nodeVals[0]*dN1dT(s,t);
  744. <a name="l00657"></a>00657 retVal+=nodeVals[1]*dN2dT(s,t);
  745. <a name="l00658"></a>00658 retVal+=nodeVals[2]*dN3dT(s,t);
  746. <a name="l00659"></a>00659 retVal+=nodeVals[3]*dN4dT(s,t);
  747. <a name="l00660"></a>00660
  748. <a name="l00661"></a>00661 <span class="keywordflow">return</span> retVal;
  749. <a name="l00662"></a>00662 }
  750. <a name="l00663"></a>00663
  751. <a name="l00664"></a>00664 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  752. <a name="l00665"></a>00665 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::jacobian</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; xVals,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; yVals)
  753. <a name="l00666"></a>00666 {
  754. <a name="l00667"></a>00667 <span class="keywordflow">return</span> fabs(d_dS(s,t,xVals)*d_dT(s,t,yVals)-d_dS(s,t,yVals)*d_dT(s,t,xVals));
  755. <a name="l00668"></a>00668 }
  756. <a name="l00669"></a>00669
  757. <a name="l00670"></a>00670 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  758. <a name="l00671"></a>00671 <span class="keywordtype">void</span> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::quadConstants</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>,std::vector&lt;dataType&gt;&amp; X,std::vector&lt;dataType&gt;&amp; W)
  759. <a name="l00672"></a>00672 {
  760. <a name="l00673"></a>00673 <span class="keywordflow">switch</span>(i)
  761. <a name="l00674"></a>00674 {
  762. <a name="l00675"></a>00675 <span class="keywordflow">case</span> 0:
  763. <a name="l00676"></a>00676 X.<a class="code" href="classmesh.html#a89ba23f3fb3bd3258e9a8d74dfec9f0f">resize</a>(1);
  764. <a name="l00677"></a>00677 W.resize(1);
  765. <a name="l00678"></a>00678 X[0]=0;
  766. <a name="l00679"></a>00679 W[0]=2;
  767. <a name="l00680"></a>00680 <span class="keywordflow">return</span>;
  768. <a name="l00681"></a>00681 <span class="keywordflow">case</span> 1:
  769. <a name="l00682"></a>00682 X.resize(2);
  770. <a name="l00683"></a>00683 W.resize(2);
  771. <a name="l00684"></a>00684 X[0]=-1.0/sqrt(3.0);
  772. <a name="l00685"></a>00685 X[1]=1.0/sqrt(3.0);
  773. <a name="l00686"></a>00686 W[0]=1.0;
  774. <a name="l00687"></a>00687 W[1]=1.0;
  775. <a name="l00688"></a>00688 <span class="keywordflow">return</span>;
  776. <a name="l00689"></a>00689 <span class="keywordflow">case</span> 2:
  777. <a name="l00690"></a>00690 X.resize(3);
  778. <a name="l00691"></a>00691 W.resize(3);
  779. <a name="l00692"></a>00692 X[0]=-sqrt(3.0/5.0);
  780. <a name="l00693"></a>00693 X[1]=0.0;
  781. <a name="l00694"></a>00694 X[2]=sqrt(3.0/5.0);
  782. <a name="l00695"></a>00695 W[0]=5.0/9.0;
  783. <a name="l00696"></a>00696 W[1]=8.0/9.0;
  784. <a name="l00697"></a>00697 W[2]=5.0/9.0;
  785. <a name="l00698"></a>00698 <span class="keywordflow">return</span>;
  786. <a name="l00699"></a>00699 <span class="keywordflow">case</span> 3:
  787. <a name="l00700"></a>00700 X.resize(4);
  788. <a name="l00701"></a>00701 W.resize(4);
  789. <a name="l00702"></a>00702 X[0]=-sqrt((3.0+2.0*sqrt(6.0/5.0))/7.0);
  790. <a name="l00703"></a>00703 X[1]=-sqrt((3.0-2.0*sqrt(6.0/5.0))/7.0);
  791. <a name="l00704"></a>00704 X[2]=sqrt((3.0-2.0*sqrt(6.0/5.0))/7.0);
  792. <a name="l00705"></a>00705 X[3]=sqrt((3.0+2.0*sqrt(6.0/5.0))/7.0);
  793. <a name="l00706"></a>00706 W[0]=(18.0-sqrt(30.0))/36.0;
  794. <a name="l00707"></a>00707 W[1]=(18.0+sqrt(30.0))/36.0;
  795. <a name="l00708"></a>00708 W[2]=(18.0+sqrt(30.0))/36.0;
  796. <a name="l00709"></a>00709 W[3]=(18.0-sqrt(30.0))/36.0;
  797. <a name="l00710"></a>00710 <span class="keywordflow">return</span>;
  798. <a name="l00711"></a>00711 <span class="keywordflow">case</span> 4:
  799. <a name="l00712"></a>00712 X.resize(5);
  800. <a name="l00713"></a>00713 W.resize(5);
  801. <a name="l00714"></a>00714 X[0]=-sqrt(5.0+2.0*sqrt(10.0/7.0))/3.0;
  802. <a name="l00715"></a>00715 X[1]=-sqrt(5.0-2.0*sqrt(10.0/7.0))/3.0;
  803. <a name="l00716"></a>00716 X[2]=0.0;
  804. <a name="l00717"></a>00717 X[3]=sqrt(5.0-2.0*sqrt(10.0/7.0))/3.0;
  805. <a name="l00718"></a>00718 X[4]=sqrt(5.0+2.0*sqrt(10.0/7.0))/3.0;
  806. <a name="l00719"></a>00719 W[0]=(322.0-13.0*sqrt(70.0))/900.0;
  807. <a name="l00720"></a>00720 W[1]=(322.0+13.0*sqrt(70.0))/900.0;
  808. <a name="l00721"></a>00721 W[2]=128.0/225.0;
  809. <a name="l00722"></a>00722 W[3]=(322.0+13.0*sqrt(70.0))/900.0;
  810. <a name="l00723"></a>00723 W[4]=(322.0-13.0*sqrt(70.0))/900.0;
  811. <a name="l00724"></a>00724 <span class="keywordflow">return</span>;
  812. <a name="l00725"></a>00725 <span class="keywordflow">default</span>:
  813. <a name="l00726"></a>00726 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;The requested quadrature have not been defined&quot;</span>);
  814. <a name="l00727"></a>00727 }
  815. <a name="l00728"></a>00728 }
  816. <a name="l00729"></a>00729
  817. <a name="l00730"></a>00730 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  818. <a name="l00731"></a>00731 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::integral</a>(<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; X,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; W,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; xVals,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; yVals,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; nodeVals)
  819. <a name="l00732"></a>00732 {
  820. <a name="l00733"></a>00733 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> retVal=0.0;
  821. <a name="l00734"></a>00734 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;X.size();i++)
  822. <a name="l00735"></a>00735 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;X.size();j++)
  823. <a name="l00736"></a>00736 retVal+=value(X[i],X[j],nodeVals)*W[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*W[j]*jacobian(X[i],X[j],xVals,yVals);
  824. <a name="l00737"></a>00737 <span class="keywordflow">return</span> retVal;
  825. <a name="l00738"></a>00738 }
  826. <a name="l00739"></a>00739
  827. <a name="l00740"></a>00740 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  828. <a name="l00741"></a>00741 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;::integralSquare</a>(<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; X,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; W,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; xVals,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; yVals,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; nodeValsA,<span class="keyword">const</span> std::vector&lt;dataType&gt;&amp; nodeValsB)
  829. <a name="l00742"></a>00742 {
  830. <a name="l00743"></a>00743 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> retVal=0.0;
  831. <a name="l00744"></a>00744 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;X.size();i++)
  832. <a name="l00745"></a>00745 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;X.size();j++)
  833. <a name="l00746"></a>00746 retVal+=value(X[i],X[j],nodeValsA)*value(X[i],X[j],nodeValsB)*W[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*W[j]*jacobian(X[i],X[j],xVals,yVals);
  834. <a name="l00747"></a>00747 <span class="keywordflow">return</span> retVal;
  835. <a name="l00748"></a>00748 }
  836. <a name="l00749"></a>00749
  837. <a name="l00750"></a>00750 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  838. <a name="l00751"></a><a class="code" href="meshSudo_8cpp.html#a29e5c31e77f04548e0340e7d367e6ca5">00751</a> std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out,const mesh&lt;dataType&gt;&amp; msh)
  839. <a name="l00752"></a>00752 {
  840. <a name="l00753"></a>00753 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;msh.elms.size();i++)
  841. <a name="l00754"></a>00754 {
  842. <a name="l00755"></a>00755 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;msh.elms[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].nodeHndl.size();j++)
  843. <a name="l00756"></a>00756 {
  844. <a name="l00757"></a>00757 out &lt;&lt; msh.nds[msh.elms[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].nodeHndl[j].nodeID];
  845. <a name="l00758"></a>00758 }
  846. <a name="l00759"></a>00759 out &lt;&lt; msh.nds[msh.elms[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].nodeHndl[0].nodeID];
  847. <a name="l00760"></a>00760 }
  848. <a name="l00761"></a>00761 <span class="keywordflow">return</span> out;
  849. <a name="l00762"></a>00762 }
  850. <a name="l00763"></a>00763
  851. <a name="l00764"></a>00764 <span class="comment">// lets say there is a box that has a constant topology mesh in it</span>
  852. <a name="l00765"></a>00765 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  853. <a name="l00766"></a><a class="code" href="classbox.html">00766</a> <span class="keyword">class </span><a class="code" href="classbox.html">box</a>
  854. <a name="l00767"></a>00767 {
  855. <a name="l00768"></a>00768 <span class="keyword">public</span>:
  856. <a name="l00769"></a>00769
  857. <a name="l00770"></a><a class="code" href="classbox.html#ad0f62fd2ce6d906916515fb0a78a1d8a">00770</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classbox.html#ad0f62fd2ce6d906916515fb0a78a1d8a">material</a>;
  858. <a name="l00771"></a>00771
  859. <a name="l00772"></a><a class="code" href="classbox.html#a0518df8926e9945b9fcbfa77a4eceec9">00772</a> <a class="code" href="classbox.html#a0518df8926e9945b9fcbfa77a4eceec9">box</a>(<a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* material_in=NULL) : <a class="code" href="classbox.html#ad0f62fd2ce6d906916515fb0a78a1d8a">material</a>(material_in)
  860. <a name="l00773"></a>00773 {}
  861. <a name="l00774"></a>00774
  862. <a name="l00775"></a><a class="code" href="classbox.html#a82d89ef2460e52a429ed4a873a1d60e0">00775</a> <a class="code" href="classbox.html#a0518df8926e9945b9fcbfa77a4eceec9">box</a>(<span class="keyword">const</span> <a class="code" href="classbox.html">box&lt;dataType&gt;</a>&amp; asg) : <a class="code" href="classbox.html#ad0f62fd2ce6d906916515fb0a78a1d8a">material</a>(asg.<a class="code" href="classbox.html#ad0f62fd2ce6d906916515fb0a78a1d8a">material</a>)
  863. <a name="l00776"></a>00776 {}
  864. <a name="l00777"></a>00777
  865. <a name="l00778"></a><a class="code" href="classbox.html#afad0b54143370dc8c01aa042eed7998a">00778</a> <span class="keyword">virtual</span> <a class="code" href="classbox.html#afad0b54143370dc8c01aa042eed7998a">~box</a>()
  866. <a name="l00779"></a>00779 {}
  867. <a name="l00780"></a>00780
  868. <a name="l00781"></a>00781 <span class="comment">// now we need some methods to retrieve the mesh</span>
  869. <a name="l00782"></a>00782 <span class="keyword">virtual</span> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a> <a class="code" href="classbox.html#a33d0339c38cb265c96813bcb41ce1666">getMesh</a>() <span class="keyword">const</span>=0;
  870. <a name="l00783"></a>00783 };
  871. <a name="l00784"></a>00784
  872. <a name="l00785"></a>00785 <span class="comment">// lets define a set of information that would be common to all adjacent box&#39;s</span>
  873. <a name="l00786"></a>00786
  874. <a name="l00787"></a>00787 <span class="comment">// this is a family of curves that are common to a set of adjacent curves</span>
  875. <a name="l00788"></a>00788 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  876. <a name="l00789"></a><a class="code" href="classcommonEW.html">00789</a> <span class="keyword">class </span><a class="code" href="classcommonEW.html">commonEW</a>
  877. <a name="l00790"></a>00790 {
  878. <a name="l00791"></a>00791 <span class="keyword">public</span>:
  879. <a name="l00792"></a>00792
  880. <a name="l00793"></a><a class="code" href="classcommonEW.html#adc4545c6344cfb9b1bbf3c8596e2e78b">00793</a> std::vector&lt;curve&lt;dataType&gt;*&gt; <a class="code" href="classcommonEW.html#adc4545c6344cfb9b1bbf3c8596e2e78b">curves</a>;
  881. <a name="l00794"></a>00794
  882. <a name="l00795"></a><a class="code" href="classcommonEW.html#ad20a68921c019d7aa5f997ab6b9c5784">00795</a> <a class="code" href="classcommonEW.html#ad20a68921c019d7aa5f997ab6b9c5784">commonEW</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> sz=0) : <a class="code" href="classcommonEW.html#adc4545c6344cfb9b1bbf3c8596e2e78b">curves</a>(sz,NULL)
  883. <a name="l00796"></a>00796 {}
  884. <a name="l00797"></a>00797
  885. <a name="l00798"></a><a class="code" href="classcommonEW.html#a309717dcd7ec6fc729f31defebfa3dda">00798</a> <a class="code" href="classcommonEW.html#ad20a68921c019d7aa5f997ab6b9c5784">commonEW</a>(<span class="keyword">const</span> <a class="code" href="classcommonEW.html">commonEW&lt;dataType&gt;</a>&amp; asg) : <a class="code" href="classcommonEW.html#adc4545c6344cfb9b1bbf3c8596e2e78b">curves</a>(asg.size(),NULL)
  886. <a name="l00799"></a>00799 {
  887. <a name="l00800"></a>00800 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;<a class="code" href="classcommonEW.html#adc4545c6344cfb9b1bbf3c8596e2e78b">curves</a>.size();i++)
  888. <a name="l00801"></a>00801 this-&gt;<a class="code" href="classcommonEW.html#adc4545c6344cfb9b1bbf3c8596e2e78b">curves</a>[i]=asg.<a class="code" href="classcommonEW.html#adc4545c6344cfb9b1bbf3c8596e2e78b">curves</a>[i];
  889. <a name="l00802"></a>00802 }
  890. <a name="l00803"></a>00803
  891. <a name="l00804"></a><a class="code" href="classcommonEW.html#a202b477f608477365b1e9fe58d72d2e7">00804</a> <a class="code" href="classcommonEW.html#a202b477f608477365b1e9fe58d72d2e7">~commonEW</a>()
  892. <a name="l00805"></a>00805 {}
  893. <a name="l00806"></a>00806
  894. <a name="l00807"></a><a class="code" href="classcommonEW.html#af03cb0f988588d34a4fc7243a7dc1b85">00807</a> <a class="code" href="classcommonEW.html">commonEW&lt;dataType&gt;</a>&amp; <a class="code" href="classcommonEW.html#af03cb0f988588d34a4fc7243a7dc1b85">operator=</a>(<span class="keyword">const</span> <a class="code" href="classcommonEW.html">commonEW&lt;dataType&gt;</a>&amp; asg)
  895. <a name="l00808"></a>00808 {
  896. <a name="l00809"></a>00809 this-&gt;<a class="code" href="classcommonEW.html#adc4545c6344cfb9b1bbf3c8596e2e78b">curves</a>.resize(asg.size());
  897. <a name="l00810"></a>00810 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;<a class="code" href="classcommonEW.html#adc4545c6344cfb9b1bbf3c8596e2e78b">curves</a>.size();i++)
  898. <a name="l00811"></a>00811 this-&gt;<a class="code" href="classcommonEW.html#adc4545c6344cfb9b1bbf3c8596e2e78b">curves</a>[i]=asg.<a class="code" href="classcommonEW.html#adc4545c6344cfb9b1bbf3c8596e2e78b">curves</a>[i];
  899. <a name="l00812"></a>00812 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  900. <a name="l00813"></a>00813 }
  901. <a name="l00814"></a>00814 };
  902. <a name="l00815"></a>00815
  903. <a name="l00816"></a>00816 <span class="comment">// this is the number of internal points that are used in the mesh along a curve. This data is common to all adjacent blocks</span>
  904. <a name="l00817"></a><a class="code" href="classcommonNS.html">00817</a> <span class="keyword">class </span><a class="code" href="classcommonNS.html">commonNS</a>
  905. <a name="l00818"></a>00818 {
  906. <a name="l00819"></a>00819 <span class="keyword">public</span>:
  907. <a name="l00820"></a>00820
  908. <a name="l00821"></a>00821 <span class="comment">// the number of internal points</span>
  909. <a name="l00822"></a><a class="code" href="classcommonNS.html#ac9d4698595b8ac865f4d0da1f9dacc2a">00822</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classcommonNS.html#ac9d4698595b8ac865f4d0da1f9dacc2a">nInt</a>;
  910. <a name="l00823"></a>00823
  911. <a name="l00824"></a><a class="code" href="classcommonNS.html#a93c70a42970016d6a6ac31ef406ae2ba">00824</a> <a class="code" href="classcommonNS.html#a93c70a42970016d6a6ac31ef406ae2ba">commonNS</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> nInt_in=0) : <a class="code" href="classcommonNS.html#ac9d4698595b8ac865f4d0da1f9dacc2a">nInt</a>(nInt_in)
  912. <a name="l00825"></a>00825 {}
  913. <a name="l00826"></a>00826
  914. <a name="l00827"></a><a class="code" href="classcommonNS.html#aef55920512347b77a6cddf6dbb6489e0">00827</a> <a class="code" href="classcommonNS.html#a93c70a42970016d6a6ac31ef406ae2ba">commonNS</a>(<span class="keyword">const</span> <a class="code" href="classcommonNS.html">commonNS</a>&amp; asg) : <a class="code" href="classcommonNS.html#ac9d4698595b8ac865f4d0da1f9dacc2a">nInt</a>(asg.<a class="code" href="classcommonNS.html#ac9d4698595b8ac865f4d0da1f9dacc2a">nInt</a>)
  915. <a name="l00828"></a>00828 {}
  916. <a name="l00829"></a>00829
  917. <a name="l00830"></a><a class="code" href="classcommonNS.html#ab69f25879e2b613f4ed3fd9af4aec3be">00830</a> <a class="code" href="classcommonNS.html#ab69f25879e2b613f4ed3fd9af4aec3be">~commonNS</a>()
  918. <a name="l00831"></a>00831 {}
  919. <a name="l00832"></a>00832
  920. <a name="l00833"></a><a class="code" href="classcommonNS.html#abba08fee37012d8f8386f101c0de981d">00833</a> <a class="code" href="classcommonNS.html">commonNS</a>&amp; <a class="code" href="classcommonNS.html#abba08fee37012d8f8386f101c0de981d">operator=</a>(<span class="keyword">const</span> <a class="code" href="classcommonNS.html">commonNS</a>&amp; asg)
  921. <a name="l00834"></a>00834 {
  922. <a name="l00835"></a>00835 this-&gt;<a class="code" href="classcommonNS.html#ac9d4698595b8ac865f4d0da1f9dacc2a">nInt</a>=asg.<a class="code" href="classcommonNS.html#ac9d4698595b8ac865f4d0da1f9dacc2a">nInt</a>;
  923. <a name="l00836"></a>00836 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  924. <a name="l00837"></a>00837 }
  925. <a name="l00838"></a>00838 };
  926. <a name="l00839"></a>00839
  927. <a name="l00840"></a>00840 <span class="comment">// at an intersect between two blocks connected at a curve, this defines the start and end of the interface.</span>
  928. <a name="l00841"></a>00841 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  929. <a name="l00842"></a><a class="code" href="classcommonPoint.html">00842</a> <span class="keyword">class </span><a class="code" href="classcommonPoint.html">commonPoint</a>
  930. <a name="l00843"></a>00843 {
  931. <a name="l00844"></a>00844 <span class="keyword">public</span>:
  932. <a name="l00845"></a>00845
  933. <a name="l00846"></a><a class="code" href="classcommonPoint.html#ab91ab26b198fcf48c3cb581cb397ab16">00846</a> <span class="keyword">virtual</span> <a class="code" href="classcommonPoint.html#ab91ab26b198fcf48c3cb581cb397ab16">~commonPoint</a>()
  934. <a name="l00847"></a>00847 {}
  935. <a name="l00848"></a>00848
  936. <a name="l00849"></a>00849 <span class="keyword">virtual</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <span class="keyword">get</span>() <span class="keyword">const</span>=0;
  937. <a name="l00850"></a>00850 };
  938. <a name="l00851"></a>00851
  939. <a name="l00852"></a>00852 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  940. <a name="l00853"></a><a class="code" href="classcommonPoint__Data.html">00853</a> <span class="keyword">class </span><a class="code" href="classcommonPoint__Data.html">commonPoint_Data</a> : <span class="keyword">public</span> <a class="code" href="classcommonPoint.html">commonPoint</a>&lt;dataType&gt;
  941. <a name="l00854"></a>00854 {
  942. <a name="l00855"></a>00855 <span class="keyword">public</span>:
  943. <a name="l00856"></a>00856
  944. <a name="l00857"></a><a class="code" href="classcommonPoint__Data.html#a29773035d7b102059354220827b49951">00857</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcommonPoint__Data.html#a29773035d7b102059354220827b49951">s</a>;
  945. <a name="l00858"></a>00858
  946. <a name="l00859"></a><a class="code" href="classcommonPoint__Data.html#a925f77e28a7790890109b6b715e2d9a1">00859</a> <a class="code" href="classcommonPoint__Data.html#a925f77e28a7790890109b6b715e2d9a1">commonPoint_Data</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s_in=0.0) : s(s_in)
  947. <a name="l00860"></a>00860 {}
  948. <a name="l00861"></a>00861
  949. <a name="l00862"></a><a class="code" href="classcommonPoint__Data.html#a2a8809c6135e76a82ebb98ebce78e227">00862</a> <a class="code" href="classcommonPoint__Data.html#a925f77e28a7790890109b6b715e2d9a1">commonPoint_Data</a>(<span class="keyword">const</span> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a>&amp; asg) : s(asg.s)
  950. <a name="l00863"></a>00863 {}
  951. <a name="l00864"></a>00864
  952. <a name="l00865"></a><a class="code" href="classcommonPoint__Data.html#a9e48e76dcbf49f32564b4e7162d8e76f">00865</a> <span class="keyword">virtual</span> <a class="code" href="classcommonPoint__Data.html#a9e48e76dcbf49f32564b4e7162d8e76f">~commonPoint_Data</a>()
  953. <a name="l00866"></a>00866 {}
  954. <a name="l00867"></a>00867
  955. <a name="l00868"></a><a class="code" href="classcommonPoint__Data.html#a06dad9d1fc48cfb8b976211de88d49b5">00868</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a>&amp; <a class="code" href="classcommonPoint__Data.html#a06dad9d1fc48cfb8b976211de88d49b5">operator=</a>(<span class="keyword">const</span> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a>&amp; asg)
  956. <a name="l00869"></a>00869 {
  957. <a name="l00870"></a>00870 this-&gt;s=asg.<a class="code" href="classcommonPoint__Data.html#a29773035d7b102059354220827b49951">s</a>;
  958. <a name="l00871"></a>00871 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  959. <a name="l00872"></a>00872 }
  960. <a name="l00873"></a>00873
  961. <a name="l00874"></a><a class="code" href="classcommonPoint__Data.html#ab2aa698d86f55d29f1026b310040b27f">00874</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <span class="keyword">get</span>() <span class="keyword">const</span>
  962. <a name="l00875"></a>00875 {
  963. <a name="l00876"></a>00876 <span class="keywordflow">return</span> <a class="code" href="classcommonPoint__Data.html#a29773035d7b102059354220827b49951">s</a>;
  964. <a name="l00877"></a>00877 }
  965. <a name="l00878"></a>00878 };
  966. <a name="l00879"></a>00879
  967. <a name="l00880"></a>00880 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  968. <a name="l00881"></a><a class="code" href="classcommonPoint__Wrap.html">00881</a> <span class="keyword">class </span><a class="code" href="classcommonPoint__Wrap.html">commonPoint_Wrap</a> : <span class="keyword">public</span> <a class="code" href="classcommonPoint.html">commonPoint</a>&lt;dataType&gt;
  969. <a name="l00882"></a>00882 {
  970. <a name="l00883"></a>00883 <span class="keyword">public</span>:
  971. <a name="l00884"></a>00884
  972. <a name="l00885"></a><a class="code" href="classcommonPoint__Wrap.html#acc03cbaa8c4318bcf79225cbb9961aae">00885</a> <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* <a class="code" href="classcommonPoint__Wrap.html#acc03cbaa8c4318bcf79225cbb9961aae">pnt</a>;
  973. <a name="l00886"></a>00886
  974. <a name="l00887"></a><a class="code" href="classcommonPoint__Wrap.html#adda885cf958503f26cb23d9457577268">00887</a> <a class="code" href="classcommonPoint__Wrap.html#adda885cf958503f26cb23d9457577268">commonPoint_Wrap</a>(<a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* pnt_in=NULL) : <a class="code" href="classcommonPoint__Wrap.html#acc03cbaa8c4318bcf79225cbb9961aae">pnt</a>(pnt_in)
  975. <a name="l00888"></a>00888 {}
  976. <a name="l00889"></a>00889
  977. <a name="l00890"></a><a class="code" href="classcommonPoint__Wrap.html#acea0335602053b308499d5e6000a96ad">00890</a> <a class="code" href="classcommonPoint__Wrap.html#adda885cf958503f26cb23d9457577268">commonPoint_Wrap</a>(<span class="keyword">const</span> <a class="code" href="classcommonPoint__Wrap.html">commonPoint_Wrap&lt;dataType&gt;</a>&amp; asg) : <a class="code" href="classcommonPoint__Wrap.html#acc03cbaa8c4318bcf79225cbb9961aae">pnt</a>(asg.<a class="code" href="classcommonPoint__Wrap.html#acc03cbaa8c4318bcf79225cbb9961aae">pnt</a>)
  978. <a name="l00891"></a>00891 {}
  979. <a name="l00892"></a>00892
  980. <a name="l00893"></a><a class="code" href="classcommonPoint__Wrap.html#a9fb008642b046641698aae452510b7e3">00893</a> <span class="keyword">virtual</span> <a class="code" href="classcommonPoint__Wrap.html#a9fb008642b046641698aae452510b7e3">~commonPoint_Wrap</a>()
  981. <a name="l00894"></a>00894 {}
  982. <a name="l00895"></a>00895
  983. <a name="l00896"></a><a class="code" href="classcommonPoint__Wrap.html#a895da31cd7f73fa8a5b1c1fbc1f05dbc">00896</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <span class="keyword">get</span>() <span class="keyword">const</span>
  984. <a name="l00897"></a>00897 {
  985. <a name="l00898"></a>00898 <span class="keywordflow">if</span>(<a class="code" href="classcommonPoint__Wrap.html#acc03cbaa8c4318bcf79225cbb9961aae">pnt</a>==NULL)
  986. <a name="l00899"></a>00899 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;commonPoint_wrap::get(): The pointer has not been set&quot;</span>);
  987. <a name="l00900"></a>00900 <span class="keywordflow">return</span> <a class="code" href="classcommonPoint__Wrap.html#acc03cbaa8c4318bcf79225cbb9961aae">pnt</a>-&gt;get()+1.0;
  988. <a name="l00901"></a>00901 }
  989. <a name="l00902"></a>00902 };
  990. <a name="l00903"></a>00903
  991. <a name="l00904"></a>00904 <span class="comment">// there is a version that is bound by two curves... but contains several intermediate curves</span>
  992. <a name="l00905"></a>00905 <span class="comment">// the ends of the box are defined by two lines between the top and bottom...</span>
  993. <a name="l00906"></a>00906 <span class="comment">// then we define a set of cross lines evenly spaced</span>
  994. <a name="l00907"></a>00907
  995. <a name="l00908"></a>00908 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  996. <a name="l00909"></a><a class="code" href="classbox__basic.html">00909</a> <span class="keyword">class </span><a class="code" href="classbox__basic.html">box_basic</a> : <span class="keyword">public</span> <a class="code" href="classbox.html">box</a>&lt;dataType&gt;
  997. <a name="l00910"></a>00910 {
  998. <a name="l00911"></a>00911 <span class="keyword">public</span>:
  999. <a name="l00912"></a>00912
  1000. <a name="l00913"></a><a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">00913</a> <a class="code" href="classcommonEW.html">commonEW&lt;dataType&gt;</a>* <a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>;
  1001. <a name="l00914"></a><a class="code" href="classbox__basic.html#a70a902aaeccf1152fc8270aa34007e9e">00914</a> <a class="code" href="classcommonNS.html">commonNS</a>* <a class="code" href="classbox__basic.html#a70a902aaeccf1152fc8270aa34007e9e">ns</a>;
  1002. <a name="l00915"></a><a class="code" href="classbox__basic.html#a2dd0ad1a73fbaea8308aff4b72e3a3bd">00915</a> <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* <a class="code" href="classbox__basic.html#a2dd0ad1a73fbaea8308aff4b72e3a3bd">ne</a>;
  1003. <a name="l00916"></a><a class="code" href="classbox__basic.html#aae0196c6e8261e7f6af27ffba12dee4c">00916</a> <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* <a class="code" href="classbox__basic.html#aae0196c6e8261e7f6af27ffba12dee4c">nw</a>;
  1004. <a name="l00917"></a><a class="code" href="classbox__basic.html#af590f7b16d9d22ab2ef3066231cdfa3f">00917</a> <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* <a class="code" href="classbox__basic.html#af590f7b16d9d22ab2ef3066231cdfa3f">sw</a>;
  1005. <a name="l00918"></a><a class="code" href="classbox__basic.html#a6fd6cad54fbd2bc1d0729da620b0633d">00918</a> <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* <a class="code" href="classbox__basic.html#a6fd6cad54fbd2bc1d0729da620b0633d">se</a>;
  1006. <a name="l00919"></a>00919
  1007. <a name="l00920"></a><a class="code" href="classbox__basic.html#a68fe81fc153b69046a5194f15fe35b29">00920</a> <a class="code" href="classbox__basic.html#a68fe81fc153b69046a5194f15fe35b29">box_basic</a>(
  1008. <a name="l00921"></a>00921 <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* material_in=NULL,
  1009. <a name="l00922"></a>00922 <a class="code" href="classcommonEW.html">commonEW&lt;dataType&gt;</a>* ew_in=NULL,
  1010. <a name="l00923"></a>00923 <a class="code" href="classcommonNS.html">commonNS</a>* ns_in=NULL,
  1011. <a name="l00924"></a>00924 <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* ne_in=NULL,
  1012. <a name="l00925"></a>00925 <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* nw_in=NULL,
  1013. <a name="l00926"></a>00926 <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* sw_in=NULL,
  1014. <a name="l00927"></a>00927 <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* se_in=NULL)
  1015. <a name="l00928"></a>00928 : <a class="code" href="classbox.html">box</a>&lt;<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&gt;(material_in)
  1016. <a name="l00929"></a>00929 , <a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>(ew_in) , <a class="code" href="classbox__basic.html#a70a902aaeccf1152fc8270aa34007e9e">ns</a>(ns_in) , <a class="code" href="classbox__basic.html#a2dd0ad1a73fbaea8308aff4b72e3a3bd">ne</a>(ne_in)
  1017. <a name="l00930"></a>00930 , <a class="code" href="classbox__basic.html#aae0196c6e8261e7f6af27ffba12dee4c">nw</a>(nw_in) , <a class="code" href="classbox__basic.html#af590f7b16d9d22ab2ef3066231cdfa3f">sw</a>(sw_in) , <a class="code" href="classbox__basic.html#a6fd6cad54fbd2bc1d0729da620b0633d">se</a>(se_in)
  1018. <a name="l00931"></a>00931 {}
  1019. <a name="l00932"></a>00932
  1020. <a name="l00933"></a><a class="code" href="classbox__basic.html#ac59822d4e1c7a2f6cc3efa0725abe636">00933</a> <a class="code" href="classbox__basic.html#a68fe81fc153b69046a5194f15fe35b29">box_basic</a>(<span class="keyword">const</span> <a class="code" href="classbox__basic.html">box_basic&lt;dataType&gt;</a>&amp; asg)
  1021. <a name="l00934"></a>00934 : <a class="code" href="classbox.html">box</a>&lt;<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&gt;(asg.<a class="code" href="classbox.html#ad0f62fd2ce6d906916515fb0a78a1d8a">material</a>)
  1022. <a name="l00935"></a>00935 , <a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>(asg.<a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>) , <a class="code" href="classbox__basic.html#a70a902aaeccf1152fc8270aa34007e9e">ns</a>(asg.<a class="code" href="classbox__basic.html#a70a902aaeccf1152fc8270aa34007e9e">ns</a>) , <a class="code" href="classbox__basic.html#a2dd0ad1a73fbaea8308aff4b72e3a3bd">ne</a>(asg.<a class="code" href="classbox__basic.html#a2dd0ad1a73fbaea8308aff4b72e3a3bd">ne</a>)
  1023. <a name="l00936"></a>00936 , <a class="code" href="classbox__basic.html#aae0196c6e8261e7f6af27ffba12dee4c">nw</a>(asg.<a class="code" href="classbox__basic.html#aae0196c6e8261e7f6af27ffba12dee4c">nw</a>) , <a class="code" href="classbox__basic.html#af590f7b16d9d22ab2ef3066231cdfa3f">sw</a>(asg.<a class="code" href="classbox__basic.html#af590f7b16d9d22ab2ef3066231cdfa3f">sw</a>) , <a class="code" href="classbox__basic.html#a6fd6cad54fbd2bc1d0729da620b0633d">se</a>(asg.<a class="code" href="classbox__basic.html#a6fd6cad54fbd2bc1d0729da620b0633d">se</a>)
  1024. <a name="l00937"></a>00937 {}
  1025. <a name="l00938"></a>00938
  1026. <a name="l00939"></a><a class="code" href="classbox__basic.html#a27239b610aa25e549d43140862b84e65">00939</a> <span class="keyword">virtual</span> <a class="code" href="classbox__basic.html#a27239b610aa25e549d43140862b84e65">~box_basic</a>()
  1027. <a name="l00940"></a>00940 {}
  1028. <a name="l00941"></a>00941
  1029. <a name="l00942"></a><a class="code" href="classbox__basic.html#aa6eb5a2e2e14589078d0adf617828958">00942</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a> <a class="code" href="classbox__basic.html#aa6eb5a2e2e14589078d0adf617828958">getMesh</a>()<span class="keyword"> const</span>
  1030. <a name="l00943"></a>00943 <span class="keyword"> </span>{
  1031. <a name="l00944"></a>00944 <span class="keywordflow">if</span>(<a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>==NULL || <a class="code" href="classbox__basic.html#a70a902aaeccf1152fc8270aa34007e9e">ns</a>==NULL || <a class="code" href="classbox__basic.html#a2dd0ad1a73fbaea8308aff4b72e3a3bd">ne</a>==NULL || <a class="code" href="classbox__basic.html#aae0196c6e8261e7f6af27ffba12dee4c">nw</a>==NULL || <a class="code" href="classbox__basic.html#af590f7b16d9d22ab2ef3066231cdfa3f">sw</a>==NULL || <a class="code" href="classbox__basic.html#a6fd6cad54fbd2bc1d0729da620b0633d">se</a>==NULL)
  1032. <a name="l00945"></a>00945 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;box_basic&lt;&gt;::getMesh(): the box information has not been defined&quot;</span>);
  1033. <a name="l00946"></a>00946
  1034. <a name="l00947"></a>00947 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> x=<a class="code" href="classbox__basic.html#a70a902aaeccf1152fc8270aa34007e9e">ns</a>-&gt;<a class="code" href="classcommonNS.html#ac9d4698595b8ac865f4d0da1f9dacc2a">nInt</a>;
  1035. <a name="l00948"></a>00948 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> y=<a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>-&gt;curves.size();
  1036. <a name="l00949"></a>00949 <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a> retVal((x+1)*(y-1)+y+x+1,(x+1)*(y-1));
  1037. <a name="l00950"></a>00950
  1038. <a name="l00951"></a>00951 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;(x+2);i++)
  1039. <a name="l00952"></a>00952 {
  1040. <a name="l00953"></a>00953 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> atS=<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>;
  1041. <a name="l00954"></a>00954 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> div=x+1;
  1042. <a name="l00955"></a>00955 atS/=div;
  1043. <a name="l00956"></a>00956 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> start=<a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>-&gt;curves[0]-&gt;getPosition(<a class="code" href="classbox__basic.html#a2dd0ad1a73fbaea8308aff4b72e3a3bd">ne</a>-&gt;get()*(1.0-atS)+<a class="code" href="classbox__basic.html#aae0196c6e8261e7f6af27ffba12dee4c">nw</a>-&gt;get()*atS);
  1044. <a name="l00957"></a>00957 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> end=<a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>-&gt;curves[<a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>-&gt;curves.size()-1]-&gt;getPosition(<a class="code" href="classbox__basic.html#a6fd6cad54fbd2bc1d0729da620b0633d">se</a>-&gt;get()*(1.0-atS)+<a class="code" href="classbox__basic.html#af590f7b16d9d22ab2ef3066231cdfa3f">sw</a>-&gt;get()*atS);
  1045. <a name="l00958"></a>00958 <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a> <a class="code" href="vector_01functions_8cpp.html#a0881962290c575e179efea1532ba31fa">cross</a>(start,end-start);
  1046. <a name="l00959"></a>00959 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;y;j++)
  1047. <a name="l00960"></a>00960 {
  1048. <a name="l00961"></a>00961 <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> data;
  1049. <a name="l00962"></a>00962 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> atH=j;
  1050. <a name="l00963"></a>00963 div=y-1;
  1051. <a name="l00964"></a>00964 atH/=div;
  1052. <a name="l00965"></a>00965
  1053. <a name="l00966"></a>00966 <span class="comment">// this may seem redundant but it was done out of paranoya.</span>
  1054. <a name="l00967"></a>00967 <span class="comment">// I wanted to make sure that all corner node locations were found with the same logic</span>
  1055. <a name="l00968"></a>00968 <span class="keywordflow">if</span>( j==0 || j==(y-1) )
  1056. <a name="l00969"></a>00969 {
  1057. <a name="l00970"></a>00970 <span class="keywordflow">if</span>(i==0)
  1058. <a name="l00971"></a>00971 {
  1059. <a name="l00972"></a>00972 <span class="keywordflow">if</span>(j==0)
  1060. <a name="l00973"></a>00973 {
  1061. <a name="l00974"></a>00974 data=<a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>-&gt;curves[j]-&gt;getPointData(<a class="code" href="classbox__basic.html#a2dd0ad1a73fbaea8308aff4b72e3a3bd">ne</a>-&gt;get());
  1062. <a name="l00975"></a>00975 }
  1063. <a name="l00976"></a>00976 <span class="keywordflow">else</span>
  1064. <a name="l00977"></a>00977 {
  1065. <a name="l00978"></a>00978 data=<a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>-&gt;curves[j]-&gt;getPointData(<a class="code" href="classbox__basic.html#a6fd6cad54fbd2bc1d0729da620b0633d">se</a>-&gt;get());
  1066. <a name="l00979"></a>00979 }
  1067. <a name="l00980"></a>00980 }
  1068. <a name="l00981"></a>00981 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(i==(x+1))
  1069. <a name="l00982"></a>00982 {
  1070. <a name="l00983"></a>00983 <span class="keywordflow">if</span>(j==0)
  1071. <a name="l00984"></a>00984 {
  1072. <a name="l00985"></a>00985 data=<a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>-&gt;curves[j]-&gt;getPointData(<a class="code" href="classbox__basic.html#aae0196c6e8261e7f6af27ffba12dee4c">nw</a>-&gt;get());
  1073. <a name="l00986"></a>00986 }
  1074. <a name="l00987"></a>00987 <span class="keywordflow">else</span>
  1075. <a name="l00988"></a>00988 {
  1076. <a name="l00989"></a>00989 data=<a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>-&gt;curves[j]-&gt;getPointData(<a class="code" href="classbox__basic.html#af590f7b16d9d22ab2ef3066231cdfa3f">sw</a>-&gt;get());
  1077. <a name="l00990"></a>00990 }
  1078. <a name="l00991"></a>00991 }
  1079. <a name="l00992"></a>00992 <span class="keywordflow">else</span>
  1080. <a name="l00993"></a>00993 {
  1081. <a name="l00994"></a>00994 <span class="keywordflow">if</span>(j==0)
  1082. <a name="l00995"></a>00995 {
  1083. <a name="l00996"></a>00996 data=start;
  1084. <a name="l00997"></a>00997 }
  1085. <a name="l00998"></a>00998 <span class="keywordflow">else</span>
  1086. <a name="l00999"></a>00999 {
  1087. <a name="l01000"></a>01000 data=end;
  1088. <a name="l01001"></a>01001 }
  1089. <a name="l01002"></a>01002 }
  1090. <a name="l01003"></a>01003 }
  1091. <a name="l01004"></a>01004 <span class="keywordflow">else</span>
  1092. <a name="l01005"></a>01005 {
  1093. <a name="l01006"></a>01006 data=<a class="code" href="classbox__basic.html#ace4a55c64b484a8725a242a796344233">ew</a>-&gt;curves[j]-&gt;intersectAverageData(cross);
  1094. <a name="l01007"></a>01007 }
  1095. <a name="l01008"></a>01008 retVal.<a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">getNode</a>(i*y+j)=<a class="code" href="classcxNode.html">cxNode&lt;dataType&gt;</a>(data.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>,data.<a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>,atH);
  1096. <a name="l01009"></a>01009 }
  1097. <a name="l01010"></a>01010 }
  1098. <a name="l01011"></a>01011 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;(x+1);i++)
  1099. <a name="l01012"></a>01012 {
  1100. <a name="l01013"></a>01013 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;(y-1);j++)
  1101. <a name="l01014"></a>01014 {
  1102. <a name="l01015"></a>01015 retVal.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i*(y-1)+j).nodeHndl[0]=<a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>(i*y+j,0);
  1103. <a name="l01016"></a>01016 retVal.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i*(y-1)+j).nodeHndl[1]=<a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>((i+1)*y+j,0);
  1104. <a name="l01017"></a>01017 retVal.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i*(y-1)+j).nodeHndl[2]=<a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>((i+1)*y+j+1,0);
  1105. <a name="l01018"></a>01018 retVal.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i*(y-1)+j).nodeHndl[3]=<a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>(i*y+j+1,0);
  1106. <a name="l01019"></a>01019 retVal.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i*(y-1)+j).material=this-&gt;<a class="code" href="classbox.html#ad0f62fd2ce6d906916515fb0a78a1d8a">material</a>;
  1107. <a name="l01020"></a>01020 }
  1108. <a name="l01021"></a>01021 }
  1109. <a name="l01022"></a>01022
  1110. <a name="l01023"></a>01023 <span class="keywordflow">return</span> retVal;
  1111. <a name="l01024"></a>01024 }
  1112. <a name="l01025"></a>01025 };
  1113. <a name="l01026"></a>01026
  1114. <a name="l01027"></a>01027 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  1115. <a name="l01028"></a><a class="code" href="classbox__web.html">01028</a> <span class="keyword">class </span><a class="code" href="classbox__web.html">box_web</a> : <span class="keyword">public</span> <a class="code" href="classbox.html">box</a>&lt;dataType&gt;
  1116. <a name="l01029"></a>01029 {
  1117. <a name="l01030"></a>01030 <span class="keyword">public</span>:
  1118. <a name="l01031"></a>01031
  1119. <a name="l01032"></a><a class="code" href="classbox__web.html#a09bc36178d67732c16a4cd236f09d610">01032</a> <a class="code" href="classcurve.html">curve&lt;dataType&gt;</a>* <a class="code" href="classbox__web.html#a09bc36178d67732c16a4cd236f09d610">top</a>;
  1120. <a name="l01033"></a><a class="code" href="classbox__web.html#a051c91da1484cd7bfb6e9d64da0632d3">01033</a> <a class="code" href="classcurve.html">curve&lt;dataType&gt;</a>* <a class="code" href="classbox__web.html#a051c91da1484cd7bfb6e9d64da0632d3">bot</a>;
  1121. <a name="l01034"></a><a class="code" href="classbox__web.html#aaff111fb51525ba8b338292cec27a53a">01034</a> <a class="code" href="classcommonNS.html">commonNS</a>* <a class="code" href="classbox__web.html#aaff111fb51525ba8b338292cec27a53a">ns</a>;
  1122. <a name="l01035"></a><a class="code" href="classbox__web.html#a94f05a785d2139a95d4b78a9eb925bc2">01035</a> <a class="code" href="classcommonNS.html">commonNS</a>* <a class="code" href="classbox__web.html#a94f05a785d2139a95d4b78a9eb925bc2">ew</a>;
  1123. <a name="l01036"></a><a class="code" href="classbox__web.html#aaa0af379696867b7163bf00d13ee95a8">01036</a> <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* <a class="code" href="classbox__web.html#aaa0af379696867b7163bf00d13ee95a8">ne</a>;
  1124. <a name="l01037"></a><a class="code" href="classbox__web.html#a28367abd07a991d7d7b0c16969a3d16e">01037</a> <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* <a class="code" href="classbox__web.html#a28367abd07a991d7d7b0c16969a3d16e">nw</a>;
  1125. <a name="l01038"></a><a class="code" href="classbox__web.html#a188a69d68d8e0096baf254002bfaf023">01038</a> <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* <a class="code" href="classbox__web.html#a188a69d68d8e0096baf254002bfaf023">sw</a>;
  1126. <a name="l01039"></a><a class="code" href="classbox__web.html#a65b8afae0c1be1c5893a8e4487d06f72">01039</a> <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* <a class="code" href="classbox__web.html#a65b8afae0c1be1c5893a8e4487d06f72">se</a>;
  1127. <a name="l01040"></a>01040
  1128. <a name="l01041"></a><a class="code" href="classbox__web.html#a8bd13fa8bdc7fea5bb9a2e2b53147cec">01041</a> <a class="code" href="classbox__web.html#a8bd13fa8bdc7fea5bb9a2e2b53147cec">box_web</a>(
  1129. <a name="l01042"></a>01042 <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* material_in=NULL
  1130. <a name="l01043"></a>01043 , <a class="code" href="classcurve.html">curve&lt;dataType&gt;</a>* top_in=NULL
  1131. <a name="l01044"></a>01044 , <a class="code" href="classcurve.html">curve&lt;dataType&gt;</a>* bot_in=NULL
  1132. <a name="l01045"></a>01045 , <a class="code" href="classcommonNS.html">commonNS</a>* ns_in=NULL
  1133. <a name="l01046"></a>01046 , <a class="code" href="classcommonNS.html">commonNS</a>* ew_in=NULL
  1134. <a name="l01047"></a>01047 , <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* ne_in=NULL
  1135. <a name="l01048"></a>01048 , <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* nw_in=NULL
  1136. <a name="l01049"></a>01049 , <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* sw_in=NULL
  1137. <a name="l01050"></a>01050 , <a class="code" href="classcommonPoint.html">commonPoint&lt;dataType&gt;</a>* se_in=NULL)
  1138. <a name="l01051"></a>01051 : <a class="code" href="classbox.html">box</a>&lt;<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&gt;(material_in)
  1139. <a name="l01052"></a>01052 , <a class="code" href="classbox__web.html#a09bc36178d67732c16a4cd236f09d610">top</a>(top_in) , <a class="code" href="classbox__web.html#a051c91da1484cd7bfb6e9d64da0632d3">bot</a>(bot_in) , <a class="code" href="classbox__web.html#aaff111fb51525ba8b338292cec27a53a">ns</a>(ns_in) , <a class="code" href="classbox__web.html#a94f05a785d2139a95d4b78a9eb925bc2">ew</a>(ew_in)
  1140. <a name="l01053"></a>01053 , <a class="code" href="classbox__web.html#aaa0af379696867b7163bf00d13ee95a8">ne</a>(ne_in) , <a class="code" href="classbox__web.html#a28367abd07a991d7d7b0c16969a3d16e">nw</a>(nw_in) , <a class="code" href="classbox__web.html#a188a69d68d8e0096baf254002bfaf023">sw</a>(sw_in) , <a class="code" href="classbox__web.html#a65b8afae0c1be1c5893a8e4487d06f72">se</a>(se_in)
  1141. <a name="l01054"></a>01054 {}
  1142. <a name="l01055"></a>01055
  1143. <a name="l01056"></a><a class="code" href="classbox__web.html#ac0ae7d11bb5a090ee9a72d30d7ee663d">01056</a> <a class="code" href="classbox__web.html#a8bd13fa8bdc7fea5bb9a2e2b53147cec">box_web</a>(<span class="keyword">const</span> <a class="code" href="classbox__web.html">box_web&lt;dataType&gt;</a>&amp; asg)
  1144. <a name="l01057"></a>01057 : <a class="code" href="classbox.html">box</a>&lt;<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&gt;(asg.<a class="code" href="classbox.html#ad0f62fd2ce6d906916515fb0a78a1d8a">material</a>)
  1145. <a name="l01058"></a>01058 , <a class="code" href="classbox__web.html#a09bc36178d67732c16a4cd236f09d610">top</a>(asg.<a class="code" href="classbox__web.html#a09bc36178d67732c16a4cd236f09d610">top</a>) , <a class="code" href="classbox__web.html#a051c91da1484cd7bfb6e9d64da0632d3">bot</a>(asg.<a class="code" href="classbox__web.html#a051c91da1484cd7bfb6e9d64da0632d3">bot</a>) , <a class="code" href="classbox__web.html#aaff111fb51525ba8b338292cec27a53a">ns</a>(asg.<a class="code" href="classbox__web.html#aaff111fb51525ba8b338292cec27a53a">ns</a>) , <a class="code" href="classbox__web.html#a94f05a785d2139a95d4b78a9eb925bc2">ew</a>(asg.<a class="code" href="classbox__web.html#a94f05a785d2139a95d4b78a9eb925bc2">ew</a>)
  1146. <a name="l01059"></a>01059 , <a class="code" href="classbox__web.html#aaa0af379696867b7163bf00d13ee95a8">ne</a>(asg.<a class="code" href="classbox__web.html#aaa0af379696867b7163bf00d13ee95a8">ne</a>) , <a class="code" href="classbox__web.html#a28367abd07a991d7d7b0c16969a3d16e">nw</a>(asg.<a class="code" href="classbox__web.html#a28367abd07a991d7d7b0c16969a3d16e">nw</a>) , <a class="code" href="classbox__web.html#a188a69d68d8e0096baf254002bfaf023">sw</a>(asg.<a class="code" href="classbox__web.html#a188a69d68d8e0096baf254002bfaf023">sw</a>) , <a class="code" href="classbox__web.html#a65b8afae0c1be1c5893a8e4487d06f72">se</a>(asg.<a class="code" href="classbox__web.html#a65b8afae0c1be1c5893a8e4487d06f72">se</a>)
  1147. <a name="l01060"></a>01060 {}
  1148. <a name="l01061"></a>01061
  1149. <a name="l01062"></a><a class="code" href="classbox__web.html#ac7fc42e97b2f6e64d0ccfb44ad886b11">01062</a> <span class="keyword">virtual</span> <a class="code" href="classbox__web.html#ac7fc42e97b2f6e64d0ccfb44ad886b11">~box_web</a>()
  1150. <a name="l01063"></a>01063 {}
  1151. <a name="l01064"></a>01064
  1152. <a name="l01065"></a><a class="code" href="classbox__web.html#a71e22004952b94d2d7d02674457361e5">01065</a> <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a> <a class="code" href="classbox__web.html#a71e22004952b94d2d7d02674457361e5">getMesh</a>()<span class="keyword"> const</span>
  1153. <a name="l01066"></a>01066 <span class="keyword"> </span>{
  1154. <a name="l01067"></a>01067 <span class="keywordflow">if</span>(<a class="code" href="classbox__web.html#a09bc36178d67732c16a4cd236f09d610">top</a>==NULL || <a class="code" href="classbox__web.html#a051c91da1484cd7bfb6e9d64da0632d3">bot</a>==NULL || <a class="code" href="classbox__web.html#aaff111fb51525ba8b338292cec27a53a">ns</a>==NULL || <a class="code" href="classbox__web.html#a94f05a785d2139a95d4b78a9eb925bc2">ew</a>==NULL || <a class="code" href="classbox__web.html#aaa0af379696867b7163bf00d13ee95a8">ne</a>==NULL || <a class="code" href="classbox__web.html#a28367abd07a991d7d7b0c16969a3d16e">nw</a>==NULL || <a class="code" href="classbox__web.html#a188a69d68d8e0096baf254002bfaf023">sw</a>==NULL || <a class="code" href="classbox__web.html#a65b8afae0c1be1c5893a8e4487d06f72">se</a>==NULL)
  1155. <a name="l01068"></a>01068 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;box_web&lt;&gt;::getMesh(): the box information has not been defined&quot;</span>);
  1156. <a name="l01069"></a>01069
  1157. <a name="l01070"></a>01070 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> x=<a class="code" href="classbox__web.html#aaff111fb51525ba8b338292cec27a53a">ns</a>-&gt;<a class="code" href="classcommonNS.html#ac9d4698595b8ac865f4d0da1f9dacc2a">nInt</a>;
  1158. <a name="l01071"></a>01071 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> y=<a class="code" href="classbox__web.html#a94f05a785d2139a95d4b78a9eb925bc2">ew</a>-&gt;<a class="code" href="classcommonNS.html#ac9d4698595b8ac865f4d0da1f9dacc2a">nInt</a>;
  1159. <a name="l01072"></a>01072 <a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a> retVal((x+2)*(y+2),(x+1)*(y+1));
  1160. <a name="l01073"></a>01073
  1161. <a name="l01074"></a>01074 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;(x+2);i++)
  1162. <a name="l01075"></a>01075 {
  1163. <a name="l01076"></a>01076 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> atH=<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>;
  1164. <a name="l01077"></a>01077 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> div=x+1;
  1165. <a name="l01078"></a>01078 atH/=div;
  1166. <a name="l01079"></a>01079 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> start=<a class="code" href="classbox__web.html#a09bc36178d67732c16a4cd236f09d610">top</a>-&gt;getPosition(<a class="code" href="classbox__web.html#a28367abd07a991d7d7b0c16969a3d16e">nw</a>-&gt;get()*(1.0-atH)+<a class="code" href="classbox__web.html#aaa0af379696867b7163bf00d13ee95a8">ne</a>-&gt;get()*atH);
  1167. <a name="l01080"></a>01080 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> end=<a class="code" href="classbox__web.html#a051c91da1484cd7bfb6e9d64da0632d3">bot</a>-&gt;getPosition(<a class="code" href="classbox__web.html#a188a69d68d8e0096baf254002bfaf023">sw</a>-&gt;get()*(1.0-atH)+<a class="code" href="classbox__web.html#a65b8afae0c1be1c5893a8e4487d06f72">se</a>-&gt;get()*atH);
  1168. <a name="l01081"></a>01081 <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a> <a class="code" href="vector_01functions_8cpp.html#a0881962290c575e179efea1532ba31fa">cross</a>(start,end-start);
  1169. <a name="l01082"></a>01082 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;(y+2);j++)
  1170. <a name="l01083"></a>01083 {
  1171. <a name="l01084"></a>01084 <span class="keywordflow">if</span>( (i==0 || i==(x+1)) &amp;&amp; (j==0 || j==(y+1)) )
  1172. <a name="l01085"></a>01085 {
  1173. <a name="l01086"></a>01086 <span class="keywordflow">if</span>(i==0)
  1174. <a name="l01087"></a>01087 {
  1175. <a name="l01088"></a>01088 <span class="keywordflow">if</span>(j==0)
  1176. <a name="l01089"></a>01089 {
  1177. <a name="l01090"></a>01090 retVal.<a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">getNode</a>(i*(y+2)+j)=<a class="code" href="classcxNode.html">cxNode&lt;dataType&gt;</a>(<a class="code" href="classbox__web.html#a09bc36178d67732c16a4cd236f09d610">top</a>-&gt;getPosition(<a class="code" href="classbox__web.html#a28367abd07a991d7d7b0c16969a3d16e">nw</a>-&gt;get()),atan2(cross.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.y,cross.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.x),atH);
  1178. <a name="l01091"></a>01091 }
  1179. <a name="l01092"></a>01092 <span class="keywordflow">else</span>
  1180. <a name="l01093"></a>01093 {
  1181. <a name="l01094"></a>01094 retVal.<a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">getNode</a>(i*(y+2)+j)=<a class="code" href="classcxNode.html">cxNode&lt;dataType&gt;</a>(<a class="code" href="classbox__web.html#a051c91da1484cd7bfb6e9d64da0632d3">bot</a>-&gt;getPosition(<a class="code" href="classbox__web.html#aaa0af379696867b7163bf00d13ee95a8">ne</a>-&gt;get()),atan2(cross.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.y,cross.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.x),atH);
  1182. <a name="l01095"></a>01095 }
  1183. <a name="l01096"></a>01096 }
  1184. <a name="l01097"></a>01097 <span class="keywordflow">else</span>
  1185. <a name="l01098"></a>01098 {
  1186. <a name="l01099"></a>01099 <span class="keywordflow">if</span>(j==0)
  1187. <a name="l01100"></a>01100 {
  1188. <a name="l01101"></a>01101 retVal.<a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">getNode</a>(i*(y+2)+j)=<a class="code" href="classcxNode.html">cxNode&lt;dataType&gt;</a>(<a class="code" href="classbox__web.html#a09bc36178d67732c16a4cd236f09d610">top</a>-&gt;getPosition(<a class="code" href="classbox__web.html#aaa0af379696867b7163bf00d13ee95a8">ne</a>-&gt;get()),atan2(cross.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.y,cross.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.x),atH);
  1189. <a name="l01102"></a>01102 }
  1190. <a name="l01103"></a>01103 <span class="keywordflow">else</span>
  1191. <a name="l01104"></a>01104 {
  1192. <a name="l01105"></a>01105 retVal.<a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">getNode</a>(i*(y+2)+j)=<a class="code" href="classcxNode.html">cxNode&lt;dataType&gt;</a>(<a class="code" href="classbox__web.html#a051c91da1484cd7bfb6e9d64da0632d3">bot</a>-&gt;getPosition(<a class="code" href="classbox__web.html#aaa0af379696867b7163bf00d13ee95a8">ne</a>-&gt;get()),atan2(cross.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.y,cross.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.x),atH);
  1193. <a name="l01106"></a>01106 }
  1194. <a name="l01107"></a>01107 }
  1195. <a name="l01108"></a>01108 }
  1196. <a name="l01109"></a>01109 <span class="keywordflow">else</span>
  1197. <a name="l01110"></a>01110 {
  1198. <a name="l01111"></a>01111 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> atS=j;
  1199. <a name="l01112"></a>01112 div=y+1;
  1200. <a name="l01113"></a>01113 atS/=div;
  1201. <a name="l01114"></a>01114 retVal.<a class="code" href="classmesh.html#abe809fe2c8a3c3a199567206b1645407">getNode</a>(i*(y+2)+j)=<a class="code" href="classcxNode.html">cxNode&lt;dataType&gt;</a>(cross.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(atS),atan2(cross.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.y,cross.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.x),atH);
  1202. <a name="l01115"></a>01115 }
  1203. <a name="l01116"></a>01116 }
  1204. <a name="l01117"></a>01117 }
  1205. <a name="l01118"></a>01118 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;(x+1);i++)
  1206. <a name="l01119"></a>01119 {
  1207. <a name="l01120"></a>01120 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;(y+1);j++)
  1208. <a name="l01121"></a>01121 {
  1209. <a name="l01122"></a>01122 retVal.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i*(y+1)+j).nodeHndl[0]=<a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>(i*(y+2)+j,0);
  1210. <a name="l01123"></a>01123 retVal.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i*(y+1)+j).nodeHndl[1]=<a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>((i+1)*(y+2)+j,0);
  1211. <a name="l01124"></a>01124 retVal.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i*(y+1)+j).nodeHndl[2]=<a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>((i+1)*(y+2)+j+1,0);
  1212. <a name="l01125"></a>01125 retVal.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i*(y+1)+j).nodeHndl[3]=<a class="code" href="classelementNodeHandle.html">elementNodeHandle</a>(i*(y+2)+j+1,0);
  1213. <a name="l01126"></a>01126 retVal.<a class="code" href="classmesh.html#a974bac3c03cec36e2703e2116a89f2c4">getElement</a>(i*(y+1)+j).material=this-&gt;<a class="code" href="classbox.html#ad0f62fd2ce6d906916515fb0a78a1d8a">material</a>;
  1214. <a name="l01127"></a>01127 }
  1215. <a name="l01128"></a>01128 }
  1216. <a name="l01129"></a>01129
  1217. <a name="l01130"></a>01130 <span class="keywordflow">return</span> retVal;
  1218. <a name="l01131"></a>01131 }
  1219. <a name="l01132"></a>01132 };
  1220. <a name="l01133"></a>01133
  1221. <a name="l01134"></a>01134 <span class="comment">// Now we have a test implementation</span>
  1222. <a name="l01135"></a>01135 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  1223. <a name="l01136"></a><a class="code" href="classcurve__circle.html">01136</a> <span class="keyword">class </span><a class="code" href="classcurve__circle.html">curve_circle</a> : <span class="keyword">public</span> <a class="code" href="classcurve.html">curve</a>&lt;dataType&gt;
  1224. <a name="l01137"></a>01137 {
  1225. <a name="l01138"></a>01138 <span class="keyword">public</span>:
  1226. <a name="l01139"></a>01139
  1227. <a name="l01140"></a><a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">01140</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>;
  1228. <a name="l01141"></a><a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">01141</a> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>;
  1229. <a name="l01142"></a>01142
  1230. <a name="l01143"></a><a class="code" href="classcurve__circle.html#a0679f1f9dcdd801bd7eeb7df8284e95f">01143</a> <a class="code" href="classcurve__circle.html#a0679f1f9dcdd801bd7eeb7df8284e95f">curve_circle</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> r_in=1.0,<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> center_in=<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(0.0,0.0)) : <a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>(r_in) , <a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>(center_in)
  1231. <a name="l01144"></a>01144 {}
  1232. <a name="l01145"></a>01145
  1233. <a name="l01146"></a><a class="code" href="classcurve__circle.html#aba5ff39010b5187e225bcf6ca2527081">01146</a> <span class="keyword">virtual</span> <a class="code" href="classcurve__circle.html#aba5ff39010b5187e225bcf6ca2527081">~curve_circle</a>()
  1234. <a name="l01147"></a>01147 {}
  1235. <a name="l01148"></a>01148
  1236. <a name="l01149"></a><a class="code" href="classcurve__circle.html#a65bdf5c4b2648c31b949e451796eae5a">01149</a> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="classcurve__circle.html#a65bdf5c4b2648c31b949e451796eae5a">getPosition</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s)<span class="keyword"> const</span>
  1237. <a name="l01150"></a>01150 <span class="keyword"> </span>{
  1238. <a name="l01151"></a>01151 <span class="keywordflow">return</span> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>*cos(s*2.0*<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>),<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>*sin(s*2.0*pi));
  1239. <a name="l01152"></a>01152 }
  1240. <a name="l01153"></a>01153
  1241. <a name="l01154"></a><a class="code" href="classcurve__circle.html#aa4cd71f2aea7cb5531adefd29e2ed46e">01154</a> <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> <a class="code" href="classcurve__circle.html#aa4cd71f2aea7cb5531adefd29e2ed46e">getPointData</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s)<span class="keyword"> const</span>
  1242. <a name="l01155"></a>01155 <span class="keyword"> </span>{
  1243. <a name="l01156"></a>01156 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> ang=s*<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>*2.0+<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>/2.0;
  1244. <a name="l01157"></a>01157 <span class="keywordflow">while</span>(ang&gt;<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>)
  1245. <a name="l01158"></a>01158 ang-=2.0*<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>;
  1246. <a name="l01159"></a>01159 <span class="keywordflow">while</span>(ang&lt;-<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>)
  1247. <a name="l01160"></a>01160 ang+=2.0*<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>;
  1248. <a name="l01161"></a>01161 <span class="keywordflow">return</span> <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a>(this-&gt;<a class="code" href="classcurve__circle.html#a65bdf5c4b2648c31b949e451796eae5a">getPosition</a>(s),ang,s);
  1249. <a name="l01162"></a>01162 }
  1250. <a name="l01163"></a>01163
  1251. <a name="l01164"></a><a class="code" href="classcurve__circle.html#a667305391f1e846fe8991602ee33bb67">01164</a> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="classcurve__circle.html#a667305391f1e846fe8991602ee33bb67">intersectFirst</a>(<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg)<span class="keyword"> const</span>
  1252. <a name="l01165"></a>01165 <span class="keyword"> </span>{
  1253. <a name="l01166"></a>01166 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> retVal;
  1254. <a name="l01167"></a>01167
  1255. <a name="l01168"></a>01168 <span class="keyword">const</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; x0=seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.x;
  1256. <a name="l01169"></a>01169 <span class="keyword">const</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; y0=seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.y;
  1257. <a name="l01170"></a>01170 <span class="keyword">const</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; xD=seg.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.x;
  1258. <a name="l01171"></a>01171 <span class="keyword">const</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; yD=seg.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.y;
  1259. <a name="l01172"></a>01172 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; xC=<a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>.x;
  1260. <a name="l01173"></a>01173 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; yC=<a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>.y;
  1261. <a name="l01174"></a>01174
  1262. <a name="l01175"></a>01175 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="timoshenko_8cpp.html#ac5eb09f63c828d8b858cf5c18eabfe8a">A</a>=pow(xD,2.0)+pow(yD,2.0);
  1263. <a name="l01176"></a>01176 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="timoshenko_8cpp.html#a8edcb78651b9b4807e1de4008fe949c4">B</a>=2.0*(x0*xD-xC*xD+y0*yD-yC*yD);
  1264. <a name="l01177"></a>01177 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="timoshenko_8cpp.html#a782271fe256f5ab9801b612fc8c854d0">C</a>=pow(x0,2.0)+pow(y0,2.0)+pow(xC,2.0)+pow(yC,2.0)-pow(<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>,2.0)-2.0*(x0*xC+y0*yC);
  1265. <a name="l01178"></a>01178
  1266. <a name="l01179"></a>01179 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> desc=pow(B,2.0)-4.0*A*<a class="code" href="timoshenko_8cpp.html#a782271fe256f5ab9801b612fc8c854d0">C</a>;
  1267. <a name="l01180"></a>01180
  1268. <a name="l01181"></a>01181 <span class="keywordflow">if</span>(desc&lt;0.0)
  1269. <a name="l01182"></a>01182 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;curve_circle::intersectFirst(): Intersect does not exist&quot;</span>);
  1270. <a name="l01183"></a>01183
  1271. <a name="l01184"></a>01184 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> a1=(-B-sqrt(desc))/(2.0*A);
  1272. <a name="l01185"></a>01185 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> a2=(-B+sqrt(desc))/(2.0*A);
  1273. <a name="l01186"></a>01186
  1274. <a name="l01187"></a>01187 <span class="keywordflow">if</span>(a1&lt;0.0)
  1275. <a name="l01188"></a>01188 {
  1276. <a name="l01189"></a>01189 <span class="keywordflow">if</span>(a2&lt;0.0)
  1277. <a name="l01190"></a>01190 {
  1278. <a name="l01191"></a>01191 <span class="keywordflow">if</span>(a1&gt;a2)
  1279. <a name="l01192"></a>01192 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1280. <a name="l01193"></a>01193 <span class="keywordflow">else</span>
  1281. <a name="l01194"></a>01194 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1282. <a name="l01195"></a>01195 }
  1283. <a name="l01196"></a>01196 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(a2&gt;1.0)
  1284. <a name="l01197"></a>01197 {
  1285. <a name="l01198"></a>01198 <span class="keywordflow">if</span>(-a1&lt;(a2-1.0))
  1286. <a name="l01199"></a>01199 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1287. <a name="l01200"></a>01200 <span class="keywordflow">else</span>
  1288. <a name="l01201"></a>01201 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1289. <a name="l01202"></a>01202 }
  1290. <a name="l01203"></a>01203 <span class="keywordflow">else</span>
  1291. <a name="l01204"></a>01204 {
  1292. <a name="l01205"></a>01205 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1293. <a name="l01206"></a>01206 }
  1294. <a name="l01207"></a>01207 }
  1295. <a name="l01208"></a>01208 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(a1&gt;1.0)
  1296. <a name="l01209"></a>01209 {
  1297. <a name="l01210"></a>01210 <span class="keywordflow">if</span>(a2&lt;0.0)
  1298. <a name="l01211"></a>01211 {
  1299. <a name="l01212"></a>01212 <span class="keywordflow">if</span>(-a2&lt;(a1-1.0))
  1300. <a name="l01213"></a>01213 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1301. <a name="l01214"></a>01214 <span class="keywordflow">else</span>
  1302. <a name="l01215"></a>01215 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1303. <a name="l01216"></a>01216 }
  1304. <a name="l01217"></a>01217 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(a2&gt;1.0)
  1305. <a name="l01218"></a>01218 {
  1306. <a name="l01219"></a>01219 <span class="keywordflow">if</span>(a2&lt;a1)
  1307. <a name="l01220"></a>01220 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1308. <a name="l01221"></a>01221 <span class="keywordflow">else</span>
  1309. <a name="l01222"></a>01222 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1310. <a name="l01223"></a>01223 }
  1311. <a name="l01224"></a>01224 <span class="keywordflow">else</span>
  1312. <a name="l01225"></a>01225 {
  1313. <a name="l01226"></a>01226 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1314. <a name="l01227"></a>01227 }
  1315. <a name="l01228"></a>01228 }
  1316. <a name="l01229"></a>01229 <span class="keywordflow">else</span>
  1317. <a name="l01230"></a>01230 {
  1318. <a name="l01231"></a>01231 <span class="keywordflow">if</span>(a2&lt;0.0)
  1319. <a name="l01232"></a>01232 {
  1320. <a name="l01233"></a>01233 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1321. <a name="l01234"></a>01234 }
  1322. <a name="l01235"></a>01235 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(a2&gt;1.0)
  1323. <a name="l01236"></a>01236 {
  1324. <a name="l01237"></a>01237 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1325. <a name="l01238"></a>01238 }
  1326. <a name="l01239"></a>01239 <span class="keywordflow">else</span>
  1327. <a name="l01240"></a>01240 {
  1328. <a name="l01241"></a>01241 <span class="keywordflow">if</span>(a2&lt;a1)
  1329. <a name="l01242"></a>01242 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1330. <a name="l01243"></a>01243 <span class="keywordflow">else</span>
  1331. <a name="l01244"></a>01244 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1332. <a name="l01245"></a>01245 }
  1333. <a name="l01246"></a>01246 }
  1334. <a name="l01247"></a>01247
  1335. <a name="l01248"></a>01248 <span class="keywordflow">return</span> retVal;
  1336. <a name="l01249"></a>01249 }
  1337. <a name="l01250"></a>01250
  1338. <a name="l01251"></a><a class="code" href="classcurve__circle.html#a754512bd29216f1ee733d305167bbb8c">01251</a> <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> <a class="code" href="classcurve__circle.html#a754512bd29216f1ee733d305167bbb8c">intersectFirstData</a>(<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg)<span class="keyword"> const</span>
  1339. <a name="l01252"></a>01252 <span class="keyword"> </span>{
  1340. <a name="l01253"></a>01253 <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> retVal;
  1341. <a name="l01254"></a>01254
  1342. <a name="l01255"></a>01255 retVal.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>=<a class="code" href="classcurve__circle.html#a667305391f1e846fe8991602ee33bb67">intersectFirst</a>(seg);
  1343. <a name="l01256"></a>01256
  1344. <a name="l01257"></a>01257 <span class="comment">// now we solve the angle</span>
  1345. <a name="l01258"></a>01258 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> x=(retVal.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>-this-&gt;<a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>).x/<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>;
  1346. <a name="l01259"></a>01259 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> y=(retVal.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>-this-&gt;<a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>).y/<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>;
  1347. <a name="l01260"></a>01260 retVal.<a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>=atan2(y,x)+<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>/2.0;
  1348. <a name="l01261"></a>01261 <span class="keywordflow">while</span>(retVal.<a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>&gt;<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>)
  1349. <a name="l01262"></a>01262 retVal.<a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>-=2.0*<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>;
  1350. <a name="l01263"></a>01263 retVal.<a class="code" href="classcurvePointData.html#a8a6d5fff4e06528adf91c68e285a1edb">sEstimate</a>=retVal.<a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>-<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>;
  1351. <a name="l01264"></a>01264
  1352. <a name="l01265"></a>01265 <span class="keywordflow">return</span> retVal;
  1353. <a name="l01266"></a>01266 }
  1354. <a name="l01267"></a>01267
  1355. <a name="l01268"></a><a class="code" href="classcurve__circle.html#ab2b548b174df15d4cb5b89adaf4a7910">01268</a> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="classcurve__circle.html#ab2b548b174df15d4cb5b89adaf4a7910">intersectAverage</a>(<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg)<span class="keyword"> const</span>
  1356. <a name="l01269"></a>01269 <span class="keyword"> </span>{
  1357. <a name="l01270"></a>01270 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> retVal;
  1358. <a name="l01271"></a>01271
  1359. <a name="l01272"></a>01272 <span class="keyword">const</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; x0=seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.x;
  1360. <a name="l01273"></a>01273 <span class="keyword">const</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; y0=seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.y;
  1361. <a name="l01274"></a>01274 <span class="keyword">const</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; xD=seg.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.x;
  1362. <a name="l01275"></a>01275 <span class="keyword">const</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; yD=seg.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.y;
  1363. <a name="l01276"></a>01276 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; xC=<a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>.x;
  1364. <a name="l01277"></a>01277 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; yC=<a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>.y;
  1365. <a name="l01278"></a>01278
  1366. <a name="l01279"></a>01279 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="timoshenko_8cpp.html#ac5eb09f63c828d8b858cf5c18eabfe8a">A</a>=pow(xD,2.0)+pow(yD,2.0);
  1367. <a name="l01280"></a>01280 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="timoshenko_8cpp.html#a8edcb78651b9b4807e1de4008fe949c4">B</a>=2.0*(x0*xD-xC*xD+y0*yD-yC*yD);
  1368. <a name="l01281"></a>01281 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="timoshenko_8cpp.html#a782271fe256f5ab9801b612fc8c854d0">C</a>=pow(x0,2.0)+pow(y0,2.0)+pow(xC,2.0)+pow(yC,2.0)-pow(<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>,2.0)-2.0*(x0*xC+y0*yC);
  1369. <a name="l01282"></a>01282
  1370. <a name="l01283"></a>01283 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> desc=pow(B,2.0)-4.0*A*<a class="code" href="timoshenko_8cpp.html#a782271fe256f5ab9801b612fc8c854d0">C</a>;
  1371. <a name="l01284"></a>01284
  1372. <a name="l01285"></a>01285 <span class="keywordflow">if</span>(desc&lt;0.0)
  1373. <a name="l01286"></a>01286 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;curve_circle::intersectAverage(): Intersect does not exist&quot;</span>);
  1374. <a name="l01287"></a>01287
  1375. <a name="l01288"></a>01288 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> a1=(-B-sqrt(desc))/(2.0*A);
  1376. <a name="l01289"></a>01289 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> a2=(-B+sqrt(desc))/(2.0*A);
  1377. <a name="l01290"></a>01290
  1378. <a name="l01291"></a>01291 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;curve_circle::intersectAverage(): This has not been implemeted to give averages&quot;</span>);
  1379. <a name="l01292"></a>01292
  1380. <a name="l01293"></a>01293 <span class="keywordflow">if</span>(a1&lt;0.0)
  1381. <a name="l01294"></a>01294 {
  1382. <a name="l01295"></a>01295 <span class="keywordflow">if</span>(a2&lt;0.0)
  1383. <a name="l01296"></a>01296 {
  1384. <a name="l01297"></a>01297 <span class="keywordflow">if</span>(a1&gt;a2)
  1385. <a name="l01298"></a>01298 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1386. <a name="l01299"></a>01299 <span class="keywordflow">else</span>
  1387. <a name="l01300"></a>01300 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1388. <a name="l01301"></a>01301 }
  1389. <a name="l01302"></a>01302 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(a2&gt;1.0)
  1390. <a name="l01303"></a>01303 {
  1391. <a name="l01304"></a>01304 <span class="keywordflow">if</span>(-a1&lt;(a2-1.0))
  1392. <a name="l01305"></a>01305 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1393. <a name="l01306"></a>01306 <span class="keywordflow">else</span>
  1394. <a name="l01307"></a>01307 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1395. <a name="l01308"></a>01308 }
  1396. <a name="l01309"></a>01309 <span class="keywordflow">else</span>
  1397. <a name="l01310"></a>01310 {
  1398. <a name="l01311"></a>01311 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1399. <a name="l01312"></a>01312 }
  1400. <a name="l01313"></a>01313 }
  1401. <a name="l01314"></a>01314 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(a1&gt;1.0)
  1402. <a name="l01315"></a>01315 {
  1403. <a name="l01316"></a>01316 <span class="keywordflow">if</span>(a2&lt;0.0)
  1404. <a name="l01317"></a>01317 {
  1405. <a name="l01318"></a>01318 <span class="keywordflow">if</span>(-a2&lt;(a1-1.0))
  1406. <a name="l01319"></a>01319 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1407. <a name="l01320"></a>01320 <span class="keywordflow">else</span>
  1408. <a name="l01321"></a>01321 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1409. <a name="l01322"></a>01322 }
  1410. <a name="l01323"></a>01323 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(a2&gt;1.0)
  1411. <a name="l01324"></a>01324 {
  1412. <a name="l01325"></a>01325 <span class="keywordflow">if</span>(a2&lt;a1)
  1413. <a name="l01326"></a>01326 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1414. <a name="l01327"></a>01327 <span class="keywordflow">else</span>
  1415. <a name="l01328"></a>01328 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1416. <a name="l01329"></a>01329 }
  1417. <a name="l01330"></a>01330 <span class="keywordflow">else</span>
  1418. <a name="l01331"></a>01331 {
  1419. <a name="l01332"></a>01332 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1420. <a name="l01333"></a>01333 }
  1421. <a name="l01334"></a>01334 }
  1422. <a name="l01335"></a>01335 <span class="keywordflow">else</span>
  1423. <a name="l01336"></a>01336 {
  1424. <a name="l01337"></a>01337 <span class="keywordflow">if</span>(a2&lt;0.0)
  1425. <a name="l01338"></a>01338 {
  1426. <a name="l01339"></a>01339 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1427. <a name="l01340"></a>01340 }
  1428. <a name="l01341"></a>01341 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(a2&gt;1.0)
  1429. <a name="l01342"></a>01342 {
  1430. <a name="l01343"></a>01343 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1431. <a name="l01344"></a>01344 }
  1432. <a name="l01345"></a>01345 <span class="keywordflow">else</span>
  1433. <a name="l01346"></a>01346 {
  1434. <a name="l01347"></a>01347 <span class="keywordflow">if</span>(a2&lt;a1)
  1435. <a name="l01348"></a>01348 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a2);
  1436. <a name="l01349"></a>01349 <span class="keywordflow">else</span>
  1437. <a name="l01350"></a>01350 retVal=seg.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(a1);
  1438. <a name="l01351"></a>01351 }
  1439. <a name="l01352"></a>01352 }
  1440. <a name="l01353"></a>01353
  1441. <a name="l01354"></a>01354 <span class="keywordflow">return</span> retVal;
  1442. <a name="l01355"></a>01355 }
  1443. <a name="l01356"></a>01356
  1444. <a name="l01357"></a><a class="code" href="classcurve__circle.html#a2616ca8cb8d687ffae4dd29a9818e7bb">01357</a> <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> <a class="code" href="classcurve__circle.html#a2616ca8cb8d687ffae4dd29a9818e7bb">intersectAverageData</a>(<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg)<span class="keyword"> const</span>
  1445. <a name="l01358"></a>01358 <span class="keyword"> </span>{
  1446. <a name="l01359"></a>01359 <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> retVal;
  1447. <a name="l01360"></a>01360
  1448. <a name="l01361"></a>01361 retVal.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>=<a class="code" href="classcurve__circle.html#ab2b548b174df15d4cb5b89adaf4a7910">intersectAverage</a>(seg);
  1449. <a name="l01362"></a>01362
  1450. <a name="l01363"></a>01363 <span class="comment">// now we solve the angle</span>
  1451. <a name="l01364"></a>01364 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> x=(retVal.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>-this-&gt;<a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>).x/<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>;
  1452. <a name="l01365"></a>01365 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> y=(retVal.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>-this-&gt;<a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>).y/<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>;
  1453. <a name="l01366"></a>01366 retVal.<a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>=atan2(y,x)+<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>/2.0;
  1454. <a name="l01367"></a>01367 <span class="keywordflow">while</span>(retVal.<a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>&gt;<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>)
  1455. <a name="l01368"></a>01368 retVal.<a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>-=2.0*<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>;
  1456. <a name="l01369"></a>01369 retVal.<a class="code" href="classcurvePointData.html#a8a6d5fff4e06528adf91c68e285a1edb">sEstimate</a>=retVal.<a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>-<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>;
  1457. <a name="l01370"></a>01370
  1458. <a name="l01371"></a>01371 <span class="keywordflow">return</span> retVal;
  1459. <a name="l01372"></a>01372 }
  1460. <a name="l01373"></a>01373
  1461. <a name="l01374"></a><a class="code" href="classcurve__circle.html#a50714898dbd9201a9ff3cc1523b64c08">01374</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcurve__circle.html#a50714898dbd9201a9ff3cc1523b64c08">jacobian</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s)<span class="keyword"> const</span>
  1462. <a name="l01375"></a>01375 <span class="keyword"> </span>{
  1463. <a name="l01376"></a>01376 <span class="keywordflow">return</span> 2.0*<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>*<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>;
  1464. <a name="l01377"></a>01377 }
  1465. <a name="l01378"></a>01378
  1466. <a name="l01379"></a><a class="code" href="classcurve__circle.html#ad8619e0d5cd9b8de32928354ba71630c">01379</a> <span class="keywordtype">void</span> <a class="code" href="classcurve__circle.html#ad8619e0d5cd9b8de32928354ba71630c">boundingBox</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; xMin,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; yMin,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; xMax,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; yMax)<span class="keyword"> const</span>
  1467. <a name="l01380"></a>01380 <span class="keyword"> </span>{
  1468. <a name="l01381"></a>01381 xMin=this-&gt;<a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>.x-<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>;
  1469. <a name="l01382"></a>01382 yMin=this-&gt;<a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>.y-<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>;
  1470. <a name="l01383"></a>01383 xMax=this-&gt;<a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>.x+<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>;
  1471. <a name="l01384"></a>01384 yMax=this-&gt;<a class="code" href="classcurve__circle.html#a49b5c44277849311698bffe0da35e0bc">center</a>.y+<a class="code" href="classcurve__circle.html#a72b0a42e53af4cb3e35c2554794f313d">r</a>;
  1472. <a name="l01385"></a>01385 }
  1473. <a name="l01386"></a>01386 };
  1474. <a name="l01387"></a>01387
  1475. <a name="l01388"></a>01388 <span class="comment">// template&lt;class dataType&gt;</span>
  1476. <a name="l01389"></a>01389 <span class="comment">// void printMatrix(const matrix&lt;dataType&gt;&amp; mtx)</span>
  1477. <a name="l01390"></a>01390 <span class="comment">// {</span>
  1478. <a name="l01391"></a>01391 <span class="comment">// unsigned long rCnt;</span>
  1479. <a name="l01392"></a>01392 <span class="comment">// unsigned long cCnt;</span>
  1480. <a name="l01393"></a>01393 <span class="comment">// </span>
  1481. <a name="l01394"></a>01394 <span class="comment">// mtx.size(rCnt,cCnt);</span>
  1482. <a name="l01395"></a>01395 <span class="comment">// for(unsigned long i=0;i&lt;rCnt;i++)</span>
  1483. <a name="l01396"></a>01396 <span class="comment">// {</span>
  1484. <a name="l01397"></a>01397 <span class="comment">// for(unsigned long j=0;j&lt;cCnt;j++)</span>
  1485. <a name="l01398"></a>01398 <span class="comment">// {</span>
  1486. <a name="l01399"></a>01399 <span class="comment">// // if(j!=0)</span>
  1487. <a name="l01400"></a>01400 <span class="comment">// // std::cout &lt;&lt; &#39;\t&#39;;</span>
  1488. <a name="l01401"></a>01401 <span class="comment">// std::cout.width(14);</span>
  1489. <a name="l01402"></a>01402 <span class="comment">// std::cout &lt;&lt; mtx.entry(i,j);</span>
  1490. <a name="l01403"></a>01403 <span class="comment">// }</span>
  1491. <a name="l01404"></a>01404 <span class="comment">// std::cout &lt;&lt; std::endl;</span>
  1492. <a name="l01405"></a>01405 <span class="comment">// }</span>
  1493. <a name="l01406"></a>01406 <span class="comment">// }</span>
  1494. <a name="l01407"></a>01407
  1495. <a name="l01408"></a>01408
  1496. <a name="l01409"></a>01409
  1497. <a name="l01410"></a>01410
  1498. <a name="l01411"></a>01411
  1499. <a name="l01412"></a>01412
  1500. <a name="l01413"></a>01413 <span class="comment">// this is a simple class that merely stores the points of a polygon</span>
  1501. <a name="l01414"></a>01414 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  1502. <a name="l01415"></a><a class="code" href="classpolygon.html">01415</a> <span class="keyword">class </span><a class="code" href="classpolygon.html">polygon</a>
  1503. <a name="l01416"></a>01416 {
  1504. <a name="l01417"></a>01417 <span class="keyword">private</span>:
  1505. <a name="l01418"></a>01418
  1506. <a name="l01419"></a>01419 std::vector&lt;planePoint&lt;dataType&gt; &gt; pnts;
  1507. <a name="l01420"></a>01420
  1508. <a name="l01421"></a>01421 <span class="keyword">public</span>:
  1509. <a name="l01422"></a>01422
  1510. <a name="l01423"></a><a class="code" href="classpolygon.html#a56b9ca479ca53443b109c540a3ec98b4">01423</a> <a class="code" href="classpolygon.html#a56b9ca479ca53443b109c540a3ec98b4">polygon</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> sz_in=0) : pnts(sz_in)
  1511. <a name="l01424"></a>01424 {}
  1512. <a name="l01425"></a>01425
  1513. <a name="l01426"></a><a class="code" href="classpolygon.html#aefd94b1ac2266272b090260ead926d5e">01426</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classpolygon.html#aefd94b1ac2266272b090260ead926d5e">size</a>()<span class="keyword"> const</span>
  1514. <a name="l01427"></a>01427 <span class="keyword"> </span>{
  1515. <a name="l01428"></a>01428 <span class="keywordflow">return</span> pnts.size();
  1516. <a name="l01429"></a>01429 }
  1517. <a name="l01430"></a>01430
  1518. <a name="l01431"></a><a class="code" href="classpolygon.html#abed08f93b09b4c40df2cb78a324db19e">01431</a> <span class="keywordtype">void</span> <a class="code" href="classpolygon.html#abed08f93b09b4c40df2cb78a324db19e">resize</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> sz)
  1519. <a name="l01432"></a>01432 {
  1520. <a name="l01433"></a>01433 pnts.resize(sz);
  1521. <a name="l01434"></a>01434 }
  1522. <a name="l01435"></a>01435
  1523. <a name="l01436"></a><a class="code" href="classpolygon.html#afacfb555417d495769e88a176755c528">01436</a> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>&amp; <a class="code" href="classpolygon.html#afacfb555417d495769e88a176755c528">getPoint</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at)
  1524. <a name="l01437"></a>01437 {
  1525. <a name="l01438"></a>01438 <span class="keywordflow">if</span>(at&gt;=pnts.size())
  1526. <a name="l01439"></a>01439 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;polygon::getPoint(): The point does not exist&quot;</span>);
  1527. <a name="l01440"></a>01440 <span class="keywordflow">return</span> pnts[at];
  1528. <a name="l01441"></a>01441 }
  1529. <a name="l01442"></a>01442
  1530. <a name="l01443"></a><a class="code" href="classpolygon.html#a49837d617e369c9bb013109a57119048">01443</a> <span class="keyword">const</span> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>&amp; <a class="code" href="classpolygon.html#afacfb555417d495769e88a176755c528">getPoint</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at)<span class="keyword"> const</span>
  1531. <a name="l01444"></a>01444 <span class="keyword"> </span>{
  1532. <a name="l01445"></a>01445 <span class="keywordflow">if</span>(at&gt;=pnts.size())
  1533. <a name="l01446"></a>01446 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;polygon::getPoint(): The point does not exist&quot;</span>);
  1534. <a name="l01447"></a>01447 <span class="keywordflow">return</span> pnts[at];
  1535. <a name="l01448"></a>01448 }
  1536. <a name="l01449"></a>01449
  1537. <a name="l01450"></a><a class="code" href="classpolygon.html#a9b01d5ead424910701cee8e4fd51039e">01450</a> <span class="keywordtype">void</span> <a class="code" href="classpolygon.html#a9b01d5ead424910701cee8e4fd51039e">print</a>(std::ostream&amp; out)
  1538. <a name="l01451"></a>01451 {
  1539. <a name="l01452"></a>01452 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;pnts.size();i++)
  1540. <a name="l01453"></a>01453 out &lt;&lt; pnts[i].x &lt;&lt; <span class="charliteral">&#39;\t&#39;</span> &lt;&lt; pnts[i].y &lt;&lt; std::endl;
  1541. <a name="l01454"></a>01454 }
  1542. <a name="l01455"></a>01455 };
  1543. <a name="l01456"></a>01456
  1544. <a name="l01457"></a>01457 <span class="comment">// this is the data structure for just one line segment for an approximated polygon</span>
  1545. <a name="l01458"></a>01458 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  1546. <a name="l01459"></a><a class="code" href="classapproxSegment.html">01459</a> <span class="keyword">class </span><a class="code" href="classapproxSegment.html">approxSegment</a>
  1547. <a name="l01460"></a>01460 {
  1548. <a name="l01461"></a>01461 <span class="keyword">private</span>:
  1549. <a name="l01462"></a>01462
  1550. <a name="l01463"></a>01463 <span class="keywordtype">bool</span> dataSet;
  1551. <a name="l01464"></a>01464 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> angleData;
  1552. <a name="l01465"></a>01465 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> L0;
  1553. <a name="l01466"></a>01466 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> M0;
  1554. <a name="l01467"></a>01467 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> start0;
  1555. <a name="l01468"></a>01468 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> end0;
  1556. <a name="l01469"></a>01469 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> defaultSlope;
  1557. <a name="l01470"></a>01470 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> kParam;
  1558. <a name="l01471"></a>01471 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> rhoParam;
  1559. <a name="l01472"></a>01472
  1560. <a name="l01473"></a>01473 <span class="comment">// class event</span>
  1561. <a name="l01474"></a>01474 <span class="comment">// {</span>
  1562. <a name="l01475"></a>01475 <span class="comment">// public:</span>
  1563. <a name="l01476"></a>01476 <span class="comment">// </span>
  1564. <a name="l01477"></a>01477 <span class="comment">// dataType h; // this is the offset this event occurs at</span>
  1565. <a name="l01478"></a>01478 <span class="comment">// dataType step; // this is the step change in length</span>
  1566. <a name="l01479"></a>01479 <span class="comment">// dataType dStep; // this is the step change in slope</span>
  1567. <a name="l01480"></a>01480 <span class="comment">// };</span>
  1568. <a name="l01481"></a>01481
  1569. <a name="l01482"></a>01482 <span class="keyword">class </span>event
  1570. <a name="l01483"></a>01483 {
  1571. <a name="l01484"></a>01484 <span class="keyword">public</span>:
  1572. <a name="l01485"></a>01485
  1573. <a name="l01486"></a>01486 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> h;
  1574. <a name="l01487"></a>01487 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> l;
  1575. <a name="l01488"></a>01488
  1576. <a name="l01489"></a>01489 event(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> h_in=0.0,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> l_in=0.0) : h(h_in) , l(l_in)
  1577. <a name="l01490"></a>01490 {}
  1578. <a name="l01491"></a>01491 };
  1579. <a name="l01492"></a>01492
  1580. <a name="l01493"></a>01493 <span class="keyword">class </span>step
  1581. <a name="l01494"></a>01494 {
  1582. <a name="l01495"></a>01495 <span class="keyword">public</span>:
  1583. <a name="l01496"></a>01496
  1584. <a name="l01497"></a>01497 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> h;
  1585. <a name="l01498"></a>01498 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classapproxSegment.html#a3397e4b1b24691b8bb54d26b0cce1b0d">deltaY</a>;
  1586. <a name="l01499"></a>01499 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> deltaM;
  1587. <a name="l01500"></a>01500
  1588. <a name="l01501"></a>01501 step(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> h_in=0.0,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> deltaY_in=0.0,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> deltaM_in=0.0) : h(h_in) , <a class="code" href="classapproxSegment.html#a3397e4b1b24691b8bb54d26b0cce1b0d">deltaY</a>(deltaY_in) , deltaM(deltaM_in)
  1589. <a name="l01502"></a>01502 {}
  1590. <a name="l01503"></a>01503 };
  1591. <a name="l01504"></a>01504
  1592. <a name="l01505"></a>01505 std::list&lt;event&gt; events;
  1593. <a name="l01506"></a>01506 std::list&lt;step&gt; steps;
  1594. <a name="l01507"></a>01507
  1595. <a name="l01508"></a>01508 <span class="keyword">public</span>:
  1596. <a name="l01509"></a>01509
  1597. <a name="l01510"></a><a class="code" href="classapproxSegment.html#a0e99c7e4106c1205026750b74457da4b">01510</a> <a class="code" href="classapproxSegment.html#a0e99c7e4106c1205026750b74457da4b">approxSegment</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> defaultSlope_in=-1.0,<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> start0_in=<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(0.0,0.0),<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> end0_in=<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(0.0,0.0),<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> kParam_in=2000.0,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> rhoParam_in=200.0)
  1598. <a name="l01511"></a>01511 : dataSet(false)
  1599. <a name="l01512"></a>01512 , angleData(0.0)
  1600. <a name="l01513"></a>01513 , L0(0.0)
  1601. <a name="l01514"></a>01514 , M0(0.0)
  1602. <a name="l01515"></a>01515 , start0(start0_in)
  1603. <a name="l01516"></a>01516 , end0(end0_in)
  1604. <a name="l01517"></a>01517 , defaultSlope(defaultSlope_in)
  1605. <a name="l01518"></a>01518 , kParam(kParam_in)
  1606. <a name="l01519"></a>01519 , rhoParam(rhoParam_in)
  1607. <a name="l01520"></a>01520 {}
  1608. <a name="l01521"></a>01521
  1609. <a name="l01522"></a><a class="code" href="classapproxSegment.html#aeb1768770ea9b17683a935575c9e6bd0">01522</a> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>&amp; <a class="code" href="classapproxSegment.html#aeb1768770ea9b17683a935575c9e6bd0">start</a>()
  1610. <a name="l01523"></a>01523 {
  1611. <a name="l01524"></a>01524 <span class="keywordflow">return</span> start0;
  1612. <a name="l01525"></a>01525 }
  1613. <a name="l01526"></a>01526
  1614. <a name="l01527"></a><a class="code" href="classapproxSegment.html#a5018fa722a48eaa81af30364e6c452f1">01527</a> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>&amp; <a class="code" href="classapproxSegment.html#a5018fa722a48eaa81af30364e6c452f1">end</a>()
  1615. <a name="l01528"></a>01528 {
  1616. <a name="l01529"></a>01529 <span class="keywordflow">return</span> end0;
  1617. <a name="l01530"></a>01530 }
  1618. <a name="l01531"></a>01531
  1619. <a name="l01532"></a><a class="code" href="classapproxSegment.html#a928daee29b0f6685accc41f341392cfa">01532</a> <span class="keywordtype">void</span> <a class="code" href="classapproxSegment.html#a928daee29b0f6685accc41f341392cfa">addEvent</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> h,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classapproxSegment.html#aba4715c01c2aa16b7d9d7ea59d5f5b2a">length</a>)
  1620. <a name="l01533"></a>01533 {
  1621. <a name="l01534"></a>01534 events.push_back(event(h,length));
  1622. <a name="l01535"></a>01535 }
  1623. <a name="l01536"></a>01536
  1624. <a name="l01537"></a><a class="code" href="classapproxSegment.html#ae2fc4a56b2f1e28333804d89b7842c8f">01537</a> <span class="keywordtype">void</span> <a class="code" href="classapproxSegment.html#ae2fc4a56b2f1e28333804d89b7842c8f">finalize</a>()
  1625. <a name="l01538"></a>01538 {
  1626. <a name="l01539"></a>01539 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> delta=end0-start0;
  1627. <a name="l01540"></a>01540 angleData=atan2(delta.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>,delta.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>);
  1628. <a name="l01541"></a>01541 L0=delta.<a class="code" href="classplanePoint.html#a71e47c23ee1607864e54c100533e4333">length</a>();
  1629. <a name="l01542"></a>01542
  1630. <a name="l01543"></a>01543 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> lastH=0.0;
  1631. <a name="l01544"></a>01544 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> lastL=L0;
  1632. <a name="l01545"></a>01545 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> lastDelta=0.0;
  1633. <a name="l01546"></a>01546 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> lastSlope=0.0;
  1634. <a name="l01547"></a>01547 <span class="keywordflow">for</span>(<span class="keyword">typename</span> std::list&lt;event&gt;::iterator it=events.begin();it!=events.end();it++)
  1635. <a name="l01548"></a>01548 {
  1636. <a name="l01549"></a>01549 <span class="keywordflow">if</span>(it-&gt;h!=lastH)
  1637. <a name="l01550"></a>01550 {
  1638. <a name="l01551"></a>01551 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> slope=(it-&gt;l-lastL)/(it-&gt;h-lastH);
  1639. <a name="l01552"></a>01552 <span class="keywordflow">if</span>(lastH==0.0)
  1640. <a name="l01553"></a>01553 {
  1641. <a name="l01554"></a>01554 M0=slope;
  1642. <a name="l01555"></a>01555 <span class="keywordflow">if</span>(lastDelta!=0.0)
  1643. <a name="l01556"></a>01556 steps.push_back(step(0.0,lastDelta,0.0));
  1644. <a name="l01557"></a>01557 }
  1645. <a name="l01558"></a>01558 <span class="keywordflow">else</span>
  1646. <a name="l01559"></a>01559 {
  1647. <a name="l01560"></a>01560 <span class="keywordflow">if</span>(lastDelta!=0.0 || slope!=lastSlope)
  1648. <a name="l01561"></a>01561 steps.push_back(step(lastH,lastDelta,slope-lastSlope));
  1649. <a name="l01562"></a>01562 }
  1650. <a name="l01563"></a>01563 lastL=it-&gt;l;
  1651. <a name="l01564"></a>01564 lastSlope=slope;
  1652. <a name="l01565"></a>01565 lastH=it-&gt;h;
  1653. <a name="l01566"></a>01566 }
  1654. <a name="l01567"></a>01567 <span class="keywordflow">else</span>
  1655. <a name="l01568"></a>01568 {
  1656. <a name="l01569"></a>01569 lastDelta=it-&gt;l-lastL;
  1657. <a name="l01570"></a>01570 }
  1658. <a name="l01571"></a>01571 }
  1659. <a name="l01572"></a>01572 <span class="comment">// scenario where there is a zero at the first point</span>
  1660. <a name="l01573"></a>01573 <span class="keywordflow">if</span>(lastH==0.0)
  1661. <a name="l01574"></a>01574 {
  1662. <a name="l01575"></a>01575 M0=defaultSlope;
  1663. <a name="l01576"></a>01576 lastSlope=defaultSlope;
  1664. <a name="l01577"></a>01577 }
  1665. <a name="l01578"></a>01578 <span class="keywordflow">if</span>(lastL!=0.0 || lastSlope&gt;=0.0)
  1666. <a name="l01579"></a>01579 {
  1667. <a name="l01580"></a>01580 <span class="keywordflow">if</span>(lastSlope&lt;0.0)
  1668. <a name="l01581"></a>01581 steps.push_back(step(lastH,0.0-lastL,0.0));
  1669. <a name="l01582"></a>01582 <span class="keywordflow">else</span>
  1670. <a name="l01583"></a>01583 steps.push_back(step(lastH,0.0-lastL,defaultSlope-lastSlope));
  1671. <a name="l01584"></a>01584 }
  1672. <a name="l01585"></a>01585 <span class="keywordflow">if</span>(lastL!=0.0 || lastSlope!=defaultSlope)
  1673. <a name="l01586"></a>01586 steps.push_back(step(lastH,0.0-lastL,defaultSlope-lastSlope));
  1674. <a name="l01587"></a>01587 dataSet=<span class="keyword">true</span>;
  1675. <a name="l01588"></a>01588 }
  1676. <a name="l01589"></a>01589
  1677. <a name="l01590"></a><a class="code" href="classapproxSegment.html#a524e8b1bc2768b162ad4de0b1cfb6a2b">01590</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classapproxSegment.html#aba4715c01c2aa16b7d9d7ea59d5f5b2a">length</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> x)
  1678. <a name="l01591"></a>01591 {
  1679. <a name="l01592"></a>01592 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> L=L0+M0*x;
  1680. <a name="l01593"></a>01593 <span class="keywordflow">for</span>(<span class="keyword">typename</span> std::list&lt;step&gt;::iterator it=steps.begin();it!=steps.end();it++)
  1681. <a name="l01594"></a>01594 {
  1682. <a name="l01595"></a>01595 <span class="keywordflow">if</span>(it-&gt;deltaY!=0)
  1683. <a name="l01596"></a>01596 L+=it-&gt;deltaY/(1.0+exp(-kParam*(x-it-&gt;h)));
  1684. <a name="l01597"></a>01597 <span class="keywordflow">if</span>(it-&gt;deltaM!=0)
  1685. <a name="l01598"></a>01598 L+=(it-&gt;deltaM/kParam)*log(1.0+exp(kParam*(x-it-&gt;h)));
  1686. <a name="l01599"></a>01599 }
  1687. <a name="l01600"></a>01600 L=(1.0/rhoParam)*log(exp(rhoParam*1e-6)+exp(rhoParam*L));
  1688. <a name="l01601"></a>01601 <span class="keywordflow">return</span> L;
  1689. <a name="l01602"></a>01602 }
  1690. <a name="l01603"></a>01603
  1691. <a name="l01604"></a><a class="code" href="classapproxSegment.html#aba4715c01c2aa16b7d9d7ea59d5f5b2a">01604</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classapproxSegment.html#aba4715c01c2aa16b7d9d7ea59d5f5b2a">length</a>()
  1692. <a name="l01605"></a>01605 {
  1693. <a name="l01606"></a>01606 <span class="keywordflow">return</span> L0;
  1694. <a name="l01607"></a>01607 }
  1695. <a name="l01608"></a>01608
  1696. <a name="l01609"></a><a class="code" href="classapproxSegment.html#ab3b5d6a05fa4084f2ef9cf267268f8d7">01609</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classapproxSegment.html#ab3b5d6a05fa4084f2ef9cf267268f8d7">angle</a>()
  1697. <a name="l01610"></a>01610 {
  1698. <a name="l01611"></a>01611 <span class="keywordflow">return</span> angleData;
  1699. <a name="l01612"></a>01612 }
  1700. <a name="l01613"></a>01613
  1701. <a name="l01614"></a><a class="code" href="classapproxSegment.html#a97ba8f38ed2d0df88b778f5ad9c71ced">01614</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classapproxSegment.html#a97ba8f38ed2d0df88b778f5ad9c71ced">deltaX</a>()
  1702. <a name="l01615"></a>01615 {
  1703. <a name="l01616"></a>01616 <span class="keywordflow">return</span> end0.x-start0.x;
  1704. <a name="l01617"></a>01617 }
  1705. <a name="l01618"></a>01618
  1706. <a name="l01619"></a><a class="code" href="classapproxSegment.html#a3397e4b1b24691b8bb54d26b0cce1b0d">01619</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classapproxSegment.html#a3397e4b1b24691b8bb54d26b0cce1b0d">deltaY</a>()
  1707. <a name="l01620"></a>01620 {
  1708. <a name="l01621"></a>01621 <span class="keywordflow">return</span> end0.y-start0.y;
  1709. <a name="l01622"></a>01622 }
  1710. <a name="l01623"></a>01623
  1711. <a name="l01624"></a><a class="code" href="classapproxSegment.html#a3526f793daac4c714240ac91261e56c0">01624</a> <span class="keywordtype">void</span> <a class="code" href="classapproxSegment.html#a3526f793daac4c714240ac91261e56c0">print</a>()
  1712. <a name="l01625"></a>01625 {
  1713. <a name="l01626"></a>01626 <span class="keywordflow">for</span>(<span class="keyword">typename</span> std::list&lt;event&gt;::iterator it=events.begin();it!=events.end();it++)
  1714. <a name="l01627"></a>01627 std::cout &lt;&lt; it-&gt;h &lt;&lt; <span class="charliteral">&#39;\t&#39;</span> &lt;&lt; it-&gt;l &lt;&lt; std::endl;
  1715. <a name="l01628"></a>01628 }
  1716. <a name="l01629"></a>01629 };
  1717. <a name="l01630"></a>01630
  1718. <a name="l01631"></a>01631 <span class="comment">// this is the data structure for polygon offseting</span>
  1719. <a name="l01632"></a>01632 <span class="comment">// this data structure is initialized with a set of points (or a simple polygon)</span>
  1720. <a name="l01633"></a>01633 <span class="comment">// this data structure provides the approximated offset for a polygon</span>
  1721. <a name="l01634"></a>01634 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  1722. <a name="l01635"></a><a class="code" href="classapproxOffset.html">01635</a> <span class="keyword">class </span><a class="code" href="classapproxOffset.html">approxOffset</a>
  1723. <a name="l01636"></a>01636 {
  1724. <a name="l01637"></a>01637 <span class="keyword">private</span>:
  1725. <a name="l01638"></a>01638
  1726. <a name="l01639"></a>01639 std::vector&lt;approxSegment&lt;dataType&gt; &gt; segments;
  1727. <a name="l01640"></a>01640 std::vector&lt;bool&gt; segSet;
  1728. <a name="l01641"></a>01641 <span class="keywordtype">bool</span> setsBuilt;
  1729. <a name="l01642"></a>01642 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> maxHData;
  1730. <a name="l01643"></a>01643
  1731. <a name="l01644"></a>01644 <span class="keyword">class </span>offsetData;
  1732. <a name="l01645"></a>01645
  1733. <a name="l01646"></a>01646 offsetData* data;
  1734. <a name="l01647"></a>01647
  1735. <a name="l01648"></a>01648 <span class="keyword">class </span><a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">topoCollapse</a>
  1736. <a name="l01649"></a>01649 {
  1737. <a name="l01650"></a>01650 <span class="keyword">public</span>:
  1738. <a name="l01651"></a>01651 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> h;
  1739. <a name="l01652"></a>01652 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at_0;
  1740. <a name="l01653"></a>01653 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at_1;
  1741. <a name="l01654"></a>01654 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> b0;
  1742. <a name="l01655"></a>01655 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> b1;
  1743. <a name="l01656"></a>01656 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> meet;
  1744. <a name="l01657"></a>01657 <span class="keywordtype">bool</span> valid;
  1745. <a name="l01658"></a>01658
  1746. <a name="l01659"></a>01659 <a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">topoCollapse</a>();
  1747. <a name="l01660"></a>01660 <a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">topoCollapse</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> edge,std::vector&lt;<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> &gt;&amp; pntsTmp,<span class="keyword">const</span> <a class="code" href="classapproxOffset.html">approxOffset</a>&amp; pLine);
  1748. <a name="l01661"></a>01661 <a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">topoCollapse</a>(<span class="keyword">const</span> <a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">topoCollapse</a>&amp; asg);
  1749. <a name="l01662"></a>01662 ~<a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">topoCollapse</a>();
  1750. <a name="l01663"></a>01663
  1751. <a name="l01664"></a>01664 <a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">topoCollapse</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">topoCollapse</a>&amp; asg);
  1752. <a name="l01665"></a>01665 };
  1753. <a name="l01666"></a>01666
  1754. <a name="l01667"></a><a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">01667</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">topoCollapse</a>;
  1755. <a name="l01668"></a>01668
  1756. <a name="l01669"></a>01669 <span class="comment">// find the events</span>
  1757. <a name="l01670"></a>01670 <span class="comment">// this class has many of the methods used in the polyline offset.</span>
  1758. <a name="l01671"></a>01671 <span class="comment">// these methods are modified somewhat to detect events</span>
  1759. <a name="l01672"></a>01672
  1760. <a name="l01673"></a>01673 <span class="keyword">class </span>offsetData
  1761. <a name="l01674"></a>01674 {
  1762. <a name="l01675"></a>01675 <span class="keyword">public</span>:
  1763. <a name="l01676"></a>01676
  1764. <a name="l01677"></a>01677 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> atH;
  1765. <a name="l01678"></a>01678 std::vector&lt;planePoint&lt;dataType&gt; &gt; pnts;
  1766. <a name="l01679"></a>01679 std::vector&lt;unsigned long&gt; segMap;
  1767. <a name="l01680"></a>01680
  1768. <a name="l01681"></a>01681 offsetData(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> sz) : atH(0.0) , pnts(sz) , segMap(sz)
  1769. <a name="l01682"></a>01682 {}
  1770. <a name="l01683"></a>01683 };
  1771. <a name="l01684"></a>01684
  1772. <a name="l01685"></a>01685 <a class="code" href="classmatrixVectorSolver.html">matrixVectorSolver</a> slvr;
  1773. <a name="l01686"></a>01686
  1774. <a name="l01687"></a>01687 <span class="comment">// This gets the indices offset in a sequence that wraps</span>
  1775. <a name="l01688"></a>01688 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> wrapIndex(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at,<span class="keywordtype">long</span> <a class="code" href="classapproxOffset.html#ac0d6991ecf091dc329b616a993914caf">offset</a>) <span class="keyword">const</span>;
  1776. <a name="l01689"></a>01689 <span class="comment">// removes points</span>
  1777. <a name="l01690"></a>01690 <span class="keywordtype">void</span> removePoints(std::vector&lt;unsigned long&gt;&amp; indices);
  1778. <a name="l01691"></a>01691 <span class="comment">// Gives a segment defined by</span>
  1779. <a name="l01692"></a>01692 <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a> getSegVect(<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> start,<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> end);
  1780. <a name="l01693"></a>01693 <span class="comment">// retrieves the line segment in std::vector format for the point [at] to [at+1]</span>
  1781. <a name="l01694"></a>01694 <span class="comment">// if at+1=size then it is to at=0</span>
  1782. <a name="l01695"></a>01695 <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a> getSegVect(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at);
  1783. <a name="l01696"></a>01696 <span class="comment">// This function finds the next event where an offsetting line segment is collapsed by the adjecent sections</span>
  1784. <a name="l01697"></a>01697 <span class="keywordtype">void</span> nextCollapse(<span class="keywordtype">bool</span>&amp; isPos,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; minH,std::vector&lt;topoCollapse&gt; &amp;topoClps,<span class="keywordtype">bool</span>&amp; isNeg,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; minNegH,std::vector&lt;topoCollapse&gt; &amp;negTopoClps);
  1785. <a name="l01698"></a>01698 <span class="comment">// Given a vertex and segment this will find if there is a split and some properties of the split</span>
  1786. <a name="l01699"></a>01699 <span class="keywordtype">bool</span> testSplit(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> vertex,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> segment,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; h);
  1787. <a name="l01700"></a>01700 <span class="comment">// Given a reflex vertex this function attempts to find the next split event</span>
  1788. <a name="l01701"></a>01701 <span class="keywordtype">bool</span> seekSplit(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> vertex,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; segment,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; h);
  1789. <a name="l01702"></a>01702 <span class="comment">// This function attempts to find where the next split is. The dir is either 1 or -1, and is used to specify direction.</span>
  1790. <a name="l01703"></a>01703 <span class="comment">// offset to the left of the segment is positive</span>
  1791. <a name="l01704"></a>01704 <span class="keywordtype">bool</span> nextSplit(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; segment,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; h);
  1792. <a name="l01705"></a>01705 <span class="comment">// This function will create a new polygon with a set of collapses. the ne poly gone has been offsetted h (should be same as offset in collapse)</span>
  1793. <a name="l01706"></a>01706 <span class="keywordtype">void</span> collapseTopology(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> h,std::vector&lt;topoCollapse&gt;&amp; topoClps);
  1794. <a name="l01707"></a>01707 <span class="comment">// joins all adjacent segments that are co-linear deletes coincident points</span>
  1795. <a name="l01708"></a>01708 <span class="keywordtype">void</span> cleanPolygon(<span class="keywordtype">bool</span>&amp; isValid,<span class="keywordtype">bool</span>&amp; faceMeetTmp);
  1796. <a name="l01709"></a>01709 <span class="comment">// This retrieves the bisect vector</span>
  1797. <a name="l01710"></a>01710 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> getBisect(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; at) <span class="keyword">const</span>;
  1798. <a name="l01711"></a>01711 <span class="comment">// this determines how much a bisect extends per unit h</span>
  1799. <a name="l01712"></a>01712 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> bisectScale(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; at) <span class="keyword">const</span>;
  1800. <a name="l01713"></a>01713
  1801. <a name="l01714"></a>01714 <span class="keywordtype">void</span> setLengths()
  1802. <a name="l01715"></a>01715 {
  1803. <a name="l01716"></a>01716 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;data-&gt;segMap.size();i++)
  1804. <a name="l01717"></a>01717 segments[data-&gt;segMap[i]].addEvent(data-&gt;atH, getSegVect(wrapIndex(i,-1)).delta.length());
  1805. <a name="l01718"></a>01718 }
  1806. <a name="l01719"></a>01719
  1807. <a name="l01720"></a>01720 <span class="keywordtype">void</span> done()
  1808. <a name="l01721"></a>01721 {
  1809. <a name="l01722"></a>01722 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;data-&gt;segMap.size();i++)
  1810. <a name="l01723"></a>01723 segments[data-&gt;segMap[i]].addEvent(data-&gt;atH,0.0);
  1811. <a name="l01724"></a>01724 maxHData=data-&gt;atH;
  1812. <a name="l01725"></a>01725 }
  1813. <a name="l01726"></a>01726
  1814. <a name="l01727"></a>01727 <span class="keywordtype">void</span> buildSegments()
  1815. <a name="l01728"></a>01728 {
  1816. <a name="l01729"></a>01729 <span class="comment">// create the data structures</span>
  1817. <a name="l01730"></a>01730 data=<span class="keyword">new</span> offsetData(segments.size());
  1818. <a name="l01731"></a>01731 <span class="keywordflow">if</span>(data==NULL)
  1819. <a name="l01732"></a>01732 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;approxOffset::buildSegments()&quot;</span>);
  1820. <a name="l01733"></a>01733
  1821. <a name="l01734"></a>01734 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;data-&gt;pnts.size();i++)
  1822. <a name="l01735"></a>01735 {
  1823. <a name="l01736"></a>01736 data-&gt;pnts[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].start();
  1824. <a name="l01737"></a>01737 data-&gt;segMap[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=wrapIndex(i,-1);
  1825. <a name="l01738"></a>01738 }
  1826. <a name="l01739"></a>01739
  1827. <a name="l01740"></a>01740 <span class="comment">// Next step is a little nebulous</span>
  1828. <a name="l01741"></a>01741 <span class="keywordtype">bool</span> isValid=<span class="keyword">true</span>;
  1829. <a name="l01742"></a>01742 <span class="keywordtype">bool</span> isPos;
  1830. <a name="l01743"></a>01743 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> minH;
  1831. <a name="l01744"></a>01744 std::vector&lt;typename approxOffset&lt;dataType&gt;::topoCollapse&gt; topoClps;
  1832. <a name="l01745"></a>01745 <span class="keywordtype">bool</span> isNeg;
  1833. <a name="l01746"></a>01746 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> minNegH;
  1834. <a name="l01747"></a>01747 std::vector&lt;typename approxOffset&lt;dataType&gt;::topoCollapse&gt; negTopoClps;
  1835. <a name="l01748"></a>01748 <span class="keywordtype">bool</span> isClps;
  1836. <a name="l01749"></a>01749 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> clpsH;
  1837. <a name="l01750"></a>01750 std::vector&lt;typename approxOffset&lt;dataType&gt;::topoCollapse&gt; Clps;
  1838. <a name="l01751"></a>01751 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> segment;
  1839. <a name="l01752"></a>01752 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> hSplit;
  1840. <a name="l01753"></a>01753 <span class="keywordtype">bool</span> faceMeetTst; <span class="comment">// This is just a dummy variable that is ignored. It detects the condition where upon a collapse two adjacent segments become coincident ie 180 degree turn</span>
  1841. <a name="l01754"></a>01754
  1842. <a name="l01755"></a>01755 <span class="comment">// here we pre-event</span>
  1843. <a name="l01756"></a>01756 setLengths();
  1844. <a name="l01757"></a>01757 <span class="keywordflow">while</span>(isValid)
  1845. <a name="l01758"></a>01758 {
  1846. <a name="l01759"></a>01759 cleanPolygon(isValid,faceMeetTst);
  1847. <a name="l01760"></a>01760 <span class="comment">// if cleanPolygon is flagged as invalid then pop out of loop here</span>
  1848. <a name="l01761"></a>01761 <span class="keywordflow">if</span>(!isValid)
  1849. <a name="l01762"></a>01762 <span class="keywordflow">break</span>;
  1850. <a name="l01763"></a>01763 <span class="comment">// here we post-event the valid </span>
  1851. <a name="l01764"></a>01764 setLengths();
  1852. <a name="l01765"></a>01765
  1853. <a name="l01766"></a>01766 isClps=<span class="keyword">false</span>;
  1854. <a name="l01767"></a>01767 clpsH=0.0;
  1855. <a name="l01768"></a>01768 Clps=std::vector&lt;typename approxOffset&lt;dataType&gt;::topoCollapse&gt;(0);
  1856. <a name="l01769"></a>01769 nextCollapse(isPos,minH,topoClps,isNeg,minNegH,negTopoClps);
  1857. <a name="l01770"></a>01770 <span class="keywordflow">if</span>(isPos)
  1858. <a name="l01771"></a>01771 {
  1859. <a name="l01772"></a>01772 isClps=<span class="keyword">true</span>;
  1860. <a name="l01773"></a>01773 clpsH=minH;
  1861. <a name="l01774"></a>01774 Clps=topoClps;
  1862. <a name="l01775"></a>01775 }
  1863. <a name="l01776"></a>01776
  1864. <a name="l01777"></a>01777 <span class="keywordflow">if</span>(nextSplit(segment,hSplit))
  1865. <a name="l01778"></a>01778 {
  1866. <a name="l01779"></a>01779 <span class="comment">// There needs to be logic to set the last event</span>
  1867. <a name="l01780"></a>01780 <span class="keywordflow">if</span>(!isClps || hSplit&lt;fabs(clpsH))
  1868. <a name="l01781"></a>01781 {
  1869. <a name="l01782"></a>01782 isValid=<span class="keyword">false</span>;
  1870. <a name="l01783"></a>01783 clpsH=hSplit;
  1871. <a name="l01784"></a>01784 isClps=<span class="keyword">true</span>;
  1872. <a name="l01785"></a>01785 }
  1873. <a name="l01786"></a>01786 }
  1874. <a name="l01787"></a>01787
  1875. <a name="l01788"></a>01788 <span class="keywordflow">if</span>(!isClps)
  1876. <a name="l01789"></a>01789 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;approxOffset::buildSegments(): No collapse detected&quot;</span>);
  1877. <a name="l01790"></a>01790
  1878. <a name="l01791"></a>01791 collapseTopology(clpsH,Clps);
  1879. <a name="l01792"></a>01792 <span class="comment">// here we pre-event</span>
  1880. <a name="l01793"></a>01793 setLengths();
  1881. <a name="l01794"></a>01794 }
  1882. <a name="l01795"></a>01795 done();
  1883. <a name="l01796"></a>01796 setsBuilt=<span class="keyword">true</span>;
  1884. <a name="l01797"></a>01797
  1885. <a name="l01798"></a>01798 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;segments.size();i++)
  1886. <a name="l01799"></a>01799 segments[i].finalize();
  1887. <a name="l01800"></a>01800
  1888. <a name="l01801"></a>01801 <span class="keyword">delete</span> data;
  1889. <a name="l01802"></a>01802 data=NULL;
  1890. <a name="l01803"></a>01803 }
  1891. <a name="l01804"></a>01804
  1892. <a name="l01805"></a>01805 <span class="keyword">public</span>:
  1893. <a name="l01806"></a>01806
  1894. <a name="l01807"></a><a class="code" href="classapproxOffset.html#acac537d81e7f9e4711152e26d6135367">01807</a> <a class="code" href="classapproxOffset.html#acac537d81e7f9e4711152e26d6135367">approxOffset</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> size_in=0) : segments(size_in) , segSet(size_in) , setsBuilt(false) , maxHData(0.0) , data(NULL)
  1895. <a name="l01808"></a>01808 {}
  1896. <a name="l01809"></a>01809
  1897. <a name="l01810"></a><a class="code" href="classapproxOffset.html#ab9396a25d7bfb22dd5ba5598446eb74f">01810</a> <a class="code" href="classapproxOffset.html#ab9396a25d7bfb22dd5ba5598446eb74f">~approxOffset</a>()
  1898. <a name="l01811"></a>01811 {
  1899. <a name="l01812"></a>01812 <span class="keywordflow">if</span>(data!=NULL)
  1900. <a name="l01813"></a>01813 <span class="keyword">delete</span> data;
  1901. <a name="l01814"></a>01814 }
  1902. <a name="l01815"></a>01815
  1903. <a name="l01816"></a><a class="code" href="classapproxOffset.html#a7a9ce7ef4356bf96465ef66cc1b1eecc">01816</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classapproxOffset.html#a7a9ce7ef4356bf96465ef66cc1b1eecc">size</a>()
  1904. <a name="l01817"></a>01817 {
  1905. <a name="l01818"></a>01818 <span class="keywordflow">return</span> segments.size();
  1906. <a name="l01819"></a>01819 }
  1907. <a name="l01820"></a>01820
  1908. <a name="l01821"></a><a class="code" href="classapproxOffset.html#a463dab75995fd25c23da5b7ebbd59388">01821</a> <span class="keywordtype">void</span> <a class="code" href="classapproxOffset.html#a463dab75995fd25c23da5b7ebbd59388">resize</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> size_in)
  1909. <a name="l01822"></a>01822 {
  1910. <a name="l01823"></a>01823 segments.resize(size_in);
  1911. <a name="l01824"></a>01824 segSet.resize(size_in,<span class="keyword">false</span>);
  1912. <a name="l01825"></a>01825 }
  1913. <a name="l01826"></a>01826
  1914. <a name="l01827"></a><a class="code" href="classapproxOffset.html#aeb585fb2b546cdd6acb7449702c8102b">01827</a> <span class="keywordtype">void</span> <a class="code" href="classapproxOffset.html#aeb585fb2b546cdd6acb7449702c8102b">addPoint</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at,<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> pnt_in)
  1915. <a name="l01828"></a>01828 {
  1916. <a name="l01829"></a>01829 <span class="keywordflow">if</span>(at&gt;=segments.size())
  1917. <a name="l01830"></a>01830 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;approxOffset::addPoint(): The given point does not exist&quot;</span>);
  1918. <a name="l01831"></a>01831 segments[wrapIndex(at,0)].start()=pnt_in;
  1919. <a name="l01832"></a>01832 segments[wrapIndex(at,-1)].end()=pnt_in;
  1920. <a name="l01833"></a>01833 segSet[wrapIndex(at,0)]=<span class="keyword">true</span>;
  1921. <a name="l01834"></a>01834 }
  1922. <a name="l01835"></a>01835
  1923. <a name="l01836"></a><a class="code" href="classapproxOffset.html#ac0d6991ecf091dc329b616a993914caf">01836</a> <a class="code" href="classpolygon.html">polygon&lt;dataType&gt;</a> <a class="code" href="classapproxOffset.html#ac0d6991ecf091dc329b616a993914caf">offset</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> h)
  1924. <a name="l01837"></a>01837 {
  1925. <a name="l01838"></a>01838 <span class="keywordflow">if</span>(!setsBuilt)
  1926. <a name="l01839"></a>01839 buildSegments();
  1927. <a name="l01840"></a>01840
  1928. <a name="l01841"></a>01841 slvr.<a class="code" href="classmatrixVectorSolver.html#ac1dd8a47143533da291f2211de8e2500">resize</a>(2*segments.size()+3);
  1929. <a name="l01842"></a>01842 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>()=<a class="code" href="classmatrix.html">matrix&lt;dataType&gt;::zeroMatrix</a>(2*segments.size()+3,2*segments.size()+3);
  1930. <a name="l01843"></a>01843 slvr.<a class="code" href="classmatrixVectorSolver.html#a8ace97aea50702cb4ccfe299d3e3784a">B</a>()=<a class="code" href="classmatrix.html">matrix&lt;dataType&gt;::zeroMatrix</a>(2*segments.size()+3,1);
  1931. <a name="l01844"></a>01844
  1932. <a name="l01845"></a>01845 std::vector&lt;dataType&gt; <a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>(segments.size());
  1933. <a name="l01846"></a>01846 std::vector&lt;dataType&gt; angle(segments.size());
  1934. <a name="l01847"></a>01847 std::vector&lt;dataType&gt; LCos(segments.size());
  1935. <a name="l01848"></a>01848 std::vector&lt;dataType&gt; LSin(segments.size());
  1936. <a name="l01849"></a>01849 std::vector&lt;dataType&gt; LCos2(segments.size());
  1937. <a name="l01850"></a>01850 std::vector&lt;dataType&gt; LCosSin(segments.size());
  1938. <a name="l01851"></a>01851 std::vector&lt;dataType&gt; LSin2(segments.size());
  1939. <a name="l01852"></a>01852 std::vector&lt;dataType&gt; xCoeff(segments.size());
  1940. <a name="l01853"></a>01853 std::vector&lt;dataType&gt; yCoeff(segments.size());
  1941. <a name="l01854"></a>01854 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> LCosSum=0.0;
  1942. <a name="l01855"></a>01855 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> LSinSum=0.0;
  1943. <a name="l01856"></a>01856 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> LCos2Sum=0.0;
  1944. <a name="l01857"></a>01857 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> LCosSinSum=0.0;
  1945. <a name="l01858"></a>01858 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> LSin2Sum=0.0;
  1946. <a name="l01859"></a>01859 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> scaleSource=0.0;
  1947. <a name="l01860"></a>01860 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> xBarSource=0.0;
  1948. <a name="l01861"></a>01861 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> yBarSource=0.0;
  1949. <a name="l01862"></a>01862
  1950. <a name="l01863"></a>01863 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;segments.size();i++)
  1951. <a name="l01864"></a>01864 {
  1952. <a name="l01865"></a>01865 <a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].length(h);
  1953. <a name="l01866"></a>01866 angle[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].angle();
  1954. <a name="l01867"></a>01867 LCos[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=<a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*cos(angle[i]);
  1955. <a name="l01868"></a>01868 LSin[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=<a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*sin(angle[i]);
  1956. <a name="l01869"></a>01869 LCos2[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=<a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*pow(cos(angle[i]),2.0);
  1957. <a name="l01870"></a>01870 LCosSin[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=<a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*cos(angle[i])*sin(angle[i]);
  1958. <a name="l01871"></a>01871 LSin2[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=<a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*pow(sin(angle[i]),2.0);
  1959. <a name="l01872"></a>01872 xCoeff[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=-<a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].deltaY()/segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].length();
  1960. <a name="l01873"></a>01873 yCoeff[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=<a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].deltaX()/segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].length();
  1961. <a name="l01874"></a>01874 LCosSum+=LCos[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>];
  1962. <a name="l01875"></a>01875 LSinSum+=LSin[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>];
  1963. <a name="l01876"></a>01876 LCos2Sum+=LCos2[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>];
  1964. <a name="l01877"></a>01877 LCosSinSum+=LCosSin[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>];
  1965. <a name="l01878"></a>01878 LSin2Sum+=LSin2[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>];
  1966. <a name="l01879"></a>01879 scaleSource+=xCoeff[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].start().x+yCoeff[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].start().y+<a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*h;
  1967. <a name="l01880"></a>01880 xBarSource+=xCoeff[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*(xCoeff[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].start().x+yCoeff[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].start().y+<a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*h);
  1968. <a name="l01881"></a>01881 yBarSource+=yCoeff[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*(xCoeff[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].start().x+yCoeff[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*segments[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>].start().y+<a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]*h);
  1969. <a name="l01882"></a>01882 }
  1970. <a name="l01883"></a>01883
  1971. <a name="l01884"></a>01884 <span class="comment">// insert the relative position equations</span>
  1972. <a name="l01885"></a>01885 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;(segments.size()-1);i++)
  1973. <a name="l01886"></a>01886 {
  1974. <a name="l01887"></a>01887 <span class="comment">// The x index</span>
  1975. <a name="l01888"></a>01888 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(i*2,i*2)=-1.0;
  1976. <a name="l01889"></a>01889 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(i*2,i*2+2)=1.0;
  1977. <a name="l01890"></a>01890 <span class="comment">// The y index</span>
  1978. <a name="l01891"></a>01891 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(i*2+1,i*2+1)=-1.0;
  1979. <a name="l01892"></a>01892 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(i*2+1,i*2+3)=1.0;
  1980. <a name="l01893"></a>01893 <span class="comment">// The alpha beta gamma</span>
  1981. <a name="l01894"></a>01894 <span class="comment">// x</span>
  1982. <a name="l01895"></a>01895 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(i*2,segments.size()*2)=-LCos2[i];
  1983. <a name="l01896"></a>01896 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(i*2,segments.size()*2+1)=-LCosSin[i];
  1984. <a name="l01897"></a>01897 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(i*2,segments.size()*2+2)=-LCos[i];
  1985. <a name="l01898"></a>01898 <span class="comment">// y</span>
  1986. <a name="l01899"></a>01899 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(i*2+1,segments.size()*2)=-LCosSin[i];
  1987. <a name="l01900"></a>01900 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(i*2+1,segments.size()*2+1)=-LSin2[i];
  1988. <a name="l01901"></a>01901 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(i*2+1,segments.size()*2+2)=-LSin[i];
  1989. <a name="l01902"></a>01902 <span class="comment">// source term</span>
  1990. <a name="l01903"></a>01903 slvr.<a class="code" href="classmatrixVectorSolver.html#a8ace97aea50702cb4ccfe299d3e3784a">B</a>().<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(i*2)=LCos[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>];
  1991. <a name="l01904"></a>01904 slvr.<a class="code" href="classmatrixVectorSolver.html#a8ace97aea50702cb4ccfe299d3e3784a">B</a>().<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(i*2+1)=LSin[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>];
  1992. <a name="l01905"></a>01905 }
  1993. <a name="l01906"></a>01906
  1994. <a name="l01907"></a>01907 <span class="comment">// insert the closure constraints</span>
  1995. <a name="l01908"></a>01908 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>((segments.size()-1)*2,segments.size()*2)=LCos2Sum;
  1996. <a name="l01909"></a>01909 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>((segments.size()-1)*2+1,segments.size()*2)=LCosSinSum;
  1997. <a name="l01910"></a>01910 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>((segments.size()-1)*2,segments.size()*2+1)=LCosSinSum;
  1998. <a name="l01911"></a>01911 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>((segments.size()-1)*2+1,segments.size()*2+1)=LSin2Sum;
  1999. <a name="l01912"></a>01912 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>((segments.size()-1)*2,segments.size()*2+2)=LCosSum;
  2000. <a name="l01913"></a>01913 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>((segments.size()-1)*2+1,segments.size()*2+2)=LSinSum;
  2001. <a name="l01914"></a>01914 slvr.<a class="code" href="classmatrixVectorSolver.html#a8ace97aea50702cb4ccfe299d3e3784a">B</a>().<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>((segments.size()-1)*2)=-LCosSum;
  2002. <a name="l01915"></a>01915 slvr.<a class="code" href="classmatrixVectorSolver.html#a8ace97aea50702cb4ccfe299d3e3784a">B</a>().<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>((segments.size()-1)*2+1)=-LSinSum;
  2003. <a name="l01916"></a>01916
  2004. <a name="l01917"></a>01917 <span class="comment">// insert the scale and center constraints</span>
  2005. <a name="l01918"></a>01918 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;segments.size();i++)
  2006. <a name="l01919"></a>01919 {
  2007. <a name="l01920"></a>01920 <span class="comment">// scale constraint</span>
  2008. <a name="l01921"></a>01921 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(segments.size()*2,i*2)=xCoeff[i];
  2009. <a name="l01922"></a>01922 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(segments.size()*2,i*2+1)=yCoeff[i];
  2010. <a name="l01923"></a>01923 slvr.<a class="code" href="classmatrixVectorSolver.html#a8ace97aea50702cb4ccfe299d3e3784a">B</a>().<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(segments.size()*2)=scaleSource;
  2011. <a name="l01924"></a>01924 <span class="comment">// Average X position</span>
  2012. <a name="l01925"></a>01925 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(segments.size()*2+1,i*2)=xCoeff[i]*xCoeff[i];
  2013. <a name="l01926"></a>01926 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(segments.size()*2+1,i*2+1)=xCoeff[i]*yCoeff[i];
  2014. <a name="l01927"></a>01927 slvr.<a class="code" href="classmatrixVectorSolver.html#a8ace97aea50702cb4ccfe299d3e3784a">B</a>().<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(segments.size()*2+1)=xBarSource;
  2015. <a name="l01928"></a>01928 <span class="comment">// Average Y position</span>
  2016. <a name="l01929"></a>01929 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(segments.size()*2+2,i*2)=yCoeff[i]*xCoeff[i];
  2017. <a name="l01930"></a>01930 slvr.<a class="code" href="classmatrixVectorSolver.html#a436841316325da875108c1cd9578014a">A</a>().<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(segments.size()*2+2,i*2+1)=yCoeff[i]*yCoeff[i];
  2018. <a name="l01931"></a>01931 slvr.<a class="code" href="classmatrixVectorSolver.html#a8ace97aea50702cb4ccfe299d3e3784a">B</a>().<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(segments.size()*2+2)=yBarSource;
  2019. <a name="l01932"></a>01932 }
  2020. <a name="l01933"></a>01933
  2021. <a name="l01934"></a>01934 slvr.<a class="code" href="classmatrixVectorSolver.html#ab9b2e9bb3706acc5807ad4ec49a7a7b7">solve</a>();
  2022. <a name="l01935"></a>01935
  2023. <a name="l01936"></a>01936 <a class="code" href="classpolygon.html">polygon&lt;dataType&gt;</a> retVal(segments.size());
  2024. <a name="l01937"></a>01937
  2025. <a name="l01938"></a>01938 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;segments.size();i++)
  2026. <a name="l01939"></a>01939 retVal.<a class="code" href="classpolygon.html#afacfb555417d495769e88a176755c528">getPoint</a>(i)=<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(slvr.<a class="code" href="classmatrixVectorSolver.html#a8ace97aea50702cb4ccfe299d3e3784a">B</a>().<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(i*2),slvr.<a class="code" href="classmatrixVectorSolver.html#a8ace97aea50702cb4ccfe299d3e3784a">B</a>().<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(i*2+1));
  2027. <a name="l01940"></a>01940
  2028. <a name="l01941"></a>01941 <span class="comment">// with all the segment length trends established we can build the matrix and solve the offset ...</span>
  2029. <a name="l01942"></a>01942 <span class="keywordflow">return</span> retVal;
  2030. <a name="l01943"></a>01943 }
  2031. <a name="l01944"></a>01944
  2032. <a name="l01945"></a><a class="code" href="classapproxOffset.html#a749e13f6b9d6a32099731f382a41746b">01945</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classapproxOffset.html#a749e13f6b9d6a32099731f382a41746b">maxH</a>()
  2033. <a name="l01946"></a>01946 {
  2034. <a name="l01947"></a>01947 <span class="keywordflow">if</span>(!setsBuilt)
  2035. <a name="l01948"></a>01948 buildSegments();
  2036. <a name="l01949"></a>01949 <span class="keywordflow">return</span> maxHData;
  2037. <a name="l01950"></a>01950 }
  2038. <a name="l01951"></a>01951 };
  2039. <a name="l01952"></a>01952
  2040. <a name="l01953"></a>01953 <span class="comment">// template&lt;class dataType&gt;</span>
  2041. <a name="l01954"></a>01954 <span class="comment">// unsigned long cubicSoln(dataType a,dataType b,dataType c,dataType d,std::complex&lt;dataType&gt;&amp; root1,std::complex&lt;dataType&gt;&amp; root2,std::complex&lt;dataType&gt;&amp; root3)</span>
  2042. <a name="l01955"></a>01955 <span class="comment">// {</span>
  2043. <a name="l01956"></a>01956 <span class="comment">// std::complex&lt;dataType&gt; A(a,0.0);</span>
  2044. <a name="l01957"></a>01957 <span class="comment">// std::complex&lt;dataType&gt; B(b,0.0);</span>
  2045. <a name="l01958"></a>01958 <span class="comment">// std::complex&lt;dataType&gt; C(c,0.0);</span>
  2046. <a name="l01959"></a>01959 <span class="comment">// std::complex&lt;dataType&gt; D(d,0.0);</span>
  2047. <a name="l01960"></a>01960 <span class="comment">// </span>
  2048. <a name="l01961"></a>01961 <span class="comment">// dataType p=(3.0*a*c-b*b)/(3.0*a*a);</span>
  2049. <a name="l01962"></a>01962 <span class="comment">// dataType q=(2.0*b*b*b-9.0*a*b*c+27.0*a*a*d)/(27.0*a*a*a);</span>
  2050. <a name="l01963"></a>01963 <span class="comment">// </span>
  2051. <a name="l01964"></a>01964 <span class="comment">// // std::complex&lt;dataType&gt; innerSqrt=sqrt(pow(2.0*B*B*B-9.0*A*B*C+27.0*A*A*D,2.0)-4.0*pow(B*B-3.0*A*C,3.0));</span>
  2052. <a name="l01965"></a>01965 <span class="comment">// // std::complex&lt;dataType&gt; innerTerm=2.0*B*B*B-9.0*A*B*C+27.0*A*A*D;</span>
  2053. <a name="l01966"></a>01966 <span class="comment">// // root1=-(B/(3.0*A))</span>
  2054. <a name="l01967"></a>01967 <span class="comment">// // -(1.0/(3.0*A))*pow(0.5*(innerTerm+innerSqrt),1.0/3.0)</span>
  2055. <a name="l01968"></a>01968 <span class="comment">// // -(1.0/(3.0*A))*pow(0.5*(innerTerm-innerSqrt),1.0/3.0);</span>
  2056. <a name="l01969"></a>01969 <span class="comment">// // root2=-(B/(3.0*A))</span>
  2057. <a name="l01970"></a>01970 <span class="comment">// // +(std::complex&lt;dataType&gt;(1.0,sqrt(3.0))/(6.0*A))*pow(0.5*(innerTerm+innerSqrt),1.0/3.0)</span>
  2058. <a name="l01971"></a>01971 <span class="comment">// // +(std::complex&lt;dataType&gt;(1.0,-sqrt(3.0))/(6.0*A))*pow(0.5*(innerTerm-innerSqrt),1.0/3.0);</span>
  2059. <a name="l01972"></a>01972 <span class="comment">// // root3=-(B/(3.0*A))</span>
  2060. <a name="l01973"></a>01973 <span class="comment">// // +(std::complex&lt;dataType&gt;(1.0,-sqrt(3.0))/(6.0*A))*pow(0.5*(innerTerm+innerSqrt),1.0/3.0)</span>
  2061. <a name="l01974"></a>01974 <span class="comment">// // +(std::complex&lt;dataType&gt;(1.0,sqrt(3.0))/(6.0*A))*pow(0.5*(innerTerm-innerSqrt),1.0/3.0);</span>
  2062. <a name="l01975"></a>01975 <span class="comment">// // </span>
  2063. <a name="l01976"></a>01976 <span class="comment">// // unsigned long cnt=0.0;</span>
  2064. <a name="l01977"></a>01977 <span class="comment">// // if(root1.imag()==0.0)</span>
  2065. <a name="l01978"></a>01978 <span class="comment">// // cnt++;</span>
  2066. <a name="l01979"></a>01979 <span class="comment">// // if(root2.imag()==0.0)</span>
  2067. <a name="l01980"></a>01980 <span class="comment">// // cnt++;</span>
  2068. <a name="l01981"></a>01981 <span class="comment">// // if(root3.imag()==0.0)</span>
  2069. <a name="l01982"></a>01982 <span class="comment">// // cnt++;</span>
  2070. <a name="l01983"></a>01983 <span class="comment">// </span>
  2071. <a name="l01984"></a>01984 <span class="comment">// return cnt;</span>
  2072. <a name="l01985"></a>01985 <span class="comment">// }</span>
  2073. <a name="l01986"></a>01986
  2074. <a name="l01987"></a>01987 <span class="comment">// this is the class that given a polygon it will produce a smooth curve</span>
  2075. <a name="l01988"></a>01988 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  2076. <a name="l01989"></a><a class="code" href="classcurve__polygon.html">01989</a> <span class="keyword">class </span><a class="code" href="classcurve__polygon.html">curve_polygon</a> : <span class="keyword">public</span> <a class="code" href="classcurve.html">curve</a>&lt;dataType&gt;
  2077. <a name="l01990"></a>01990 {
  2078. <a name="l01991"></a>01991 <span class="keyword">private</span>:
  2079. <a name="l01992"></a>01992
  2080. <a name="l01993"></a>01993 std::vector&lt;dataType&gt; sPoints;
  2081. <a name="l01994"></a>01994 std::vector&lt;matrixRdWtStatic_Data&lt;dataType,4,2&gt; &gt; cubics;
  2082. <a name="l01995"></a>01995
  2083. <a name="l01996"></a>01996 <span class="keywordtype">void</span> setVertices(<span class="keyword">const</span> <a class="code" href="classpolygon.html">polygon&lt;dataType&gt;</a>&amp; poly)
  2084. <a name="l01997"></a>01997 {
  2085. <a name="l01998"></a>01998 <span class="comment">// create</span>
  2086. <a name="l01999"></a>01999 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> sz=poly.<a class="code" href="classpolygon.html#aefd94b1ac2266272b090260ead926d5e">size</a>();
  2087. <a name="l02000"></a>02000
  2088. <a name="l02001"></a>02001 <span class="comment">// First generate the set of s points</span>
  2089. <a name="l02002"></a>02002 sPoints.resize(sz);
  2090. <a name="l02003"></a>02003 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;sz;i++)
  2091. <a name="l02004"></a>02004 {
  2092. <a name="l02005"></a>02005 <span class="keywordflow">if</span>(i!=0)
  2093. <a name="l02006"></a>02006 sPoints[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=sPoints[i-1];
  2094. <a name="l02007"></a>02007 <span class="keywordflow">else</span>
  2095. <a name="l02008"></a>02008 sPoints[0]=0.0;
  2096. <a name="l02009"></a>02009 sPoints[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]+=(poly.<a class="code" href="classpolygon.html#afacfb555417d495769e88a176755c528">getPoint</a>((i+1)%sz)-poly.<a class="code" href="classpolygon.html#afacfb555417d495769e88a176755c528">getPoint</a>(i%sz)).<a class="code" href="rotationMath_8cpp.html#a5c585f7f82a9507ad212639d44663ac2">length</a>();
  2097. <a name="l02010"></a>02010 }
  2098. <a name="l02011"></a>02011 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> S=sPoints[sz-1];
  2099. <a name="l02012"></a>02012 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=sz-1;i&gt;0;i--)
  2100. <a name="l02013"></a>02013 sPoints[i]=sPoints[i-1]/S;
  2101. <a name="l02014"></a>02014 sPoints[0]=0.0;
  2102. <a name="l02015"></a>02015
  2103. <a name="l02016"></a>02016 <span class="comment">// This is the set of coefficients for quadratics</span>
  2104. <a name="l02017"></a>02017 std::vector&lt;matrixRdWtStatic_Data&lt;dataType,3,2&gt; &gt; quads(sz+1);
  2105. <a name="l02018"></a>02018 <a class="code" href="classmatrixRdWtStatic__Data.html">matrixRdWtStatic_Data&lt;dataType,3,2&gt;</a> source;
  2106. <a name="l02019"></a>02019 <a class="code" href="classmatrixRdWtStaticSqr__Data.html">matrixRdWtStaticSqr_Data&lt;dataType,3&gt;</a> sValues;
  2107. <a name="l02020"></a>02020 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;=sz;i++)
  2108. <a name="l02021"></a>02021 {
  2109. <a name="l02022"></a>02022 <span class="keywordflow">if</span>(i==0)
  2110. <a name="l02023"></a>02023 {
  2111. <a name="l02024"></a>02024 <span class="comment">// i-1</span>
  2112. <a name="l02025"></a>02025 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(0,0)=1.0;
  2113. <a name="l02026"></a>02026 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(0,1)=sPoints[((i+sz)-1)%sz]-1.0;
  2114. <a name="l02027"></a>02027 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(0,2)=pow(sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(0,1),2.0);
  2115. <a name="l02028"></a>02028 source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0)=poly.<a class="code" href="classpolygon.html#afacfb555417d495769e88a176755c528">getPoint</a>(sz-1).x;
  2116. <a name="l02029"></a>02029 source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,1)=poly.<a class="code" href="classpolygon.html#afacfb555417d495769e88a176755c528">getPoint</a>(sz-1).y;
  2117. <a name="l02030"></a>02030 <span class="comment">// i</span>
  2118. <a name="l02031"></a>02031 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(1,0)=1.0;
  2119. <a name="l02032"></a>02032 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(1,1)=0.0;
  2120. <a name="l02033"></a>02033 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(1,2)=0.0;
  2121. <a name="l02034"></a>02034 source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,0)=poly.<a class="code" href="classpolygon.html#afacfb555417d495769e88a176755c528">getPoint</a>(0).x;
  2122. <a name="l02035"></a>02035 source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1)=poly.<a class="code" href="classpolygon.html#afacfb555417d495769e88a176755c528">getPoint</a>(0).y;
  2123. <a name="l02036"></a>02036 <span class="comment">// i+1</span>
  2124. <a name="l02037"></a>02037 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,0)=1.0;
  2125. <a name="l02038"></a>02038 }
  2126. <a name="l02039"></a>02039 <span class="keywordflow">else</span>
  2127. <a name="l02040"></a>02040 {
  2128. <a name="l02041"></a>02041 <span class="comment">// i-1</span>
  2129. <a name="l02042"></a>02042 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(0,1)=sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(1,1);
  2130. <a name="l02043"></a>02043 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(0,2)=sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(1,2);
  2131. <a name="l02044"></a>02044 source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0)=source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,0);
  2132. <a name="l02045"></a>02045 source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,1)=source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1);
  2133. <a name="l02046"></a>02046 <span class="comment">// i</span>
  2134. <a name="l02047"></a>02047 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(1,1)=sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,1);
  2135. <a name="l02048"></a>02048 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(1,2)=sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,2);
  2136. <a name="l02049"></a>02049 source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,0)=source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,0);
  2137. <a name="l02050"></a>02050 source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1)=source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,1);
  2138. <a name="l02051"></a>02051 }
  2139. <a name="l02052"></a>02052 <span class="comment">// i+1</span>
  2140. <a name="l02053"></a>02053 <span class="keywordflow">if</span>(i==(sz-1))
  2141. <a name="l02054"></a>02054 {
  2142. <a name="l02055"></a>02055 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,1)=1.0;
  2143. <a name="l02056"></a>02056 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,2)=1.0;
  2144. <a name="l02057"></a>02057 }
  2145. <a name="l02058"></a>02058 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(i==sz)
  2146. <a name="l02059"></a>02059 {
  2147. <a name="l02060"></a>02060 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,1)=1.0+sPoints[1];
  2148. <a name="l02061"></a>02061 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,2)=pow(sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,1),2.0);
  2149. <a name="l02062"></a>02062 }
  2150. <a name="l02063"></a>02063 <span class="keywordflow">else</span>
  2151. <a name="l02064"></a>02064 {
  2152. <a name="l02065"></a>02065 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,1)=sPoints[i+1];
  2153. <a name="l02066"></a>02066 sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,2)=pow(sValues.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,1),2.0);
  2154. <a name="l02067"></a>02067 }
  2155. <a name="l02068"></a>02068 source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,0)=poly.<a class="code" href="classpolygon.html#afacfb555417d495769e88a176755c528">getPoint</a>((i+1)%sz).x;
  2156. <a name="l02069"></a>02069 source.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,1)=poly.<a class="code" href="classpolygon.html#afacfb555417d495769e88a176755c528">getPoint</a>((i+1)%sz).y;
  2157. <a name="l02070"></a>02070
  2158. <a name="l02071"></a>02071 quads[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=sValues.<a class="code" href="classmatrixSqr.html#a991ebad568b11587f75c85cc3b8da408">inverse</a>()*source;
  2159. <a name="l02072"></a>02072 }
  2160. <a name="l02073"></a>02073
  2161. <a name="l02074"></a>02074 <span class="comment">// now we create the cubics</span>
  2162. <a name="l02075"></a>02075 cubics.resize(sz);
  2163. <a name="l02076"></a>02076 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;sz;i++)
  2164. <a name="l02077"></a>02077 {
  2165. <a name="l02078"></a>02078 <a class="code" href="classmatrixRdWtStatic__Data.html">matrixRdWtStatic_Data&lt;dataType,4,3&gt;</a> Map_1;
  2166. <a name="l02079"></a>02079 <a class="code" href="classmatrixRdWtStatic__Data.html">matrixRdWtStatic_Data&lt;dataType,4,3&gt;</a> Map_2;
  2167. <a name="l02080"></a>02080 <span class="keywordflow">if</span>(i==0)
  2168. <a name="l02081"></a>02081 {
  2169. <a name="l02082"></a>02082 Map_1=<a class="code" href="classmatrixStatic__Zero.html">matrixStatic_Zero&lt;dataType,4,3&gt;</a>();
  2170. <a name="l02083"></a>02083 Map_2=<a class="code" href="classmatrixStatic__Zero.html">matrixStatic_Zero&lt;dataType,4,3&gt;</a>();
  2171. <a name="l02084"></a>02084 Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,0)=-1.0;
  2172. <a name="l02085"></a>02085 Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,1)=-1.0;
  2173. <a name="l02086"></a>02086 Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(3,2)=-1.0;
  2174. <a name="l02087"></a>02087 Map_2.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,0)=1.0;
  2175. <a name="l02088"></a>02088 Map_2.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,1)=1.0;
  2176. <a name="l02089"></a>02089 Map_2.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(3,2)=1.0;
  2177. <a name="l02090"></a>02090 Map_2.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0)=0.0;
  2178. <a name="l02091"></a>02091 Map_2.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1)=0.0;
  2179. <a name="l02092"></a>02092 Map_2.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,2)=0.0;
  2180. <a name="l02093"></a>02093 }
  2181. <a name="l02094"></a>02094 <span class="keywordflow">else</span>
  2182. <a name="l02095"></a>02095 {
  2183. <a name="l02096"></a>02096 Map_2.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0)=-Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0);
  2184. <a name="l02097"></a>02097 Map_2.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1)=-Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1);
  2185. <a name="l02098"></a>02098 Map_2.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,2)=-Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,2);
  2186. <a name="l02099"></a>02099 }
  2187. <a name="l02100"></a>02100 <span class="keywordflow">if</span>(i==(sz-1))
  2188. <a name="l02101"></a>02101 {
  2189. <a name="l02102"></a>02102 Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0)=1.0;
  2190. <a name="l02103"></a>02103 Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1)=1.0;
  2191. <a name="l02104"></a>02104 Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,2)=1.0;
  2192. <a name="l02105"></a>02105 }
  2193. <a name="l02106"></a>02106 <span class="keywordflow">else</span>
  2194. <a name="l02107"></a>02107 {
  2195. <a name="l02108"></a>02108 Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0)=sPoints[i+1];
  2196. <a name="l02109"></a>02109 Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1)=sPoints[i+1];
  2197. <a name="l02110"></a>02110 Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,2)=sPoints[i+1];
  2198. <a name="l02111"></a>02111 }
  2199. <a name="l02112"></a>02112 cubics[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=(1.0/(Map_1.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0)+Map_2.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0)))*(Map_1*quads[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]+Map_2*quads[i+1]);
  2200. <a name="l02113"></a>02113 }
  2201. <a name="l02114"></a>02114 }
  2202. <a name="l02115"></a>02115
  2203. <a name="l02116"></a>02116 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> getAt(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; s)<span class="keyword"> const</span>
  2204. <a name="l02117"></a>02117 <span class="keyword"> </span>{
  2205. <a name="l02118"></a>02118 s=s-floor(s);
  2206. <a name="l02119"></a>02119 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at=0;
  2207. <a name="l02120"></a>02120 <span class="keywordflow">while</span>(at&lt;(sPoints.size()-1) &amp;&amp; s&gt;sPoints[at+1])
  2208. <a name="l02121"></a>02121 at++;
  2209. <a name="l02122"></a>02122 <span class="keywordflow">return</span> at;
  2210. <a name="l02123"></a>02123 }
  2211. <a name="l02124"></a>02124
  2212. <a name="l02125"></a>02125 <span class="keywordtype">void</span> position(<span class="keyword">const</span> <a class="code" href="classmatrixRdWtStatic__Data.html">matrixRdWtStatic_Data&lt;dataType,4,2&gt;</a>&amp; cube,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> atS,<a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a>&amp; pnt)<span class="keyword"> const</span>
  2213. <a name="l02126"></a>02126 <span class="keyword"> </span>{
  2214. <a name="l02127"></a>02127 <span class="comment">// solve the position</span>
  2215. <a name="l02128"></a>02128 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,4&gt;</a> sLocs=<a class="code" href="classmatrixStatic__Zero.html">matrixStatic_Zero&lt;dataType,1,4&gt;</a>();
  2216. <a name="l02129"></a>02129 sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(0)=1.0;
  2217. <a name="l02130"></a>02130 sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(1)=atS;
  2218. <a name="l02131"></a>02131 sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(2)=sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(1)*sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(1);
  2219. <a name="l02132"></a>02132 sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(3)=sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(2)*sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(1);
  2220. <a name="l02133"></a>02133 pnt=sLocs*cube;
  2221. <a name="l02134"></a>02134 }
  2222. <a name="l02135"></a>02135
  2223. <a name="l02136"></a>02136 <span class="keywordtype">void</span> gradient(<span class="keyword">const</span> <a class="code" href="classmatrixRdWtStatic__Data.html">matrixRdWtStatic_Data&lt;dataType,4,2&gt;</a>&amp; cube,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> atS,<a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a>&amp; pnt)<span class="keyword"> const</span>
  2224. <a name="l02137"></a>02137 <span class="keyword"> </span>{
  2225. <a name="l02138"></a>02138 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,3&gt;</a> sLocs=<a class="code" href="classmatrixStatic__Zero.html">matrixStatic_Zero&lt;dataType,1,3&gt;</a>();
  2226. <a name="l02139"></a>02139 <a class="code" href="classmatrixRdWtStatic__Data.html">matrixRdWtStatic_Data&lt;dataType,3,4&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>=<a class="code" href="classmatrixStatic__Zero.html">matrixStatic_Zero&lt;dataType,3,4&gt;</a>();
  2227. <a name="l02140"></a>02140 grad.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,1)=1.0;
  2228. <a name="l02141"></a>02141 grad.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,2)=2.0;
  2229. <a name="l02142"></a>02142 grad.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,3)=3.0;
  2230. <a name="l02143"></a>02143 sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(0)=1.0;
  2231. <a name="l02144"></a>02144 sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(1)=atS;
  2232. <a name="l02145"></a>02145 sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(2)=sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(1)*sLocs.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(1);
  2233. <a name="l02146"></a>02146 pnt=sLocs*grad*cube;
  2234. <a name="l02147"></a>02147 }
  2235. <a name="l02148"></a>02148
  2236. <a name="l02149"></a>02149 <span class="keyword">struct </span>iPoint
  2237. <a name="l02150"></a>02150 {
  2238. <a name="l02151"></a>02151 <span class="keyword">public</span>:
  2239. <a name="l02152"></a>02152
  2240. <a name="l02153"></a>02153 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s;
  2241. <a name="l02154"></a>02154 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> w;
  2242. <a name="l02155"></a>02155 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> pnt;
  2243. <a name="l02156"></a>02156 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>;
  2244. <a name="l02157"></a>02157
  2245. <a name="l02158"></a>02158 iPoint(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s_in=0.0,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> w_in=0.0) : s(s_in) , w(w_in)
  2246. <a name="l02159"></a>02159 {}
  2247. <a name="l02160"></a>02160 };
  2248. <a name="l02161"></a>02161
  2249. <a name="l02162"></a>02162 <span class="keywordtype">void</span> sRange(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; sLow,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; sHigh)<span class="keyword"> const</span>
  2250. <a name="l02163"></a>02163 <span class="keyword"> </span>{
  2251. <a name="l02164"></a>02164 sLow=sPoints[at];
  2252. <a name="l02165"></a>02165 <span class="keywordflow">if</span>(at&lt;(sPoints.size()-1))
  2253. <a name="l02166"></a>02166 sHigh=sPoints[at+1];
  2254. <a name="l02167"></a>02167 <span class="keywordflow">else</span>
  2255. <a name="l02168"></a>02168 sHigh=1.0;
  2256. <a name="l02169"></a>02169 }
  2257. <a name="l02170"></a>02170
  2258. <a name="l02171"></a>02171 <span class="keywordtype">void</span> solveCubic(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sLow,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sHigh,<span class="keyword">const</span> <a class="code" href="classmatrixRdWtStatic__Data.html">matrixRdWtStatic_Data&lt;dataType,4,2&gt;</a>&amp; cube,std::list&lt;iPoint&gt;&amp; iPnts)<span class="keyword"> const</span>
  2259. <a name="l02172"></a>02172 <span class="keyword"> </span>{
  2260. <a name="l02173"></a>02173
  2261. <a name="l02174"></a>02174 <span class="keyword">const</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; a=cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(3,1);
  2262. <a name="l02175"></a>02175 <span class="keyword">const</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; b=cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,1);
  2263. <a name="l02176"></a>02176 <span class="keyword">const</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; c=cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1);
  2264. <a name="l02177"></a>02177 <span class="keyword">const</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; d=cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,1);
  2265. <a name="l02178"></a>02178 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> p=(3.0*a*c-b*b)/(3.0*a*a);
  2266. <a name="l02179"></a>02179 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> q=(2.0*b*b*b-9.0*a*b*c+27.0*a*a*d)/(27.0*a*a*a);
  2267. <a name="l02180"></a>02180 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> desc=-4.0*p*p*p-27.0*q*q;
  2268. <a name="l02181"></a>02181
  2269. <a name="l02182"></a>02182 <span class="keywordflow">if</span>(desc&gt;=0.0)
  2270. <a name="l02183"></a>02183 {
  2271. <a name="l02184"></a>02184 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> pnt;
  2272. <a name="l02185"></a>02185
  2273. <a name="l02186"></a>02186 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> theta=(1.0/3.0)*<a class="code" href="ComplexMathExt_8cpp.html#aa3da7a96d23cd4396c5fbf21898194a0">acos</a>(3.0*q*sqrt(-3.0/p)/(2.0*p));
  2274. <a name="l02187"></a>02187
  2275. <a name="l02188"></a>02188 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t1=2.0*sqrt(-p/3.0)*cos(theta);
  2276. <a name="l02189"></a>02189 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s1=t1-b/(3.0*a);
  2277. <a name="l02190"></a>02190 <span class="keywordflow">if</span>(sLow&lt;=s1 &amp;&amp; s1&lt;=sHigh)
  2278. <a name="l02191"></a>02191 {
  2279. <a name="l02192"></a>02192 position(cube,s1,pnt);
  2280. <a name="l02193"></a>02193 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> &amp;x=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0);
  2281. <a name="l02194"></a>02194 <span class="keywordflow">if</span>(0.0&lt;=x &amp;&amp; x&lt;=1.0)
  2282. <a name="l02195"></a>02195 {
  2283. <a name="l02196"></a>02196 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>;
  2284. <a name="l02197"></a>02197 gradient(cube,s1,grad);
  2285. <a name="l02198"></a>02198 iPnts.push_back(iPoint(s1,fabs(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1))/sqrt(pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0),2.0)+pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1),2.0))));
  2286. <a name="l02199"></a>02199 }
  2287. <a name="l02200"></a>02200 }
  2288. <a name="l02201"></a>02201
  2289. <a name="l02202"></a>02202 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t2=2.0*sqrt(-p/3.0)*cos(theta-2.0*<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>/3.0);
  2290. <a name="l02203"></a>02203 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s2=t2-b/(3.0*a);
  2291. <a name="l02204"></a>02204 <span class="keywordflow">if</span>(sLow&lt;=s2 &amp;&amp; s2&lt;=sHigh)
  2292. <a name="l02205"></a>02205 {
  2293. <a name="l02206"></a>02206 position(cube,s2,pnt);
  2294. <a name="l02207"></a>02207 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> &amp;x=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0);
  2295. <a name="l02208"></a>02208 <span class="keywordflow">if</span>(0.0&lt;=x &amp;&amp; x&lt;=1.0)
  2296. <a name="l02209"></a>02209 {
  2297. <a name="l02210"></a>02210 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>;
  2298. <a name="l02211"></a>02211 gradient(cube,s2,grad);
  2299. <a name="l02212"></a>02212 iPnts.push_back(iPoint(s2,fabs(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1))/sqrt(pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0),2.0)+pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1),2.0))));
  2300. <a name="l02213"></a>02213 }
  2301. <a name="l02214"></a>02214 }
  2302. <a name="l02215"></a>02215
  2303. <a name="l02216"></a>02216 <span class="keywordflow">if</span>(theta!=0.0)
  2304. <a name="l02217"></a>02217 {
  2305. <a name="l02218"></a>02218 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t3=2.0*sqrt(-p/3.0)*cos(theta-4.0*<a class="code" href="meshSudo_8cpp.html#a43016d873124d39034edb8cd164794db">pi</a>/3.0);
  2306. <a name="l02219"></a>02219 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s3=t3-b/(3.0*a);
  2307. <a name="l02220"></a>02220 <span class="keywordflow">if</span>(sLow&lt;=s3 &amp;&amp; s3&lt;=sHigh)
  2308. <a name="l02221"></a>02221 {
  2309. <a name="l02222"></a>02222 position(cube,s3,pnt);
  2310. <a name="l02223"></a>02223 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> &amp;x=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0);
  2311. <a name="l02224"></a>02224 <span class="keywordflow">if</span>(0.0&lt;=x &amp;&amp; x&lt;=1.0)
  2312. <a name="l02225"></a>02225 {
  2313. <a name="l02226"></a>02226 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>;
  2314. <a name="l02227"></a>02227 gradient(cube,s3,grad);
  2315. <a name="l02228"></a>02228 iPnts.push_back(iPoint(s3,fabs(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1))/sqrt(pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0),2.0)+pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1),2.0))));
  2316. <a name="l02229"></a>02229 }
  2317. <a name="l02230"></a>02230 }
  2318. <a name="l02231"></a>02231 }
  2319. <a name="l02232"></a>02232 }
  2320. <a name="l02233"></a>02233 <span class="keywordflow">else</span>
  2321. <a name="l02234"></a>02234 {
  2322. <a name="l02235"></a>02235 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> pnt;
  2323. <a name="l02236"></a>02236
  2324. <a name="l02237"></a>02237 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> quadDesc=q*q/4.0+p*p*p/27.0;
  2325. <a name="l02238"></a>02238 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> cube1=-q/2.0+sqrt(quadDesc);
  2326. <a name="l02239"></a>02239 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> cube2=-q/2.0-sqrt(quadDesc);
  2327. <a name="l02240"></a>02240 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> root1;
  2328. <a name="l02241"></a>02241 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> root2;
  2329. <a name="l02242"></a>02242 <span class="keywordflow">if</span>(cube1&lt;0.0)
  2330. <a name="l02243"></a>02243 root1=-1.0*pow(-1.0*cube1,1.0/3.0);
  2331. <a name="l02244"></a>02244 <span class="keywordflow">else</span>
  2332. <a name="l02245"></a>02245 root1=pow(cube1,1.0/3.0);
  2333. <a name="l02246"></a>02246 <span class="keywordflow">if</span>(cube2&lt;0.0)
  2334. <a name="l02247"></a>02247 root2=-1.0*pow(-1.0*cube2,1.0/3.0);
  2335. <a name="l02248"></a>02248 <span class="keywordflow">else</span>
  2336. <a name="l02249"></a>02249 root2=pow(cube2,1.0/3.0);
  2337. <a name="l02250"></a>02250 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> t=root1+root2;
  2338. <a name="l02251"></a>02251 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s=t-b/(3.0*a);
  2339. <a name="l02252"></a>02252 <span class="keywordflow">if</span>(sLow&lt;=s &amp;&amp; s&lt;=sHigh)
  2340. <a name="l02253"></a>02253 {
  2341. <a name="l02254"></a>02254 position(cube,s,pnt);
  2342. <a name="l02255"></a>02255 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> &amp;x=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0);
  2343. <a name="l02256"></a>02256 <span class="keywordflow">if</span>(0.0&lt;=x &amp;&amp; x&lt;=1.0)
  2344. <a name="l02257"></a>02257 {
  2345. <a name="l02258"></a>02258 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>;
  2346. <a name="l02259"></a>02259 gradient(cube,s,grad);
  2347. <a name="l02260"></a>02260 iPnts.push_back(iPoint(s,fabs(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1))/sqrt(pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0),2.0)+pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1),2.0))));
  2348. <a name="l02261"></a>02261 }
  2349. <a name="l02262"></a>02262 }
  2350. <a name="l02263"></a>02263 }
  2351. <a name="l02264"></a>02264
  2352. <a name="l02265"></a>02265 <span class="comment">// This is an old version that relies on numerical methods</span>
  2353. <a name="l02266"></a>02266 <span class="comment">// // First lets retrieve all the critical points and let that guide us to determine if it is worth solving the roots</span>
  2354. <a name="l02267"></a>02267 <span class="comment">// dataType descY=pow(2.0*cube.entry(2,1),2.0)-12.0*cube.entry(3,1)*cube.entry(1,1);</span>
  2355. <a name="l02268"></a>02268 <span class="comment">// </span>
  2356. <a name="l02269"></a>02269 <span class="comment">// // this will get all the critical points for the x equation</span>
  2357. <a name="l02270"></a>02270 <span class="comment">// std::list&lt;dataType&gt; critX;</span>
  2358. <a name="l02271"></a>02271 <span class="comment">// critX.push_back(sLow);</span>
  2359. <a name="l02272"></a>02272 <span class="comment">// if(cube.entry(3,0)!=0.0)</span>
  2360. <a name="l02273"></a>02273 <span class="comment">// {</span>
  2361. <a name="l02274"></a>02274 <span class="comment">// dataType descX=pow(2.0*cube.entry(2,0),2.0)-12.0*cube.entry(3,0)*cube.entry(1,0);</span>
  2362. <a name="l02275"></a>02275 <span class="comment">// if(descX&gt;0.0)</span>
  2363. <a name="l02276"></a>02276 <span class="comment">// {</span>
  2364. <a name="l02277"></a>02277 <span class="comment">// // there is a potential for multiple solutions !!!</span>
  2365. <a name="l02278"></a>02278 <span class="comment">// dataType crit1X=(-2.0*cube.entry(2,0)-sqrt(descX))/(6.0*cube.entry(3,0));</span>
  2366. <a name="l02279"></a>02279 <span class="comment">// dataType crit2X=(-2.0*cube.entry(2,0)+sqrt(descX))/(6.0*cube.entry(3,0));</span>
  2367. <a name="l02280"></a>02280 <span class="comment">// if(crit1X&gt;sLow &amp;&amp; crit1X&lt;sHigh)</span>
  2368. <a name="l02281"></a>02281 <span class="comment">// critX.push_back(crit1X);</span>
  2369. <a name="l02282"></a>02282 <span class="comment">// if(crit2X&gt;sLow &amp;&amp; crit2X&lt;sHigh)</span>
  2370. <a name="l02283"></a>02283 <span class="comment">// critX.push_back(crit2X);</span>
  2371. <a name="l02284"></a>02284 <span class="comment">// }</span>
  2372. <a name="l02285"></a>02285 <span class="comment">// }</span>
  2373. <a name="l02286"></a>02286 <span class="comment">// else if(cube.entry(2,0)!=0.0)</span>
  2374. <a name="l02287"></a>02287 <span class="comment">// {</span>
  2375. <a name="l02288"></a>02288 <span class="comment">// dataType crit1X=-cube.entry(1,0)/(2.0*cube.entry(2,0));</span>
  2376. <a name="l02289"></a>02289 <span class="comment">// if(crit1X&gt;sLow &amp;&amp; crit1X&lt;sHigh)</span>
  2377. <a name="l02290"></a>02290 <span class="comment">// critX.push_back(crit1X);</span>
  2378. <a name="l02291"></a>02291 <span class="comment">// }</span>
  2379. <a name="l02292"></a>02292 <span class="comment">// critX.push_back(sHigh);</span>
  2380. <a name="l02293"></a>02293 <span class="comment">// </span>
  2381. <a name="l02294"></a>02294 <span class="comment">// // this will get all the critical points for the y equation</span>
  2382. <a name="l02295"></a>02295 <span class="comment">// std::list&lt;dataType&gt; critY;</span>
  2383. <a name="l02296"></a>02296 <span class="comment">// critY.push_back(sLow);</span>
  2384. <a name="l02297"></a>02297 <span class="comment">// if(descY&gt;0.0)</span>
  2385. <a name="l02298"></a>02298 <span class="comment">// {</span>
  2386. <a name="l02299"></a>02299 <span class="comment">// // there is a potential for multiple solutions !!!</span>
  2387. <a name="l02300"></a>02300 <span class="comment">// dataType crit1Y=(-2.0*cube.entry(2,1)-sqrt(descY))/(6.0*cube.entry(3,1));</span>
  2388. <a name="l02301"></a>02301 <span class="comment">// dataType crit2Y=(-2.0*cube.entry(2,1)+sqrt(descY))/(6.0*cube.entry(3,1));</span>
  2389. <a name="l02302"></a>02302 <span class="comment">// if(crit1Y&gt;sLow &amp;&amp; crit1Y&lt;sHigh)</span>
  2390. <a name="l02303"></a>02303 <span class="comment">// critY.push_back(crit1Y);</span>
  2391. <a name="l02304"></a>02304 <span class="comment">// if(crit2Y&gt;sLow &amp;&amp; crit2Y&lt;sHigh)</span>
  2392. <a name="l02305"></a>02305 <span class="comment">// critY.push_back(crit2Y);</span>
  2393. <a name="l02306"></a>02306 <span class="comment">// }</span>
  2394. <a name="l02307"></a>02307 <span class="comment">// critY.push_back(sHigh);</span>
  2395. <a name="l02308"></a>02308 <span class="comment">// </span>
  2396. <a name="l02309"></a>02309 <span class="comment">// // this will merge all the critical points</span>
  2397. <a name="l02310"></a>02310 <span class="comment">// std::list&lt;dataType&gt; crit;</span>
  2398. <a name="l02311"></a>02311 <span class="comment">// typename std::list&lt;dataType&gt;::iterator itX=critX.begin();</span>
  2399. <a name="l02312"></a>02312 <span class="comment">// typename std::list&lt;dataType&gt;::iterator itY=critY.begin();</span>
  2400. <a name="l02313"></a>02313 <span class="comment">// while( itX!=critX.end() || itY!=critY.end())</span>
  2401. <a name="l02314"></a>02314 <span class="comment">// {</span>
  2402. <a name="l02315"></a>02315 <span class="comment">// if(itX!=critX.end() &amp;&amp; itY!=critY.end())</span>
  2403. <a name="l02316"></a>02316 <span class="comment">// {</span>
  2404. <a name="l02317"></a>02317 <span class="comment">// if((*itX)&lt;(*itY))</span>
  2405. <a name="l02318"></a>02318 <span class="comment">// {</span>
  2406. <a name="l02319"></a>02319 <span class="comment">// crit.push_back(*itX);</span>
  2407. <a name="l02320"></a>02320 <span class="comment">// itX++;</span>
  2408. <a name="l02321"></a>02321 <span class="comment">// }</span>
  2409. <a name="l02322"></a>02322 <span class="comment">// else if((*itX)&gt;(*itY))</span>
  2410. <a name="l02323"></a>02323 <span class="comment">// {</span>
  2411. <a name="l02324"></a>02324 <span class="comment">// crit.push_back(*itY);</span>
  2412. <a name="l02325"></a>02325 <span class="comment">// itY++;</span>
  2413. <a name="l02326"></a>02326 <span class="comment">// }</span>
  2414. <a name="l02327"></a>02327 <span class="comment">// else</span>
  2415. <a name="l02328"></a>02328 <span class="comment">// {</span>
  2416. <a name="l02329"></a>02329 <span class="comment">// crit.push_back(*itY);</span>
  2417. <a name="l02330"></a>02330 <span class="comment">// itX++;</span>
  2418. <a name="l02331"></a>02331 <span class="comment">// itY++;</span>
  2419. <a name="l02332"></a>02332 <span class="comment">// }</span>
  2420. <a name="l02333"></a>02333 <span class="comment">// }</span>
  2421. <a name="l02334"></a>02334 <span class="comment">// else if(itX!=critX.end())</span>
  2422. <a name="l02335"></a>02335 <span class="comment">// {</span>
  2423. <a name="l02336"></a>02336 <span class="comment">// crit.push_back(*itX);</span>
  2424. <a name="l02337"></a>02337 <span class="comment">// itX++;</span>
  2425. <a name="l02338"></a>02338 <span class="comment">// }</span>
  2426. <a name="l02339"></a>02339 <span class="comment">// else</span>
  2427. <a name="l02340"></a>02340 <span class="comment">// {</span>
  2428. <a name="l02341"></a>02341 <span class="comment">// crit.push_back(*itY);</span>
  2429. <a name="l02342"></a>02342 <span class="comment">// itY++;</span>
  2430. <a name="l02343"></a>02343 <span class="comment">// }</span>
  2431. <a name="l02344"></a>02344 <span class="comment">// }</span>
  2432. <a name="l02345"></a>02345 <span class="comment">// </span>
  2433. <a name="l02346"></a>02346 <span class="comment">// // now we solve the position at all the critical points</span>
  2434. <a name="l02347"></a>02347 <span class="comment">// std::vector&lt;matrixRdWtStaticVectRow_Data&lt;dataType,2&gt; &gt; critPoints(crit.size());</span>
  2435. <a name="l02348"></a>02348 <span class="comment">// std::vector&lt;dataType&gt; sCrit(crit.size());</span>
  2436. <a name="l02349"></a>02349 <span class="comment">// unsigned long i=0;</span>
  2437. <a name="l02350"></a>02350 <span class="comment">// for(typename std::list&lt;dataType&gt;::iterator it=crit.begin();it!=crit.end();it++)</span>
  2438. <a name="l02351"></a>02351 <span class="comment">// {</span>
  2439. <a name="l02352"></a>02352 <span class="comment">// sCrit[i]=(*it);</span>
  2440. <a name="l02353"></a>02353 <span class="comment">// position(cube,sCrit[i],critPoints[i]);</span>
  2441. <a name="l02354"></a>02354 <span class="comment">// i++;</span>
  2442. <a name="l02355"></a>02355 <span class="comment">// }</span>
  2443. <a name="l02356"></a>02356 <span class="comment">// </span>
  2444. <a name="l02357"></a>02357 <span class="comment">// // Now we try to seek out an interval that is valid</span>
  2445. <a name="l02358"></a>02358 <span class="comment">// for(unsigned long i=0;i&lt;(sCrit.size()-1);i++)</span>
  2446. <a name="l02359"></a>02359 <span class="comment">// {</span>
  2447. <a name="l02360"></a>02360 <span class="comment">// if( !((critPoints[i].entry(0)&lt;0.0 &amp;&amp; critPoints[i+1].entry(0)&lt;0.0) || (critPoints[i].entry(0)&gt;1.0 &amp;&amp; critPoints[i+1].entry(0)&gt;1.0)) &amp;&amp; (critPoints[i].entry(1)*critPoints[i+1].entry(1)&lt;=0.0) )</span>
  2448. <a name="l02361"></a>02361 <span class="comment">// {</span>
  2449. <a name="l02362"></a>02362 <span class="comment">// // this is a valid</span>
  2450. <a name="l02363"></a>02363 <span class="comment">// </span>
  2451. <a name="l02364"></a>02364 <span class="comment">// // Now check the end points of the domain</span>
  2452. <a name="l02365"></a>02365 <span class="comment">// if(critPoints[i].entry(1)==0.0)</span>
  2453. <a name="l02366"></a>02366 <span class="comment">// {</span>
  2454. <a name="l02367"></a>02367 <span class="comment">// if(critPoints[i].entry(0)&gt;=0.0 &amp;&amp; critPoints[i].entry(0)&lt;=1.0)</span>
  2455. <a name="l02368"></a>02368 <span class="comment">// {</span>
  2456. <a name="l02369"></a>02369 <span class="comment">// matrixRdWtStaticVectRow_Data&lt;dataType,2&gt; grad;</span>
  2457. <a name="l02370"></a>02370 <span class="comment">// gradient(cube,sCrit[i],grad);</span>
  2458. <a name="l02371"></a>02371 <span class="comment">// iPnts.push_back(iPoint(sCrit[i],fabs(grad.entry(1))/sqrt(pow(grad.entry(0),2.0)+pow(grad.entry(1),2.0))));</span>
  2459. <a name="l02372"></a>02372 <span class="comment">// }</span>
  2460. <a name="l02373"></a>02373 <span class="comment">// }</span>
  2461. <a name="l02374"></a>02374 <span class="comment">// else if(critPoints[i+1].entry(1)==0.0)</span>
  2462. <a name="l02375"></a>02375 <span class="comment">// {</span>
  2463. <a name="l02376"></a>02376 <span class="comment">// if(critPoints[i+1].entry(0)&gt;=0.0 &amp;&amp; critPoints[i+1].entry(0)&lt;=1.0)</span>
  2464. <a name="l02377"></a>02377 <span class="comment">// {</span>
  2465. <a name="l02378"></a>02378 <span class="comment">// matrixRdWtStaticVectRow_Data&lt;dataType,2&gt; grad;</span>
  2466. <a name="l02379"></a>02379 <span class="comment">// gradient(cube,sCrit[i+1],grad);</span>
  2467. <a name="l02380"></a>02380 <span class="comment">// iPnts.push_back(iPoint(sCrit[i+1],fabs(grad.entry(1))/sqrt(pow(grad.entry(0),2.0)+pow(grad.entry(1),2.0))));</span>
  2468. <a name="l02381"></a>02381 <span class="comment">// }</span>
  2469. <a name="l02382"></a>02382 <span class="comment">// i++;</span>
  2470. <a name="l02383"></a>02383 <span class="comment">// }</span>
  2471. <a name="l02384"></a>02384 <span class="comment">// else</span>
  2472. <a name="l02385"></a>02385 <span class="comment">// {</span>
  2473. <a name="l02386"></a>02386 <span class="comment">// // numerically solve it to machine precision</span>
  2474. <a name="l02387"></a>02387 <span class="comment">// dataType s0;</span>
  2475. <a name="l02388"></a>02388 <span class="comment">// dataType s1;</span>
  2476. <a name="l02389"></a>02389 <span class="comment">// dataType sTst;</span>
  2477. <a name="l02390"></a>02390 <span class="comment">// </span>
  2478. <a name="l02391"></a>02391 <span class="comment">// if(critPoints[i].entry(1)&gt;critPoints[i+1].entry(1))</span>
  2479. <a name="l02392"></a>02392 <span class="comment">// {</span>
  2480. <a name="l02393"></a>02393 <span class="comment">// s1=sCrit[i];</span>
  2481. <a name="l02394"></a>02394 <span class="comment">// s0=sCrit[i+1];</span>
  2482. <a name="l02395"></a>02395 <span class="comment">// }</span>
  2483. <a name="l02396"></a>02396 <span class="comment">// else</span>
  2484. <a name="l02397"></a>02397 <span class="comment">// {</span>
  2485. <a name="l02398"></a>02398 <span class="comment">// s0=sCrit[i];</span>
  2486. <a name="l02399"></a>02399 <span class="comment">// s1=sCrit[i+1];</span>
  2487. <a name="l02400"></a>02400 <span class="comment">// }</span>
  2488. <a name="l02401"></a>02401 <span class="comment">// sTst=(s0+s1)/2.0;</span>
  2489. <a name="l02402"></a>02402 <span class="comment">// </span>
  2490. <a name="l02403"></a>02403 <span class="comment">// dataType sVal=1.0;</span>
  2491. <a name="l02404"></a>02404 <span class="comment">// while(sTst!=s0 &amp;&amp; sTst!=s1)</span>
  2492. <a name="l02405"></a>02405 <span class="comment">// {</span>
  2493. <a name="l02406"></a>02406 <span class="comment">// sVal=cube.entry(3,1)*pow(sTst,3.0)+cube.entry(2,1)*pow(sTst,2.0)+cube.entry(1,1)*sTst+cube.entry(0,1);</span>
  2494. <a name="l02407"></a>02407 <span class="comment">// if(sVal&lt;0.0)</span>
  2495. <a name="l02408"></a>02408 <span class="comment">// {</span>
  2496. <a name="l02409"></a>02409 <span class="comment">// s0=sTst;</span>
  2497. <a name="l02410"></a>02410 <span class="comment">// }</span>
  2498. <a name="l02411"></a>02411 <span class="comment">// else if(sVal&gt;0.0)</span>
  2499. <a name="l02412"></a>02412 <span class="comment">// {</span>
  2500. <a name="l02413"></a>02413 <span class="comment">// s1=sTst;</span>
  2501. <a name="l02414"></a>02414 <span class="comment">// }</span>
  2502. <a name="l02415"></a>02415 <span class="comment">// else</span>
  2503. <a name="l02416"></a>02416 <span class="comment">// {</span>
  2504. <a name="l02417"></a>02417 <span class="comment">// break;</span>
  2505. <a name="l02418"></a>02418 <span class="comment">// }</span>
  2506. <a name="l02419"></a>02419 <span class="comment">// sTst=(s0+s1)/2.0;</span>
  2507. <a name="l02420"></a>02420 <span class="comment">// }</span>
  2508. <a name="l02421"></a>02421 <span class="comment">// </span>
  2509. <a name="l02422"></a>02422 <span class="comment">// // we have narrowed the solution down to machine precision</span>
  2510. <a name="l02423"></a>02423 <span class="comment">// if(sVal==0.0 || s0==s1)</span>
  2511. <a name="l02424"></a>02424 <span class="comment">// {</span>
  2512. <a name="l02425"></a>02425 <span class="comment">// dataType valX=cube.entry(3,0)*pow(sTst,3.0)+cube.entry(2,0)*pow(sTst,2.0)+cube.entry(1,0)*sTst+cube.entry(0,0);</span>
  2513. <a name="l02426"></a>02426 <span class="comment">// if(valX&gt;=0.0 &amp;&amp; valX&lt;=1.0)</span>
  2514. <a name="l02427"></a>02427 <span class="comment">// {</span>
  2515. <a name="l02428"></a>02428 <span class="comment">// matrixRdWtStaticVectRow_Data&lt;dataType,2&gt; grad;</span>
  2516. <a name="l02429"></a>02429 <span class="comment">// gradient(cube,sTst,grad);</span>
  2517. <a name="l02430"></a>02430 <span class="comment">// iPnts.push_back(iPoint(sTst,fabs(grad.entry(1))/sqrt(pow(grad.entry(0),2.0)+pow(grad.entry(1),2.0))));</span>
  2518. <a name="l02431"></a>02431 <span class="comment">// }</span>
  2519. <a name="l02432"></a>02432 <span class="comment">// }</span>
  2520. <a name="l02433"></a>02433 <span class="comment">// else</span>
  2521. <a name="l02434"></a>02434 <span class="comment">// {</span>
  2522. <a name="l02435"></a>02435 <span class="comment">// dataType val0=cube.entry(3,1)*pow(s0,3.0)+cube.entry(2,1)*pow(s0,2.0)+cube.entry(1,1)*s0+cube.entry(0,1);</span>
  2523. <a name="l02436"></a>02436 <span class="comment">// dataType val1=cube.entry(3,1)*pow(s1,3.0)+cube.entry(2,1)*pow(s1,2.0)+cube.entry(1,1)*s1+cube.entry(0,1);</span>
  2524. <a name="l02437"></a>02437 <span class="comment">// if(fabs(val0)&lt;fabs(val1))</span>
  2525. <a name="l02438"></a>02438 <span class="comment">// {</span>
  2526. <a name="l02439"></a>02439 <span class="comment">// dataType valX=cube.entry(3,0)*pow(s0,3.0)+cube.entry(2,0)*pow(s0,2.0)+cube.entry(1,0)*s0+cube.entry(0,0);</span>
  2527. <a name="l02440"></a>02440 <span class="comment">// if(valX&gt;=0.0 &amp;&amp; valX&lt;=1.0)</span>
  2528. <a name="l02441"></a>02441 <span class="comment">// {</span>
  2529. <a name="l02442"></a>02442 <span class="comment">// matrixRdWtStaticVectRow_Data&lt;dataType,2&gt; grad;</span>
  2530. <a name="l02443"></a>02443 <span class="comment">// gradient(cube,s0,grad);</span>
  2531. <a name="l02444"></a>02444 <span class="comment">// iPnts.push_back(iPoint(s0,fabs(grad.entry(1))/sqrt(pow(grad.entry(0),2.0)+pow(grad.entry(1),2.0))));</span>
  2532. <a name="l02445"></a>02445 <span class="comment">// }</span>
  2533. <a name="l02446"></a>02446 <span class="comment">// }</span>
  2534. <a name="l02447"></a>02447 <span class="comment">// else</span>
  2535. <a name="l02448"></a>02448 <span class="comment">// {</span>
  2536. <a name="l02449"></a>02449 <span class="comment">// dataType valX=cube.entry(3,0)*pow(s1,3.0)+cube.entry(2,0)*pow(s1,2.0)+cube.entry(1,0)*s1+cube.entry(0,0);</span>
  2537. <a name="l02450"></a>02450 <span class="comment">// if(valX&gt;=0.0 &amp;&amp; valX&lt;=1.0)</span>
  2538. <a name="l02451"></a>02451 <span class="comment">// {</span>
  2539. <a name="l02452"></a>02452 <span class="comment">// matrixRdWtStaticVectRow_Data&lt;dataType,2&gt; grad;</span>
  2540. <a name="l02453"></a>02453 <span class="comment">// gradient(cube,s1,grad);</span>
  2541. <a name="l02454"></a>02454 <span class="comment">// iPnts.push_back(iPoint(s1,fabs(grad.entry(1))/sqrt(pow(grad.entry(0),2.0)+pow(grad.entry(1),2.0))));</span>
  2542. <a name="l02455"></a>02455 <span class="comment">// }</span>
  2543. <a name="l02456"></a>02456 <span class="comment">// }</span>
  2544. <a name="l02457"></a>02457 <span class="comment">// }</span>
  2545. <a name="l02458"></a>02458 <span class="comment">// }</span>
  2546. <a name="l02459"></a>02459 <span class="comment">// }</span>
  2547. <a name="l02460"></a>02460 <span class="comment">// }</span>
  2548. <a name="l02461"></a>02461 }
  2549. <a name="l02462"></a>02462
  2550. <a name="l02463"></a>02463 <span class="keywordtype">void</span> solveQuadratic(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sLow,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sHigh,<a class="code" href="classmatrixRdWtStatic__Data.html">matrixRdWtStatic_Data&lt;dataType,4,2&gt;</a>&amp; cube,std::list&lt;iPoint&gt;&amp; iPnts)<span class="keyword"> const</span>
  2551. <a name="l02464"></a>02464 <span class="keyword"> </span>{
  2552. <a name="l02465"></a>02465 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> desc=pow(cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1),2.0)-4.0*cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,1)*cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,1);
  2553. <a name="l02466"></a>02466 <span class="keywordflow">if</span>(desc==0.0)
  2554. <a name="l02467"></a>02467 {
  2555. <a name="l02468"></a>02468 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s=-cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1)/(2.0*cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,1));
  2556. <a name="l02469"></a>02469 <span class="keywordflow">if</span>(s&gt;=sLow &amp;&amp; s&lt;=sHigh)
  2557. <a name="l02470"></a>02470 {
  2558. <a name="l02471"></a>02471 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> valX=cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(3,0)*pow(s,3.0)+cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,0)*pow(s,2.0)+cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,0)*s+cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0);
  2559. <a name="l02472"></a>02472 <span class="keywordflow">if</span>(valX&gt;=0.0 &amp;&amp; valX&lt;=1.0)
  2560. <a name="l02473"></a>02473 {
  2561. <a name="l02474"></a>02474 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>;
  2562. <a name="l02475"></a>02475 gradient(cube,s,grad);
  2563. <a name="l02476"></a>02476 iPnts.push_back(iPoint(s,fabs(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1))/sqrt(pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0),2.0)+pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1),2.0))));
  2564. <a name="l02477"></a>02477 }
  2565. <a name="l02478"></a>02478 }
  2566. <a name="l02479"></a>02479 }
  2567. <a name="l02480"></a>02480 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(desc&gt;0.0)
  2568. <a name="l02481"></a>02481 {
  2569. <a name="l02482"></a>02482 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s=(-cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1)-sqrt(desc))/(2.0*cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,1));
  2570. <a name="l02483"></a>02483 <span class="keywordflow">if</span>(s&gt;=sLow &amp;&amp; s&lt;=sHigh)
  2571. <a name="l02484"></a>02484 {
  2572. <a name="l02485"></a>02485 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> valX=cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(3,0)*pow(s,3.0)+cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,0)*pow(s,2.0)+cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,0)*s+cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0);
  2573. <a name="l02486"></a>02486 <span class="keywordflow">if</span>(valX&gt;=0.0 &amp;&amp; valX&lt;=1.0)
  2574. <a name="l02487"></a>02487 {
  2575. <a name="l02488"></a>02488 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>;
  2576. <a name="l02489"></a>02489 gradient(cube,s,grad);
  2577. <a name="l02490"></a>02490 iPnts.push_back(iPoint(s,fabs(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1))/sqrt(pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0),2.0)+pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1),2.0))));
  2578. <a name="l02491"></a>02491 }
  2579. <a name="l02492"></a>02492 }
  2580. <a name="l02493"></a>02493 s=(-cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1)+sqrt(desc))/(2.0*cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,1));
  2581. <a name="l02494"></a>02494 <span class="keywordflow">if</span>(s&gt;=sLow &amp;&amp; s&lt;=sHigh)
  2582. <a name="l02495"></a>02495 {
  2583. <a name="l02496"></a>02496 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> valX=cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(3,0)*pow(s,3.0)+cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,0)*pow(s,2.0)+cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,0)*s+cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0);
  2584. <a name="l02497"></a>02497 <span class="keywordflow">if</span>(valX&gt;=0.0 &amp;&amp; valX&lt;=1.0)
  2585. <a name="l02498"></a>02498 {
  2586. <a name="l02499"></a>02499 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>;
  2587. <a name="l02500"></a>02500 gradient(cube,s,grad);
  2588. <a name="l02501"></a>02501 iPnts.push_back(iPoint(s,fabs(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1))/sqrt(pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0),2.0)+pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1),2.0))));
  2589. <a name="l02502"></a>02502 }
  2590. <a name="l02503"></a>02503 }
  2591. <a name="l02504"></a>02504 }
  2592. <a name="l02505"></a>02505 }
  2593. <a name="l02506"></a>02506
  2594. <a name="l02507"></a>02507 <span class="keywordtype">void</span> solveLinear(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sLow,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sHigh,<a class="code" href="classmatrixRdWtStatic__Data.html">matrixRdWtStatic_Data&lt;dataType,4,2&gt;</a>&amp; cube,std::list&lt;iPoint&gt;&amp; iPnts)<span class="keyword"> const</span>
  2595. <a name="l02508"></a>02508 <span class="keyword"> </span>{
  2596. <a name="l02509"></a>02509 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s=-cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,1)/cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1);
  2597. <a name="l02510"></a>02510 <span class="keywordflow">if</span>(s&gt;=sLow &amp;&amp; s&lt;=sHigh)
  2598. <a name="l02511"></a>02511 {
  2599. <a name="l02512"></a>02512 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> valX=cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(3,0)*pow(s,3.0)+cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,0)*pow(s,2.0)+cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,0)*s+cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0);
  2600. <a name="l02513"></a>02513 <span class="keywordflow">if</span>(valX&gt;=0.0 &amp;&amp; valX&lt;=1.0)
  2601. <a name="l02514"></a>02514 {
  2602. <a name="l02515"></a>02515 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>;
  2603. <a name="l02516"></a>02516 gradient(cube,s,grad);
  2604. <a name="l02517"></a>02517 iPnts.push_back(iPoint(s,fabs(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1))/sqrt(pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0),2.0)+pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1),2.0))));
  2605. <a name="l02518"></a>02518 }
  2606. <a name="l02519"></a>02519 }
  2607. <a name="l02520"></a>02520 }
  2608. <a name="l02521"></a>02521
  2609. <a name="l02522"></a>02522 <span class="keywordtype">void</span> getIPoints(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sLow,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sHigh,<a class="code" href="classmatrixRdWtStatic__Data.html">matrixRdWtStatic_Data&lt;dataType,4,2&gt;</a> cube,<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg,std::list&lt;iPoint&gt;&amp; iPnts)<span class="keyword"> const</span>
  2610. <a name="l02523"></a>02523 <span class="keyword"> </span>{
  2611. <a name="l02524"></a>02524 <span class="comment">// now create the shifted - rotated - scaled cubic</span>
  2612. <a name="l02525"></a>02525 <span class="comment">// 1st we shift it so the origin is at the start of the segment</span>
  2613. <a name="l02526"></a>02526 cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0)-=seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.x;
  2614. <a name="l02527"></a>02527 cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,1)-=seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.y;
  2615. <a name="l02528"></a>02528 <span class="comment">// then we rotate and scale the polynomials</span>
  2616. <a name="l02529"></a>02529 <a class="code" href="classmatrixRdWtStaticSqr__Data.html">matrixRdWtStaticSqr_Data&lt;dataType,2&gt;</a> rot;
  2617. <a name="l02530"></a>02530 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> L=seg.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.length();
  2618. <a name="l02531"></a>02531 rot.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,0)=seg.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.x/pow(L,2.0);
  2619. <a name="l02532"></a>02532 rot.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,0)=seg.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.y/pow(L,2.0);
  2620. <a name="l02533"></a>02533 rot.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,1)=-seg.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.y/pow(L,2.0);
  2621. <a name="l02534"></a>02534 rot.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1)=seg.<a class="code" href="classlineSegment.html#ac80f03cc2352b52fd08e0b4d804815b8">delta</a>.x/pow(L,2.0);
  2622. <a name="l02535"></a>02535 cube=cube*rot;
  2623. <a name="l02536"></a>02536
  2624. <a name="l02537"></a>02537 <span class="keywordflow">if</span>(cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(3,1)!=0.0)
  2625. <a name="l02538"></a>02538 solveCubic(sLow,sHigh,cube,iPnts);
  2626. <a name="l02539"></a>02539 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2,1)!=0.0)
  2627. <a name="l02540"></a>02540 solveQuadratic(sLow,sHigh,cube,iPnts);
  2628. <a name="l02541"></a>02541 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1)!=0.0)
  2629. <a name="l02542"></a>02542 solveLinear(sLow,sHigh,cube,iPnts);
  2630. <a name="l02543"></a>02543 <span class="keywordflow">if</span>(cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1,1)==0.0 &amp;&amp; cube.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0,1)==0.0)
  2631. <a name="l02544"></a>02544 {
  2632. <a name="l02545"></a>02545 std::cerr &lt;&lt; <span class="stringliteral">&quot;curve_polygon::getIPoints(): Warning detected an intersection with a co-linear line segment&quot;</span> &lt;&lt; std::endl;
  2633. <a name="l02546"></a>02546 iPnts.push_back(iPoint((sLow+sHigh)/2.0,0.0));
  2634. <a name="l02547"></a>02547 }
  2635. <a name="l02548"></a>02548 }
  2636. <a name="l02549"></a>02549
  2637. <a name="l02550"></a>02550 <span class="keyword">class </span>extrema
  2638. <a name="l02551"></a>02551 {
  2639. <a name="l02552"></a>02552 <span class="keyword">public</span>:
  2640. <a name="l02553"></a>02553
  2641. <a name="l02554"></a>02554 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> atCurve;
  2642. <a name="l02555"></a>02555 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> atS;
  2643. <a name="l02556"></a>02556
  2644. <a name="l02557"></a>02557 extrema(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> atCurve_in=0,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> atS_in=0.0) : atCurve(atCurve_in) , atS(atS_in)
  2645. <a name="l02558"></a>02558 {}
  2646. <a name="l02559"></a>02559
  2647. <a name="l02560"></a>02560 extrema(<span class="keyword">const</span> extrema&amp; asg) : atCurve(asg.atCurve) , atS(asg.atS)
  2648. <a name="l02561"></a>02561 {}
  2649. <a name="l02562"></a>02562
  2650. <a name="l02563"></a>02563 ~extrema()
  2651. <a name="l02564"></a>02564 {}
  2652. <a name="l02565"></a>02565
  2653. <a name="l02566"></a>02566 extrema&amp; operator=(<span class="keyword">const</span> extrema&amp; asg)
  2654. <a name="l02567"></a>02567 {
  2655. <a name="l02568"></a>02568 this-&gt;atCurve=asg.atCurve;
  2656. <a name="l02569"></a>02569 this-&gt;atS=asg.atS;
  2657. <a name="l02570"></a>02570
  2658. <a name="l02571"></a>02571 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  2659. <a name="l02572"></a>02572 }
  2660. <a name="l02573"></a>02573 };
  2661. <a name="l02574"></a>02574
  2662. <a name="l02575"></a>02575 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> getExtrema(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="timoshenko_8cpp.html#ac5eb09f63c828d8b858cf5c18eabfe8a">A</a>,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="timoshenko_8cpp.html#a8edcb78651b9b4807e1de4008fe949c4">B</a>,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="timoshenko_8cpp.html#a782271fe256f5ab9801b612fc8c854d0">C</a>,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; s0,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; s1)<span class="keyword"> const</span>
  2663. <a name="l02576"></a>02576 <span class="keyword"> </span>{
  2664. <a name="l02577"></a>02577 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> desc=B*B-4.0*A*<a class="code" href="timoshenko_8cpp.html#a782271fe256f5ab9801b612fc8c854d0">C</a>;
  2665. <a name="l02578"></a>02578 <span class="keywordflow">if</span>(desc&lt;0.0)
  2666. <a name="l02579"></a>02579 <span class="keywordflow">return</span> 0;
  2667. <a name="l02580"></a>02580 s1=s0=-B/(2.0*<a class="code" href="timoshenko_8cpp.html#ac5eb09f63c828d8b858cf5c18eabfe8a">A</a>);
  2668. <a name="l02581"></a>02581 <span class="keywordflow">if</span>(desc==0.0)
  2669. <a name="l02582"></a>02582 <span class="keywordflow">return</span> 1;
  2670. <a name="l02583"></a>02583 desc=sqrt(desc)/(2.0*<a class="code" href="timoshenko_8cpp.html#ac5eb09f63c828d8b858cf5c18eabfe8a">A</a>);
  2671. <a name="l02584"></a>02584 s0-=desc;
  2672. <a name="l02585"></a>02585 s1+=desc;
  2673. <a name="l02586"></a>02586 <span class="keywordflow">return</span> 2;
  2674. <a name="l02587"></a>02587 }
  2675. <a name="l02588"></a>02588
  2676. <a name="l02589"></a>02589 <span class="keywordtype">void</span> getExtrema(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sLow,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sHigh,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> atCurve,<span class="keywordtype">bool</span> forX,std::list&lt;extrema&gt;&amp; pnts)<span class="keyword"> const</span>
  2677. <a name="l02590"></a>02590 <span class="keyword"> </span>{
  2678. <a name="l02591"></a>02591 <span class="comment">// const matrixRdWtStatic_Data&lt;dataType,4,2&gt;&amp; cube=cubics[atCurve];</span>
  2679. <a name="l02592"></a>02592 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> ord;
  2680. <a name="l02593"></a>02593 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> cnt;
  2681. <a name="l02594"></a>02594 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s0;
  2682. <a name="l02595"></a>02595 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s1;
  2683. <a name="l02596"></a>02596
  2684. <a name="l02597"></a>02597 <span class="keywordflow">if</span>(forX)
  2685. <a name="l02598"></a>02598 ord=0;
  2686. <a name="l02599"></a>02599 <span class="keywordflow">else</span>
  2687. <a name="l02600"></a>02600 ord=1;
  2688. <a name="l02601"></a>02601
  2689. <a name="l02602"></a>02602 cnt=getExtrema(cubics[atCurve].entry(3,ord)*3.0,cubics[atCurve].entry(2,ord)*2.0,cubics[atCurve].entry(1,ord),s0,s1);
  2690. <a name="l02603"></a>02603 <span class="keywordflow">if</span>(cnt&gt;0)
  2691. <a name="l02604"></a>02604 {
  2692. <a name="l02605"></a>02605 <span class="keywordflow">if</span>(s0&gt;sLow &amp;&amp; sHigh&gt;=s0)
  2693. <a name="l02606"></a>02606 pnts.push_back(extrema(atCurve,s0));
  2694. <a name="l02607"></a>02607 <span class="keywordflow">if</span>(s0==sLow &amp;&amp; (pnts.size()==0 || s0!=pnts.back().atS) )
  2695. <a name="l02608"></a>02608 pnts.push_back(extrema(atCurve,s0));
  2696. <a name="l02609"></a>02609 <span class="keywordflow">if</span>(cnt==2)
  2697. <a name="l02610"></a>02610 {
  2698. <a name="l02611"></a>02611 <span class="keywordflow">if</span>(s1&gt;sLow &amp;&amp; sHigh&gt;=s1)
  2699. <a name="l02612"></a>02612 pnts.push_back(extrema(atCurve,s1));
  2700. <a name="l02613"></a>02613 <span class="keywordflow">if</span>(s1==sLow &amp;&amp; (pnts.size()==0 || s1!=pnts.back().atS) )
  2701. <a name="l02614"></a>02614 pnts.push_back(extrema(atCurve,s1));
  2702. <a name="l02615"></a>02615 }
  2703. <a name="l02616"></a>02616 }
  2704. <a name="l02617"></a>02617 }
  2705. <a name="l02618"></a>02618
  2706. <a name="l02619"></a>02619 <span class="keywordtype">void</span> getExtrema(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sLow,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sHigh,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> atCurve,std::list&lt;extrema&gt;&amp; xPnts,std::list&lt;extrema&gt;&amp; yPnts)<span class="keyword"> const</span>
  2707. <a name="l02620"></a>02620 <span class="keyword"> </span>{
  2708. <a name="l02621"></a>02621 getExtrema(sLow,sHigh,atCurve,<span class="keyword">true</span>,xPnts);
  2709. <a name="l02622"></a>02622 getExtrema(sLow,sHigh,atCurve,<span class="keyword">false</span>,yPnts);
  2710. <a name="l02623"></a>02623 }
  2711. <a name="l02624"></a>02624
  2712. <a name="l02625"></a>02625 <span class="keyword">public</span>:
  2713. <a name="l02626"></a>02626
  2714. <a name="l02627"></a><a class="code" href="classcurve__polygon.html#aaa67c1697d029e06168412aadfcdb599">02627</a> <a class="code" href="classcurve__polygon.html#a69ad7af73841588d60bd43dbaf76687a">curve_polygon</a>(<span class="keyword">const</span> <a class="code" href="classpolygon.html">polygon&lt;dataType&gt;</a>&amp; poly)
  2715. <a name="l02628"></a>02628 {
  2716. <a name="l02629"></a>02629 setVertices(poly);
  2717. <a name="l02630"></a>02630 }
  2718. <a name="l02631"></a>02631
  2719. <a name="l02632"></a><a class="code" href="classcurve__polygon.html#a975cb96da5e8d4c9c3194af76424c828">02632</a> <span class="keyword">virtual</span> <a class="code" href="classcurve__polygon.html#a975cb96da5e8d4c9c3194af76424c828">~curve_polygon</a>()
  2720. <a name="l02633"></a>02633 {}
  2721. <a name="l02634"></a>02634
  2722. <a name="l02635"></a><a class="code" href="classcurve__polygon.html#a34a8d37badde4c26d38ccc0bfa8cc309">02635</a> <a class="code" href="classcurve__polygon.html">curve_polygon&lt;dataType&gt;</a>&amp; <a class="code" href="classcurve__polygon.html#a34a8d37badde4c26d38ccc0bfa8cc309">setPolygon</a>(<span class="keyword">const</span> <a class="code" href="classpolygon.html">polygon&lt;dataType&gt;</a>&amp; poly)
  2723. <a name="l02636"></a>02636 {
  2724. <a name="l02637"></a>02637 setVertices(poly);
  2725. <a name="l02638"></a>02638 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  2726. <a name="l02639"></a>02639 }
  2727. <a name="l02640"></a>02640
  2728. <a name="l02641"></a><a class="code" href="classcurve__polygon.html#ad9e5e04a691ac5d36932df7151fec22d">02641</a> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="classcurve__polygon.html#ad9e5e04a691ac5d36932df7151fec22d">getPosition</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s)<span class="keyword"> const</span>
  2729. <a name="l02642"></a>02642 <span class="keyword"> </span>{
  2730. <a name="l02643"></a>02643 <span class="comment">// find the correct cubic</span>
  2731. <a name="l02644"></a>02644 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at=getAt(s);
  2732. <a name="l02645"></a>02645
  2733. <a name="l02646"></a>02646 <span class="comment">// solve the position</span>
  2734. <a name="l02647"></a>02647 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> pnt;
  2735. <a name="l02648"></a>02648 position(cubics[at],s,pnt);
  2736. <a name="l02649"></a>02649
  2737. <a name="l02650"></a>02650 <span class="comment">// return the results</span>
  2738. <a name="l02651"></a>02651 <span class="keywordflow">return</span> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0),pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1));
  2739. <a name="l02652"></a>02652 }
  2740. <a name="l02653"></a>02653
  2741. <a name="l02654"></a><a class="code" href="classcurve__polygon.html#a669bed1c86449f65e84203b0295b6dc1">02654</a> <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> <a class="code" href="classcurve__polygon.html#a669bed1c86449f65e84203b0295b6dc1">getPointData</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s)<span class="keyword"> const</span>
  2742. <a name="l02655"></a>02655 <span class="keyword"> </span>{
  2743. <a name="l02656"></a>02656 <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> retVal;
  2744. <a name="l02657"></a>02657 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> pnt;
  2745. <a name="l02658"></a>02658
  2746. <a name="l02659"></a>02659 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at=getAt(s);
  2747. <a name="l02660"></a>02660 position(cubics[at],s,pnt);
  2748. <a name="l02661"></a>02661
  2749. <a name="l02662"></a>02662 retVal.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>.x=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0);
  2750. <a name="l02663"></a>02663 retVal.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>.y=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1);
  2751. <a name="l02664"></a>02664
  2752. <a name="l02665"></a>02665 gradient(cubics[at],s,pnt);
  2753. <a name="l02666"></a>02666
  2754. <a name="l02667"></a>02667 retVal.<a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>=atan2(pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1),pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0));
  2755. <a name="l02668"></a>02668
  2756. <a name="l02669"></a>02669 retVal.<a class="code" href="classcurvePointData.html#a8a6d5fff4e06528adf91c68e285a1edb">sEstimate</a>=s;
  2757. <a name="l02670"></a>02670
  2758. <a name="l02671"></a>02671 <span class="keywordflow">return</span> retVal;
  2759. <a name="l02672"></a>02672 }
  2760. <a name="l02673"></a>02673
  2761. <a name="l02674"></a><a class="code" href="classcurve__polygon.html#a1b0d46775544ab44226afa0d736d6641">02674</a> <span class="keyword">virtual</span> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="classcurve__polygon.html#a1b0d46775544ab44226afa0d736d6641">intersectFirst</a>(<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg)<span class="keyword"> const</span>
  2762. <a name="l02675"></a>02675 <span class="keyword"> </span>{
  2763. <a name="l02676"></a>02676 <span class="comment">// find all the intersections</span>
  2764. <a name="l02677"></a>02677 std::list&lt;iPoint&gt; iPnts;
  2765. <a name="l02678"></a>02678 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> weight=0.0;
  2766. <a name="l02679"></a>02679 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> sz;
  2767. <a name="l02680"></a>02680 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;cubics.size();i++)
  2768. <a name="l02681"></a>02681 {
  2769. <a name="l02682"></a>02682 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sLow;
  2770. <a name="l02683"></a>02683 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sHigh;
  2771. <a name="l02684"></a>02684
  2772. <a name="l02685"></a>02685 sz=iPnts.size();
  2773. <a name="l02686"></a>02686 sRange(i,sLow,sHigh);
  2774. <a name="l02687"></a>02687 getIPoints(sLow,sHigh,cubics[i],seg,iPnts);
  2775. <a name="l02688"></a>02688
  2776. <a name="l02689"></a>02689 <span class="keyword">typename</span> std::list&lt;iPoint&gt;::reverse_iterator it=iPnts.rbegin();
  2777. <a name="l02690"></a>02690
  2778. <a name="l02691"></a>02691 <span class="comment">// solve the pnt for any new solution</span>
  2779. <a name="l02692"></a>02692 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;(iPnts.size()-sz);j++)
  2780. <a name="l02693"></a>02693 {
  2781. <a name="l02694"></a>02694 position(cubics[i],it-&gt;s,it-&gt;pnt);
  2782. <a name="l02695"></a>02695 weight+=it-&gt;w;
  2783. <a name="l02696"></a>02696 it++;
  2784. <a name="l02697"></a>02697 }
  2785. <a name="l02698"></a>02698 }
  2786. <a name="l02699"></a>02699
  2787. <a name="l02700"></a>02700 <span class="comment">// confirm we have a solution</span>
  2788. <a name="l02701"></a>02701 <span class="keywordflow">if</span>(iPnts.size()==0)
  2789. <a name="l02702"></a>02702 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;curve_polygon::intersectFirst(): Failed to find intersection&quot;</span>);
  2790. <a name="l02703"></a>02703
  2791. <a name="l02704"></a>02704 <span class="comment">// Find the nearest </span>
  2792. <a name="l02705"></a>02705 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> pnt=iPnts.front().pnt;
  2793. <a name="l02706"></a>02706 <span class="keyword">typename</span> std::list&lt;iPoint&gt;::iterator it=iPnts.begin();
  2794. <a name="l02707"></a>02707 it++;
  2795. <a name="l02708"></a>02708 <span class="keywordflow">for</span>(;it!=iPnts.end();it++)
  2796. <a name="l02709"></a>02709 {
  2797. <a name="l02710"></a>02710 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> distChamp=sqrt(pow(pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0)-seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.x,2.0)+pow(pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1)-seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.y,2.0));
  2798. <a name="l02711"></a>02711 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> distChalng=sqrt(pow(it-&gt;pnt.entry(0)-seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.x,2.0)+pow(it-&gt;pnt.entry(1)-seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.y,2.0));
  2799. <a name="l02712"></a>02712 <span class="keywordflow">if</span>(distChalng&lt;distChamp)
  2800. <a name="l02713"></a>02713 pnt=it-&gt;pnt;
  2801. <a name="l02714"></a>02714 }
  2802. <a name="l02715"></a>02715
  2803. <a name="l02716"></a>02716 <span class="comment">// return the results</span>
  2804. <a name="l02717"></a>02717 <span class="keywordflow">return</span> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0),pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1));
  2805. <a name="l02718"></a>02718 }
  2806. <a name="l02719"></a>02719
  2807. <a name="l02720"></a><a class="code" href="classcurve__polygon.html#a1b30158567e2b00f5d79b296918c505a">02720</a> <span class="keyword">virtual</span> <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> <a class="code" href="classcurve__polygon.html#a1b30158567e2b00f5d79b296918c505a">intersectFirstData</a>(<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg)<span class="keyword"> const</span>
  2808. <a name="l02721"></a>02721 <span class="keyword"> </span>{
  2809. <a name="l02722"></a>02722 <span class="comment">// note that the ply angle is not defined as the tangent but instead as the weighted averag of the all the intersection tangents</span>
  2810. <a name="l02723"></a>02723 <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> retVal;
  2811. <a name="l02724"></a>02724
  2812. <a name="l02725"></a>02725 <span class="comment">// find all the intersections</span>
  2813. <a name="l02726"></a>02726 std::list&lt;iPoint&gt; iPnts;
  2814. <a name="l02727"></a>02727 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> weight=0.0;
  2815. <a name="l02728"></a>02728 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> sz;
  2816. <a name="l02729"></a>02729 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;cubics.size();i++)
  2817. <a name="l02730"></a>02730 {
  2818. <a name="l02731"></a>02731 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sLow;
  2819. <a name="l02732"></a>02732 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sHigh;
  2820. <a name="l02733"></a>02733
  2821. <a name="l02734"></a>02734 sz=iPnts.size();
  2822. <a name="l02735"></a>02735 sRange(i,sLow,sHigh);
  2823. <a name="l02736"></a>02736 getIPoints(sLow,sHigh,cubics[i],seg,iPnts);
  2824. <a name="l02737"></a>02737
  2825. <a name="l02738"></a>02738 <span class="keyword">typename</span> std::list&lt;iPoint&gt;::reverse_iterator it=iPnts.rbegin();
  2826. <a name="l02739"></a>02739
  2827. <a name="l02740"></a>02740 <span class="comment">// solve the pnt for any new solution</span>
  2828. <a name="l02741"></a>02741 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;(iPnts.size()-sz);j++)
  2829. <a name="l02742"></a>02742 {
  2830. <a name="l02743"></a>02743
  2831. <a name="l02744"></a>02744 position(cubics[i],it-&gt;s,it-&gt;pnt);
  2832. <a name="l02745"></a>02745 gradient(cubics[i],it-&gt;s,it-&gt;grad);
  2833. <a name="l02746"></a>02746
  2834. <a name="l02747"></a>02747 weight+=it-&gt;w;
  2835. <a name="l02748"></a>02748 it++;
  2836. <a name="l02749"></a>02749 }
  2837. <a name="l02750"></a>02750 }
  2838. <a name="l02751"></a>02751
  2839. <a name="l02752"></a>02752 <span class="comment">// confirm we have a solution</span>
  2840. <a name="l02753"></a>02753 <span class="keywordflow">if</span>(iPnts.size()==0)
  2841. <a name="l02754"></a>02754 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;curve_polygon::intersectFirstData(): Failed to find intersection&quot;</span>);
  2842. <a name="l02755"></a>02755
  2843. <a name="l02756"></a>02756 <span class="comment">// Find the nearest</span>
  2844. <a name="l02757"></a>02757 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> atS=iPnts.front().s;
  2845. <a name="l02758"></a>02758 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> pnt=iPnts.front().pnt;
  2846. <a name="l02759"></a>02759 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>=iPnts.front().grad;
  2847. <a name="l02760"></a>02760 <span class="keyword">typename</span> std::list&lt;iPoint&gt;::iterator it=iPnts.begin();
  2848. <a name="l02761"></a>02761 it++;
  2849. <a name="l02762"></a>02762 <span class="keywordflow">for</span>(;it!=iPnts.end();it++)
  2850. <a name="l02763"></a>02763 {
  2851. <a name="l02764"></a>02764 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> distChamp=sqrt(pow(pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0)-seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.x,2.0)+pow(pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1)-seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.y,2.0));
  2852. <a name="l02765"></a>02765 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> distChalng=sqrt(pow(it-&gt;pnt.entry(0)-seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.x,2.0)+pow(it-&gt;pnt.entry(1)-seg.<a class="code" href="classlineSegment.html#a08b1e2ce361736f69809ae2b3200b8d5">start</a>.y,2.0));
  2853. <a name="l02766"></a>02766 <span class="keywordflow">if</span>(distChalng&lt;distChamp)
  2854. <a name="l02767"></a>02767 {
  2855. <a name="l02768"></a>02768 atS=it-&gt;s;
  2856. <a name="l02769"></a>02769 pnt=it-&gt;pnt;
  2857. <a name="l02770"></a>02770 grad=it-&gt;grad;
  2858. <a name="l02771"></a>02771 }
  2859. <a name="l02772"></a>02772 }
  2860. <a name="l02773"></a>02773
  2861. <a name="l02774"></a>02774 <span class="comment">// build the return value</span>
  2862. <a name="l02775"></a>02775 retVal.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>.x=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0);
  2863. <a name="l02776"></a>02776 retVal.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>.y=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1);
  2864. <a name="l02777"></a>02777 retVal.<a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>=atan2(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1),grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0));
  2865. <a name="l02778"></a>02778 retVal.<a class="code" href="classcurvePointData.html#a8a6d5fff4e06528adf91c68e285a1edb">sEstimate</a>=atS;
  2866. <a name="l02779"></a>02779
  2867. <a name="l02780"></a>02780 <span class="keywordflow">return</span> retVal;
  2868. <a name="l02781"></a>02781 }
  2869. <a name="l02782"></a>02782
  2870. <a name="l02783"></a><a class="code" href="classcurve__polygon.html#a64b6e115f461c4bd3fc34fb59fe8f509">02783</a> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="classcurve__polygon.html#a64b6e115f461c4bd3fc34fb59fe8f509">intersectAverage</a>(<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg)<span class="keyword"> const</span>
  2871. <a name="l02784"></a>02784 <span class="keyword"> </span>{
  2872. <a name="l02785"></a>02785 <span class="comment">// find all the intersections</span>
  2873. <a name="l02786"></a>02786 std::list&lt;iPoint&gt; iPnts;
  2874. <a name="l02787"></a>02787 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> weight=0.0;
  2875. <a name="l02788"></a>02788 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> sz;
  2876. <a name="l02789"></a>02789 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;cubics.size();i++)
  2877. <a name="l02790"></a>02790 {
  2878. <a name="l02791"></a>02791 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sLow;
  2879. <a name="l02792"></a>02792 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sHigh;
  2880. <a name="l02793"></a>02793
  2881. <a name="l02794"></a>02794 sz=iPnts.size();
  2882. <a name="l02795"></a>02795 sRange(i,sLow,sHigh);
  2883. <a name="l02796"></a>02796 getIPoints(sLow,sHigh,cubics[i],seg,iPnts);
  2884. <a name="l02797"></a>02797
  2885. <a name="l02798"></a>02798 <span class="keyword">typename</span> std::list&lt;iPoint&gt;::reverse_iterator it=iPnts.rbegin();
  2886. <a name="l02799"></a>02799
  2887. <a name="l02800"></a>02800 <span class="comment">// solve the pnt for any new solution</span>
  2888. <a name="l02801"></a>02801 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;(iPnts.size()-sz);j++)
  2889. <a name="l02802"></a>02802 {
  2890. <a name="l02803"></a>02803 position(cubics[i],it-&gt;s,it-&gt;pnt);
  2891. <a name="l02804"></a>02804 weight+=it-&gt;w;
  2892. <a name="l02805"></a>02805 it++;
  2893. <a name="l02806"></a>02806 }
  2894. <a name="l02807"></a>02807 }
  2895. <a name="l02808"></a>02808
  2896. <a name="l02809"></a>02809 <span class="comment">// confirm we have a solution</span>
  2897. <a name="l02810"></a>02810 <span class="keywordflow">if</span>(iPnts.size()==0)
  2898. <a name="l02811"></a>02811 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;curve_polygon::intersectAverage(): Failed to find intersection&quot;</span>);
  2899. <a name="l02812"></a>02812
  2900. <a name="l02813"></a>02813 <span class="comment">// Solve the weighted average</span>
  2901. <a name="l02814"></a>02814 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> pnt=<a class="code" href="classmatrixStatic__Zero.html">matrixStatic_Zero&lt;dataType,1,2&gt;</a>();
  2902. <a name="l02815"></a>02815 <span class="keywordflow">for</span>(<span class="keyword">typename</span> std::list&lt;iPoint&gt;::iterator it=iPnts.begin();it!=iPnts.end();it++)
  2903. <a name="l02816"></a>02816 {
  2904. <a name="l02817"></a>02817 <span class="keywordflow">if</span>(weight==0.0)
  2905. <a name="l02818"></a>02818 pnt+=it-&gt;pnt;
  2906. <a name="l02819"></a>02819 <span class="keywordflow">else</span>
  2907. <a name="l02820"></a>02820 pnt+=it-&gt;pnt*it-&gt;w;
  2908. <a name="l02821"></a>02821 }
  2909. <a name="l02822"></a>02822 <span class="keywordflow">if</span>(weight==0.0)
  2910. <a name="l02823"></a>02823 pnt=pnt*(1.0/<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>(iPnts.size()));
  2911. <a name="l02824"></a>02824 <span class="keywordflow">else</span>
  2912. <a name="l02825"></a>02825 pnt=pnt*(1.0/weight);
  2913. <a name="l02826"></a>02826
  2914. <a name="l02827"></a>02827 <span class="comment">// return the results</span>
  2915. <a name="l02828"></a>02828 <span class="keywordflow">return</span> <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0),pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1));
  2916. <a name="l02829"></a>02829 }
  2917. <a name="l02830"></a>02830
  2918. <a name="l02831"></a><a class="code" href="classcurve__polygon.html#a65e37425ea9208e509df9df3759d3d95">02831</a> <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> <a class="code" href="classcurve__polygon.html#a65e37425ea9208e509df9df3759d3d95">intersectAverageData</a>(<span class="keyword">const</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>&amp; seg)<span class="keyword"> const</span>
  2919. <a name="l02832"></a>02832 <span class="keyword"> </span>{
  2920. <a name="l02833"></a>02833 <span class="comment">// note that the ply angle is not defined as the tangent but instead as the weighted averag of the all the intersection tangents</span>
  2921. <a name="l02834"></a>02834 <a class="code" href="classcurvePointData.html">curvePointData&lt;dataType&gt;</a> retVal;
  2922. <a name="l02835"></a>02835
  2923. <a name="l02836"></a>02836 <span class="comment">// find all the intersections</span>
  2924. <a name="l02837"></a>02837 std::list&lt;iPoint&gt; iPnts;
  2925. <a name="l02838"></a>02838 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> weight=0.0;
  2926. <a name="l02839"></a>02839 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> sz;
  2927. <a name="l02840"></a>02840 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;cubics.size();i++)
  2928. <a name="l02841"></a>02841 {
  2929. <a name="l02842"></a>02842 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sLow;
  2930. <a name="l02843"></a>02843 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sHigh;
  2931. <a name="l02844"></a>02844
  2932. <a name="l02845"></a>02845 sz=iPnts.size();
  2933. <a name="l02846"></a>02846 sRange(i,sLow,sHigh);
  2934. <a name="l02847"></a>02847 getIPoints(sLow,sHigh,cubics[i],seg,iPnts);
  2935. <a name="l02848"></a>02848
  2936. <a name="l02849"></a>02849 <span class="keyword">typename</span> std::list&lt;iPoint&gt;::reverse_iterator it=iPnts.rbegin();
  2937. <a name="l02850"></a>02850
  2938. <a name="l02851"></a>02851 <span class="comment">// solve the pnt for any new solution</span>
  2939. <a name="l02852"></a>02852 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;(iPnts.size()-sz);j++)
  2940. <a name="l02853"></a>02853 {
  2941. <a name="l02854"></a>02854
  2942. <a name="l02855"></a>02855 position(cubics[i],it-&gt;s,it-&gt;pnt);
  2943. <a name="l02856"></a>02856 gradient(cubics[i],it-&gt;s,it-&gt;grad);
  2944. <a name="l02857"></a>02857
  2945. <a name="l02858"></a>02858 weight+=it-&gt;w;
  2946. <a name="l02859"></a>02859 it++;
  2947. <a name="l02860"></a>02860 }
  2948. <a name="l02861"></a>02861 }
  2949. <a name="l02862"></a>02862
  2950. <a name="l02863"></a>02863 <span class="comment">// confirm we have a solution</span>
  2951. <a name="l02864"></a>02864 <span class="keywordflow">if</span>(iPnts.size()==0)
  2952. <a name="l02865"></a>02865 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;curve_polygon::intersectAverageData(): Failed to find intersection&quot;</span>);
  2953. <a name="l02866"></a>02866
  2954. <a name="l02867"></a>02867 <span class="comment">// determine the weghted average</span>
  2955. <a name="l02868"></a>02868 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> pnt=<a class="code" href="classmatrixStatic__Zero.html">matrixStatic_Zero&lt;dataType,1,2&gt;</a>();
  2956. <a name="l02869"></a>02869 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>=<a class="code" href="classmatrixStatic__Zero.html">matrixStatic_Zero&lt;dataType,1,2&gt;</a>();
  2957. <a name="l02870"></a>02870 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> atS=0.0;
  2958. <a name="l02871"></a>02871 <span class="keywordflow">for</span>(<span class="keyword">typename</span> std::list&lt;iPoint&gt;::iterator it=iPnts.begin();it!=iPnts.end();it++)
  2959. <a name="l02872"></a>02872 {
  2960. <a name="l02873"></a>02873 <span class="keywordflow">if</span>(weight==0.0)
  2961. <a name="l02874"></a>02874 {
  2962. <a name="l02875"></a>02875 pnt+=it-&gt;pnt;
  2963. <a name="l02876"></a>02876 grad+=it-&gt;grad;
  2964. <a name="l02877"></a>02877 atS+=it-&gt;s;
  2965. <a name="l02878"></a>02878 }
  2966. <a name="l02879"></a>02879 <span class="keywordflow">else</span>
  2967. <a name="l02880"></a>02880 {
  2968. <a name="l02881"></a>02881 pnt+=it-&gt;pnt*it-&gt;w;
  2969. <a name="l02882"></a>02882 grad+=it-&gt;grad*it-&gt;w;
  2970. <a name="l02883"></a>02883 atS+=it-&gt;s*it-&gt;w;
  2971. <a name="l02884"></a>02884 }
  2972. <a name="l02885"></a>02885 }
  2973. <a name="l02886"></a>02886 <span class="keywordflow">if</span>(weight==0.0)
  2974. <a name="l02887"></a>02887 {
  2975. <a name="l02888"></a>02888 pnt=pnt*(1.0/<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>(iPnts.size()));
  2976. <a name="l02889"></a>02889 grad=grad*(1.0/<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>(iPnts.size()));
  2977. <a name="l02890"></a>02890 atS=atS*(1.0/<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>(iPnts.size()));
  2978. <a name="l02891"></a>02891 }
  2979. <a name="l02892"></a>02892 <span class="keywordflow">else</span>
  2980. <a name="l02893"></a>02893 {
  2981. <a name="l02894"></a>02894 pnt=pnt*(1.0/weight);
  2982. <a name="l02895"></a>02895 grad=grad*(1.0/weight);
  2983. <a name="l02896"></a>02896 atS=atS*(1.0/weight);
  2984. <a name="l02897"></a>02897 }
  2985. <a name="l02898"></a>02898
  2986. <a name="l02899"></a>02899 <span class="comment">// build the return value</span>
  2987. <a name="l02900"></a>02900 retVal.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>.x=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0);
  2988. <a name="l02901"></a>02901 retVal.<a class="code" href="classcurvePointData.html#a0eed9b95e394660b13ebab4080bc9afc">position</a>.y=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1);
  2989. <a name="l02902"></a>02902 retVal.<a class="code" href="classcurvePointData.html#a46594ff5b9f3d0b1a2c422f40113f23d">angle</a>=atan2(grad.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1),grad.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0));
  2990. <a name="l02903"></a>02903 retVal.<a class="code" href="classcurvePointData.html#a8a6d5fff4e06528adf91c68e285a1edb">sEstimate</a>=atS;
  2991. <a name="l02904"></a>02904
  2992. <a name="l02905"></a>02905 <span class="keywordflow">return</span> retVal;
  2993. <a name="l02906"></a>02906 }
  2994. <a name="l02907"></a>02907
  2995. <a name="l02908"></a><a class="code" href="classcurve__polygon.html#aef03a3e48a8f9bd61a01ef388fb8a4d6">02908</a> <span class="keywordtype">void</span> <a class="code" href="classcurve__polygon.html#aef03a3e48a8f9bd61a01ef388fb8a4d6">print</a>(std::ostream&amp; out,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> cnt=240)
  2996. <a name="l02909"></a>02909 {
  2997. <a name="l02910"></a>02910 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> pnt;
  2998. <a name="l02911"></a>02911 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;=cnt;i++)
  2999. <a name="l02912"></a>02912 {
  3000. <a name="l02913"></a>02913 pnt=<a class="code" href="classcurve__polygon.html#ad9e5e04a691ac5d36932df7151fec22d">getPosition</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>(i)/<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>(cnt));
  3001. <a name="l02914"></a>02914 out &lt;&lt; pnt.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a> &lt;&lt; <span class="charliteral">&#39;\t&#39;</span> &lt;&lt; pnt.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a> &lt;&lt; std::endl;
  3002. <a name="l02915"></a>02915 }
  3003. <a name="l02916"></a>02916 }
  3004. <a name="l02917"></a>02917
  3005. <a name="l02918"></a><a class="code" href="classcurve__polygon.html#a164a04d076f0feb84fb89f9ad8e9438d">02918</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcurve__polygon.html#a164a04d076f0feb84fb89f9ad8e9438d">jacobian</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> s)<span class="keyword"> const</span>
  3006. <a name="l02919"></a>02919 <span class="keyword"> </span>{
  3007. <a name="l02920"></a>02920 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> <a class="code" href="namespaceTIMEALG.html#a601ffad978926698060401bb5bd9378b">grad</a>;
  3008. <a name="l02921"></a>02921 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at=getAt(s);
  3009. <a name="l02922"></a>02922 gradient(cubics[at],s,grad);
  3010. <a name="l02923"></a>02923
  3011. <a name="l02924"></a>02924 <span class="keywordflow">return</span> sqrt(pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0),2.0)+pow(grad.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1),2.0));
  3012. <a name="l02925"></a>02925 }
  3013. <a name="l02926"></a>02926
  3014. <a name="l02927"></a><a class="code" href="classcurve__polygon.html#ab62141a9b166dd844a2e0f4a89381d7a">02927</a> <span class="keywordtype">void</span> <a class="code" href="classcurve__polygon.html#ab62141a9b166dd844a2e0f4a89381d7a">boundingBox</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; xMin,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; yMin,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; xMax,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; yMax)<span class="keyword"> const</span>
  3015. <a name="l02928"></a>02928 <span class="keyword"> </span>{
  3016. <a name="l02929"></a>02929 std::list&lt;extrema&gt; xPnts;
  3017. <a name="l02930"></a>02930 std::list&lt;extrema&gt; yPnts;
  3018. <a name="l02931"></a>02931 <a class="code" href="classmatrixRdWtStaticVectRow__Data.html">matrixRdWtStaticVectRow_Data&lt;dataType,2&gt;</a> pnt;
  3019. <a name="l02932"></a>02932
  3020. <a name="l02933"></a>02933 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;cubics.size();i++)
  3021. <a name="l02934"></a>02934 {
  3022. <a name="l02935"></a>02935 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sLow;
  3023. <a name="l02936"></a>02936 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> sHigh;
  3024. <a name="l02937"></a>02937
  3025. <a name="l02938"></a>02938 sRange(i,sLow,sHigh);
  3026. <a name="l02939"></a>02939 getExtrema(sLow,sHigh,i,xPnts,yPnts);
  3027. <a name="l02940"></a>02940 }
  3028. <a name="l02941"></a>02941
  3029. <a name="l02942"></a>02942 <span class="keywordflow">if</span>(xPnts.size()&lt;2)
  3030. <a name="l02943"></a>02943 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;curve_polygon::boundingBox(): Failed to find all the x extrema&quot;</span>);
  3031. <a name="l02944"></a>02944 <span class="keywordflow">if</span>(yPnts.size()&lt;2)
  3032. <a name="l02945"></a>02945 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;curve_polygon::boundingBox(): Failed to find all the y extrema&quot;</span>);
  3033. <a name="l02946"></a>02946
  3034. <a name="l02947"></a>02947 <span class="keyword">typename</span> std::list&lt;extrema&gt;::iterator it=xPnts.begin();
  3035. <a name="l02948"></a>02948 position(cubics[it-&gt;atCurve],it-&gt;atS,pnt);
  3036. <a name="l02949"></a>02949 xMin=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0);
  3037. <a name="l02950"></a>02950 xMax=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0);
  3038. <a name="l02951"></a>02951 it++;
  3039. <a name="l02952"></a>02952 <span class="keywordflow">for</span>(;it!=xPnts.end();it++)
  3040. <a name="l02953"></a>02953 {
  3041. <a name="l02954"></a>02954 position(cubics[it-&gt;atCurve],it-&gt;atS,pnt);
  3042. <a name="l02955"></a>02955 <span class="keywordflow">if</span>(pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0)&lt;xMin)
  3043. <a name="l02956"></a>02956 xMin=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0);
  3044. <a name="l02957"></a>02957 <span class="keywordflow">if</span>(pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0)&gt;xMax)
  3045. <a name="l02958"></a>02958 xMax=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(0);
  3046. <a name="l02959"></a>02959 }
  3047. <a name="l02960"></a>02960
  3048. <a name="l02961"></a>02961 it=yPnts.begin();
  3049. <a name="l02962"></a>02962 position(cubics[it-&gt;atCurve],it-&gt;atS,pnt);
  3050. <a name="l02963"></a>02963 yMin=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1);
  3051. <a name="l02964"></a>02964 yMax=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1);
  3052. <a name="l02965"></a>02965 it++;
  3053. <a name="l02966"></a>02966 <span class="keywordflow">for</span>(;it!=yPnts.end();it++)
  3054. <a name="l02967"></a>02967 {
  3055. <a name="l02968"></a>02968 position(cubics[it-&gt;atCurve],it-&gt;atS,pnt);
  3056. <a name="l02969"></a>02969 <span class="keywordflow">if</span>(pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1)&lt;yMin)
  3057. <a name="l02970"></a>02970 yMin=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1);
  3058. <a name="l02971"></a>02971 <span class="keywordflow">if</span>(pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1)&gt;yMax)
  3059. <a name="l02972"></a>02972 yMax=pnt.<a class="code" href="classmatrixRdWtVect.html#ab6754006e5bfc55c5a3ade09cb9f5a65">entry</a>(1);
  3060. <a name="l02973"></a>02973 }
  3061. <a name="l02974"></a>02974 }
  3062. <a name="l02975"></a>02975
  3063. <a name="l02976"></a>02976 <span class="comment">// void printCubics()</span>
  3064. <a name="l02977"></a>02977 <span class="comment">// {</span>
  3065. <a name="l02978"></a>02978 <span class="comment">// dataType sLow;</span>
  3066. <a name="l02979"></a>02979 <span class="comment">// dataType sHigh;</span>
  3067. <a name="l02980"></a>02980 <span class="comment">// </span>
  3068. <a name="l02981"></a>02981 <span class="comment">// for(unsigned long i=0;i&lt;cubics.size();i++)</span>
  3069. <a name="l02982"></a>02982 <span class="comment">// {</span>
  3070. <a name="l02983"></a>02983 <span class="comment">// sRange(i,sLow,sHigh);</span>
  3071. <a name="l02984"></a>02984 <span class="comment">// std::cout &lt;&lt; &quot;X:\t&quot; &lt;&lt; sLow &lt;&lt; &#39;\t&#39; &lt;&lt; sHigh &lt;&lt; &#39;\t&#39; &lt;&lt; cubics[i].entry(0,0) &lt;&lt; &#39;\t&#39; &lt;&lt; cubics[i].entry(1,0) &lt;&lt; &#39;\t&#39; &lt;&lt; cubics[i].entry(2,0) &lt;&lt; &#39;\t&#39; &lt;&lt; cubics[i].entry(3,0) &lt;&lt; std::endl;</span>
  3072. <a name="l02985"></a>02985 <span class="comment">// std::cout &lt;&lt; &quot;Y:\t&quot; &lt;&lt; sLow &lt;&lt; &#39;\t&#39; &lt;&lt; sHigh &lt;&lt; &#39;\t&#39; &lt;&lt; cubics[i].entry(0,1) &lt;&lt; &#39;\t&#39; &lt;&lt; cubics[i].entry(1,1) &lt;&lt; &#39;\t&#39; &lt;&lt; cubics[i].entry(2,1) &lt;&lt; &#39;\t&#39; &lt;&lt; cubics[i].entry(3,1) &lt;&lt; std::endl;</span>
  3073. <a name="l02986"></a>02986 <span class="comment">// }</span>
  3074. <a name="l02987"></a>02987 <span class="comment">// }</span>
  3075. <a name="l02988"></a>02988 };
  3076. <a name="l02989"></a>02989
  3077. <a name="l02990"></a>02990 <span class="comment">// this is an abstract class in general...</span>
  3078. <a name="l02991"></a>02991 <span class="comment">// however it is meant to supply a family of curves that are all approximations of an offset</span>
  3079. <a name="l02992"></a>02992 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3080. <a name="l02993"></a><a class="code" href="classcurveFamily.html">02993</a> <span class="keyword">class </span><a class="code" href="classcurveFamily.html">curveFamily</a>
  3081. <a name="l02994"></a>02994 {
  3082. <a name="l02995"></a>02995 <span class="keyword">public</span>:
  3083. <a name="l02996"></a>02996
  3084. <a name="l02997"></a><a class="code" href="classcurveFamily.html#a7158cd0b662c4f38984e7cbc1a5fe537">02997</a> <span class="keyword">virtual</span> <a class="code" href="classcurveFamily.html#a7158cd0b662c4f38984e7cbc1a5fe537">~curveFamily</a>()
  3085. <a name="l02998"></a>02998 {}
  3086. <a name="l02999"></a>02999
  3087. <a name="l03000"></a>03000 <span class="comment">// creates new offset curves using the new command ** needs to be deleted **</span>
  3088. <a name="l03001"></a>03001 <span class="keyword">virtual</span> <a class="code" href="classcurve.html">curve&lt;dataType&gt;</a>* <a class="code" href="classcurveFamily.html#a2cb814258325371060895d143b49cc4c">getCurve</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> offsetDist)=0;
  3089. <a name="l03002"></a>03002
  3090. <a name="l03003"></a>03003 <span class="comment">// returns the largest value of offsetDist that would still be valid</span>
  3091. <a name="l03004"></a>03004 <span class="keyword">virtual</span> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcurveFamily.html#a4b0c63f6fedb17691750305af924069f">maximumOffset</a>()=0;
  3092. <a name="l03005"></a>03005 };
  3093. <a name="l03006"></a>03006
  3094. <a name="l03007"></a>03007 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3095. <a name="l03008"></a><a class="code" href="classcurveFamily__curveApproxPolygon.html">03008</a> <span class="keyword">class </span><a class="code" href="classcurveFamily__curveApproxPolygon.html">curveFamily_curveApproxPolygon</a> : <span class="keyword">public</span> <a class="code" href="classcurveFamily.html">curveFamily</a>&lt;dataType&gt;
  3096. <a name="l03009"></a>03009 {
  3097. <a name="l03010"></a>03010 <span class="keyword">private</span>:
  3098. <a name="l03011"></a>03011
  3099. <a name="l03012"></a>03012 <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;</a>* polyApprox;
  3100. <a name="l03013"></a>03013 <span class="keywordtype">bool</span> deletePolyApprox;
  3101. <a name="l03014"></a>03014
  3102. <a name="l03015"></a>03015 <span class="keyword">public</span>:
  3103. <a name="l03016"></a>03016
  3104. <a name="l03017"></a><a class="code" href="classcurveFamily__curveApproxPolygon.html#ae2454a9f670b15019f303bc8630ca98d">03017</a> <a class="code" href="classcurveFamily__curveApproxPolygon.html#ae2454a9f670b15019f303bc8630ca98d">curveFamily_curveApproxPolygon</a>(<a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;</a>* polyApprox_in=NULL,<span class="keywordtype">bool</span> deletePolyApprox_in=<span class="keyword">false</span>) : polyApprox(polyApprox_in) , deletePolyApprox(deletePolyApprox_in)
  3105. <a name="l03018"></a>03018 {}
  3106. <a name="l03019"></a>03019
  3107. <a name="l03020"></a><a class="code" href="classcurveFamily__curveApproxPolygon.html#a8dc6c5c086bd67c663ed0d4f97a5c19e">03020</a> <span class="keyword">virtual</span> <a class="code" href="classcurveFamily__curveApproxPolygon.html#a8dc6c5c086bd67c663ed0d4f97a5c19e">~curveFamily_curveApproxPolygon</a>()
  3108. <a name="l03021"></a>03021 {
  3109. <a name="l03022"></a>03022 <span class="keywordflow">if</span>(deletePolyApprox &amp;&amp; polyApprox!=NULL)
  3110. <a name="l03023"></a>03023 <span class="keyword">delete</span> polyApprox;
  3111. <a name="l03024"></a>03024 }
  3112. <a name="l03025"></a>03025
  3113. <a name="l03026"></a>03026 <span class="comment">// creates new offset curves using the new command ** needs to be deleted **</span>
  3114. <a name="l03027"></a><a class="code" href="classcurveFamily__curveApproxPolygon.html#ae46d3491ae3d8aa8ec0c9715a2b54081">03027</a> <a class="code" href="classcurve.html">curve&lt;dataType&gt;</a>* <a class="code" href="classcurveFamily__curveApproxPolygon.html#ae46d3491ae3d8aa8ec0c9715a2b54081">getCurve</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> offsetDist)
  3115. <a name="l03028"></a>03028 {
  3116. <a name="l03029"></a>03029 <span class="keywordflow">if</span>(polyApprox==NULL)
  3117. <a name="l03030"></a>03030 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;curveFamily_curveApproxPolygon::getCurve(): The polyApprox has not been set&quot;</span>);
  3118. <a name="l03031"></a>03031 <a class="code" href="classcurve__polygon.html">curve_polygon&lt;dataType&gt;</a>* crv=<span class="keyword">new</span> <a class="code" href="classcurve__polygon.html">curve_polygon&lt;dataType&gt;</a>(polyApprox-&gt;offset(offsetDist));
  3119. <a name="l03032"></a>03032 <span class="comment">// crv-&gt;printCubics();</span>
  3120. <a name="l03033"></a>03033 <span class="keywordflow">return</span> crv;
  3121. <a name="l03034"></a>03034 }
  3122. <a name="l03035"></a>03035
  3123. <a name="l03036"></a><a class="code" href="classcurveFamily__curveApproxPolygon.html#a6f0f9e1c1064de05b73a27b4e9d87062">03036</a> <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classcurveFamily__curveApproxPolygon.html#a6f0f9e1c1064de05b73a27b4e9d87062">maximumOffset</a>()
  3124. <a name="l03037"></a>03037 {
  3125. <a name="l03038"></a>03038 <span class="keywordflow">if</span>(polyApprox==NULL)
  3126. <a name="l03039"></a>03039 <span class="keywordflow">throw</span> <a class="code" href="classeMsg.html">eMsg</a>(<span class="stringliteral">&quot;curveFamily_curveApproxPolygon::maximumOffset(): The polyApprox has not been set&quot;</span>);
  3127. <a name="l03040"></a>03040 <span class="keywordflow">return</span> polyApprox-&gt;maxH();
  3128. <a name="l03041"></a>03041 }
  3129. <a name="l03042"></a>03042 };
  3130. <a name="l03043"></a>03043
  3131. <a name="l03044"></a>03044 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3132. <a name="l03045"></a>03045 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::getBisect</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; at)<span class="keyword"> const</span>
  3133. <a name="l03046"></a>03046 <span class="keyword"></span>{
  3134. <a name="l03047"></a>03047 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at_0=wrapIndex(at,-1);
  3135. <a name="l03048"></a>03048 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at_1=wrapIndex(at,0);
  3136. <a name="l03049"></a>03049 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at_2=wrapIndex(at,1);
  3137. <a name="l03050"></a>03050 <span class="comment">// Get the normals for each segment</span>
  3138. <a name="l03051"></a>03051 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> n0=(data-&gt;pnts[at_1]-data-&gt;pnts[at_0]).normal().<a class="code" href="classplanePoint.html#ae5d6aa1d23ecf2463092f5f9b506ceab">unit</a>();
  3139. <a name="l03052"></a>03052 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> n1=(data-&gt;pnts[at_2]-data-&gt;pnts[at_1]).normal().<a class="code" href="classplanePoint.html#ae5d6aa1d23ecf2463092f5f9b506ceab">unit</a>();
  3140. <a name="l03053"></a>03053 <span class="comment">// find the bisecting vector</span>
  3141. <a name="l03054"></a>03054 <span class="keywordflow">return</span> (n0+n1).unit();
  3142. <a name="l03055"></a>03055 }
  3143. <a name="l03056"></a>03056
  3144. <a name="l03057"></a>03057 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3145. <a name="l03058"></a>03058 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::bisectScale</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; at)<span class="keyword"> const</span>
  3146. <a name="l03059"></a>03059 <span class="keyword"></span>{
  3147. <a name="l03060"></a>03060 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> delta0=(data-&gt;pnts[wrapIndex(at,0)]-data-&gt;pnts[wrapIndex(at,-1)]).<a class="code" href="vector_01functions_8cpp.html#afec438cdf97f2f58378c6765f0871568">unit</a>();
  3148. <a name="l03061"></a>03061 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> norm0=delta0.<a class="code" href="classplanePoint.html#aed6dba70319518809f361942b41d716f">normal</a>().unit();
  3149. <a name="l03062"></a>03062
  3150. <a name="l03063"></a>03063 <span class="keywordflow">return</span> 1.0/((this-&gt;getBisect(at)).<a class="code" href="vector_01functions_8cpp.html#a13c7499151a59c9cbb0c4813b549b27d">dot</a>(norm0));
  3151. <a name="l03064"></a>03064 }
  3152. <a name="l03065"></a>03065
  3153. <a name="l03066"></a>03066 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3154. <a name="l03067"></a>03067 <a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">approxOffset&lt;dataType&gt;::topoCollapse::topoCollapse</a>()
  3155. <a name="l03068"></a>03068 {
  3156. <a name="l03069"></a>03069 valid=<span class="keyword">false</span>;
  3157. <a name="l03070"></a>03070 h=0.0;
  3158. <a name="l03071"></a>03071 at_0=0;
  3159. <a name="l03072"></a>03072 at_1=0;
  3160. <a name="l03073"></a>03073 b0=<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(0.0,0.0);
  3161. <a name="l03074"></a>03074 b1=<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(0.0,0.0);
  3162. <a name="l03075"></a>03075 meet=<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(0.0,0.0);
  3163. <a name="l03076"></a>03076 }
  3164. <a name="l03077"></a>03077
  3165. <a name="l03078"></a>03078 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3166. <a name="l03079"></a>03079 <a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">approxOffset&lt;dataType&gt;::topoCollapse::topoCollapse</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> edge,std::vector&lt;<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> &gt;&amp; pntsTmp,<span class="keyword">const</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;</a>&amp; pLine)
  3167. <a name="l03080"></a>03080 {
  3168. <a name="l03081"></a>03081 at_0=pLine.wrapIndex(edge,0);
  3169. <a name="l03082"></a>03082 at_1=pLine.wrapIndex(edge,1);
  3170. <a name="l03083"></a>03083 <span class="comment">// find the bisecting vector</span>
  3171. <a name="l03084"></a>03084 b0=pLine.getBisect(at_0);
  3172. <a name="l03085"></a>03085 b1=pLine.getBisect(at_1);
  3173. <a name="l03086"></a>03086 <span class="comment">// check to see if the bisectors are parallel</span>
  3174. <a name="l03087"></a>03087 valid=(b0.cross(b1)!=0.0);
  3175. <a name="l03088"></a>03088 <span class="comment">// determine meet and h</span>
  3176. <a name="l03089"></a>03089 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> s=pntsTmp[at_1]-pntsTmp[at_0];
  3177. <a name="l03090"></a>03090 meet=pntsTmp[at_0]+b0*(s.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>*b1.x-s.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>*b1.y)/(b0.y*b1.x-b1.y*b0.x);
  3178. <a name="l03091"></a>03091 h=((s.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>*b1.x-s.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>*b1.y)*(s.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>*b0.y-s.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>*b0.x))/(s.<a class="code" href="classplanePoint.html#a71e47c23ee1607864e54c100533e4333">length</a>()*(b0.y*b1.x-b1.y*b0.x));
  3179. <a name="l03092"></a>03092 }
  3180. <a name="l03093"></a>03093
  3181. <a name="l03094"></a>03094 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3182. <a name="l03095"></a>03095 <a class="code" href="classapproxOffset.html#a4f2e3421656c126521a32f9b1319cea9">approxOffset&lt;dataType&gt;::topoCollapse::topoCollapse</a>(<span class="keyword">const</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::topoCollapse</a>&amp; asg)
  3183. <a name="l03096"></a>03096 {
  3184. <a name="l03097"></a>03097 *<span class="keyword">this</span>=asg;
  3185. <a name="l03098"></a>03098 }
  3186. <a name="l03099"></a>03099
  3187. <a name="l03100"></a>03100 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3188. <a name="l03101"></a>03101 <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::topoCollapse::~topoCollapse</a>()
  3189. <a name="l03102"></a>03102 {}
  3190. <a name="l03103"></a>03103
  3191. <a name="l03104"></a>03104 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3192. <a name="l03105"></a>03105 <span class="keyword">typename</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::topoCollapse</a>&amp; <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::topoCollapse::operator=</a>(<span class="keyword">const</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::topoCollapse</a>&amp; asg)
  3193. <a name="l03106"></a>03106 {
  3194. <a name="l03107"></a>03107 this-&gt;h=asg.h;
  3195. <a name="l03108"></a>03108 this-&gt;at_0=asg.at_0;
  3196. <a name="l03109"></a>03109 this-&gt;at_1=asg.at_1;
  3197. <a name="l03110"></a>03110 this-&gt;b0=asg.b0;
  3198. <a name="l03111"></a>03111 this-&gt;b1=asg.b1;
  3199. <a name="l03112"></a>03112 this-&gt;meet=asg.meet;
  3200. <a name="l03113"></a>03113 this-&gt;valid=asg.valid;
  3201. <a name="l03114"></a>03114 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
  3202. <a name="l03115"></a>03115 }
  3203. <a name="l03116"></a>03116
  3204. <a name="l03117"></a>03117 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3205. <a name="l03118"></a>03118 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::wrapIndex</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at,<span class="keywordtype">long</span> offset)<span class="keyword"> const</span>
  3206. <a name="l03119"></a>03119 <span class="keyword"></span>{
  3207. <a name="l03120"></a>03120 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> size;
  3208. <a name="l03121"></a>03121 <span class="keywordflow">if</span>(data==NULL)
  3209. <a name="l03122"></a>03122 size=segments.<a class="code" href="classapproxOffset.html#a7a9ce7ef4356bf96465ef66cc1b1eecc">size</a>();
  3210. <a name="l03123"></a>03123 <span class="keywordflow">else</span>
  3211. <a name="l03124"></a>03124 size=data-&gt;pnts.size();
  3212. <a name="l03125"></a>03125 <span class="keywordflow">if</span>(offset&lt;0)
  3213. <a name="l03126"></a>03126 {
  3214. <a name="l03127"></a>03127 offset=-((-offset)%size);
  3215. <a name="l03128"></a>03128 offset+=size;
  3216. <a name="l03129"></a>03129 }
  3217. <a name="l03130"></a>03130 <span class="keywordflow">return</span> (at+offset)%size;
  3218. <a name="l03131"></a>03131 }
  3219. <a name="l03132"></a>03132
  3220. <a name="l03133"></a>03133 <span class="comment">// removes points</span>
  3221. <a name="l03134"></a>03134 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3222. <a name="l03135"></a>03135 <span class="keywordtype">void</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::removePoints</a>(std::vector&lt;unsigned long&gt;&amp; indices)
  3223. <a name="l03136"></a>03136 {
  3224. <a name="l03137"></a>03137 <span class="comment">// this function we need to add a whole bunch of logic to properly remove the points and maps</span>
  3225. <a name="l03138"></a>03138 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> index;
  3226. <a name="l03139"></a>03139 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;indices.size();i++)
  3227. <a name="l03140"></a>03140 {
  3228. <a name="l03141"></a>03141 index=indices[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>];
  3229. <a name="l03142"></a>03142 segments[data-&gt;segMap[index]].addEvent(data-&gt;atH,0.0);
  3230. <a name="l03143"></a>03143 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=index;j&lt;(data-&gt;pnts.size()-1);j++)
  3231. <a name="l03144"></a>03144 {
  3232. <a name="l03145"></a>03145 data-&gt;pnts[j]=data-&gt;pnts[j+1];
  3233. <a name="l03146"></a>03146 data-&gt;segMap[j]=data-&gt;segMap[j+1];
  3234. <a name="l03147"></a>03147 }
  3235. <a name="l03148"></a>03148 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=i+1;j&lt;indices.size();j++)
  3236. <a name="l03149"></a>03149 {
  3237. <a name="l03150"></a>03150 <span class="keywordflow">if</span>(indices[j]&gt;index)
  3238. <a name="l03151"></a>03151 indices[j]--;
  3239. <a name="l03152"></a>03152 }
  3240. <a name="l03153"></a>03153 }
  3241. <a name="l03154"></a>03154 data-&gt;pnts.<a class="code" href="classapproxOffset.html#a463dab75995fd25c23da5b7ebbd59388">resize</a>(data-&gt;pnts.size()-indices.size());
  3242. <a name="l03155"></a>03155 data-&gt;segMap.resize(data-&gt;segMap.size()-indices.size());
  3243. <a name="l03156"></a>03156 }
  3244. <a name="l03157"></a>03157
  3245. <a name="l03158"></a>03158 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3246. <a name="l03159"></a>03159 <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::getSegVect</a>(<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> start,<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> end)
  3247. <a name="l03160"></a>03160 {
  3248. <a name="l03161"></a>03161 <span class="keywordflow">return</span> <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a>(start,end-start);
  3249. <a name="l03162"></a>03162 }
  3250. <a name="l03163"></a>03163
  3251. <a name="l03164"></a>03164 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3252. <a name="l03165"></a>03165 <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::getSegVect</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> at)
  3253. <a name="l03166"></a>03166 {
  3254. <a name="l03167"></a>03167 at=wrapIndex(at,0);
  3255. <a name="l03168"></a>03168 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> atEnd=at+1;
  3256. <a name="l03169"></a>03169 <span class="keywordflow">if</span>(atEnd==data-&gt;pnts.size())
  3257. <a name="l03170"></a>03170 atEnd=0;
  3258. <a name="l03171"></a>03171 <span class="keywordflow">return</span> getSegVect(data-&gt;pnts[wrapIndex(at,0)],data-&gt;pnts[wrapIndex(at,1)]);
  3259. <a name="l03172"></a>03172 }
  3260. <a name="l03173"></a>03173
  3261. <a name="l03174"></a>03174 <span class="comment">// Need to give the offset and the new topology</span>
  3262. <a name="l03175"></a>03175 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3263. <a name="l03176"></a>03176 <span class="keywordtype">void</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::nextCollapse</a>(<span class="keywordtype">bool</span>&amp; isPos,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; minH,std::vector&lt;<a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::topoCollapse</a>&gt; &amp;topoClps,<span class="keywordtype">bool</span>&amp; isNeg,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; minNegH,std::vector&lt;<a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::topoCollapse</a>&gt; &amp;negTopoClps)
  3264. <a name="l03177"></a>03177 {
  3265. <a name="l03178"></a>03178 <span class="comment">// init</span>
  3266. <a name="l03179"></a>03179 isPos=<span class="keyword">false</span>;
  3267. <a name="l03180"></a>03180 minH=0.0;
  3268. <a name="l03181"></a>03181 topoClps=std::vector&lt;typename approxOffset&lt;dataType&gt;::topoCollapse&gt;(0);
  3269. <a name="l03182"></a>03182 isNeg=<span class="keyword">false</span>;
  3270. <a name="l03183"></a>03183 minNegH=0.0;
  3271. <a name="l03184"></a>03184 negTopoClps=std::vector&lt;typename approxOffset&lt;dataType&gt;::topoCollapse&gt;(0);
  3272. <a name="l03185"></a>03185 <span class="comment">// loop through all the edges</span>
  3273. <a name="l03186"></a>03186 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;data-&gt;pnts.size();i++)
  3274. <a name="l03187"></a>03187 {
  3275. <a name="l03188"></a>03188 <span class="keyword">typename</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::topoCollapse</a> tst(i,data-&gt;pnts,*<span class="keyword">this</span>);
  3276. <a name="l03189"></a>03189 <span class="keywordflow">if</span>(tst.valid)
  3277. <a name="l03190"></a>03190 {
  3278. <a name="l03191"></a>03191 <span class="keywordflow">if</span>(tst.h&gt;0.0)
  3279. <a name="l03192"></a>03192 {
  3280. <a name="l03193"></a>03193 <span class="keywordflow">if</span>(!isPos || tst.h&lt;minH)
  3281. <a name="l03194"></a>03194 {
  3282. <a name="l03195"></a>03195 isPos=<span class="keyword">true</span>;
  3283. <a name="l03196"></a>03196 minH=tst.h;
  3284. <a name="l03197"></a>03197 topoClps=std::vector&lt;typename approxOffset&lt;dataType&gt;::topoCollapse&gt;(1,tst);
  3285. <a name="l03198"></a>03198 }
  3286. <a name="l03199"></a>03199 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(isPos &amp;&amp; tst.h==minH)
  3287. <a name="l03200"></a>03200 {
  3288. <a name="l03201"></a>03201 topoClps.resize(topoClps.size()+1,tst);
  3289. <a name="l03202"></a>03202 }
  3290. <a name="l03203"></a>03203 }
  3291. <a name="l03204"></a>03204 <span class="keywordflow">else</span>
  3292. <a name="l03205"></a>03205 {
  3293. <a name="l03206"></a>03206 <span class="keywordflow">if</span>(!isNeg || tst.h&gt;minNegH)
  3294. <a name="l03207"></a>03207 {
  3295. <a name="l03208"></a>03208 isNeg=<span class="keyword">true</span>;
  3296. <a name="l03209"></a>03209 minNegH=tst.h;
  3297. <a name="l03210"></a>03210 negTopoClps=std::vector&lt;typename approxOffset&lt;dataType&gt;::topoCollapse&gt;(1,tst);
  3298. <a name="l03211"></a>03211 }
  3299. <a name="l03212"></a>03212 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(isNeg &amp;&amp; tst.h==minNegH)
  3300. <a name="l03213"></a>03213 {
  3301. <a name="l03214"></a>03214 negTopoClps.resize(negTopoClps.size()+1,tst);
  3302. <a name="l03215"></a>03215 }
  3303. <a name="l03216"></a>03216 }
  3304. <a name="l03217"></a>03217 }
  3305. <a name="l03218"></a>03218 }
  3306. <a name="l03219"></a>03219 <span class="keywordflow">return</span>;
  3307. <a name="l03220"></a>03220 }
  3308. <a name="l03221"></a>03221
  3309. <a name="l03222"></a>03222 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3310. <a name="l03223"></a>03223 <span class="keywordtype">bool</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::testSplit</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> vertex,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> segment,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; h)
  3311. <a name="l03224"></a>03224 {
  3312. <a name="l03225"></a>03225 <span class="comment">// ######################################</span>
  3313. <a name="l03226"></a>03226 <span class="comment">// Gather some basic geometric information about locations and orientations</span>
  3314. <a name="l03227"></a>03227 <span class="comment">// ######################################</span>
  3315. <a name="l03228"></a>03228
  3316. <a name="l03229"></a>03229 <span class="comment">// extract points</span>
  3317. <a name="l03230"></a>03230 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> p0=data-&gt;pnts[vertex];
  3318. <a name="l03231"></a>03231 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> p2=data-&gt;pnts[segment];
  3319. <a name="l03232"></a>03232 <span class="comment">// build delta vectors</span>
  3320. <a name="l03233"></a>03233 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> delta0=(p0-data-&gt;pnts[wrapIndex(vertex,-1)]).<a class="code" href="vector_01functions_8cpp.html#afec438cdf97f2f58378c6765f0871568">unit</a>();
  3321. <a name="l03234"></a>03234 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> delta1=(data-&gt;pnts[wrapIndex(vertex,1)]-p0).<a class="code" href="vector_01functions_8cpp.html#afec438cdf97f2f58378c6765f0871568">unit</a>();
  3322. <a name="l03235"></a>03235 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> endPnt=data-&gt;pnts[wrapIndex(segment,1)];
  3323. <a name="l03236"></a>03236 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> delta2=(endPnt-p2).<a class="code" href="vector_01functions_8cpp.html#afec438cdf97f2f58378c6765f0871568">unit</a>();
  3324. <a name="l03237"></a>03237 <span class="comment">// find normal vectors</span>
  3325. <a name="l03238"></a>03238 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> norm0=delta0.<a class="code" href="classplanePoint.html#aed6dba70319518809f361942b41d716f">normal</a>().unit();
  3326. <a name="l03239"></a>03239 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> norm1=delta1.<a class="code" href="classplanePoint.html#aed6dba70319518809f361942b41d716f">normal</a>().unit();
  3327. <a name="l03240"></a>03240 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> <a class="code" href="vector_01functions_8cpp.html#a9c3c2fd60a51fdcec1668fc036b4a41c">norm2</a>=delta2.<a class="code" href="classplanePoint.html#aed6dba70319518809f361942b41d716f">normal</a>().unit();
  3328. <a name="l03241"></a>03241 <span class="comment">// test if the vertex touches before the surfaces</span>
  3329. <a name="l03242"></a>03242 <span class="keywordflow">if</span>((norm0.<a class="code" href="classplanePoint.html#ac11da6a78e63c26f603668cc7c9c2342">cross</a>(-norm2)*(-<a class="code" href="vector_01functions_8cpp.html#a9c3c2fd60a51fdcec1668fc036b4a41c">norm2</a>).<a class="code" href="vector_01functions_8cpp.html#a0881962290c575e179efea1532ba31fa">cross</a>(norm1))&lt;=0.0)
  3330. <a name="l03243"></a>03243 <span class="keywordflow">return</span> <span class="keyword">false</span>;
  3331. <a name="l03244"></a>03244
  3332. <a name="l03245"></a>03245 <span class="comment">// ######################################</span>
  3333. <a name="l03246"></a>03246 <span class="comment">// Now we solve the triple point where all surfaces meet</span>
  3334. <a name="l03247"></a>03247 <span class="comment">// ######################################</span>
  3335. <a name="l03248"></a>03248
  3336. <a name="l03249"></a>03249 <span class="comment">// build matrix</span>
  3337. <a name="l03250"></a>03250 <a class="code" href="classmatrixRdWtStaticSqr__Data.html">matrixRdWtStaticSqr_Data&lt;dataType,6&gt;</a> <a class="code" href="timoshenko_8cpp.html#ac5eb09f63c828d8b858cf5c18eabfe8a">A</a>=<a class="code" href="classmatrixStatic__Zero.html">matrixStatic_Zero&lt;dataType,6,6&gt;</a>();
  3338. <a name="l03251"></a>03251 <a class="code" href="classmatrixRdWtStaticVectCol__Data.html">matrixRdWtStaticVectCol_Data&lt;dataType,6&gt;</a> <a class="code" href="timoshenko_8cpp.html#a8edcb78651b9b4807e1de4008fe949c4">B</a>=<a class="code" href="classmatrixStatic__Zero.html">matrixStatic_Zero&lt;dataType,6,1&gt;</a>();
  3339. <a name="l03252"></a>03252 <span class="comment">// add delta entries</span>
  3340. <a name="l03253"></a>03253 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(0,0)=delta0.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>;
  3341. <a name="l03254"></a>03254 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(1,0)=delta0.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>;
  3342. <a name="l03255"></a>03255 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,1)=delta1.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>;
  3343. <a name="l03256"></a>03256 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(3,1)=delta1.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>;
  3344. <a name="l03257"></a>03257 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(4,2)=delta2.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>;
  3345. <a name="l03258"></a>03258 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(5,2)=delta2.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>;
  3346. <a name="l03259"></a>03259 <span class="comment">// add normal entries</span>
  3347. <a name="l03260"></a>03260 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(0,3)=norm0.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>;
  3348. <a name="l03261"></a>03261 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(1,3)=norm0.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>;
  3349. <a name="l03262"></a>03262 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,3)=norm1.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>;
  3350. <a name="l03263"></a>03263 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(3,3)=norm1.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>;
  3351. <a name="l03264"></a>03264 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(4,3)=norm2.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>;
  3352. <a name="l03265"></a>03265 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(5,3)=norm2.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>;
  3353. <a name="l03266"></a>03266 <span class="comment">// add center</span>
  3354. <a name="l03267"></a>03267 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(0,4)=-1.0;
  3355. <a name="l03268"></a>03268 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(1,5)=-1.0;
  3356. <a name="l03269"></a>03269 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(2,4)=-1.0;
  3357. <a name="l03270"></a>03270 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(3,5)=-1.0;
  3358. <a name="l03271"></a>03271 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(4,4)=-1.0;
  3359. <a name="l03272"></a>03272 A.<a class="code" href="classmatrixRdWt.html#a85aaa63333c688527b5e62dbce69cb61">entry</a>(5,5)=-1.0;
  3360. <a name="l03273"></a>03273 <span class="comment">// test if there is a solution</span>
  3361. <a name="l03274"></a>03274 <span class="keywordflow">if</span>(A.<a class="code" href="classmatrixSqr.html#a21b5977b0d70c9302e6da7ce584f45c1">det</a>()==0.0)
  3362. <a name="l03275"></a>03275 <span class="keywordflow">return</span> <span class="keyword">false</span>;
  3363. <a name="l03276"></a>03276 <span class="comment">// populate the B vector</span>
  3364. <a name="l03277"></a>03277 B.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(0)=-p0.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>;
  3365. <a name="l03278"></a>03278 B.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(1)=-p0.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>;
  3366. <a name="l03279"></a>03279 B.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(2)=-p0.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>;
  3367. <a name="l03280"></a>03280 B.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(3)=-p0.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>;
  3368. <a name="l03281"></a>03281 B.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(4)=-p2.<a class="code" href="classplanePoint.html#aa74fa1087ea6d64336c8bf9f8f4e9c6c">x</a>;
  3369. <a name="l03282"></a>03282 B.<a class="code" href="classmatrix.html#a81a746378de5ff16645b2cc51189e302">entry</a>(5)=-p2.<a class="code" href="classplanePoint.html#aaf99f5b126fa4b299ef00b308d5a10ed">y</a>;
  3370. <a name="l03283"></a>03283 <span class="comment">// solve the problem</span>
  3371. <a name="l03284"></a>03284 <a class="code" href="classmatrixRdWtStaticVectCol__Data.html">matrixRdWtStaticVectCol_Data&lt;dataType,6&gt;</a> X=A.<a class="code" href="classmatrixSqr.html#a991ebad568b11587f75c85cc3b8da408">inverse</a>()*<a class="code" href="timoshenko_8cpp.html#a8edcb78651b9b4807e1de4008fe949c4">B</a>;
  3372. <a name="l03285"></a>03285 <span class="comment">// test if it is a reflex vertex</span>
  3373. <a name="l03286"></a>03286 <span class="keywordflow">if</span>( X.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(0)&lt;0.0 || X.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(1)&gt;0.0 )
  3374. <a name="l03287"></a>03287 <span class="keywordflow">return</span> <span class="keyword">false</span>;
  3375. <a name="l03288"></a>03288 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> center=<a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a>(X.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(4),X.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(5));
  3376. <a name="l03289"></a>03289
  3377. <a name="l03290"></a>03290 <span class="comment">// ######################################</span>
  3378. <a name="l03291"></a>03291 <span class="comment">// Now we test the solution to determine if it is within bisectors</span>
  3379. <a name="l03292"></a>03292 <span class="comment">// ######################################</span>
  3380. <a name="l03293"></a>03293
  3381. <a name="l03294"></a>03294 <span class="comment">// Now we get the bisectors</span>
  3382. <a name="l03295"></a>03295 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> bisectBack=this-&gt;getBisect(wrapIndex(segment,0));
  3383. <a name="l03296"></a>03296 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> bisectFront=this-&gt;getBisect(wrapIndex(segment,1));
  3384. <a name="l03297"></a>03297 <span class="comment">// test if center falls within the bisectors</span>
  3385. <a name="l03298"></a>03298 <span class="keywordflow">if</span>(bisectBack.<a class="code" href="classplanePoint.html#ac11da6a78e63c26f603668cc7c9c2342">cross</a>(center-p2)&gt;0.0)
  3386. <a name="l03299"></a>03299 <span class="keywordflow">return</span> <span class="keyword">false</span>;
  3387. <a name="l03300"></a>03300 <span class="keywordflow">if</span>((center-endPnt).cross(bisectFront)&gt;0.0)
  3388. <a name="l03301"></a>03301 <span class="keywordflow">return</span> <span class="keyword">false</span>;
  3389. <a name="l03302"></a>03302 h=X.<a class="code" href="classmatrixVect.html#adb2ffeb4b912280fe62e0d0b46189eca">entry</a>(3);
  3390. <a name="l03303"></a>03303 <span class="keywordflow">return</span> <span class="keyword">true</span>;
  3391. <a name="l03304"></a>03304 }
  3392. <a name="l03305"></a>03305
  3393. <a name="l03306"></a>03306 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3394. <a name="l03307"></a>03307 <span class="keywordtype">bool</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::seekSplit</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> vertex,<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; segment,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; h)
  3395. <a name="l03308"></a>03308 {
  3396. <a name="l03309"></a>03309 <span class="keywordtype">bool</span> splitFnd=<span class="keyword">false</span>;
  3397. <a name="l03310"></a>03310 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> hTst;
  3398. <a name="l03311"></a>03311
  3399. <a name="l03312"></a>03312 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;data-&gt;pnts.size();i++)
  3400. <a name="l03313"></a>03313 {
  3401. <a name="l03314"></a>03314 <span class="keywordflow">if</span>(wrapIndex(vertex,0)!=wrapIndex(i,0) &amp;&amp; wrapIndex(vertex,0)!=wrapIndex(i,1))
  3402. <a name="l03315"></a>03315 {
  3403. <a name="l03316"></a>03316 <span class="keywordflow">if</span>(testSplit(vertex,i,hTst) &amp;&amp; (!splitFnd || fabs(hTst)&lt;fabs(h)))
  3404. <a name="l03317"></a>03317 {
  3405. <a name="l03318"></a>03318 segment=<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>;
  3406. <a name="l03319"></a>03319 h=hTst;
  3407. <a name="l03320"></a>03320 splitFnd=<span class="keyword">true</span>;
  3408. <a name="l03321"></a>03321 }
  3409. <a name="l03322"></a>03322 }
  3410. <a name="l03323"></a>03323 }
  3411. <a name="l03324"></a>03324 <span class="keywordflow">return</span> splitFnd;
  3412. <a name="l03325"></a>03325 }
  3413. <a name="l03326"></a>03326
  3414. <a name="l03327"></a>03327 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3415. <a name="l03328"></a>03328 <span class="keywordtype">bool</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::nextSplit</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>&amp; segment,<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a>&amp; h)
  3416. <a name="l03329"></a>03329 {
  3417. <a name="l03330"></a>03330 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> segmentTst;
  3418. <a name="l03331"></a>03331 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> hTst;
  3419. <a name="l03332"></a>03332 <span class="keywordtype">bool</span> hFnd=<span class="keyword">false</span>;
  3420. <a name="l03333"></a>03333
  3421. <a name="l03334"></a>03334 <span class="comment">// find reflex vertex...</span>
  3422. <a name="l03335"></a>03335 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;data-&gt;pnts.size();i++)
  3423. <a name="l03336"></a>03336 {
  3424. <a name="l03337"></a>03337 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> delta0=(data-&gt;pnts[wrapIndex(i,0)]-data-&gt;pnts[wrapIndex(i,-1)]).<a class="code" href="vector_01functions_8cpp.html#afec438cdf97f2f58378c6765f0871568">unit</a>();
  3425. <a name="l03338"></a>03338 <a class="code" href="classplanePoint.html">planePoint&lt;dataType&gt;</a> delta1=(data-&gt;pnts[wrapIndex(i,1)]-data-&gt;pnts[wrapIndex(i,0)]).<a class="code" href="vector_01functions_8cpp.html#afec438cdf97f2f58378c6765f0871568">unit</a>();
  3426. <a name="l03339"></a>03339 <span class="keywordflow">if</span>(delta0.<a class="code" href="classplanePoint.html#ac11da6a78e63c26f603668cc7c9c2342">cross</a>(delta1)&lt;0.0)
  3427. <a name="l03340"></a>03340 {
  3428. <a name="l03341"></a>03341 <span class="comment">// seek split</span>
  3429. <a name="l03342"></a>03342 <span class="keywordflow">if</span>(seekSplit(i,segmentTst,hTst) &amp;&amp; (!hFnd || fabs(hTst)&lt;fabs(h)))
  3430. <a name="l03343"></a>03343 {
  3431. <a name="l03344"></a>03344 h=hTst;
  3432. <a name="l03345"></a>03345 segment=segmentTst;
  3433. <a name="l03346"></a>03346 hFnd=<span class="keyword">true</span>;
  3434. <a name="l03347"></a>03347 }
  3435. <a name="l03348"></a>03348 }
  3436. <a name="l03349"></a>03349 }
  3437. <a name="l03350"></a>03350 <span class="keywordflow">return</span> hFnd;
  3438. <a name="l03351"></a>03351 }
  3439. <a name="l03352"></a>03352
  3440. <a name="l03353"></a>03353 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3441. <a name="l03354"></a>03354 <span class="keywordtype">void</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::collapseTopology</a>(<a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> h,std::vector&lt;<a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::topoCollapse</a>&gt;&amp; topoClps)
  3442. <a name="l03355"></a>03355 {
  3443. <a name="l03356"></a>03356 <span class="comment">// is boolean on whether an old node is kept</span>
  3444. <a name="l03357"></a>03357 std::vector&lt;bool&gt; isNodeDone=std::vector&lt;bool&gt;(data-&gt;pnts.size(),<span class="keyword">false</span>);
  3445. <a name="l03358"></a>03358 <span class="comment">// state variable the manges whether a collapse has been applied</span>
  3446. <a name="l03359"></a>03359 std::vector&lt;bool&gt; clpsDone=std::vector&lt;bool&gt;(topoClps.size(),<span class="keyword">false</span>);
  3447. <a name="l03360"></a>03360 <span class="comment">// a variable for all the collapses that are common</span>
  3448. <a name="l03361"></a>03361 std::vector&lt;unsigned long&gt; mrgClps;
  3449. <a name="l03362"></a>03362 <span class="comment">// create a copy of the points to be modifed</span>
  3450. <a name="l03363"></a>03363 std::vector&lt;planePoint&lt;dataType&gt; &gt; pntsNew=data-&gt;pnts;
  3451. <a name="l03364"></a>03364
  3452. <a name="l03365"></a>03365 <span class="comment">// process all the collapses</span>
  3453. <a name="l03366"></a>03366 <span class="keywordtype">bool</span> isClps=<span class="keyword">true</span>;
  3454. <a name="l03367"></a>03367 std::vector&lt;unsigned long&gt; indices(topoClps.size(),0);
  3455. <a name="l03368"></a>03368 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> atIndex=0;
  3456. <a name="l03369"></a>03369 <span class="keywordflow">while</span>(isClps)
  3457. <a name="l03370"></a>03370 {
  3458. <a name="l03371"></a>03371 isClps=<span class="keyword">false</span>;
  3459. <a name="l03372"></a>03372
  3460. <a name="l03373"></a>03373 <span class="comment">// Find a unique collapse points</span>
  3461. <a name="l03374"></a>03374 <span class="keywordtype">bool</span> clpsFnd=<span class="keyword">false</span>;
  3462. <a name="l03375"></a>03375 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> atClps=0;
  3463. <a name="l03376"></a>03376 <span class="comment">// This loop detects collapses that meet at a common point</span>
  3464. <a name="l03377"></a>03377 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;topoClps.size();i++)
  3465. <a name="l03378"></a>03378 {
  3466. <a name="l03379"></a>03379 <span class="keywordflow">if</span>(!clpsDone[i])
  3467. <a name="l03380"></a>03380 {
  3468. <a name="l03381"></a>03381 <span class="keywordflow">if</span>(!clpsFnd || topoClps[atClps].meet==topoClps[i].meet)
  3469. <a name="l03382"></a>03382 {
  3470. <a name="l03383"></a>03383 atClps=<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>;
  3471. <a name="l03384"></a>03384 <span class="keywordflow">if</span>(clpsFnd)
  3472. <a name="l03385"></a>03385 mrgClps.resize(mrgClps.size()+1,<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>);
  3473. <a name="l03386"></a>03386 <span class="keywordflow">else</span>
  3474. <a name="l03387"></a>03387 mrgClps=std::vector&lt;unsigned long&gt;(1,<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>);
  3475. <a name="l03388"></a>03388 clpsDone[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=<span class="keyword">true</span>;
  3476. <a name="l03389"></a>03389 clpsFnd=<span class="keyword">true</span>;
  3477. <a name="l03390"></a>03390 }
  3478. <a name="l03391"></a>03391 <span class="keywordflow">else</span> <span class="keywordflow">if</span>(clpsFnd)
  3479. <a name="l03392"></a>03392 isClps=<span class="keyword">true</span>; <span class="comment">// there is another collaps but it meets at a different point</span>
  3480. <a name="l03393"></a>03393 }
  3481. <a name="l03394"></a>03394 }
  3482. <a name="l03395"></a>03395
  3483. <a name="l03396"></a>03396 <span class="comment">// prepare all the nodes for it to be deleted</span>
  3484. <a name="l03397"></a>03397 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;mrgClps.size();i++)
  3485. <a name="l03398"></a>03398 {
  3486. <a name="l03399"></a>03399 indices[atIndex++]=topoClps[mrgClps[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]].at_1;
  3487. <a name="l03400"></a>03400 isNodeDone[topoClps[mrgClps[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]].at_1]=<span class="keyword">true</span>;
  3488. <a name="l03401"></a>03401 }
  3489. <a name="l03402"></a>03402
  3490. <a name="l03403"></a>03403 <span class="comment">// find the indices at the beginning of the collapse</span>
  3491. <a name="l03404"></a>03404 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> first;
  3492. <a name="l03405"></a>03405 <span class="keywordtype">bool</span> frstFnd=<span class="keyword">false</span>;
  3493. <a name="l03406"></a>03406 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;mrgClps.size();i++)
  3494. <a name="l03407"></a>03407 {
  3495. <a name="l03408"></a>03408 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> fstCand=topoClps[mrgClps[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]].at_0;
  3496. <a name="l03409"></a>03409 <span class="keywordtype">bool</span> cndFnd=<span class="keyword">false</span>;
  3497. <a name="l03410"></a>03410 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=0;j&lt;mrgClps.size();j++)
  3498. <a name="l03411"></a>03411 {
  3499. <a name="l03412"></a>03412 <span class="keywordflow">if</span>(fstCand==topoClps[mrgClps[j]].at_1)
  3500. <a name="l03413"></a>03413 cndFnd=<span class="keyword">true</span>;
  3501. <a name="l03414"></a>03414 }
  3502. <a name="l03415"></a>03415 <span class="keywordflow">if</span>(!cndFnd)
  3503. <a name="l03416"></a>03416 {
  3504. <a name="l03417"></a>03417 first=fstCand;
  3505. <a name="l03418"></a>03418 frstFnd=<span class="keyword">true</span>;
  3506. <a name="l03419"></a>03419 <span class="keywordflow">break</span>;
  3507. <a name="l03420"></a>03420 }
  3508. <a name="l03421"></a>03421 }
  3509. <a name="l03422"></a>03422 <span class="comment">// Can only process if the node is not deleted</span>
  3510. <a name="l03423"></a>03423 <span class="keywordflow">if</span>(frstFnd)
  3511. <a name="l03424"></a>03424 {
  3512. <a name="l03425"></a>03425 isNodeDone[first]=<span class="keyword">true</span>;
  3513. <a name="l03426"></a>03426 pntsNew[first]=topoClps[mrgClps[0]].meet;
  3514. <a name="l03427"></a>03427 }
  3515. <a name="l03428"></a>03428 }
  3516. <a name="l03429"></a>03429
  3517. <a name="l03430"></a>03430 <span class="comment">// regenerate all the points that are not part of a collapse</span>
  3518. <a name="l03431"></a>03431 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;data-&gt;pnts.size();i++)
  3519. <a name="l03432"></a>03432 {
  3520. <a name="l03433"></a>03433 <span class="keywordflow">if</span>(!isNodeDone[i])
  3521. <a name="l03434"></a>03434 {
  3522. <a name="l03435"></a>03435 pntsNew[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=data-&gt;pnts[wrapIndex(i,0)]+this-&gt;getBisect(i)*h*this-&gt;bisectScale(i);
  3523. <a name="l03436"></a>03436 isNodeDone[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=<span class="keyword">true</span>;
  3524. <a name="l03437"></a>03437 }
  3525. <a name="l03438"></a>03438 }
  3526. <a name="l03439"></a>03439 <span class="comment">// copy the new points then delete all the unused points</span>
  3527. <a name="l03440"></a>03440 data-&gt;atH+=h;
  3528. <a name="l03441"></a>03441 data-&gt;pnts=pntsNew;
  3529. <a name="l03442"></a>03442 removePoints(indices);
  3530. <a name="l03443"></a>03443 }
  3531. <a name="l03444"></a>03444
  3532. <a name="l03445"></a>03445 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType&gt;
  3533. <a name="l03446"></a>03446 <span class="keywordtype">void</span> <a class="code" href="classapproxOffset.html">approxOffset&lt;dataType&gt;::cleanPolygon</a>(<span class="keywordtype">bool</span>&amp; isValid,<span class="keywordtype">bool</span>&amp; faceMeetTmp)
  3534. <a name="l03447"></a>03447 {
  3535. <a name="l03448"></a>03448 std::vector&lt;unsigned long&gt; indices;
  3536. <a name="l03449"></a>03449 std::vector&lt;bool&gt; killed;
  3537. <a name="l03450"></a>03450 isValid=<span class="keyword">true</span>;
  3538. <a name="l03451"></a>03451 <span class="keywordtype">bool</span> testKill=<span class="keyword">true</span>;
  3539. <a name="l03452"></a>03452 faceMeetTmp=<span class="keyword">false</span>;
  3540. <a name="l03453"></a>03453 <span class="comment">// first lets tackle some easy stuff</span>
  3541. <a name="l03454"></a>03454 <span class="comment">// adjacent points that are coincident</span>
  3542. <a name="l03455"></a>03455 <span class="keywordflow">while</span>(testKill)
  3543. <a name="l03456"></a>03456 {
  3544. <a name="l03457"></a>03457 testKill=<span class="keyword">false</span>;
  3545. <a name="l03458"></a>03458 indices=std::vector&lt;unsigned long&gt;(0);
  3546. <a name="l03459"></a>03459 killed=std::vector&lt;bool&gt;(data-&gt;pnts.size(),<span class="keyword">false</span>);
  3547. <a name="l03460"></a>03460
  3548. <a name="l03461"></a>03461 <span class="comment">// this loop detects points that are identical</span>
  3549. <a name="l03462"></a>03462 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;data-&gt;pnts.size();i++)
  3550. <a name="l03463"></a>03463 {
  3551. <a name="l03464"></a>03464 <span class="keywordflow">if</span>(!killed[i] &amp;&amp; data-&gt;pnts[wrapIndex(i,0)]==data-&gt;pnts[wrapIndex(i,-1)])
  3552. <a name="l03465"></a>03465 {
  3553. <a name="l03466"></a>03466 indices.<a class="code" href="classapproxOffset.html#a463dab75995fd25c23da5b7ebbd59388">resize</a>(indices.size()+1,<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>);
  3554. <a name="l03467"></a>03467 killed[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=<span class="keyword">true</span>;
  3555. <a name="l03468"></a>03468 testKill=<span class="keyword">true</span>;
  3556. <a name="l03469"></a>03469 }
  3557. <a name="l03470"></a>03470 }
  3558. <a name="l03471"></a>03471 <span class="comment">// Delete points that are between two colinear segments</span>
  3559. <a name="l03472"></a>03472 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;data-&gt;pnts.size();i++)
  3560. <a name="l03473"></a>03473 {
  3561. <a name="l03474"></a>03474 <span class="keywordflow">if</span>(!killed[i] &amp;&amp; getSegVect(wrapIndex(i,-1)).coLinear(getSegVect(wrapIndex(i,0))))
  3562. <a name="l03475"></a>03475 {
  3563. <a name="l03476"></a>03476 <span class="keywordflow">if</span>( ((data-&gt;pnts[wrapIndex(i,0)]-data-&gt;pnts[wrapIndex(i,-1)]).<a class="code" href="vector_01functions_8cpp.html#afec438cdf97f2f58378c6765f0871568">unit</a>())==(-((data-&gt;pnts[wrapIndex(i,1)]-data-&gt;pnts[wrapIndex(i,0)]).<a class="code" href="vector_01functions_8cpp.html#afec438cdf97f2f58378c6765f0871568">unit</a>())) )
  3564. <a name="l03477"></a>03477 {
  3565. <a name="l03478"></a>03478 faceMeetTmp=<span class="keyword">true</span>; <span class="comment">// this detects points where there is a 180 degree reversal of the line segment</span>
  3566. <a name="l03479"></a>03479 indices.resize(indices.size()+1,<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>);
  3567. <a name="l03480"></a>03480 killed[<a class="code" href="namespaceCPPL.html#aca67a31b860a54cc09b2519953aa2b39">i</a>]=<span class="keyword">true</span>;
  3568. <a name="l03481"></a>03481 testKill=<span class="keyword">true</span>;
  3569. <a name="l03482"></a>03482 <span class="comment">// perform a little re-mapping logic</span>
  3570. <a name="l03483"></a>03483 <span class="keywordflow">if</span>(getSegVect(wrapIndex(i,0)).delta.length()&lt;getSegVect(wrapIndex(i,-1)).delta.length())
  3571. <a name="l03484"></a>03484 {
  3572. <a name="l03485"></a>03485 <span class="comment">// switch map</span>
  3573. <a name="l03486"></a>03486 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> tmpMap=data-&gt;segMap[wrapIndex(i,0)];
  3574. <a name="l03487"></a>03487 data-&gt;segMap[wrapIndex(i,0)]=data-&gt;segMap[wrapIndex(i,1)];
  3575. <a name="l03488"></a>03488 data-&gt;segMap[wrapIndex(i,1)]=tmpMap;
  3576. <a name="l03489"></a>03489 }
  3577. <a name="l03490"></a>03490 }
  3578. <a name="l03491"></a>03491 }
  3579. <a name="l03492"></a>03492 }
  3580. <a name="l03493"></a>03493 <span class="comment">// delete all the points...</span>
  3581. <a name="l03494"></a>03494 <span class="keywordflow">if</span>(testKill)
  3582. <a name="l03495"></a>03495 removePoints(indices);
  3583. <a name="l03496"></a>03496 <span class="comment">// Ensure that there are enough valid points to make a polygon</span>
  3584. <a name="l03497"></a>03497 <span class="keywordflow">if</span>(data-&gt;pnts.size()&lt;3)
  3585. <a name="l03498"></a>03498 isValid=<span class="keyword">false</span>; <span class="comment">// at this point the polygon is nothing</span>
  3586. <a name="l03499"></a>03499 }
  3587. <a name="l03500"></a>03500 <span class="comment">// Now we check to see if there are any segments that are intersection...</span>
  3588. <a name="l03501"></a>03501 <span class="comment">// If the segment is not valid after this loop... then a new closed loop has been generated thus this h defines the limit to the offsetting...</span>
  3589. <a name="l03502"></a>03502 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> i=0;i&lt;data-&gt;pnts.size() &amp;&amp; isValid;i++)
  3590. <a name="l03503"></a>03503 {
  3591. <a name="l03504"></a>03504 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> limit=data-&gt;pnts.size();
  3592. <a name="l03505"></a>03505 <span class="keywordflow">if</span>(i==0)
  3593. <a name="l03506"></a>03506 limit--;
  3594. <a name="l03507"></a>03507 <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a> champ=getSegVect(wrapIndex(i,0));
  3595. <a name="l03508"></a>03508 <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> j=i+2;j&lt;limit &amp;&amp; isValid;j++)
  3596. <a name="l03509"></a>03509 {
  3597. <a name="l03510"></a>03510 <a class="code" href="classlineSegment.html">lineSegment&lt;dataType&gt;</a> chlng=getSegVect(wrapIndex(j,0));
  3598. <a name="l03511"></a>03511 <span class="keywordflow">if</span>(champ.<a class="code" href="classlineSegment.html#accc6ee68372d87ac598d054ae35fb2d5">isParallel</a>(chlng))
  3599. <a name="l03512"></a>03512 {
  3600. <a name="l03513"></a>03513 <span class="keywordflow">if</span>(champ.<a class="code" href="classlineSegment.html#a4103aced67051597b497ce904dd0ef7a">coLinear</a>(chlng))
  3601. <a name="l03514"></a>03514 {
  3602. <a name="l03515"></a>03515 <span class="keywordflow">if</span>((chlng.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(0.0)-champ.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(0.0)).<a class="code" href="vector_01functions_8cpp.html#a13c7499151a59c9cbb0c4813b549b27d">dot</a>(chlng.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(0.0)-champ.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(1.0))&lt;=0.0)
  3603. <a name="l03516"></a>03516 isValid=<span class="keyword">false</span>;
  3604. <a name="l03517"></a>03517 <span class="keywordflow">if</span>((chlng.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(1.0)-champ.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(0.0)).<a class="code" href="vector_01functions_8cpp.html#a13c7499151a59c9cbb0c4813b549b27d">dot</a>(chlng.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(1.0)-champ.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(1.0))&lt;=0.0)
  3605. <a name="l03518"></a>03518 isValid=<span class="keyword">false</span>;
  3606. <a name="l03519"></a>03519 <span class="keywordflow">if</span>((champ.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(1.0)-chlng.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(0.0)).<a class="code" href="vector_01functions_8cpp.html#a13c7499151a59c9cbb0c4813b549b27d">dot</a>(champ.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(1.0)-chlng.<a class="code" href="classlineSegment.html#acdb188f0770e669ba382ee5af9e95628">point</a>(1.0))&lt;=0.0)
  3607. <a name="l03520"></a>03520 isValid=<span class="keyword">false</span>;
  3608. <a name="l03521"></a>03521 }
  3609. <a name="l03522"></a>03522 }
  3610. <a name="l03523"></a>03523 <span class="keywordflow">else</span>
  3611. <a name="l03524"></a>03524 {
  3612. <a name="l03525"></a>03525 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> a;
  3613. <a name="l03526"></a>03526 <a class="code" href="timoshenko_8cpp.html#a926743e1c2bd9fc382c84014036246c2">dataType</a> b;
  3614. <a name="l03527"></a>03527 champ.<a class="code" href="classlineSegment.html#add93ba4d5093b54bc4eebfb4b8b03016">intersect</a>(chlng,a,b);
  3615. <a name="l03528"></a>03528 <span class="keywordflow">if</span>(a&gt;=0.0 &amp;&amp; a&lt;=1.0 &amp;&amp; b&gt;=0.0 &amp;&amp; b&lt;=1.0)
  3616. <a name="l03529"></a>03529 isValid=<span class="keyword">false</span>;
  3617. <a name="l03530"></a>03530 }
  3618. <a name="l03531"></a>03531 }
  3619. <a name="l03532"></a>03532 }
  3620. <a name="l03533"></a>03533 }
  3621. <a name="l03534"></a>03534
  3622. <a name="l03535"></a>03535 <span class="comment">// this class is responsible for converting design parameters into a mesh</span>
  3623. <a name="l03536"></a>03536 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType,<span class="keyword">class</span> cxDesignType&gt;
  3624. <a name="l03537"></a><a class="code" href="classcrossSectionGeom.html">03537</a> <span class="keyword">class </span><a class="code" href="classcrossSectionGeom.html">crossSectionGeom</a>
  3625. <a name="l03538"></a>03538 {
  3626. <a name="l03539"></a>03539 <span class="keyword">public</span>:
  3627. <a name="l03540"></a>03540
  3628. <a name="l03541"></a><a class="code" href="classcrossSectionGeom.html#ab82e4be71ae052379e2f4cd09253c7a7">03541</a> <span class="keyword">virtual</span> <a class="code" href="classcrossSectionGeom.html#ab82e4be71ae052379e2f4cd09253c7a7">~crossSectionGeom</a>()
  3629. <a name="l03542"></a>03542 {}
  3630. <a name="l03543"></a>03543
  3631. <a name="l03544"></a>03544 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcrossSectionGeom.html#a333173a8ba27fd0632d1bad008295484">setDesign</a>(<span class="keyword">const</span> cxDesignType&amp; desParam) =0;
  3632. <a name="l03545"></a>03545 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcrossSectionGeom.html#a686ac21be9f33ccac2622249c6c006c8">getMesh</a>(<a class="code" href="classmesh.html">mesh&lt;dataType&gt;</a>&amp; msh) =0;
  3633. <a name="l03546"></a>03546 };
  3634. <a name="l03547"></a>03547
  3635. <a name="l03548"></a>03548 <span class="comment">// this class is an intermediate.</span>
  3636. <a name="l03549"></a>03549 <span class="comment">// All it does is hold all the Ibeam objects and ensures that all the pointers are set correctly. </span>
  3637. <a name="l03550"></a>03550 <span class="keyword">template</span>&lt;<span class="keyword">class</span> dataType,<span class="keyword">class</span> cxDesignType&gt;
  3638. <a name="l03551"></a><a class="code" href="classcrossSectionGeom__iBeam.html">03551</a> <span class="keyword">class </span><a class="code" href="classcrossSectionGeom__iBeam.html">crossSectionGeom_iBeam</a> : <span class="keyword">public</span> <a class="code" href="classcrossSectionGeom.html">crossSectionGeom</a>&lt;dataType,cxDesignType&gt;
  3639. <a name="l03552"></a>03552 {
  3640. <a name="l03553"></a>03553 <span class="keyword">protected</span>:
  3641. <a name="l03554"></a>03554
  3642. <a name="l03555"></a>03555 <span class="comment">// this is essentially the mold line and the offsets:</span>
  3643. <a name="l03556"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ae40404b3c0136b955376401fc16aa226">03556</a> <a class="code" href="classcurveFamily.html">curveFamily&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#ae40404b3c0136b955376401fc16aa226">curveSource</a>;
  3644. <a name="l03557"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a594de3b7e4f362c43f0326946d01a0a8">03557</a> <span class="keywordtype">bool</span> <a class="code" href="classcrossSectionGeom__iBeam.html#a594de3b7e4f362c43f0326946d01a0a8">deleteCurveSource</a>;
  3645. <a name="l03558"></a>03558
  3646. <a name="l03559"></a>03559 <span class="comment">// these are the actual objects required for the mesh</span>
  3647. <a name="l03560"></a>03560
  3648. <a name="l03561"></a>03561 <span class="comment">// these control the common curves</span>
  3649. <a name="l03562"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a68dfb68a70c914e4b99c9f080be0d624">03562</a> <a class="code" href="classcommonEW.html">commonEW&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a68dfb68a70c914e4b99c9f080be0d624">skinEW</a>;
  3650. <a name="l03563"></a><a class="code" href="classcrossSectionGeom__iBeam.html#af7143fa2c63ca69303c45818bbed80f9">03563</a> <a class="code" href="classcommonEW.html">commonEW&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#af7143fa2c63ca69303c45818bbed80f9">capTopEW</a>;
  3651. <a name="l03564"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ac79eb448af0db109c56639616c97657f">03564</a> <a class="code" href="classcommonEW.html">commonEW&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#ac79eb448af0db109c56639616c97657f">capBotEW</a>;
  3652. <a name="l03565"></a>03565
  3653. <a name="l03566"></a>03566 <span class="comment">// This controls the line density</span>
  3654. <a name="l03567"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a3b803d11c8714ca5c51de07fa48c40fd">03567</a> <a class="code" href="classcommonNS.html">commonNS</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a3b803d11c8714ca5c51de07fa48c40fd">teNS</a>;
  3655. <a name="l03568"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a639cd8fa1d793058507c0cce171211b3">03568</a> <a class="code" href="classcommonNS.html">commonNS</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a639cd8fa1d793058507c0cce171211b3">teTopCapNS</a>;
  3656. <a name="l03569"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ae2794e4d97d3439da2257090fc7282fa">03569</a> <a class="code" href="classcommonNS.html">commonNS</a> <a class="code" href="classcrossSectionGeom__iBeam.html#ae2794e4d97d3439da2257090fc7282fa">webCurveNS</a>;
  3657. <a name="l03570"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a34b3d0fbb3b5ef1df8367a57c13d184b">03570</a> <a class="code" href="classcommonNS.html">commonNS</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a34b3d0fbb3b5ef1df8367a57c13d184b">leTopCapNS</a>;
  3658. <a name="l03571"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a40553920906feab5e322b49166eccb4c">03571</a> <a class="code" href="classcommonNS.html">commonNS</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a40553920906feab5e322b49166eccb4c">leNS</a>;
  3659. <a name="l03572"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ad45f167177d0113542fa61fff6285e60">03572</a> <a class="code" href="classcommonNS.html">commonNS</a> <a class="code" href="classcrossSectionGeom__iBeam.html#ad45f167177d0113542fa61fff6285e60">leBotCapNS</a>;
  3660. <a name="l03573"></a><a class="code" href="classcrossSectionGeom__iBeam.html#af86894d98c77552a5d9e9eb69fd5ddac">03573</a> <a class="code" href="classcommonNS.html">commonNS</a> <a class="code" href="classcrossSectionGeom__iBeam.html#af86894d98c77552a5d9e9eb69fd5ddac">teBotCapNS</a>;
  3661. <a name="l03574"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a4cafbda5a77e6c89403f505fd0a91810">03574</a> <a class="code" href="classcommonNS.html">commonNS</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a4cafbda5a77e6c89403f505fd0a91810">webNS</a>;
  3662. <a name="l03575"></a>03575
  3663. <a name="l03576"></a>03576 <span class="comment">// these are the common points</span>
  3664. <a name="l03577"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a50afb49652bdad95d8f6c3778ef94bb6">03577</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a50afb49652bdad95d8f6c3778ef94bb6">A0</a>;
  3665. <a name="l03578"></a><a class="code" href="classcrossSectionGeom__iBeam.html#abac5a656e78e6671949f4c5826047faa">03578</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#abac5a656e78e6671949f4c5826047faa">B0</a>;
  3666. <a name="l03579"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ab9ea68ce2df8c76266dac3e1cd3f98c9">03579</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#ab9ea68ce2df8c76266dac3e1cd3f98c9">A1</a>;
  3667. <a name="l03580"></a><a class="code" href="classcrossSectionGeom__iBeam.html#af30edd23512b4a9e23db148c414a89a9">03580</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#af30edd23512b4a9e23db148c414a89a9">B1</a>;
  3668. <a name="l03581"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a7967c2c860e5646557604467e19b6991">03581</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a7967c2c860e5646557604467e19b6991">C1</a>;
  3669. <a name="l03582"></a><a class="code" href="classcrossSectionGeom__iBeam.html#adbf97b92a2a35f29da600eb7f5c68e3f">03582</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#adbf97b92a2a35f29da600eb7f5c68e3f">A2</a>;
  3670. <a name="l03583"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a3892357821c9f8267b6c7a00fd8c2b60">03583</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a3892357821c9f8267b6c7a00fd8c2b60">B2</a>;
  3671. <a name="l03584"></a><a class="code" href="classcrossSectionGeom__iBeam.html#aba35bd9e12d7bc00d1e7345725c7e82a">03584</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#aba35bd9e12d7bc00d1e7345725c7e82a">C2</a>;
  3672. <a name="l03585"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ab8f6c7b3f6fd20d975704edb535561b6">03585</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#ab8f6c7b3f6fd20d975704edb535561b6">A3</a>;
  3673. <a name="l03586"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ae8a7b98b2b013bd6fbaa814ef3dcfcc0">03586</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#ae8a7b98b2b013bd6fbaa814ef3dcfcc0">B3</a>;
  3674. <a name="l03587"></a><a class="code" href="classcrossSectionGeom__iBeam.html#acfc9a4bee28fe26fd4d8923dd18ebd9e">03587</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#acfc9a4bee28fe26fd4d8923dd18ebd9e">C3</a>;
  3675. <a name="l03588"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a753cf7a51b45bac02126562d6ff38f5c">03588</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a753cf7a51b45bac02126562d6ff38f5c">A4</a>;
  3676. <a name="l03589"></a><a class="code" href="classcrossSectionGeom__iBeam.html#aaa54f1e4a9ebf2f7162879cf9b6f7a6e">03589</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#aaa54f1e4a9ebf2f7162879cf9b6f7a6e">B4</a>;
  3677. <a name="l03590"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ab2554c3c570e63428f44f82110c8cbba">03590</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#ab2554c3c570e63428f44f82110c8cbba">C4</a>;
  3678. <a name="l03591"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ab822fa7dcbe5bd670474556d4affa256">03591</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#ab822fa7dcbe5bd670474556d4affa256">A5</a>;
  3679. <a name="l03592"></a><a class="code" href="classcrossSectionGeom__iBeam.html#add472063739aaf21482d0f2a63d3b634">03592</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#add472063739aaf21482d0f2a63d3b634">B5</a>;
  3680. <a name="l03593"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a07e29a6b91467de6c3a7dc0f83990177">03593</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a07e29a6b91467de6c3a7dc0f83990177">C5</a>;
  3681. <a name="l03594"></a><a class="code" href="classcrossSectionGeom__iBeam.html#acb6691c81f8809d25c22e20032d32ba3">03594</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#acb6691c81f8809d25c22e20032d32ba3">A6</a>;
  3682. <a name="l03595"></a><a class="code" href="classcrossSectionGeom__iBeam.html#aed5f423158a4d510fa68fde4ca537131">03595</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#aed5f423158a4d510fa68fde4ca537131">B6</a>;
  3683. <a name="l03596"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a7bc51005b136472ba09cf779835b0d44">03596</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a7bc51005b136472ba09cf779835b0d44">C6</a>;
  3684. <a name="l03597"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a1a206b0862c78d98b949e57e3728d69f">03597</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a1a206b0862c78d98b949e57e3728d69f">A7</a>;
  3685. <a name="l03598"></a><a class="code" href="classcrossSectionGeom__iBeam.html#aa742a0d139453e206e3bf2ed6399cdc4">03598</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#aa742a0d139453e206e3bf2ed6399cdc4">B7</a>;
  3686. <a name="l03599"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a334972db72d6175817c048e5eb18f5bc">03599</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a334972db72d6175817c048e5eb18f5bc">C7</a>;
  3687. <a name="l03600"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a96c0f858ae3a85e37c136056657f245b">03600</a> <a class="code" href="classcommonPoint__Wrap.html">commonPoint_Wrap&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a96c0f858ae3a85e37c136056657f245b">A8</a>;
  3688. <a name="l03601"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a8230155969a0326a4c2d5291abaef518">03601</a> <a class="code" href="classcommonPoint__Wrap.html">commonPoint_Wrap&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a8230155969a0326a4c2d5291abaef518">B8</a>;
  3689. <a name="l03602"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a1f16eb193afd8c73fcfbea33008c4684">03602</a> <a class="code" href="classcommonPoint__Data.html">commonPoint_Data&lt;dataType&gt;</a> <a class="code" href="classcrossSectionGeom__iBeam.html#a1f16eb193afd8c73fcfbea33008c4684">C8</a>;
  3690. <a name="l03603"></a>03603
  3691. <a name="l03604"></a>03604 <span class="comment">// These are the pointers to the material</span>
  3692. <a name="l03605"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ab28d958eedfba46eeff2511882412e96">03605</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#ab28d958eedfba46eeff2511882412e96">A0Matl</a>;
  3693. <a name="l03606"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a0614143f1ccba221cdb4427e21323d2f">03606</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#a0614143f1ccba221cdb4427e21323d2f">A1Matl</a>;
  3694. <a name="l03607"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ad1c401da77e3f6ff87f547a80de95116">03607</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#ad1c401da77e3f6ff87f547a80de95116">A2Matl</a>;
  3695. <a name="l03608"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a6a4a40c446b5b0b3d43a2c8e85f46b6d">03608</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#a6a4a40c446b5b0b3d43a2c8e85f46b6d">A3Matl</a>;
  3696. <a name="l03609"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ac320ea683ada0f84c231f64ce9ded87a">03609</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#ac320ea683ada0f84c231f64ce9ded87a">A4Matl</a>;
  3697. <a name="l03610"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ab28641328e29932ed0e939af065cc987">03610</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#ab28641328e29932ed0e939af065cc987">A5Matl</a>;
  3698. <a name="l03611"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ab1803de95a2518b9ff5889cff609c355">03611</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#ab1803de95a2518b9ff5889cff609c355">A6Matl</a>;
  3699. <a name="l03612"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a2f65cb50700de41706da65575c855307">03612</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#a2f65cb50700de41706da65575c855307">A7Matl</a>;
  3700. <a name="l03613"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ad3da5c81af293dabf9dbfc3d0852dddd">03613</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#ad3da5c81af293dabf9dbfc3d0852dddd">B1Matl</a>;
  3701. <a name="l03614"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a9de9f460b45d21d292021704640857ea">03614</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#a9de9f460b45d21d292021704640857ea">B2Matl</a>;
  3702. <a name="l03615"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ab7f7eb9506ab90f3d4b6b829ba90b8e5">03615</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#ab7f7eb9506ab90f3d4b6b829ba90b8e5">B3Matl</a>;
  3703. <a name="l03616"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a590704102fd8272896af94a370d86795">03616</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#a590704102fd8272896af94a370d86795">B5Matl</a>;
  3704. <a name="l03617"></a><a class="code" href="classcrossSectionGeom__iBeam.html#ab790eb007ddaf476d24164f5dbb62676">03617</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionGeom__iBeam.html#ab790eb007ddaf476d24164f5dbb62676">B6Matl</a>;
  3705. <a name="l03618"></a><a class="code" href="classcrossSectionGeom__iBeam.html#a29fe64e9501217c6164c3e91bcf0ed74">03618</a> <a class="code" href="classconstituitive.html">constituitive&lt;dataType&gt;</a>* <a class="code" href="classcrossSectionG