Skip to content

Commit

Permalink
updated doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Su Tian authored and Su Tian committed Sep 9, 2020
1 parent 6a1e261 commit 4075928
Show file tree
Hide file tree
Showing 59 changed files with 333 additions and 222 deletions.
Binary file modified __pycache__/analysis.cpython-37.pyc
Binary file not shown.
Binary file modified __pycache__/presg.cpython-37.pyc
Binary file not shown.
Binary file modified __pycache__/sg.cpython-37.pyc
Binary file not shown.
Binary file modified __pycache__/utils.cpython-37.pyc
Binary file not shown.
12 changes: 7 additions & 5 deletions analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def solve(sg_xml, analysis, solver, scrnout=True):
* fi - initial failure indices and strength ratios
solver : str
Format of the generated input file ('vabs' or 'swiftcomp').
scrnout : bool, default True
Switch of printing solver messages.
"""

# Preprocess
Expand Down Expand Up @@ -54,22 +56,22 @@ def run(input_name, analysis, solver, smdim, scrnout=True):
Parameters
----------
solver : str
Excect command string of the code ('vabs' or 'swiftcomp').
input_name : str
Name of the input file.
analysis : str
analysis : {'h', 'd', 'l', 'f', 'fe', 'fi'}
Analysis to be carried out.
* h - homogenization
* d or l - dehomogenization/localization/recover
* f - initial failure strength
* fe - initial failure envelope
* fi - initial failure indices and strength ratios
solver : {'swiftcomp', 'vabs'}
Excect command string of the code ('vabs' or 'swiftcomp').
smdim : int
Dimension of the macroscopic structural model.
scrnout : bool
Print solver messages.
scrnout : bool, default True
Switch of printing solver messages.
"""
try:
analysis_long = {
Expand Down
Binary file modified analysis.pyc
Binary file not shown.
Binary file modified doc/build/doctrees/analysis.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/beam.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified doc/build/doctrees/iogebt.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/ioutils.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/iovabs.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/ms_analysis.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/prebeam.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/presg.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/sg.doctree
Binary file not shown.
Binary file modified doc/build/doctrees/utils.doctree
Binary file not shown.
2 changes: 2 additions & 0 deletions doc/build/html/_sources/utils.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ Utility Functions
.. autofunction:: msgpi.utils.calcRotationTensorFromParameters

.. autofunction:: msgpi.utils.calcCab

.. autofunction:: msgpi.utils.parseXML
13 changes: 8 additions & 5 deletions doc/build/html/analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>

<script type="text/javascript" src="_static/js/theme.js"></script>

Expand Down Expand Up @@ -82,7 +83,7 @@

<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="sg_module.html">SG I/O Module</a><ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="sg_module.html">SG Module</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="sg.html">Class Module for MSM Structure Gene</a></li>
<li class="toctree-l2"><a class="reference internal" href="presg.html">presg Module</a></li>
<li class="toctree-l2"><a class="reference internal" href="iovabs.html">SG I/O Module for VABS</a></li>
Expand All @@ -91,6 +92,7 @@
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="ms_module.html">Structure Module</a></li>
<li class="toctree-l1"><a class="reference internal" href="utils.html">Utility Functions</a></li>
</ul>


Expand Down Expand Up @@ -136,7 +138,7 @@

<li><a href="index.html">Docs</a> &raquo;</li>

<li><a href="sg_module.html">SG I/O Module</a> &raquo;</li>
<li><a href="sg_module.html">SG Module</a> &raquo;</li>

<li>analysis Module</li>

Expand Down Expand Up @@ -182,6 +184,7 @@ <h1>analysis Module<a class="headerlink" href="#analysis-module" title="Permalin
</ul>
</li>
<li><strong>solver</strong> (<em>str</em>) – Format of the generated input file (‘vabs’ or ‘swiftcomp’).</li>
<li><strong>scrnout</strong> (<em>bool</em><em>, </em><em>default True</em>) – Switch of printing solver messages.</li>
</ul>
</td>
</tr>
Expand All @@ -198,9 +201,8 @@ <h1>analysis Module<a class="headerlink" href="#analysis-module" title="Permalin
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>solver</strong> (<em>str</em>) – Excect command string of the code (‘vabs’ or ‘swiftcomp’).</li>
<li><strong>input_name</strong> (<em>str</em>) – Name of the input file.</li>
<li><strong>analysis</strong> (<em>str</em>) – <p>Analysis to be carried out.</p>
<li><strong>analysis</strong> (<em>{'h'</em><em>, </em><em>'d'</em><em>, </em><em>'l'</em><em>, </em><em>'f'</em><em>, </em><em>'fe'</em><em>, </em><em>'fi'}</em>) – <p>Analysis to be carried out.</p>
<ul>
<li>h - homogenization</li>
<li>d or l - dehomogenization/localization/recover</li>
Expand All @@ -209,8 +211,9 @@ <h1>analysis Module<a class="headerlink" href="#analysis-module" title="Permalin
<li>fi - initial failure indices and strength ratios</li>
</ul>
</li>
<li><strong>solver</strong> (<em>{'swiftcomp'</em><em>, </em><em>'vabs'}</em>) – Excect command string of the code (‘vabs’ or ‘swiftcomp’).</li>
<li><strong>smdim</strong> (<em>int</em>) – Dimension of the macroscopic structural model.</li>
<li><strong>scrnout</strong> (<em>bool</em>) – Print solver messages.</li>
<li><strong>scrnout</strong> (<em>bool</em><em>, </em><em>default True</em>) – Switch of printing solver messages.</li>
</ul>
</td>
</tr>
Expand Down
24 changes: 13 additions & 11 deletions doc/build/html/beam.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>

<script type="text/javascript" src="_static/js/theme.js"></script>

Expand Down Expand Up @@ -82,7 +83,7 @@

<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="sg_module.html">SG I/O Module</a></li>
<li class="toctree-l1"><a class="reference internal" href="sg_module.html">SG Module</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="ms_module.html">Structure Module</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">Class Module for Beam</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#beam-segment">Beam segment</a></li>
Expand All @@ -94,6 +95,7 @@
<li class="toctree-l2"><a class="reference internal" href="ms_analysis.html">analysis Module for GEBT</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="utils.html">Utility Functions</a></li>
</ul>


Expand Down Expand Up @@ -196,7 +198,7 @@ <h2>Beam segment<a class="headerlink" href="#beam-segment" title="Permalink to t
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list(list(float))</td>
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of lists of floats</td>
</tr>
</tbody>
</table>
Expand All @@ -211,7 +213,7 @@ <h2>Beam segment<a class="headerlink" href="#beam-segment" title="Permalink to t
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list(int)</td>
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of ints</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -254,7 +256,7 @@ <h2>Beam segment<a class="headerlink" href="#beam-segment" title="Permalink to t
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list(int)</td>
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of ints</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -307,7 +309,7 @@ <h2>Beam<a class="headerlink" href="#beam" title="Permalink to this headline">¶
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list(float)</td>
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of floats</td>
</tr>
</tbody>
</table>
Expand All @@ -331,7 +333,7 @@ <h2>Beam<a class="headerlink" href="#beam" title="Permalink to this headline">¶
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Point coordinates.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list(float)</td>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">list of floats</td>
</tr>
</tbody>
</table>
Expand All @@ -349,7 +351,7 @@ <h2>Beam<a class="headerlink" href="#beam" title="Permalink to this headline">¶
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Sectional properties.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MaterialSection</span></code></td>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="sg.html#msgpi.sg.MaterialSection" title="msgpi.sg.MaterialSection">msgpi.sg.MaterialSection</a></td>
</tr>
</tbody>
</table>
Expand All @@ -370,7 +372,7 @@ <h2>Beam<a class="headerlink" href="#beam" title="Permalink to this headline">¶
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list(float)</td>
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">list of floats</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -469,7 +471,7 @@ <h2>Beam<a class="headerlink" href="#beam" title="Permalink to this headline">¶
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">dict(int, list(float))</td>
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">dict of {int, list of floats}</td>
</tr>
</tbody>
</table>
Expand All @@ -484,7 +486,7 @@ <h2>Beam<a class="headerlink" href="#beam" title="Permalink to this headline">¶
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">dict(int, <code class="xref py py-obj docutils literal notranslate"><span class="pre">MaterialSection</span></code>)</td>
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">dict of {int, msgpi.sg.MaterialSection}</td>
</tr>
</tbody>
</table>
Expand All @@ -499,7 +501,7 @@ <h2>Beam<a class="headerlink" href="#beam" title="Permalink to this headline">¶
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">dict(int, <a class="reference internal" href="#msgpi.ms.beam.BeamSegment" title="msgpi.ms.beam.BeamSegment"><code class="xref py py-obj docutils literal notranslate"><span class="pre">BeamSegment</span></code></a>)</td>
<tr class="field-odd field"><th class="field-name">Type:</th><td class="field-body">dict of {int, msgpi.ms.beam.BeamSegment}</td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 2 additions & 0 deletions doc/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ <h2 id="O">O</h2>
<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="utils.html#msgpi.utils.parseXML">parseXML() (in module msgpi.utils)</a>
</li>
<li><a href="beam.html#msgpi.ms.beam.Beam.pconditions">pconditions (msgpi.ms.beam.Beam attribute)</a>
</li>
<li><a href="sg.html#msgpi.sg.StructureGene.physics">physics (msgpi.sg.StructureGene attribute)</a>
Expand Down
33 changes: 24 additions & 9 deletions doc/build/html/iogebt.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>

<script type="text/javascript" src="_static/js/theme.js"></script>

Expand Down Expand Up @@ -82,7 +83,7 @@

<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="sg_module.html">SG I/O Module</a></li>
<li class="toctree-l1"><a class="reference internal" href="sg_module.html">SG Module</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="ms_module.html">Structure Module</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="beam.html">Class Module for Beam</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">I/O Module for GEBT</a><ul>
Expand All @@ -94,6 +95,7 @@
<li class="toctree-l2"><a class="reference internal" href="ms_analysis.html">analysis Module for GEBT</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="utils.html">Utility Functions</a></li>
</ul>


Expand Down Expand Up @@ -179,7 +181,7 @@ <h2>Reading Functions<a class="headerlink" href="#reading-functions" title="Perm
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Beam object constructed from the data.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Beam</span></code></td>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="beam.html#msgpi.ms.beam.Beam" title="msgpi.ms.beam.Beam">msgpi.ms.beam.Beam</a></td>
</tr>
</tbody>
</table>
Expand All @@ -195,7 +197,7 @@ <h2>Reading Functions<a class="headerlink" href="#reading-functions" title="Perm
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>fn_gebt_out</strong> (<em>str</em>) – File name of the GEBT output.</li>
<li><strong>beam</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">Beam</span></code>) – Beam object</li>
<li><strong>beam</strong> (<a class="reference internal" href="beam.html#msgpi.ms.beam.Beam" title="msgpi.ms.beam.Beam"><em>msgpi.ms.beam.Beam</em></a>) – Beam object</li>
</ul>
</td>
</tr>
Expand All @@ -213,14 +215,14 @@ <h2>Reading Functions<a class="headerlink" href="#reading-functions" title="Perm
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>lines</strong> (<em>list</em><em>(</em><em>str</em><em>)</em>) – File name of the GEBT output.</li>
<li><strong>beam</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">Beam</span></code>) – Beam object.</li>
<li><strong>beam</strong> (<a class="reference internal" href="beam.html#msgpi.ms.beam.Beam" title="msgpi.ms.beam.Beam"><em>msgpi.ms.beam.Beam</em></a>) – Beam object.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Table of result numbers for this node.</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list(list(float))</p>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list of lists of floats</p>
</td>
</tr>
</tbody>
Expand All @@ -237,7 +239,7 @@ <h2>Reading Functions<a class="headerlink" href="#reading-functions" title="Perm
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>fn_gebt_out</strong> (<em>str</em>) – File name of the GEBT output.</li>
<li><strong>beam</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">Beam</span></code>) – Beam object.</li>
<li><strong>beam</strong> (<a class="reference internal" href="beam.html#msgpi.ms.beam.Beam" title="msgpi.ms.beam.Beam"><em>msgpi.ms.beam.Beam</em></a>) – Beam object.</li>
</ul>
</td>
</tr>
Expand All @@ -253,12 +255,25 @@ <h2>Reading Functions<a class="headerlink" href="#reading-functions" title="Perm
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>fn_gebt_out</strong> (<em>str</em>) – File name of the GEBT output.</li>
<li><strong>beam</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">Beam</span></code>) – Beam object.</li>
<li><strong>beam</strong> (<em>:msgpi.ms.beam.Beam</em>) – Beam object.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><p>Steady results, eigen results</p>
<p>Eigen results: <cite>[eigenvalues, eigenvectors]</cite></p>
<p>eigenvalues = <cite>[[eva11, eva12], [eva21, eva22], …]</cite></p>
<p>eigenvectors = <cite>[eve1, eve2, …]</cite></p>
<p>for each eigenvector evei: <cite>[point results, member results]</cite></p>
<p>for each point result: <cite>[[x11, x12, x13, u11, u12, u13, t11, t12, t13], …]</cite></p>
<p>for each memebr result: <cite>[[[x11, x12, x13, u11, u12, u13, t11, t12, t13], [], …], …]</cite></p>
</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">list, list</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
Expand All @@ -275,7 +290,7 @@ <h2>Writing Functions<a class="headerlink" href="#writing-functions" title="Perm
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>beam</strong> (<code class="xref py py-obj docutils literal notranslate"><span class="pre">Beam</span></code>) – Beam object that is going to be written to file.</li>
<li><strong>beam</strong> (<a class="reference internal" href="beam.html#msgpi.ms.beam.Beam" title="msgpi.ms.beam.Beam"><em>msgpi.ms.beam.Beam</em></a>) – Beam object that is going to be written to file.</li>
<li><strong>fn_gebt_in</strong> (<em>str</em>) – File name of the GEBT input.
If left blank, the file name will be the same as the beam name,
i.e., <cite>[beam.name].dat</cite>.</li>
Expand Down
Loading

0 comments on commit 4075928

Please sign in to comment.