Commit Graph
16 Commits
Author SHA1 Message Date
Magne Sjaastad 5a9d38d53b Make RimStimPlanModelCalculator more robust
- Fix out-of-bounds vector access in calculateFormation when an index derived from curve data falls outside formationNamesVector, including when the value is invalid (NaN/inf) or negative.
- Initialize m_stimPlanModel to nullptr in the constructor; it was previously left uninitialized until setStimPlanModel() was called.
- Guard all entry points that dereference m_stimPlanModel directly (extractCurveData, calculateLayers, findCurveAndComputeLayeredAverage, findCurveAndComputeTopOfLayer, calculateStressWithGradients, calculateTemperature, calculateFacies, calculateFormation) and return a safe default/log an error when it is null.
- Bounds-check findValueAtTopOfLayer/findValueAtBottomOfLayer against both the layer index and the underlying values vector, returning quiet_NaN instead of out-of-bounds access or a thrown exception from vector::at().
- Guard computeAverageByLayer against out-of-range indices and empty layers (division by zero), returning 0.0 for empty layers instead of NaN/inf.
2026-10-05 19:56:10 +02:00
Kristian Bendiksen 5ffcb69acc #13126 RiaLogging: Use std::string_view instead of QString for logging 2026-05-08 10:11:09 +02:00
Kristian Bendiksen a3efc16615 StimPlan Model: Provide default value for facies 2023-05-26 12:32:43 +02:00
Kristian Bendiksen 02ec71955b StimPlan Model: Improve logging for facies value/name mismatch. 2023-05-10 15:22:55 +02:00
Magne Sjaastad 952e766c2f Update clang-format.yml (#10068)
* Update to clang-format-15
Removed two custom .clang-format files in subfolders of AppFwk

* Fixes by clang-format
2023-04-13 07:05:53 +02:00
Magne Sjaastad f8c5cf389f clang-format: Set column width to 140
* Set column width to 140
* Use c++20
* Remove redundant virtual
2023-02-26 10:48:40 +01:00
Kristian Bendiksen faba3a980d #8027 StimPlan Model Export: Add perforation, formation and facies info 2021-10-04 10:20:09 +02:00
Kristian Bendiksen f72890584f StimPlan Model Calculator: guard against inf/nan in stress calculation. 2021-05-20 07:18:44 +02:00
Kristian Bendiksen 3b383f1a57 StimPlan Model Calculator: Add more error checking for stress calculation. 2021-05-20 07:18:44 +02:00
Kristian Bendiksen efd3aaeb4e #7452 Refactor: Extract method for stress gradient calculation. 2021-03-19 13:24:25 +01:00
Kristian Bendiksen 66df15224f #7452 Remove magic number. 2021-03-19 13:24:25 +01:00
Kristian Bendiksen 8542643963 #7452 Use pressure gradient from equilibrium region for stress gradient 2021-03-19 13:24:25 +01:00
Kristian Bendiksen 35525eeedf #7400 StimPlanModel: Cache calculated results. 2021-02-26 14:03:30 +01:00
Kristian Bendiksen e72cec3c62 #7339 StimPlanModel: Interpolate pressure data from dynamic eclipse case 2021-02-19 12:18:30 +01:00
bc81437435 Moved UnitSystem from RiaEclipseUnitTools to RiaDefines. (#7225)
* Moved UnitSystem from RiaEclipseUnitTools to RiaDefines.
- Renamed UnitSystem to EclipseUnitSystem
- Replaced header includes and removed obsolete includes of RiaEclipseUnitTools.h
* Moved  result name functions into separate file.
* Minor cleanup

Co-authored-by: rubenthoms <rubenthoms@users.noreply.github.com>
Co-authored-by: Magne Sjaastad <magne.sjaastad@ceetronsolutions.com>
Co-authored-by: magnesj <magnesj@users.noreply.github.com>
2021-01-21 12:58:46 +01:00
Gaute Lindkvist 81699db187 Rename ApplicationCode to ApplicationLibCode 2021-01-11 15:27:45 +01:00