Commit Graph

370 Commits

Author SHA1 Message Date
Joakim Hove
6379cec8e0 Changed Transmult constructor 2017-09-24 15:43:29 +02:00
Joakim Hove
28f62a019f Removed GridDims from EclipseState. 2017-09-24 09:22:54 +02:00
Joakim Hove
009e00ed61 Added EclipseGrid method to get corner positions. 2017-06-23 17:05:11 +02:00
Arne Morten Kvarving
18f15e7432 mark constructors as explicit 2017-06-09 17:38:42 +02:00
Joakim Hove
494cb74124 Limited support for cylindrical grids.
For cylindrical grids based on the keyword set DRV, DTHETAV, DZV and
TOPS the EclipseGrid implementation will create a cornerpoint
representation of the grid.
2017-06-08 08:26:43 +02:00
Joakim Hove
fbb2ce73cd Added circle property to EclipseGrid 2017-06-08 07:01:25 +02:00
Jørgen Kvalsvik
e884b0664c Redesign cmake
Tune the makefile according to new principles, which adds a few bells
and whistles and for clarity.

Synopsis:

* The dependency on opm-common is completely gone. This is reflected in
  travis and appveyor as well. No non-kitware cmake modules are used.
* Directories are flattened, quite a bit - source code is located in the
  lib/ directory if it belongs to opm-parser, and external/ if third
  party.
* The sibling build feature is implemented through cmake's
  export(PACKAGE) rather than implicitly looking through source files.
* Targets explicitly set required public and private include
  directories, compile options and definitions, which cmake will handle
  and propagate
* opm-parser-config.cmake for downstream users is now provided.
* Dependencies are set up using targets. In the future, when cmake 3.x+
  can be used, these should be either targets from newer Find modules,
  or interface libraries.
* Fewer system specific assumptions are coded in, instead we assume
  cmake or users set up system specific details.
* All module wide configuration and looking up libraries is handled in
  the root makefile - all sub directories only set up libraries and
  compile options for the module in question.
* Targets are defined and links handled transitively because cmake now
  is told about them. ${module_LIBRARIES} variables are gone.

This is largely guided by the principles outlined in
https://rix0r.nl/blog/2015/08/13/cmake-guide/

Most source files are just moved - if they have some content change then
it's nothing more than include fixes or similar in order to make them
compile.
2017-06-01 15:29:23 +02:00
Joakim Hove
ebc3a3ac79 Added GridProperties::hasDeckKeyword( )
The GridProperties::hasDeckKewyord( ) will return false for keywords
which have only been auto generated. Have also renamed
getInitializedkeyword( ) to getDeckKeyword( ).
2017-02-16 15:13:13 +01:00
Joakim Hove
0dcf411e8c Changed semantics of GridProperties.hasKeyword( )
The GridProperties.hasKeyword( ) would previously return false if a
keyword in the properties container had been auto created. This is now
changed, the hasKeyword( ) implementation will not consider whether a
keyword has been autocreated or not.

Have also added a void method GridProperties.assertKeyword( kw ) which by
side effect will ensure that the container contains the keyword kw.
2017-02-16 15:13:12 +01:00
Pål Grønås Drange
b8b5bd374b Added FIP_PROBE and tests, we now accept FIPxxxx kws 2017-01-11 12:36:22 +01:00
Atgeirr Flø Rasmussen
b4360ff1e7 Add extra braces for C++11 compilers.
With C++14 the warnings generated will probably disappear, but for now
this keeps clang happy (warning-free).
2016-12-12 14:58:13 +01:00
Atgeirr Flø Rasmussen
d753ecd9b4 Allow 'X+', 'I+', 'Y+', 'J+', 'Z+' and 'K+'.
This has been encountered in the wild. We treat it like
the documented 'X', 'I' etc. strings.
2016-12-09 15:19:40 +01:00
Joakim Hove
eb283a1434 ZCORN adjustments considers cell-cell relation. 2016-12-04 22:56:54 +01:00
Joakim Hove
c022809073 Added functionality to "fix" ZCORN problems. 2016-11-23 14:59:48 +01:00
Joakim Hove
5ebddba40e Changes in Tabdims construction:
1. Removed Tabdims(int,int,int, ....) constructor and added
    Tabdims(Deck) constructor.

 2. Added Tabdims member to Runspec( ) object.

 3. Changed std_shared_ptr<Tabdims> to Tabdims member in TableManager.
2016-11-18 10:48:02 +01:00
Joakim Hove
76f5a4d78b Handle keyword OPERATE. 2016-11-15 08:45:04 +01:00
Joakim Hove
2b53bc4c43 Add begin() and end() to Box. 2016-11-15 08:45:04 +01:00
Jørgen Kvalsvik
21aaceaed9 Runspec object; move phases from TableManager
There has never really been a natural home for initial properties that
aren't InitConfig, meaning information such as phases in the deck and
other runspec information hasn't had a natural home.

This patch introduces the Runspec object on EclipseState for phase
information and other similar properties that are interesting and static
for when setting up parameters etc. for simulation, that aren't all that
interesting once simulation starts.

An additional benefit is a leaner implementation for the phase enum and
some stricter semantics via enum classes.
2016-11-01 16:41:19 +01:00
Jørgen Kvalsvik
066be72ce1 Small doc on GridProperty guarantees 2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
f9cb516b99 Remove DeckPtr+ParserPtr aliases
Remove the deprecated DeckPtr and ParserPtr aliases and removes
shared_ptr<Deck> and friends from all interfaces.
2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
8b4350f720 TransMult stores MULTREGTScanner as value
Improves copying semantics and fixes a memory leak in TransMult
initialisation.
2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
56608e9a10 3DProperties default constructible
This also means UnitSystem must be default constructible, which now
makes the default unit system metric. GridProperties must also be
default constructible (a valid 0x0x0 grid with no properties).
2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
1906bf4d16 Make EclipseGrid no longer use shared_ptr 2016-10-19 20:38:28 +02:00
Jørgen Kvalsvik
fcc93085ee Make NNC no longer use shared_ptr 2016-10-19 20:38:27 +02:00
Jørgen Kvalsvik
64b44eda77 Make Box+BoxManager no longer use shared_ptr 2016-10-19 20:38:27 +02:00
Jørgen Kvalsvik
c893a92aa6 Make Dimension+UnitSystem no longer use shared_ptr 2016-10-19 20:38:27 +02:00
Jørgen Kvalsvik
d53c73fb41 Make Fault+FaultFace no longer use shared_ptr 2016-10-19 20:38:27 +02:00
Atgeirr Flø Rasmussen
43e759d261 Merge pull request #936 from andlaus/opm-parser_units
fully move the units code from opm-core to opm-parser
2016-10-18 15:25:14 +02:00
Andreas Lauser
a8b6047b1d fully move the units code from opm-core to opm-parser
this fixes some annoying inconsistencies (e.g., the recently
introduced 'dyne' unit was unavailable in the opm-core version) and
gets rid of some compiler abiguity errors if 'using namespace
Opm::details' was used by code inside the 'Opm' namespace.

Since opm-parser is a hard dependency of opm-core, the only measure
which must be taken by higher-level code is to include
'opm/parser/eclipse/Units/Units.hpp' instead of
'opm/parser/eclipse/Units/ConversionFactors.hpp' or
'opm/core/utility/Units.hpp'.

Note that a potentially better location for this code would be
opm-common, but this would break the Windows build of opm-parser.
2016-10-10 17:45:37 +02:00
Jørgen Kvalsvik
9a3e5e4c4f Explicit boolean expression in isAutoGenerated_ 2016-10-06 13:17:23 +02:00
Arne Morten Kvarving
afedca7b18 quell signed/unsigned comparison warning
switch to using std::iota
2016-09-14 11:04:23 +02:00
Jørgen Kvalsvik
9aee6e7708 Return identity when compressing active-only cells. 2016-09-12 21:14:07 +02:00
Joakim Hove
74e1aff9dc Compress std::vector<T> and GridPropery. 2016-09-08 09:14:30 +02:00
Joakim Hove
56077998e0 Added EclipseGrid::getGlobalIndex( activeIndex ) 2016-09-08 09:14:29 +02:00
Joakim Hove
15588fe7ca Added EclipseGrid::allActive() convenience method. 2016-09-08 09:14:28 +02:00
Joakim Hove
489602c51c EclipseGrid: default copy and move constructors. 2016-09-08 09:14:27 +02:00
Joakim Hove
c2b4ee687f Added class ZcornMapper. 2016-09-07 11:08:31 +02:00
Joakim Hove
4af4c40dc6 Added EclipseGrid processed copy. 2016-09-07 11:07:51 +02:00
Joakim Hove
ba6e2a0eb1 Merge pull request #909 from andlaus/implement_multregp
Implement support for MULTREGP
2016-09-05 18:11:18 +02:00
Joakim Hove
37c1418876 Do not apply the MAPAXES transform. 2016-09-02 14:35:14 +02:00
Andreas Lauser
cf8c957968 add a unit test for the MULTREGP keyword 2016-09-02 11:16:34 +02:00
Joakim Hove
b6c4043f20 Merge pull request #902 from joakim-hove/gridproperty-cells
Scan a property and return cells equal to a value.
2016-08-26 11:04:42 +02:00
Joakim Hove
bea47dc06d Scan a property and return cells equal to a value. 2016-08-25 17:27:36 +02:00
Jørgen Kvalsvik
bb2d0c5324 Active cell cache with automatic storage
Simplify slightly by using automatic memory management, rather than
heap-alloc.
2016-08-25 13:51:46 +02:00
Joakim Hove
1c0716aefd EclipseGrid::activeMap( ) will cache the results. 2016-08-25 11:50:09 +02:00
Joakim Hove
9bcdadd443 Merge pull request #890 from pgdr/transmult-and-shared_ptrs
Removing some use of shared_ptr
2016-08-09 09:32:41 +02:00
Jørgen Kvalsvik
d928f53a52 Use getCellDepth; hoist size() in numApply 2016-08-08 11:56:40 +02:00
Jørgen Kvalsvik
9966e3fbfd Prefer .at over checking size and throwing
Seems to be slightly faster and is much simpler.
2016-08-05 15:57:44 +02:00
Pål Grønås Drange
b359e9c0fb transmult is member, use ref's, use proper constructor of EclipseState 2016-08-05 15:07:15 +02:00
Joakim Hove
df9d3c660f Merge pull request #877 from jokva/remove-warnings
Remove warnings
2016-07-14 12:05:21 +02:00