1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>esys.escript.symbolic Package — esys.escript 5.6 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<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>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<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">esys.escript 5.6 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-esys.escript.symbolic">
<span id="esys-escript-symbolic-package"></span><h1>esys.escript.symbolic Package<a class="headerlink" href="#module-esys.escript.symbolic" title="Permalink to this headline">¶</a></h1>
<ul class="simple">
<li></li>
</ul>
<div class="section" id="classes">
<h2>Classes<a class="headerlink" href="#classes" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><a class="reference internal" href="#esys.escript.symbolic.Evaluator" title="esys.escript.symbolic.Evaluator"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Evaluator</span></code></a></li>
<li><a class="reference internal" href="#esys.escript.symbolic.Symbol" title="esys.escript.symbolic.Symbol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Symbol</span></code></a></li>
</ul>
<dl class="class">
<dt id="esys.escript.symbolic.Evaluator">
<em class="property">class </em><code class="descclassname">esys.escript.symbolic.</code><code class="descname">Evaluator</code><span class="sig-paren">(</span><em>*expressions</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Evaluator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<dl class="method">
<dt id="esys.escript.symbolic.Evaluator.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>*expressions</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Evaluator.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a symbolic evaluator.</p>
<table class="docutils field-list" frame="void" rules="none">
<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"><strong>expressions</strong> – optional expressions to initialise with</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Evaluator.addExpression">
<code class="descname">addExpression</code><span class="sig-paren">(</span><em>expression</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Evaluator.addExpression" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds an expression to this evaluator.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the modified Evaluator object</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Evaluator.evaluate">
<code class="descname">evaluate</code><span class="sig-paren">(</span><em>evalf=False</em>, <em>**args</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Evaluator.evaluate" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates all expressions in this evaluator and returns the result
as a tuple.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the evaluated expressions in the order they were added to
this Evaluator.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Evaluator.subs">
<code class="descname">subs</code><span class="sig-paren">(</span><em>**args</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Evaluator.subs" title="Permalink to this definition">¶</a></dt>
<dd><p>Symbol substitution.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the modified Evaluator object</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="esys.escript.symbolic.Symbol">
<em class="property">class </em><code class="descclassname">esys.escript.symbolic.</code><code class="descname">Symbol</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p><a class="reference internal" href="#esys.escript.symbolic.Symbol" title="esys.escript.symbolic.Symbol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Symbol</span></code></a> objects are placeholders for a single mathematical symbol, such as
‘x’, or for arbitrarily complex mathematical expressions such as
‘c*x**4+alpha*exp(x)-2*sin(beta*x)’, where ‘alpha’, ‘beta’, ‘c’, and ‘x’
are also Symbols (the symbolic ‘atoms’ of the expression).</p>
<p>With the help of the ‘Evaluator’ class these symbols and expressions can
be resolved by substituting numeric values and/or escript <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code> objects
for the atoms. To facilitate the use of <code class="xref py py-obj docutils literal notranslate"><span class="pre">Data</span></code> objects a <a class="reference internal" href="#esys.escript.symbolic.Symbol" title="esys.escript.symbolic.Symbol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Symbol</span></code></a> has a
shape (and thus a rank) as well as a dimension (see constructor).
Symbols are useful to perform mathematical simplifications, compute
derivatives and as coefficients for nonlinear PDEs which can be solved by
the <code class="xref py py-obj docutils literal notranslate"><span class="pre">NonlinearPDE</span></code> class.</p>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialises a new <a class="reference internal" href="#esys.escript.symbolic.Symbol" title="esys.escript.symbolic.Symbol"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Symbol</span></code></a> object in one of three ways:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">u</span><span class="o">=</span><span class="n">Symbol</span><span class="p">(</span><span class="s1">'u'</span><span class="p">)</span>
</pre></div>
</div>
<p>returns a scalar symbol by the name ‘u’.</p>
<blockquote>
<div>alpha=Symbol(‘alpha’, (4,3))</div></blockquote>
<p>returns a rank 2 symbol with the shape (4,3), whose elements are
named ‘[alpha]_i_j’ (with i=0..3, j=0..2).</p>
<blockquote>
<div>a,b,c=symbols(‘a,b,c’)
x=Symbol([[a+b,0,0],[0,b-c,0],[0,0,c-a]])</div></blockquote>
<p>returns a rank 2 symbol with the shape (3,3) whose elements are
explicitly specified by numeric values and other symbols/expressions
within a list or numpy array.</p>
<p>The dimensionality of the symbol can be specified through the <code class="docutils literal notranslate"><span class="pre">dim</span></code>
keyword. All other keywords are passed to the underlying symbolic
library (currently sympy).</p>
<table class="docutils field-list" frame="void" rules="none">
<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">
<li><strong>args</strong> – initialisation arguments as described above</li>
<li><strong>dim</strong> (<code class="docutils literal notranslate"><span class="pre">int</span></code>) – dimensionality of the new Symbol (default: 2)</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.applyfunc">
<code class="descname">applyfunc</code><span class="sig-paren">(</span><em>f</em>, <em>on_type=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.applyfunc" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies the function <code class="xref py py-obj docutils literal notranslate"><span class="pre">f</span></code> to all elements (if on_type is None) or to
all elements of type <code class="xref py py-obj docutils literal notranslate"><span class="pre">on_type</span></code>.</p>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.atoms">
<code class="descname">atoms</code><span class="sig-paren">(</span><em>*types</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.atoms" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the atoms that form the current Symbol.</p>
<p>By default, only objects that are truly atomic and cannot be divided
into smaller pieces are returned: symbols, numbers, and number
symbols like I and pi. It is possible to request atoms of any type,
however.</p>
<p>Note that if this symbol contains components such as [x]_i_j then
only their main symbol ‘x’ is returned.</p>
<table class="docutils field-list" frame="void" rules="none">
<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"><strong>types</strong> – types to restrict result to</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list of atoms of specified type</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">set</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.coeff">
<code class="descname">coeff</code><span class="sig-paren">(</span><em>x</em>, <em>expand=True</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.coeff" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the coefficient of the term “x” or 0 if there is no “x”.</p>
<p>If “x” is a scalar symbol then “x” is searched in all components of
this symbol. Otherwise the shapes must match and the coefficients are
checked component by component.</p>
<p>Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">x</span><span class="o">=</span><span class="n">Symbol</span><span class="p">(</span><span class="s1">'x'</span><span class="p">,</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">))</span>
<span class="n">y</span><span class="o">=</span><span class="mi">3</span><span class="o">*</span><span class="n">x</span>
<span class="nb">print</span> <span class="n">y</span><span class="o">.</span><span class="n">coeff</span><span class="p">(</span><span class="n">x</span><span class="p">)</span>
<span class="nb">print</span> <span class="n">y</span><span class="o">.</span><span class="n">coeff</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">])</span>
</pre></div>
</div>
<p>will print:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="mi">3</span> <span class="mi">3</span><span class="p">]</span>
<span class="p">[</span><span class="mi">3</span> <span class="mi">3</span><span class="p">]]</span>
<span class="p">[[</span><span class="mi">0</span> <span class="mi">0</span><span class="p">]</span>
<span class="p">[</span><span class="mi">0</span> <span class="mi">3</span><span class="p">]]</span>
</pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<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"><strong>x</strong> (<code class="docutils literal notranslate"><span class="pre">Symbol</span></code>, <code class="docutils literal notranslate"><span class="pre">numpy.ndarray</span></code>, <code class="xref py py-obj docutils literal notranslate"><span class="pre">list</span></code>) – the term whose coefficients are to be found</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the coefficient(s) of the term</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">Symbol</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.diff">
<code class="descname">diff</code><span class="sig-paren">(</span><em>*symbols</em>, <em>**assumptions</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.diff" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.evalf">
<code class="descname">evalf</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.evalf" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies the sympy.evalf operation on all elements in this symbol</p>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.expand">
<code class="descname">expand</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.expand" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies the sympy.expand operation on all elements in this symbol</p>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.getDataSubstitutions">
<code class="descname">getDataSubstitutions</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.getDataSubstitutions" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a dictionary of symbol names and the escript <code class="docutils literal notranslate"><span class="pre">Data</span></code> objects
they represent within this Symbol.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the dictionary of substituted <code class="docutils literal notranslate"><span class="pre">Data</span></code> objects</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">dict</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.getDim">
<code class="descname">getDim</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.getDim" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the spatial dimensionality of this symbol.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the symbol’s spatial dimensionality, or -1 if undefined</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">int</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.getRank">
<code class="descname">getRank</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.getRank" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the rank of this symbol.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the symbol’s rank which is equal to the length of the shape.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">int</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.getShape">
<code class="descname">getShape</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.getShape" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the shape of this symbol.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the symbol’s shape</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">tuple</span></code> of <code class="docutils literal notranslate"><span class="pre">int</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.grad">
<code class="descname">grad</code><span class="sig-paren">(</span><em>where=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.grad" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a symbol which represents the gradient of this symbol.
:type where: <code class="docutils literal notranslate"><span class="pre">Symbol</span></code>, <code class="docutils literal notranslate"><span class="pre">FunctionSpace</span></code></p>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.inverse">
<code class="descname">inverse</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.inverse" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="esys.escript.symbolic.Symbol.is_Add">
<code class="descname">is_Add</code><em class="property"> = False</em><a class="headerlink" href="#esys.escript.symbolic.Symbol.is_Add" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="esys.escript.symbolic.Symbol.is_Float">
<code class="descname">is_Float</code><em class="property"> = False</em><a class="headerlink" href="#esys.escript.symbolic.Symbol.is_Float" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.item">
<code class="descname">item</code><span class="sig-paren">(</span><em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.item" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns an element of this symbol.
This method behaves like the item() method of numpy.ndarray.
If this is a scalar Symbol, no arguments are allowed and the only
element in this Symbol is returned.
Otherwise, ‘args’ specifies a flat or nd-index and the element at
that index is returned.</p>
<table class="docutils field-list" frame="void" rules="none">
<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"><strong>args</strong> – index of item to be returned</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the requested element</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><code class="docutils literal notranslate"><span class="pre">sympy.Symbol</span></code>, <code class="docutils literal notranslate"><span class="pre">int</span></code>, or <code class="docutils literal notranslate"><span class="pre">float</span></code></td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.lambdarepr">
<code class="descname">lambdarepr</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.lambdarepr" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.simplify">
<code class="descname">simplify</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.simplify" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies the sympy.simplify operation on all elements in this symbol</p>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.subs">
<code class="descname">subs</code><span class="sig-paren">(</span><em>old</em>, <em>new</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.subs" title="Permalink to this definition">¶</a></dt>
<dd><p>Substitutes an expression.</p>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.swap_axes">
<code class="descname">swap_axes</code><span class="sig-paren">(</span><em>axis0</em>, <em>axis1</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.swap_axes" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.tensorProduct">
<code class="descname">tensorProduct</code><span class="sig-paren">(</span><em>other</em>, <em>axis_offset</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.tensorProduct" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.tensorTransposedProduct">
<code class="descname">tensorTransposedProduct</code><span class="sig-paren">(</span><em>other</em>, <em>axis_offset</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.tensorTransposedProduct" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.trace">
<code class="descname">trace</code><span class="sig-paren">(</span><em>axis_offset</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.trace" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the trace of this Symbol.</p>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.transpose">
<code class="descname">transpose</code><span class="sig-paren">(</span><em>axis_offset</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.transpose" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the transpose of this Symbol.</p>
</dd></dl>
<dl class="method">
<dt id="esys.escript.symbolic.Symbol.transposedTensorProduct">
<code class="descname">transposedTensorProduct</code><span class="sig-paren">(</span><em>other</em>, <em>axis_offset</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.Symbol.transposedTensorProduct" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="functions">
<h2>Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="esys.escript.symbolic.combineData">
<code class="descclassname">esys.escript.symbolic.</code><code class="descname">combineData</code><span class="sig-paren">(</span><em>array</em>, <em>shape</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.combineData" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="esys.escript.symbolic.getTotalDifferential">
<code class="descclassname">esys.escript.symbolic.</code><code class="descname">getTotalDifferential</code><span class="sig-paren">(</span><em>f</em>, <em>x</em>, <em>order=0</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.getTotalDifferential" title="Permalink to this definition">¶</a></dt>
<dd><p>This function computes:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">|</span> <span class="n">Df</span><span class="o">/</span><span class="n">Dx</span> <span class="o">=</span> <span class="n">del_f</span><span class="o">/</span><span class="n">del_x</span> <span class="o">+</span> <span class="n">del_f</span><span class="o">/</span><span class="n">del_grad</span><span class="p">(</span><span class="n">x</span><span class="p">)</span><span class="o">*</span><span class="n">del_grad</span><span class="p">(</span><span class="n">x</span><span class="p">)</span><span class="o">/</span><span class="n">del_x</span> <span class="o">+</span> <span class="o">...</span>
<span class="o">|</span> \ <span class="o">/</span> \ <span class="o">/</span>
<span class="o">|</span> <span class="n">a</span> <span class="n">b</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="esys.escript.symbolic.isSymbol">
<code class="descclassname">esys.escript.symbolic.</code><code class="descname">isSymbol</code><span class="sig-paren">(</span><em>arg</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.isSymbol" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if the argument <code class="docutils literal notranslate"><span class="pre">arg</span></code> is an escript <code class="docutils literal notranslate"><span class="pre">Symbol</span></code> or
<code class="docutils literal notranslate"><span class="pre">sympy.Basic</span></code> object, False otherwise.</p>
</dd></dl>
<dl class="function">
<dt id="esys.escript.symbolic.pprint">
<code class="descclassname">esys.escript.symbolic.</code><code class="descname">pprint</code><span class="sig-paren">(</span><em>expr</em>, <em>use_unicode=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.pprint" title="Permalink to this definition">¶</a></dt>
<dd><p>Prints expr in pretty form.</p>
<p>pprint is just a shortcut for this function</p>
</dd></dl>
<dl class="function">
<dt id="esys.escript.symbolic.pretty_print">
<code class="descclassname">esys.escript.symbolic.</code><code class="descname">pretty_print</code><span class="sig-paren">(</span><em>expr</em>, <em>use_unicode=None</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.pretty_print" title="Permalink to this definition">¶</a></dt>
<dd><p>Prints expr in pretty form.</p>
<p>pprint is just a shortcut for this function</p>
</dd></dl>
<dl class="function">
<dt id="esys.escript.symbolic.removeFsFromGrad">
<code class="descclassname">esys.escript.symbolic.</code><code class="descname">removeFsFromGrad</code><span class="sig-paren">(</span><em>sym</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.removeFsFromGrad" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <code class="docutils literal notranslate"><span class="pre">sym</span></code> with all occurrences grad_n(a,b,c) replaced by grad_n(a,b).
That is, all functionspace parameters are removed.</p>
</dd></dl>
<dl class="function">
<dt id="esys.escript.symbolic.symbols">
<code class="descclassname">esys.escript.symbolic.</code><code class="descname">symbols</code><span class="sig-paren">(</span><em>*names</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#esys.escript.symbolic.symbols" title="Permalink to this definition">¶</a></dt>
<dd><p>Emulates the behaviour of sympy.symbols.</p>
</dd></dl>
</div>
<div class="section" id="others">
<h2>Others<a class="headerlink" href="#others" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>HAVE_SYMBOLS</li>
</ul>
</div>
<div class="section" id="packages">
<h2>Packages<a class="headerlink" href="#packages" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">esys.escript.symbolic Package</a><ul>
<li><a class="reference internal" href="#classes">Classes</a></li>
<li><a class="reference internal" href="#functions">Functions</a></li>
<li><a class="reference internal" href="#others">Others</a></li>
<li><a class="reference internal" href="#packages">Packages</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<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">esys.escript 5.6 documentation</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2012-2014, Author.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.4.
</div>
</body>
</html>
|