Commit Graph
24025 Commits
Author SHA1 Message Date
Bård Skaflestad aae9c06fee Merge pull request #6854 from akva2/use_ranges_copy
replace std::copy with std::ranges::copy where appropriate
2026-02-23 10:48:34 +01:00
Arne Morten Kvarving ee00a789be replace std::copy with std::copy_n where appropriate
more expressive
2026-02-23 08:41:16 +01:00
Arne Morten Kvarving 9d30a6d502 replace std::copy with std::ranges::copy where appropriate
the c++-20 constrained algorithm is safer and code is more readable
2026-02-23 08:20:59 +01:00
Bård Skaflestad 4b2a574727 Merge pull request #6851 from akva2/use_ranges_foreach
replace std::for_each with std::ranges::for_each where appropriate
2026-02-20 16:19:32 +01:00
Arne Morten Kvarving d18117fbe6 replace std::for_each with std::ranges::for_each where appropriate
the c++-20 constrained algorithm is safer and code is more readable
2026-02-20 15:41:07 +01:00
Bård Skaflestad a67322cc15 Merge pull request #6850 from akva2/use_ranges_sort
replace std::sort with std::ranges::sort where appropriate
2026-02-20 15:40:27 +01:00
Arne Morten Kvarving 9ff0392e6b replace std::sort with std::ranges::sort where appropriate
the c++-20 constrained algorithm is safer and code is more readable
2026-02-20 14:21:53 +01:00
Tor Harald Sandve f29e84d06b Merge pull request #6837 from hakonhagland/refact_wgc
Move getAutoChokeGroupProductionTargetRate() to GroupStateHelper
2026-02-20 14:18:24 +01:00
Bård Skaflestad 3461a3f01c Merge pull request #6848 from akva2/use_ranges_transform
replace std::transform with std::ranges::transform where appropriate
2026-02-20 14:08:16 +01:00
Arne Morten Kvarving 670743f786 replace std::transform with std::ranges::transform where appropriate
the c++-20 constrained algorithm is safer and code is more readable
2026-02-20 13:28:11 +01:00
Arne Morten Kvarving 91ad70dfb7 Merge pull request #6847 from jakobtorben/add_missing_cuda_safe_call
Add missing OPM_GPU_SAFE_CALL for cudaMemset
2026-02-20 12:30:01 +01:00
Jakob Torben 40168ec82e Add missing OPM_GPU_SAFE_CALL for cudaMemset 2026-02-20 10:38:51 +01:00
Håkon Hægland 7abd6f9b88 Move autochoke target rate to GroupStateHelper
Move getAutoChokeGroupProductionTargetRate() from
WellGroupControls (static method) to GroupStateHelper
(member method). The method has no well dependency and
manually reimplements chain iteration already available
as applyReductionsAndFractions_().

The moved implementation delegates to
applyReductionsAndFractions_() with do_addback=false
and the actual getLocalReductionLevel_() value, replacing
the manual reduction loop.

Make getLocalReductionLevel_() private again (reverting
the visibility change from the previous commit), since
its only external caller was the now-removed static
method in WellGroupControls.

Remove unused FractionCalculator.hpp include from
WellGroupControls.cpp and WellGroupControls.hpp include
from BlackoilWellModelNetwork_impl.hpp and the test file.
2026-02-19 20:17:33 +01:00
Bård Skaflestad b5bf6a5a57 Merge pull request #6845 from daavid00/warns
Fixing compilation warnings
2026-02-19 18:07:41 +01:00
David Landa Marban 6d5e3b617f Fixing warnings 2026-02-19 17:46:16 +01:00
Tor Harald Sandve fa509b2563 Merge pull request #6835 from hakonhagland/test_autochoke_gtgt
Add tests and fix autochoke group target rate
2026-02-19 16:01:01 +01:00
David Landa-Marbán 0eace1f172 Merge pull request #6830 from daavid00/bvels
BVEL[G|O|W][I|J|K][|-] summary keywords
2026-02-19 13:58:08 +01:00
David Landa Marban 7e8fd2457b BVEL[G|O|W][I|J|K][|-] summary keywords 2026-02-19 10:20:42 +01:00
Atgeirr Flø Rasmussen b6eaa425a3 Merge pull request #6792 from totto82/speedupTEMP
Speedup temp
2026-02-18 16:39:02 +01:00
Tor Harald Sandve a2b4d9a71a Fix OMP issue 2026-02-18 13:46:57 +01:00
Tor Harald Sandve c6e5d99795 Minor fixes 2026-02-18 11:31:27 +01:00
Tor Harald Sandve c4548eca44 refactor computeWellTemperature 2026-02-18 11:31:27 +01:00
Tor Harald Sandve 8694fa88b0 fix compilation 2026-02-18 11:31:27 +01:00
Tor Harald Sandve 5f3c434674 Use SparseMatrixAdapter 2026-02-18 11:31:27 +01:00
Tor Harald Sandve 208c266e8e Some more minor speedup 2026-02-18 11:31:27 +01:00
Tor Harald Sandve bf1013cee5 Store and use thermalHalfTransmissbilities from nbInfo 2026-02-18 11:31:27 +01:00
Tor Harald Sandve d853e349b5 compute well temperature in TEMP module 2026-02-18 11:31:27 +01:00
Tor Harald Sandve 7155ab4c70 reuse darcy flux in temperatureModule 2026-02-18 11:31:27 +01:00
Tor Harald Sandve 26d5a3497f Speedup the temperature module
- Use its own fluidstate and Evaluation class to avoid having to add an extra derivative to the main equations
- Sotre the scaling factor to avoid calling the parameter all the time
2026-02-18 11:31:27 +01:00
Bård Skaflestad 858eb9298d Merge pull request #6832 from akva2/mark_fmt_strings_runtime_nvcc
mark format string as runtime
2026-02-18 09:10:21 +01:00
Atgeirr Flø Rasmussen 7d6feee0d9 Merge pull request #6676 from multitalentloes/make_newtranfluxmodule_gpu_friendly
make more files gpu-compatible
2026-02-18 08:47:36 +01:00
Tobias Meyer Andersen 5469cc5539 reindent remaining functions 2026-02-17 16:46:55 +01:00
Tobias Meyer Andersen 66059d95d6 rename template argument 2026-02-17 16:28:40 +01:00
Tobias Meyer Andersen d81d75517c fix indentation 2026-02-17 16:28:32 +01:00
Tobias Meyer Andersen c828cb37bb add empty() to views 2026-02-17 16:28:21 +01:00
Tobias Meyer Andersen 3601af0e85 move closer to first use 2026-02-17 16:28:07 +01:00
Kai Bao 464aa27674 Merge pull request #6836 from GitPaean/not_setting_FLD_to_NONE
not setting FLD to be NONE for group
2026-02-17 15:53:49 +01:00
Arne Morten Kvarving 13c195ac39 mark format string as runtime 2026-02-17 15:41:14 +01:00
Håkon Hægland 9b9864551d Fix autochoke target rate and clean up guide rate
Add local_reduction_level gating to the autochoke target
loop in getAutoChokeGroupProductionTargetRate(), preventing
double-counting of reductions at intermediate groups with
group-controlled-wells count of zero.

Remove getGuideRate() from GroupStateHelper: the group path
is dead code (only caller was isAutoChokeGroupUnderperforming_
which now uses guide_rate_ directly), and the well path is
inlined into FractionCalculator::guideRate().

Improve isAutoChokeGroupUnderperforming_() to compute the
control group guide rate as the sum of its FLD children's
guide rates (matching how targets are distributed), and
accumulate efficiency factors from the autochoke group up
to the control group. This makes the formula correct for
the common case where the control group is the immediate
parent with no reductions.

Rename getLocalReductionLevel_ to getLocalReductionLevel
and make it public, as it is now called from
WellGroupControls.cpp.

Update test to verify the corrected target rate and remove
references to the now-fixed double-counting issue.
2026-02-17 15:41:08 +01:00
Håkon Hægland 504c8f62e5 Add tests for autochoke group target rate
Add two test cases for getAutoChokeGroupProductionTargetRate():

- TestAutoChokeGroupProductionTargetRate: normal case with
  MANI (autochoke, FLD) under intermediate group PLAT that
  has a guide rate. Verifies the autochoke reduction loop
  produces the same result as applyReductionsAndFractions_()
  when both are applicable.

- TestAutoChokeGroupTargetRateDoubleCountingBug: uses a
  NETWORK DATA file with NODEPROP (as_choke=YES) and lower
  well rates to naturally trigger underperformance detection
  (GCW=0). Documents the double-counting bug where missing
  local_reduction_level gating causes reductions to be
  subtracted at both FIELD and PLAT, producing a clamped-
  to-zero target instead of the correct value.

Also adds GROUP_HIGHER_CONSTRAINTS_NETWORK.DATA with
BRANPROP/NODEPROP keywords and parameterizes the test
fixture with mani2_control, data_file, and well rates.
2026-02-17 15:41:08 +01:00
Tobias Meyer Andersen 1f7b248016 Merge pull request #6670 from multitalentloes/add_reset_to_gpu_matrices
Add reset to gpu matrices
2026-02-17 15:14:16 +01:00
Bård Skaflestad 08c25aebab Merge pull request #6833 from hakonhagland/fix_ac_comm_sum
Fix missing communication in auto choke underperformance check
2026-02-17 14:57:20 +01:00
Håkon Hægland 818a33ce17 Fix missing communication in auto choke underperformance check
sumWellSurfaceRates() only returns rank-local rates, but
isAutoChokeGroupUnderperforming_() compared them directly against the
full group target. Add comm_.sum() to aggregate rates across all ranks
before the comparison.
2026-02-17 14:22:33 +01:00
Tobias Meyer Andersen bb7a3c15a8 renamme resetMatrix() 2026-02-17 14:08:34 +01:00
Kai Bao 5bf33bd753 not setting FLD to be NONE for group
since SingleWellState::GroupTarget does not get group target from a
group under FLD control.
2026-02-17 14:03:19 +01:00
Tobias Meyer Andersen 61608c1ff7 simplify code 2026-02-17 13:33:45 +01:00
Tor Harald Sandve a539d10330 Merge pull request #6805 from totto82/outher_network_iter
dont add outer network iter for ctrl change
2026-02-17 11:14:57 +01:00
Arne Morten Kvarving cf679ac28f Merge pull request #6834 from akva2/janitoring
Janitoring: quell some compiler warnings
2026-02-17 11:10:26 +01:00
Arne Morten Kvarving c4c81bb55e quell signed/unsigned comparison warning 2026-02-17 10:55:59 +01:00
Arne Morten Kvarving 3d08f3bb96 remove unused variable 2026-02-17 10:55:58 +01:00