StreamTracer¶
- class streamtracer.StreamTracer(max_steps, step_size)¶
Bases:
object
A streamline tracing class.
- Parameters
- max_stepsint
Number of steps available for each line. The maximum number of points on a single stream line is
max_steps
.- step_sizefloat
Step size as a the fraction of cell size.
- cyclic[bool, bool, bool], optional
Whether to have cyclic boundary conditions in each dimension.
- Attributes
- xsarray of (n, 3) arrays
An array of the streamlines, which in general can have varying numbers of points.
- ROTinteger array
Reason(s) of termination. Shape
len(xs)
if traced in one direction, or(len(xs), 2)
if traced in both directions. Can take the following values: - -1: Encountered a NaN - 1: Reached maximum available steps - 2: Out of bounds
Attributes Summary
Methods Summary
trace
(seeds, grid[, direction])Trace streamlines.
Attributes Documentation
- max_steps¶
Methods Documentation
- trace(seeds, grid, direction=0)¶
Trace streamlines.
This traces streamlines from a series of seeds, through a vector field.
- Parameters
- seeds(n, 3) array
Seed points.
- gridVectorGrid
Grid of field vectors.
- directionint, optional
Integration direction.
0
for both directions,1
for forward, or-1
for backwards.