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
|
<a name="Module:Scientific.Geometry.TensorAnalysis"><h1>Module Scientific.Geometry.TensorAnalysis</h1></a>
<hr width=70%>
<a name="Class:Scientific.Geometry.TensorAnalysis.TensorField"><h2>Class TensorField: Tensor field of arbitrary rank</h2></a>
<p>A tensor field is described by a tensor at each point of
a three-dimensional rectangular grid. The grid spacing
may be non-uniform. Tensor fields are implemented as a subclass
of InterpolatingFunction from the module
Scientific.Functions.Interpolation and thus share all methods
defined in that class.</p>
<p>Constructor: TensorField(<i>rank</i>, <i>axes</i>, <i>values</i>, <i>default</i>=<tt>None</tt>)</p>
<p><dl>
<dt><i>rank</i></dt>
<dd><p>
a non-negative integer indicating the tensor rank</p></dd>
<dt><i>axes</i></dt>
<dd><p>
a sequence of three one-dimensional arrays, each
of which specifies one coordinate (x, y, z) of the
grid points</p></dd>
<dt><i>values</i></dt>
<dd><p>
an array of <tt>rank+3</tt> dimensions. Its first
three dimensions correspond to the x, y, z
directions and must have lengths compatible with
the axis arrays. The remaining dimensions must
have length 3.</p></dd>
<dt><i>default</i></dt>
<dd><p>
the value of the field for points outside the grid.
A value of <tt>None</tt> means that an exception will be
raised for an attempt to evaluate the field outside
the grid. Any other value must a tensor of the
correct rank.</p></dd>
</dl>
</p>
<p>Evaluation:</p>
<ul>
<li> <p>
<tt>tensorfield(x, y, z)</tt> (three coordinates)
</p><li> <p>
<tt>tensorfield(coordinates)</tt> (any sequence containing three coordinates)
</p></ul>
<b>Methods:</b><br>
<ul>
<li> <b><i>zero</i></b>()
<p>Returns a tensor of the correct rank with zero elements.</p>
<li> <b><i>derivative</i></b>(<i>variable</i>)
<p>Returns the derivative with respect to <i>variable</i>, which
must be one of 0, 1, or 2.</p>
<li> <b><i>allDerivatives</i></b>()
<p>Returns all three derivatives (x, y, z).</p>
</ul>
<hr width=70%>
<a name="Class:Scientific.Geometry.TensorAnalysis.ScalarField"><h2>Class ScalarField: Scalar field (tensor field of rank 0)</h2></a>
<p>Constructor: ScalarField(<i>axes</i>, <i>values</i>, <i>default</i>=<tt>None</tt>)</p>
<p>A subclass of TensorField.
</p>
<b>Methods:</b><br>
<ul>
<li> <b><i>gradient</i></b>()
<p>Returns the gradient (a vector field).</p>
<li> <b><i>laplacian</i></b>()
<p>Returns the laplacian (a scalar field).</p>
</ul>
<hr width=70%>
<a name="Class:Scientific.Geometry.TensorAnalysis.VectorField"><h2>Class VectorField: Vector field (tensor field of rank 1)</h2></a>
<p>Constructor: VectorField(<i>axes</i>, <i>values</i>, <i>default</i>=<tt>None</tt>)</p>
<p>A subclass of TensorField.
</p>
<b>Methods:</b><br>
<ul>
<li> <b><i>divergence</i></b>()
<p>Returns the divergence (a scalar field).</p>
<li> <b><i>curl</i></b>()
<p>Returns the curl (a vector field).</p>
<li> <b><i>strain</i></b>()
<p>Returns the strain (a tensor field of rank 2).</p>
<li> <b><i>divergenceCurlAndStrain</i></b>()
<p>Returns all derivative fields: divergence, curl, and strain.</p>
<li> <b><i>laplacian</i></b>()
<p>Returns the laplacian (a vector field).</p>
<li> <b><i>length</i></b>()
<p>Returns a scalar field corresponding to the length (norm) of
the vector field.</p>
</ul>
|