Skip to content

Commit

Permalink
deploy: 35b66bc
Browse files Browse the repository at this point in the history
  • Loading branch information
brmather committed Dec 5, 2023
1 parent e27f852 commit 8b01c6e
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,34 +492,7 @@ <h2>Sample meshes<a class="headerlink" href="#sample-meshes" title="Permalink to
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Square mesh 121 25921
Elliptical mesh 21 1301
(276,) (276,)
</pre></div>
</div>
<div class="output traceback highlight-ipythontb notranslate"><div class="highlight"><pre><span></span><span class="gt">---------------------------------------------------------------------------</span>
<span class="ne">ValueError</span><span class="g g-Whitespace"> </span>Traceback (most recent call last)
<span class="n">Cell</span> <span class="n">In</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">line</span> <span class="mi">31</span>
<span class="g g-Whitespace"> </span><span class="mi">28</span> <span class="nb">print</span><span class="p">(</span><span class="n">str_fmt</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="s1">&#39;Elliptical mesh&#39;</span><span class="p">,</span> <span class="n">ellip0</span><span class="o">.</span><span class="n">npoints</span><span class="p">,</span> <span class="n">ellipR</span><span class="o">.</span><span class="n">npoints</span><span class="p">))</span>
<span class="g g-Whitespace"> </span><span class="mi">30</span> <span class="n">randR</span> <span class="o">=</span> <span class="n">stripy</span><span class="o">.</span><span class="n">cartesian_meshes</span><span class="o">.</span><span class="n">random_mesh</span><span class="p">(</span><span class="n">extent</span><span class="p">,</span> <span class="n">nsamples</span><span class="p">)</span>
<span class="ne">---&gt; </span><span class="mi">31</span> <span class="n">rand0</span> <span class="o">=</span> <span class="n">stripy</span><span class="o">.</span><span class="n">Triangulation</span><span class="p">(</span><span class="n">randR</span><span class="o">.</span><span class="n">x</span><span class="p">[::</span><span class="mi">50</span><span class="p">],</span> <span class="n">randR</span><span class="o">.</span><span class="n">y</span><span class="p">[::</span><span class="mi">50</span><span class="p">])</span>
<span class="g g-Whitespace"> </span><span class="mi">32</span> <span class="n">rand2</span> <span class="o">=</span> <span class="n">stripy</span><span class="o">.</span><span class="n">Triangulation</span><span class="p">(</span><span class="n">randR</span><span class="o">.</span><span class="n">x</span><span class="p">[::</span><span class="mi">25</span><span class="p">],</span> <span class="n">randR</span><span class="o">.</span><span class="n">y</span><span class="p">[::</span><span class="mi">25</span><span class="p">])</span>
<span class="g g-Whitespace"> </span><span class="mi">35</span> <span class="nb">print</span><span class="p">(</span><span class="n">str_fmt</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="s1">&#39;Random mesh&#39;</span><span class="p">,</span> <span class="n">rand0</span><span class="o">.</span><span class="n">npoints</span><span class="p">,</span> <span class="n">randR</span><span class="o">.</span><span class="n">npoints</span><span class="p">))</span>

<span class="nn">File ~/.local/lib/python3.10/site-packages/stripy/cartesian.py:141,</span> in <span class="ni">Triangulation.__init__</span><span class="nt">(self, x, y, refinement_levels, permute, tree)</span>
<span class="g g-Whitespace"> </span><span class="mi">138</span> <span class="bp">self</span><span class="o">.</span><span class="n">permute</span> <span class="o">=</span> <span class="n">permute</span>
<span class="g g-Whitespace"> </span><span class="mi">139</span> <span class="bp">self</span><span class="o">.</span><span class="n">tree</span> <span class="o">=</span> <span class="n">tree</span>
<span class="ne">--&gt; </span><span class="mi">141</span> <span class="bp">self</span><span class="o">.</span><span class="n">_update_triangulation</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">)</span>
<span class="g g-Whitespace"> </span><span class="mi">143</span> <span class="k">for</span> <span class="n">r</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="n">refinement_levels</span><span class="p">):</span>
<span class="g g-Whitespace"> </span><span class="mi">144</span> <span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">uniformly_refine_triangulation</span><span class="p">(</span><span class="n">faces</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">trisect</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>

<span class="nn">File ~/.local/lib/python3.10/site-packages/stripy/cartesian.py:196,</span> in <span class="ni">Triangulation._update_triangulation</span><span class="nt">(self, x, y)</span>
<span class="nn"> 194 raise ValueError(&#39;ierr={}</span> in <span class="ni">trmesh\n{}&#39;.format</span><span class="nt">(ierr, _ier_codes[9999]))</span>
<span class="g g-Whitespace"> </span><span class="mi">195</span> <span class="k">elif</span> <span class="n">ierr</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
<span class="nn">--&gt; 196 raise ValueError(&#39;ierr={}</span> in <span class="ni">trmesh\n{}&#39;.format</span><span class="nt">(ierr, _ier_codes[ierr]))</span>
<span class="g g-Whitespace"> </span><span class="mi">198</span> <span class="bp">self</span><span class="o">.</span><span class="n">npoints</span> <span class="o">=</span> <span class="n">npoints</span>
<span class="g g-Whitespace"> </span><span class="mi">199</span> <span class="bp">self</span><span class="o">.</span><span class="n">_x</span> <span class="o">=</span> <span class="n">x</span>

<span class="ne">ValueError</span>: ierr=-2 in trmesh
<span class="n">the</span> <span class="n">first</span> <span class="n">three</span> <span class="n">nodes</span> <span class="n">are</span> <span class="n">collinear</span><span class="o">.</span>
<span class="n">Set</span> <span class="n">permute</span> <span class="n">to</span> <span class="kc">True</span> <span class="ow">or</span> <span class="n">reorder</span> <span class="n">nodes</span> <span class="n">manually</span><span class="o">.</span>
Random mesh 100 5000
</pre></div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -853,10 +853,10 @@ <h2>Derivatives of solution compared to analytic values<a class="headerlink" hre
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.048347335 0.24072336
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.048985202 0.2443841
</pre></div>
</div>
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.04880738 0.24497788
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>0.04879181 0.2449923
</pre></div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,12 +646,12 @@ <h2>Smoothing operations<a class="headerlink" href="#smoothing-operations" title
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>(array([-0.69065833, -0.625951 , -0.7459229 , ..., 0.15694866,
-0.07444829, -0.1721751 ], dtype=float32),
[array([ 0.0644195 , 0.02488284, 0.0242763 , ..., -0.01852148,
-0.00069227, -0.00902285], dtype=float32),
array([ 0.24540576, 0.40816653, 0.07307491, ..., -0.42619547,
-0.36651105, -0.29960406], dtype=float32)])
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>(array([-0.6964785 , -0.63436186, -0.7475453 , ..., 0.15252843,
-0.07603396, -0.17448533], dtype=float32),
[array([ 0.06474929, 0.02102301, 0.02235528, ..., -0.04317357,
-0.02627707, -0.0331846 ], dtype=float32),
array([ 0.23077393, 0.39795634, 0.05781872, ..., -0.42479894,
-0.35580367, -0.2889486 ], dtype=float32)])
</pre></div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ <h2>Count heat flow points per triangle<a class="headerlink" href="#count-heat-f
</div>
</div>
<div class="cell_output docutils container">
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>number of unique triangles = 272
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>number of unique triangles = 268
</pre></div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion 2.3.3/_sources/SphericalMeshing/0-Stripy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "176bb274",
"id": "7b704c6d",
"metadata": {},
"source": [
"# Triangulations\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "612b90c4",
"id": "d2031808",
"metadata": {},
"source": [
"# Cartesian Meshes\n",
Expand All @@ -21,7 +21,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2b4164ad",
"id": "9c268d94",
"metadata": {},
"outputs": [],
"source": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "eff4f30d",
"id": "a39f9eeb",
"metadata": {},
"source": [
"# Spherical Meshes\n",
Expand Down
2 changes: 1 addition & 1 deletion 2.3.3/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 8b01c6e

Please sign in to comment.