Commit Graph

13 Commits

Author SHA1 Message Date
Jørgen Kvalsvik
d928f53a52 Use getCellDepth; hoist size() in numApply 2016-08-08 11:56:40 +02:00
Joakim Hove
5cf9932b1d Refactored Eclipse3DProperties
- Moved the handling of keywords from Eclipse3DProperties to
   GridProperties<T>.

 - The GridProperty<T> postprocessor is invoked from
   GridProperties<T>::getKeyword() method. The question of whether the
   postprocessor should be invoked or not is determined by the
   overload:

     public:
       const GridProperty<T>& getKeyword(const std::string) const;

     private:
       GridProperty<T>& getKeyword(const std::string);

   The public const overload will run the postprocessor, whereas the
   non-const private overload should (will) be used in the construction
   phase and should not invoke the post processor.

 - The two pass passing where we first internalize integer keywords and
   then floating point keywords has been removed.

 - Code in GridProperties has mainly been moved to GridProperties.cpp
   with explicit instantiation for int and double.
2016-05-24 09:50:15 +02:00
Jørgen Kvalsvik
0889c8c286 Bind parameters individually to init/post hooks
With the inflexible GridProperty*Function replaced with std::function,
bind parameters individually to each property, indicating exactly what
dependencies any function has.
2016-04-27 11:51:45 +02:00
Jørgen Kvalsvik
0a5c7c85f8 Fix off-by-one error in satfuncinit.
Reported by Bård Skaflestad in
https://github.com/OPM/opm-parser/issues/774.
2016-04-25 08:37:48 +02:00
Atgeirr Flø Rasmussen
e313378e23 Silence unused function parameter warnings. 2016-04-13 13:05:01 +02:00
Pål Grønås Drange
e48b64c41d Substantial edits to Eclipse3DProperties
* Removed all references to state, need to fix initPORV
* Made TransMult return raw pointer const GridProperty over shared pointer.
* Moved getDirectionProperty and hasDirectionProperty out of API
** Removed tests as these methods are no longer public
* Moved grid properties stuff to new class
* Removed use of deck in SatfuncInitializers, moved to TableManager
* Removed shared_ptr for several members of EclipseState and 3DProperties
* Moved region-property from EclipseState to Eclipse3DProperties
* Moved initGridopts from EclipseState to Eclipse3DProperties
* Made several Eclipse3DProperties methods private
* Postprocessors take raw pointers, not shared_ptr---these will be phased out
* Fixed return reference instead of copy several places
** GridProperties<T> in Eclipse3DProperties are now references, not shared_ptr
** Eclipse3DProperties takes const Deck&, not shared_ptr
* Removed obsolete tests
2016-04-12 14:42:18 +02:00
Atgeirr Flø Rasmussen
edfe69f639 Add missing include directives. 2016-03-29 21:21:43 +02:00
Jørgen Kvalsvik
ff1ad83f08 Split GridPropertyFunction into Init+Post
The assumptions and interface for these two functions are distinct. Init
does not have to take a preallocated vector, but post processing
requires an input vector. Splits the two and changes their signatures.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
3e222f58d7 findVerticalPoints split up
Most users of the findVerticalPoints function didn't use more than one
of the vectors returned. By splitting them up into seperate functions,
we only have to compute what we'll use.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
7bf13fbb61 findCritical split up
Most users of the findCritical function didn't use more than one of the
vectors returned. By splitting them up into seperate functions, we only
have to compute what we'll use.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
9798b4667a findSaturationEndpoints split up
Most users of the findSaturationEndpoints function didn't use more than
one of the four vectors returned. By splitting them up into seperate
functions, we only have to compute what we'll use.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
34bfba42d3 Replace initializer classes, refactor PropertyInit
In an effort to make GridPropertyInitializer and
SatfuncPropertyInitializer functionality more maintainble, the
shared-ptr-to-base-class model has been replaced by a specialised
function object and free functions. This means:

* GridPropertyBaseInitializer and everything derived from it is gone
* All SatfuncPropertyInitializer code has been heavily rewritten to
  emphasise dependencies. Now behaves like proper functions.
* EclipseState intialisation code is somewhat simpler
* Code is more declarative. In particular, some maybe unintended
  behaviour has been discovered and described.
2016-03-01 08:46:23 +01:00
Jørgen Kvalsvik
80f3abe1c6 Move SatfuncInitializers to source file
Since the template-parameterised base header was moved to a source file,
there is no longer any reason for this to be header-only. Split into
source.
2016-03-01 08:46:23 +01:00