Band tracer and region outlines.
Outline segments (e0, y0)-(e1, y1) live on a "strip-edge" grid, e indexing model strip
edges: e0 == e1 is vertical at edge e0, y0 == y1 && e1 == e0 + 1 horizontal across a
time boundary.
Greedy band tracer.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public | :: | maxbands | = | 0 |
Number of band slots. |
|
| integer(kind=int32), | public, | allocatable | :: | i0(:) |
First and last model of the band in each slot. |
||
| integer(kind=int32), | public, | allocatable | :: | i1(:) |
First and last model of the band in each slot. |
||
| logical, | public, | allocatable | :: | opn(:) |
Slot holds an open band; band was extended this step. |
||
| logical, | public, | allocatable | :: | ext(:) |
Slot holds an open band; band was extended this step. |
||
| real(kind=real64), | public, | allocatable | :: | ylo(:,:) |
Lower and upper interface of each band, |
||
| real(kind=real64), | public, | allocatable | :: | yhi(:,:) |
Lower and upper interface of each band, |
Traced band in data coords.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public | :: | i0 | = | 0 |
First and last model of band. |
|
| integer(kind=int32), | public | :: | i1 | = | 0 |
First and last model of band. |
|
| real(kind=real64), | public, | allocatable | :: | ylo(:) |
Lower and upper interface in each model, |
||
| real(kind=real64), | public, | allocatable | :: | yhi(:) |
Lower and upper interface in each model, |
Growable list of bands.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public | :: | nb | = | 0 |
Number of bands stored. |
|
| type(band_t), | public, | allocatable | :: | b(:) |
Bands, |
Outline polyline along a region boundary.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public | :: | n | = | 0 |
Number of points. |
|
| integer(kind=int32), | public, | allocatable | :: | ei(:) |
Strip-edge index of each point. |
||
| real(kind=real64), | public, | allocatable | :: | y(:) |
y coordinate of each point. |
Growable list of outline chains.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=int32), | public | :: | nc | = | 0 |
Number of chains stored. |
|
| type(chain_t), | public, | allocatable | :: | c(:) |
Chains, |
Allocate tracer w/ maxbands band slots over nm models, all closed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tracer_t), | intent(out) | :: | tr |
Tracer. |
||
| integer(kind=int32), | intent(in) | :: | maxbands |
Number of band slots; number of models. |
||
| integer(kind=int32), | intent(in) | :: | nm |
Number of band slots; number of models. |
Free tracer's band slots.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tracer_t), | intent(inout) | :: | tr |
Tracer. |
Begin new feature: close leftover bands without emitting.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tracer_t), | intent(inout) | :: | tr |
Tracer. |
Feed model i's intervals (ivlo/ivhi, m of them, ascending in y).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(tracer_t), | intent(inout) | :: | tr |
Tracer. |
||
| type(bandset_t), | intent(inout) | :: | bs |
Receives bands closed at this model. |
||
| integer(kind=int32), | intent(in) | :: | i |
Model index; number of intervals. |
||
| real(kind=real64), | intent(in) | :: | ivlo(:) |
Lower and upper y of each interval, |
||
| real(kind=real64), | intent(in) | :: | ivhi(:) |
Lower and upper y of each interval, |
||
| integer(kind=int32), | intent(in) | :: | m |
Model index; number of intervals. |
Drop every band of a set.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(bandset_t), | intent(inout) | :: | bs |
Band set. |
Append one band, growing by doubling.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(bandset_t), | intent(inout) | :: | bs |
Band set. |
||
| integer(kind=int32), | intent(in) | :: | i0 |
First and last model of band. |
||
| integer(kind=int32), | intent(in) | :: | i1 |
First and last model of band. |
||
| real(kind=real64), | intent(in) | :: | ylo(:) |
Lower and upper interface in each model, |
||
| real(kind=real64), | intent(in) | :: | yhi(:) |
Lower and upper interface in each model, |
Append one outline segment, growing by doubling.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout), | allocatable | :: | se0(:) |
Strip edge of each segment's first and second end. |
|
| integer(kind=int32), | intent(inout), | allocatable | :: | se1(:) |
Strip edge of each segment's first and second end. |
|
| real(kind=real64), | intent(inout), | allocatable | :: | sy0(:) |
y of each segment's first and second end. |
|
| real(kind=real64), | intent(inout), | allocatable | :: | sy1(:) |
y of each segment's first and second end. |
|
| integer(kind=int32), | intent(inout) | :: | ns |
Number of segments, incremented. |
||
| integer(kind=int32), | intent(in) | :: | e0 |
Strip edges of new segment's ends. |
||
| integer(kind=int32), | intent(in) | :: | e1 |
Strip edges of new segment's ends. |
||
| real(kind=real64), | intent(in) | :: | y0 |
y of new segment's ends. |
||
| real(kind=real64), | intent(in) | :: | y1 |
y of new segment's ends. |
Append vertical outline segments at strip edge e.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(in) | :: | alo(:) |
Intervals of the models left ( |
||
| real(kind=real64), | intent(in) | :: | ahi(:) |
Intervals of the models left ( |
||
| integer(kind=int32), | intent(in) | :: | na |
Number of |
||
| real(kind=real64), | intent(in) | :: | blo(:) |
Intervals of the models left ( |
||
| real(kind=real64), | intent(in) | :: | bhi(:) |
Intervals of the models left ( |
||
| integer(kind=int32), | intent(in) | :: | nb |
Number of |
||
| integer(kind=int32), | intent(in) | :: | e |
Number of |
||
| real(kind=real64), | intent(inout) | :: | bp(:) |
Breakpoint scratch, at least |
||
| integer(kind=int32), | intent(inout), | allocatable | :: | se0(:) |
Strip edge of each segment's first and second end. |
|
| integer(kind=int32), | intent(inout), | allocatable | :: | se1(:) |
Strip edge of each segment's first and second end. |
|
| real(kind=real64), | intent(inout), | allocatable | :: | sy0(:) |
y of each segment's first and second end. |
|
| real(kind=real64), | intent(inout), | allocatable | :: | sy1(:) |
y of each segment's first and second end. |
|
| integer(kind=int32), | intent(inout) | :: | ns |
Number of segments, incremented per appended segment. |
Link outline segments into polyline chains by walking shared endpoints.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(chainset_t), | intent(inout) | :: | cs |
Receives chains. |
||
| integer(kind=int32), | intent(in) | :: | se0(:) |
Strip edge of each segment's first and second end. |
||
| integer(kind=int32), | intent(in) | :: | se1(:) |
Strip edge of each segment's first and second end. |
||
| real(kind=real64), | intent(in) | :: | sy0(:) |
y of each segment's first and second end. |
||
| real(kind=real64), | intent(in) | :: | sy1(:) |
y of each segment's first and second end. |
||
| integer(kind=int32), | intent(in) | :: | ns |
Number of segments. |
Append one point to growable chain.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout), | allocatable | :: | cei(:) |
Strip edge of each point. |
|
| real(kind=real64), | intent(inout), | allocatable | :: | cy(:) |
y of each point. |
|
| integer(kind=int32), | intent(inout) | :: | cn |
Number of points, incremented. |
||
| integer(kind=int32), | intent(in) | :: | e |
Strip edge of new point. |
||
| real(kind=real64), | intent(in) | :: | y |
y of new point. |
Drop every chain of a set.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(chainset_t), | intent(inout) | :: | cs |
Chain set. |
Store one chain, growing by doubling like bandset_append.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(chainset_t), | intent(inout) | :: | cs |
Chain set. |
||
| integer(kind=int32), | intent(in) | :: | cei(:) |
Strip edge of each point; number of points. |
||
| real(kind=real64), | intent(in) | :: | cy(:) |
y of each point. |
||
| integer(kind=int32), | intent(in) | :: | cn |
Strip edge of each point; number of points. |
Make room for need entries, keeping contents.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int32), | intent(inout), | allocatable | :: | a(:) |
Array. |
|
| integer(kind=int32), | intent(in) | :: | need |
Number of entries needed. |
Real counterpart of grow_i32.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(inout), | allocatable | :: | a(:) |
Array. |
|
| integer(kind=int32), | intent(in) | :: | need |
Number of entries needed. |