Files
ResInsight/ApplicationLibCode
Kristian Bendiksen 4ecfee3b61 Add minSegmentLength parameter to createSubSegmentMDPairs
Added optional minSegmentLength parameter to prevent creating segments
smaller than a specified minimum length. The parameter uses std::optional
and is positioned before maxSegmentLength in the parameter list.

Key features:
- When subdividing would create segments smaller than minSegmentLength,
  the segment count is reduced to ensure all segments meet the minimum
- Uses floor(length / minSegmentLength) to calculate fewer, larger segments
- Custom intervals are exempt and can be smaller than minSegmentLength
- Includes CVF_ASSERT to validate minSegmentLength < maxSegmentLength
  (only when both are specified and maxSegmentLength > 0)

Example: For 55 units with maxSegmentLength=40, minSegmentLength=30:
- Without min: ceil(55/40) = 2 segments of 27.5 units each
- With min=30: floor(55/30) = 1 segment of 55 units (27.5 < 30)

Added 9 comprehensive unit tests covering:
- Prevention of too-small segments
- Segment count reduction when needed
- Interaction with custom intervals (gaps respect min, intervals exempt)
- Edge cases (minSegmentLength=0, no maxSegmentLength)

All existing tests pass unchanged (backward compatible with std::nullopt).
Total test count: 599 tests (29 for createSubSegmentMDPairs).
2025-12-23 12:17:24 +01:00
..
2025-12-12 07:36:02 +01:00
2025-10-31 13:21:19 +01:00
2025-11-19 10:25:32 +01:00
2024-07-01 14:09:56 +02:00