Commit Graph

24 Commits

Author SHA1 Message Date
Atgeirr Flø Rasmussen
319fb8df50 Merge pull request #84 from bska/fix-equality-comparisons
Fix well classification that was only correct by accident
2012-10-25 01:08:48 -07:00
Roland Kaufmann
09f458f5ee Remove superfluous construction by std::make_pair
Since we know the type of the components, we may just as well create the
pair directly! (Using make_pair invokes compiler bugs in GCC).
2012-10-24 21:22:11 +02:00
Bård Skaflestad
c8dedfde06 Fix well classification that was only correct by accident
Specifically, the tests

   if (!wells->type[self_index] == INJECTOR)
   if (!wells->type[self_index] == PRODUCER)

produced the expected results *only* because INJECTOR==0 and PRODUCER==1
in the WellType enumeration, thus (!INJECTOR == PRODUCER) and
(!PRODUCER == INJECTOR).

Installing the (much) more appropriate

    if (wells->type[self_index] != INJECTOR)
    if (wells->type[self_index] != PRODUCER)

is not only more readable, it is also future-proof and scales better if
we ever introduce new WellTypes (e.g., a MONITOR).
2012-10-24 21:12:29 +02:00
Roland Kaufmann
359fdb1428 Make GCC 4.6.3 happy in C++0x mode
It complains about not finding a match for the pair<> template class,
because the first parameter (this) is allegedly const. However, this
isn't a const method, so I suspect it is a compiler bug.

In order to move on, I slap on a harmless cast which will make this
particular compiler happy, and which should have no effects elsewhere,
but put it in a #if..#else..#endif macro to avoid warnings on others;
hopefully this also makes it easier to spot and remove in the future.
2012-10-24 09:57:12 +02:00
kristinf
16dc071bca sign error in total_produced 2012-10-09 15:23:56 +02:00
Atgeirr Flø Rasmussen
9de3b03e69 Fix sign of production rate controls.
In the Wells struct, production rate control targets must be negative
(and injection rate control targets are always positive).
In the WellsGroup classes, there are separate variables for injection
and production, and all rates are positive. Therefore, upon adding or
modification of a production rate control, the negated value must
be used.
2012-10-08 14:27:56 +02:00
Bård Skaflestad
fde2d25c86 Clone wells object when constructing from existing.
This installs a measure of safety on the part of the interface in that
the caller is free to dispose of the wells object upon returning from
the WellsManager constructor.
2012-10-05 10:15:06 +02:00
Halvor Møll Nilsen
e913456fa6 Added constuctor to WellManager which used Wells struct. 2012-10-05 10:14:55 +02:00
Atgeirr Flø Rasmussen
c221dca66c Fix treatment of WELOPEN keyword.
Now you can actually shut and open wells with WELOPEN. The following
caveats apply:
 - this may interact improperly with group controls,
 - dynamic usage of WCONINJE/WCONPROD should not be mixed with WELOPEN.
2012-09-20 14:35:03 +02:00
Atgeirr Flø Rasmussen
75382c7f9e Fix error message. 2012-09-14 09:52:13 +02:00
Bård Skaflestad
6cf71b3ba4 Prune an unused header. 2012-06-19 09:34:34 +02:00
Bård Skaflestad
9133e73a33 *Control::mode(): Defer control-mode look-up to std::map. 2012-06-19 00:30:32 +02:00
Bård Skaflestad
f300a9736e Sort includes. 2012-06-19 00:01:30 +02:00
Bård Skaflestad
149e1952a5 *Control::mode(): Defer keyword look-up to std::find() algorithm.
This is simpler than implementing our own version of the same.
2012-06-18 15:21:27 +02:00
Bård Skaflestad
b8a6a14747 Add support for storing well names in "Wells" structure.
The well name must be passed as a parameter to add_well(), so update
callers accordingly.
2012-06-18 10:15:53 +02:00
Kjetil Olsen Lye
4bee8b2d45 Removed errors on trying to open a shut well (or shut an open well). 2012-06-15 15:16:32 +02:00
Kjetil Olsen Lye
ba2729bff7 Handle WellOpen has both open and shut. 2012-06-15 14:29:43 +02:00
Kjetil Olsen Lye
c64ddca287 Made the grouptree respect the new convention of tilde. 2012-06-15 14:08:28 +02:00
Kjetil Olsen Lye
26b5d1ea39 Correct a const error. 2012-06-15 13:57:35 +02:00
Kjetil Olsen Lye
6bde0a03cd Added welshut for production wells. Also added wellopen-handling. 2012-06-15 13:49:58 +02:00
Kjetil Olsen Lye
407582b437 Added initial shutting of injection wells. 2012-06-15 13:38:07 +02:00
Atgeirr Flø Rasmussen
6c4b799925 WellsManager now handles multiple WELSPECS, WCONINJE, WCONPROD-lines referring to the same well.
This is mostly relevant for schedule handling. The last occurence of a well
is the one used.
2012-06-15 10:12:36 +02:00
Kjetil Olsen Lye
4e78f96db1 Removed a debug print statement in the WellsGroup-code. 2012-06-11 13:16:39 +02:00
Atgeirr Flø Rasmussen
955b5ea068 Reorganized, added opm/core/wells/ and opm/core/simulator/. 2012-06-05 15:42:49 +02:00