Commit Graph

52 Commits

Author SHA1 Message Date
Arne Morten Kvarving
62a49dceb1 add serialization template to InitConfig 2020-03-16 12:59:20 +01:00
Arne Morten Kvarving
3362831db4 remove accessor in FoamConfig added for external serialization 2020-03-16 12:59:20 +01:00
Arne Morten Kvarving
044b82459f add serialization template to FoamConfig 2020-03-16 12:59:20 +01:00
Arne Morten Kvarving
d569225cc8 add serialization template to FoamData 2020-03-16 12:59:20 +01:00
Arne Morten Kvarving
70b8fe0899 remove accessor in Equil added for external serialization 2020-03-16 12:59:20 +01:00
Arne Morten Kvarving
44e9dc1a7c add serialization template to Equil 2020-03-16 12:59:20 +01:00
Arne Morten Kvarving
18a263f3bc add serialization template to EquilRecord 2020-03-16 12:59:20 +01:00
Arne Morten Kvarving
ef1e6d5fd8 Revert "added: PolymerConfig class"
This reverts commit a984ca5beb.
2020-03-05 14:17:51 +01:00
Arne Morten Kvarving
b53bd27a08 Merge pull request #1535 from akva2/add_polymerconfig
added: PolymerConfig class
2020-03-05 13:02:57 +01:00
Arne Morten Kvarving
a984ca5beb added: PolymerConfig class 2020-03-05 11:54:22 +01:00
Arne Morten Kvarving
c8ff9503a2 fixed: update FoamConfig defaults
Foam cases should run without FOAMOPTS available. That means
we need to default the mobility model to a valid value.

This also adds enum value 'FUNC' and handles setting the default model
if only transport phase is unspecified.
2020-03-05 09:13:03 +01:00
Arne Morten Kvarving
26bd5fd4a0 changed: don't enforce foam model limits in parser 2020-03-04 10:53:20 +01:00
Arne Morten Kvarving
448ea5f3ab added: gravity flag to InitConfig 2020-01-22 12:47:39 +01:00
Arne Morten Kvarving
b4066d40f5 allow constructing InitConfig from tables
also add accessors and equality operator
2019-12-17 12:46:27 +01:00
Arne Morten Kvarving
d13b9a0a15 allow constructing FoamConfig from tables
also add accessors and equality operator
2019-12-17 12:46:27 +01:00
Arne Morten Kvarving
b56cef3103 allow constructing FoamData from doubles
also add accessors and equality operator
2019-12-17 11:04:12 +01:00
Arne Morten Kvarving
0741f4c099 allow constructing Equil from tables
also add accessors and equality operator
2019-12-17 10:31:23 +01:00
Arne Morten Kvarving
d532f861ac add equality operator and a default constructor to EquilRecord 2019-12-17 10:31:23 +01:00
Joakim Hove
9c96588f36 Changed EquilRecord to take SI values instead of DeckRecord 2019-09-23 21:44:59 +02:00
Atgeirr Flø Rasmussen
c3dcedc392 Allow FOAM without FOAMFSC
This is necessary to support the table-based gas mobility reduction model.
In order to extend support to the function-based model the FOAMFSC-related
things have been kept.
2019-07-04 12:57:43 +02:00
Atgeirr Flø Rasmussen
522db6d093 Address issues from review. 2019-07-02 16:58:04 +02:00
Atgeirr Flø Rasmussen
33783b1e9f Add FOAMROCK including FoamConfig support and test. 2019-07-02 13:55:42 +02:00
Atgeirr Flø Rasmussen
17a2e5d334 Address review comments.
- Use a raw literal.
 - Use 'index', not 'id'.
 - Use FoamConfig(const Deck&) constructor.
2019-07-02 10:43:13 +02:00
Atgeirr Flø Rasmussen
7245598952 Include cstddef for std::size_t. 2019-07-01 15:29:21 +02:00
Atgeirr Flø Rasmussen
62a3b7334d Add FoamConfig to InitConfig. 2019-07-01 14:40:37 +02:00
Atgeirr Flø Rasmussen
34d1918a2d Add copyright notice to new files. 2019-07-01 10:49:33 +02:00
Atgeirr Flø Rasmussen
39f8eb18c7 Change class name Foam -> FoamConfig. 2019-07-01 10:47:48 +02:00
Franz G. Fuchs
4baff64d63 implemented faom config 2019-06-28 12:37:04 +02:00
Franz G. Fuchs
a68db0a857 update 2019-06-28 09:44:33 +02:00
Franz G. Fuchs
563c6317d4 udpate 2019-06-28 09:43:20 +02:00
Bård Skaflestad
ffecc035c0 InitConfig: Internalize FILLEPS Keyword
This commit extends the InitConfig class to support querying whether
or not the FILLEPS keyword is present in the PROPS section.  Note
that we only look for the keyword in PROPS (not the whole input
deck), since the keyword is only permitted in PROPS.

Add unit tests to exercise the new ability.
2019-06-24 14:15:55 +02:00
CDN MacbookPro13
12402916a7 See #https://github.com/OPM/opm-common/issues/474. header files should be self-sufficient 2018-08-25 12:50:58 +05:30
Andrea Brambilla
8620ad485a Added missing include in Equil.hpp
When running test in opm-parser, this never showed up as a problem since
Equil.hpp seems to be always included after <vector> is included (either
directly or by including other files). However, this can become a
problem when using opm-parser in other projects (eg, sunbeam)
2017-11-06 15:13:26 +01:00
Arne Morten Kvarving
18f15e7432 mark constructors as explicit 2017-06-09 17:38:42 +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
Jørgen Kvalsvik
066aba3f38 Ignore SKIPREST
The SKIPREST keyword is really only needed in eclipse - since we parse
through the entire deck and create a complete internal representation
with random access, we don't need to actually skip parts of the input.

The old behaviour was to mimic some possible failure modes for eclipse,
however this has caused issues for no real benefit.

refs:
* https://github.com/OPM/opm-parser/issues/773
* https://github.com/OPM/opm-parser/issues/960
2016-11-02 13:55:05 +01: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
f5a1630dc0 Make InitConfig no longer use shared_ptr 2016-10-19 20:38:28 +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
Pål Grønås Drange
3a3ec10649 moved initialization of primary's to header, fixed rebase 2016-05-03 13:22:57 +02:00
Pål Grønås Drange
63e452167c Introduce deckptr-less EclipseState and EclipseGrid 2016-05-03 13:22:56 +02:00
Joakim Hove
25ef8781c9 Added ability to set restart parameters. 2016-04-28 16:03:29 +02:00
Joakim Hove
fb8c39a8c4 Using compile time constants. 2016-04-25 15:37:46 +02:00
Joakim Hove
d097f95601 Will ignore SKIPREST keyword. 2016-04-25 15:37:46 +02:00
Liu Ming
a4a449538d rename ParseMode as ParseContext in EclipseState folder. 2016-03-16 17:15:09 +08:00
Jørgen Kvalsvik
5c02c60035 Introducing InitConfig/Equil
Introduces Equil, a thin storage class for 'EQUIL' derived information,
accessible through EclipseState.

Previously this was handled through "raw" deck access, provided by
EquilWrapper. The interface for Equil has been derived from the
EquilWrapper, but they're to be seen as different entities altogether.
More importantly, Equil is owned by EclipseState, not some stand-alone
Deck reading unit.
2016-03-01 08:44:38 +01:00
Jørgen Kvalsvik
f0ae5db131 opm-parser adoption of Deck automatic ownership
Since the Deck* family of classes have changed their interfaces to no
longer use shared_ptr, a lot of code broke. This patch fixes all
problems in tests, other signatures and accesses to now use the new Deck
interfaces.
2016-02-18 13:27:24 +01:00
Jørgen Kvalsvik
4b98943665 Replaces unecessary header includes with fwd decls
Every header is self-contained and includes only what it must to
function, relying on users include what they need in source files,
adopting a pay-what-you-use model (in particular for internal
dependencies).
2016-01-26 13:23:22 +01:00
Jørgen Kvalsvik
f404828d63 Cleans up headers to improve build preformance
This is an effort to improve build performance.  Several includes
scattered across the project are either unused or partially used (i.e.
just used to import a type name, not depending on the actual contents of
the header file).

Replaces a lot of these includes with forward declarations.
2016-01-21 09:22:06 +01:00
Joakim Hove
5e64d0f147 Added parser error for 'random text'.
Previously random text in the input deck which was not formatted as a
valid keyword header was simply ignored; i.e. this

   DIMENS
     10 10 10 /

   Mohaha random gibbersih - not according to any Spec.

   GRID

Would suprisingly parse just fine. This will now be handled according
to the ParseMode::randomText setting. Observe that as a side effect of
this it turned out that many of the test datasets had additional
terminating slashes which were now detected as 'ranomdText'.
2015-08-05 22:02:10 +02:00