StreamTracer¶
-
class
streamtracer.
StreamTracer
(max_steps, step_size)¶ Bases:
object
A streamline tracing class.
Parameters: - max_steps : int
Number of steps available for each line.
- step_size : float
Step size as a the fraction of cell size.
- cyclic : [bool, bool, bool], optional
Whether to have cyclic boundary conditions in each dimension.
Attributes: - xs : array of (n, 3) arrays
An array of the streamlines, which in general can have varying numbers of points.
- ROT : integer 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
max_steps
Methods Summary
trace
(self, seeds, grid[, direction])Trace streamlines. Attributes Documentation
-
max_steps
¶
Methods Documentation
-
trace
(self, 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.
- grid : VectorGrid
Grid of field vectors.
- direction : int, optional
Integration direction.
0
for both directions,1
for forward, or-1
for backwards.