Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Hartmaier authored and Alexander Hartmaier committed Jan 28, 2022
1 parent dc9a5dd commit 8606f16
Show file tree
Hide file tree
Showing 26 changed files with 15,297 additions and 192 deletions.
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 11e24ecb086b3722c21b5fe755982994
config: ff52a5f899b7dfb16e79b33e71c1803a
tags: 645f666f9bcd5a90fca523b33c5a78b7
10 changes: 5 additions & 5 deletions docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &#8212; pyLabFEA 4.0.0 documentation</title>
<title>Overview: module code &#8212; pyLabFEA 4.1.1 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/classic.css" />

Expand All @@ -26,7 +26,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">pyLabFEA 4.0.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">pyLabFEA 4.1.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Overview: module code</a></li>
</ul>
</div>
Expand Down Expand Up @@ -73,13 +73,13 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">pyLabFEA 4.0.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">pyLabFEA 4.1.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Overview: module code</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020, 2021, Alexander Hartmaier, ICAMS/Ruhr University Bochum, Germany.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.2.0.
&#169; Copyright 2020, 2021, 2022, Alexander Hartmaier, ICAMS/Ruhr University Bochum, Germany.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
</div>
</body>
</html>
12 changes: 7 additions & 5 deletions docs/_modules/pylabfea/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylabfea.basic &#8212; pyLabFEA 4.0.0 documentation</title>
<title>pylabfea.basic &#8212; pyLabFEA 4.1.1 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/classic.css" />

Expand All @@ -26,7 +26,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pyLabFEA 4.0.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pyLabFEA 4.1.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pylabfea.basic</a></li>
</ul>
Expand Down Expand Up @@ -574,6 +574,8 @@ <h1>Source code for pylabfea.basic</h1><div class="highlight"><pre>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">if</span> <span class="n">name</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">&#39;Name for pickled material must be given.&#39;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">path</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">&#39;/&#39;</span><span class="p">:</span>
<span class="n">path</span> <span class="o">+=</span> <span class="s1">&#39;/&#39;</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">path</span><span class="o">+</span><span class="n">name</span><span class="p">,</span> <span class="s1">&#39;rb&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="nb">input</span><span class="p">:</span>
<span class="n">pckl</span> <span class="o">=</span> <span class="n">pickle</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="nb">input</span><span class="p">)</span>
<span class="k">return</span> <span class="n">pckl</span></div>
Expand Down Expand Up @@ -608,14 +610,14 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pyLabFEA 4.0.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pyLabFEA 4.1.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pylabfea.basic</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020, 2021, Alexander Hartmaier, ICAMS/Ruhr University Bochum, Germany.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.2.0.
&#169; Copyright 2020, 2021, 2022, Alexander Hartmaier, ICAMS/Ruhr University Bochum, Germany.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
</div>
</body>
</html>
12 changes: 6 additions & 6 deletions docs/_modules/pylabfea/data.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylabfea.data &#8212; pyLabFEA 4.0.0 documentation</title>
<title>pylabfea.data &#8212; pyLabFEA 4.1.1 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/classic.css" />

Expand All @@ -26,7 +26,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pyLabFEA 4.0.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pyLabFEA 4.1.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pylabfea.data</a></li>
</ul>
Expand Down Expand Up @@ -285,7 +285,7 @@ <h1>Source code for pylabfea.data</h1><div class="highlight"><pre>
<span class="s1">&#39;nu_av&#39;</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">nu_av</span><span class="p">,</span><span class="c1"># Poisson ratio</span>
<span class="s1">&#39;sy_av&#39;</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">sy_av</span> <span class="c1"># yield strength</span>
<span class="p">}</span>
<span class="nb">print</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mat_param</span><span class="p">)</span>
<span class="c1">#print(self.mat_param)</span>
<span class="n">syld</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">((</span><span class="bp">self</span><span class="o">.</span><span class="n">Nset</span><span class="p">,</span><span class="n">Nlc_min</span><span class="p">,</span><span class="mi">6</span><span class="p">))</span> <span class="c1"># Voigt stress tensor at onset of yielding</span>
<span class="k">for</span> <span class="n">iset</span><span class="p">,</span> <span class="n">dset</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">set</span><span class="p">):</span> <span class="c1"># loop over data sets</span>
<span class="n">syld</span><span class="p">[</span><span class="n">iset</span><span class="p">,:,:]</span> <span class="o">=</span> <span class="n">dset</span><span class="o">.</span><span class="n">syld</span><span class="p">[</span><span class="mi">0</span><span class="p">:</span><span class="n">Nlc_min</span><span class="p">,:]</span>
Expand Down Expand Up @@ -1133,14 +1133,14 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pyLabFEA 4.0.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pyLabFEA 4.1.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pylabfea.data</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020, 2021, Alexander Hartmaier, ICAMS/Ruhr University Bochum, Germany.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.2.0.
&#169; Copyright 2020, 2021, 2022, Alexander Hartmaier, ICAMS/Ruhr University Bochum, Germany.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
</div>
</body>
</html>
40 changes: 31 additions & 9 deletions docs/_modules/pylabfea/material.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pylabfea.material &#8212; pyLabFEA 4.0.0 documentation</title>
<title>pylabfea.material &#8212; pyLabFEA 4.1.1 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/classic.css" />

Expand All @@ -26,7 +26,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pyLabFEA 4.0.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pyLabFEA 4.1.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pylabfea.material</a></li>
</ul>
Expand Down Expand Up @@ -1475,11 +1475,11 @@ <h1>Source code for pylabfea.material</h1><div class="highlight"><pre>
<span class="sd"> sname : str</span>
<span class="sd"> Name of script that created this material</span>
<span class="sd"> source : str</span>
<span class="sd"> Source of parameters (optiona, default: None)</span>
<span class="sd"> Source of parameters (optional, default: None)</span>
<span class="sd"> file : str</span>
<span class="sd"> Trunk of filename to which CSV flies are written (optional, default: None)</span>
<span class="sd"> path : str</span>
<span class="sd"> Path to which files are written (optional: default: &#39;&#39;)</span>
<span class="sd"> Path to which files are written (optional: default: &#39;../../models/&#39;)</span>
<span class="sd"> descr : list</span>
<span class="sd"> List of names of model parameters used for generating this ML material (optional, default: [])</span>
<span class="sd"> param : list</span>
Expand Down Expand Up @@ -1511,7 +1511,9 @@ <h1>Source code for pylabfea.material</h1><div class="highlight"><pre>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s1">&#39;Lists for descr and param must have the same lengths.&#39;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">file</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">file</span> <span class="o">=</span> <span class="s1">&#39;abq_&#39;</span><span class="o">+</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span>
<span class="n">file</span> <span class="o">=</span> <span class="n">path</span><span class="o">+</span><span class="n">file</span>
<span class="k">if</span> <span class="n">path</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">&#39;/&#39;</span><span class="p">:</span>
<span class="n">path</span> <span class="o">+=</span> <span class="s1">&#39;/&#39;</span>
<span class="n">file</span> <span class="o">=</span> <span class="n">path</span> <span class="o">+</span> <span class="n">file</span>

<span class="c1"># write parameters of trained SVC to file readable to Abaqus</span>
<span class="n">dc</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">svm_yf</span><span class="o">.</span><span class="n">dual_coef_</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="c1"># dual coefficients</span>
Expand Down Expand Up @@ -1621,6 +1623,8 @@ <h1>Source code for pylabfea.material</h1><div class="highlight"><pre>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">if</span> <span class="n">name</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">name</span> <span class="o">=</span> <span class="s1">&#39;mat_&#39;</span><span class="o">+</span><span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">+</span> <span class="s1">&#39;.pkl&#39;</span>
<span class="k">if</span> <span class="n">path</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="o">!=</span> <span class="s1">&#39;/&#39;</span><span class="p">:</span>
<span class="n">path</span> <span class="o">+=</span> <span class="s1">&#39;/&#39;</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">path</span><span class="o">+</span><span class="n">name</span><span class="p">,</span> <span class="s1">&#39;wb&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">output</span><span class="p">:</span>
<span class="n">pickle</span><span class="o">.</span><span class="n">dump</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">output</span><span class="p">,</span> <span class="n">pickle</span><span class="o">.</span><span class="n">HIGHEST_PROTOCOL</span><span class="p">)</span>
<span class="k">return</span></div>
Expand Down Expand Up @@ -1790,7 +1794,8 @@ <h1>Source code for pylabfea.material</h1><div class="highlight"><pre>
<span class="sd"> grain shapes and porosities. Will invoke definition of elastic and plastic </span>
<span class="sd"> parameters by calls to the methods `Material.elasticity` and `Material.plasticity` </span>
<span class="sd"> with the parameters provided in the data set. </span>
<span class="sd"> Also initializes current texture to first one in list and re-sets work-hardening parameters.</span>
<span class="sd"> Also initializes current texture to first one in list and resets work hardening </span>
<span class="sd"> parameters.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
Expand Down Expand Up @@ -1839,6 +1844,23 @@ <h1>Source code for pylabfea.material</h1><div class="highlight"><pre>
<span class="n">tp</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">Nset</span><span class="p">)</span>
<span class="n">tp</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="mf">1.</span>
<span class="bp">self</span><span class="o">.</span><span class="n">set_texture</span><span class="p">(</span><span class="n">tp</span><span class="p">)</span></div>

<div class="viewcode-block" id="Material.from_MLparam"><a class="viewcode-back" href="../../pyLabFEA.html#pylabfea.material.Material.from_MLparam">[docs]</a> <span class="k">def</span> <span class="nf">from_MLparam</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">path</span><span class="o">=</span><span class="s1">&#39;../../models/&#39;</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;Define material properties from parameters of trained machine learning </span>
<span class="sd"> models that have been written with `Material.export_MLparam`.</span>
<span class="sd"> Will invoke definition of elastic parameters by calls to the methods </span>
<span class="sd"> `Material.elasticity` with the parameters provided in the data set. </span>
<span class="sd"> Also initializes current texture to first one in list and resets work hardening</span>
<span class="sd"> parameters.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
<span class="sd"> name : string</span>
<span class="sd"> Name of parameter files (`name`.csv file and metadata file `name_meta.json`)</span>
<span class="sd"> path : string</span>
<span class="sd"> Path in which files are stored (optional, default: &#39;../../models/&#39;) </span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">raise</span> <span class="ne">ModuleNotFoundError</span><span class="p">(</span><span class="s1">&#39;Import from ML parameters not yet implemented.&#39;</span><span class="p">)</span></div>

<div class="viewcode-block" id="Material.set_texture"><a class="viewcode-back" href="../../pyLabFEA.html#pylabfea.material.Material.set_texture">[docs]</a> <span class="k">def</span> <span class="nf">set_texture</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">current</span><span class="p">,</span> <span class="n">verb</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;Set parameters for current crystallographic texture of material as defined in microstructure.</span>
Expand Down Expand Up @@ -2478,14 +2500,14 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pyLabFEA 4.0.0 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../../index.html">pyLabFEA 4.1.1 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="../index.html" >Module code</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">pylabfea.material</a></li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2020, 2021, Alexander Hartmaier, ICAMS/Ruhr University Bochum, Germany.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.2.0.
&#169; Copyright 2020, 2021, 2022, Alexander Hartmaier, ICAMS/Ruhr University Bochum, Germany.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
</div>
</body>
</html>
Loading

0 comments on commit 8606f16

Please sign in to comment.