Streamplot implementation broken down for size compliance
Refactored from 253-line function into focused, testable components following SOLID principles and size constraints.
Setup and validate streamplot parameters (focused on validation logic)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(figure_t), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | x(:) | |||
| real(kind=wp), | intent(in) | :: | y(:) | |||
| real(kind=wp), | intent(in) | :: | u(:,:) | |||
| real(kind=wp), | intent(in) | :: | v(:,:) | |||
| real(kind=wp), | intent(in), | optional | :: | density | ||
| real(kind=wp), | intent(in), | optional | :: | color(3) | ||
| real(kind=wp), | intent(in), | optional | :: | linewidth | ||
| real(kind=wp), | intent(in), | optional | :: | rtol | ||
| real(kind=wp), | intent(in), | optional | :: | atol | ||
| real(kind=wp), | intent(in), | optional | :: | max_time | ||
| real(kind=wp), | intent(in), | optional | :: | arrowsize | ||
| character(len=*), | intent(in), | optional | :: | arrowstyle | 
Generate streamlines using matplotlib-compatible algorithm
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | x(:) | |||
| real(kind=wp), | intent(in) | :: | y(:) | |||
| real(kind=wp), | intent(in) | :: | u(:,:) | |||
| real(kind=wp), | intent(in) | :: | v(:,:) | |||
| real(kind=wp), | intent(in) | :: | density | |||
| real, | intent(out), | allocatable | :: | trajectories(:,:,:) | ||
| integer, | intent(out) | :: | n_trajectories | |||
| integer, | intent(out), | allocatable | :: | trajectory_lengths(:) | 
Add streamline trajectory to figure as line plot
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(figure_t), | intent(inout) | :: | fig | |||
| real(kind=wp), | intent(in) | :: | traj_x(:) | |||
| real(kind=wp), | intent(in) | :: | traj_y(:) | |||
| real(kind=wp), | intent(in) | :: | line_color(3) |