| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | nx |
Mask dimensions |
|||
| integer, | public | :: | ny |
Mask dimensions |
|||
| integer, | public, | allocatable | :: | mask(:,:) |
Collision mask (0=free, 1=occupied) |
||
| integer, | public, | allocatable | :: | trajectory(:,:) |
Current trajectory points for undo |
||
| integer, | public | :: | traj_length | = | 0 |
Length of current trajectory |
|
| integer, | public | :: | current_x | = | -1 |
Current position |
|
| integer, | public | :: | current_y | = | -1 |
Current position |
Initialize StreamMask with matplotlib-compatible sizing density=1 → 30x30, density=2 → 60x60, etc.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(stream_mask_t), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | density |
Check if mask position is free for streamline placement
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(stream_mask_t), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | x | |||
| integer, | intent(in) | :: | y |
Start recording new streamline trajectory
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(stream_mask_t), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | x | |||
| integer, | intent(in) | :: | y |
Update trajectory position and mark mask
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(stream_mask_t), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | x | |||
| integer, | intent(in) | :: | y |
Try to update trajectory, return false if collision occurs
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(stream_mask_t), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | x | |||
| integer, | intent(in) | :: | y |
Remove current trajectory from mask (for short/bad streamlines)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(stream_mask_t), | intent(inout) | :: | self |