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. The maximum number of points on a single stream line is
max_steps
.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.
- xs#
An array of the streamlines, which in general can have varying numbers of points.
- Type:
array of (n, 3) arrays
- ROT#
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- Type:
integer array
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.
grid (VectorGrid) – Grid of field vectors.
direction (int, optional) – Integration direction.
0
for both directions,1
for forward, or-1
for backwards.