Commit Graph

167 Commits

Author SHA1 Message Date
Joakim Hove
89ab99e6b9 UDQ: fix bug with parsing of expressions like A - B - C - D
- In the case of several tokens separated with +/- the final tree is assembled
   from left, was previously from the right. This fixes evaluation bug with
   expressions like A - B - C which were eventually evaluated as A - (B - C).

 - Improved handling of different types; both transiton from scalar to sets of
   wells and groups, and also groups in general. In particular you can now
   assign to a group variable:

        DEFINE GUXXX  WOPR * 0.25

 - Actually hook up the evaluation of group variables from the Summary code.
2019-12-17 16:59:06 +01:00
Joakim Hove
af1b140723 Some improvements to runtime type conversion when evaluating UDQ 2019-12-13 23:17:07 +01:00
Joakim Hove
b4fd949ca8 Change exception + test 2019-12-13 15:39:34 +01:00
Joakim Hove
198b208258 Test use of FieldPropsManager in WellConnections 2019-11-29 16:42:29 +01:00
Joakim Hove
e9b6ac54d9 Add PORO keyword to testdata 2019-11-28 20:06:39 +01:00
Joakim Hove
b2d9e92e25 Update test fixture to use correct grid 2019-11-26 21:34:04 +01:00
Bård Skaflestad
2558320aa3 UDQ Unit Test: Don't Create Dangling References
This fixes an issue identified by Address Sanitizer.
2019-10-26 18:18:38 -05:00
Joakim Hove
7e2d45cf66 Export all UDQTokens in use from UDQDefine 2019-10-24 16:51:15 +02:00
Joakim Hove
697545cf54 Use dimensions from ParserKeyword 2019-10-16 21:03:02 +02:00
Jostein Alvestad
202651c34d corrections after complex rebase to write DUDW data to ECL-compatible restart file 2019-10-07 09:54:36 +02:00
Joakim Hove
16a8f4040c Renamed UDQInput -> UDQCOnfig
UDQConfig object has merged DEFINE & ASSIGN

Log use of UDA for output purposes

Output UDQ keywords to restart file

Add size() method to UDQConfig

Add UDQVarTYpe member to UDQInput class

Add UDQIndex type to keep track of sequence number of variable types

Add unit to UDQInput class

use maps

Add operator[] to UDQConfig class

Use UDQInput class when creating restart file

UDQInput: use correct input index

Add UDQActive::get() method

Make sure UDQ DEFINE overwrite correctly

WIP

WIP - further code to output IGPH vector

WIP

Fix IUAD input index

Output use_index for IUAD

Fix bug with size of IUAD array

UAD usage hashing based on udqstring and controltype

Add UDQ test and input file

Refactor UDQActive - handles vanishing UDA

minor correction for iuad[1] and for test_UDQ_x.cpp

Further work for making unit tests for UDQ restart data

WIP Further work unit tests

WIP some minor corrections

WIP changes to add first version of BOOST test for IUDQ

WIP Added code to write InteHead and DoubHead data as well as IGPH to restart file,

Further added unit tests to the writing of UDQ data

add code to output IUAP array

Fixed group-group2 transition, disable Restart output

WIP Initial changes to add DUDW array to restart output

WIP further work on DUDW data

WIP - further work to output and test DUDW vector data to restart file

Further changes to write DUDW array to Restartfile
2019-10-07 09:54:34 +02:00
Joakim Hove
ff69737b99 Add start_time argument to SummaryState 2019-09-19 22:09:15 +02:00
Arne Morten Kvarving
6bbf1fcde2 remove unused UDQParams member in UDQContext 2019-09-18 13:21:00 +02:00
Joakim Hove
c8cd730d5c Refactor UDQActive - handles vanishing UDA 2019-08-12 13:04:47 +02:00
Joakim Hove
44ddd382a3 UAD usage hashing based on udqstring and controltype 2019-08-12 13:04:42 +02:00
Joakim Hove
79da1ba5eb Fix bug with size of IUAD array 2019-08-12 13:04:41 +02:00
Joakim Hove
29c3310671 Fix IUAD input index 2019-08-12 13:04:37 +02:00
Joakim Hove
858e0b84cf Make sure UDQ DEFINE overwrite correctly 2019-08-12 13:04:31 +02:00
Joakim Hove
39346c3b97 Add UDQActive::get() method 2019-08-12 13:04:30 +02:00
Joakim Hove
1a79e811dd Add operator[] to UDQConfig class 2019-08-12 13:04:24 +02:00
Joakim Hove
5e751bb26c Add unit to UDQInput class 2019-08-12 13:04:21 +02:00
Joakim Hove
9e309375b6 Add size() method to UDQConfig 2019-08-12 13:04:17 +02:00
Joakim Hove
1a62ceff7d Log use of UDA for output purposes 2019-08-12 13:04:10 +02:00
Joakim Hove
4d1b747b42 UDQConfig object has merged DEFINE & ASSIGN 2019-08-12 13:04:08 +02:00
Joakim Hove
28c2e7024c Renamed UDQInput -> UDQCOnfig 2019-08-12 13:04:07 +02:00
Joakim Hove
11fe1d6e03 Maintain insert order in UDQINput 2019-07-22 16:07:36 +02:00
Joakim Hove
2fb64e21d9 Add method UDQDefine::input_string() 2019-07-22 16:07:36 +02:00
Joakim Hove
370ce5de1f Removed public tokens() property for UDQDefine 2019-07-22 16:07:36 +02:00
Kai Bao
ca7fe55934 silencing shadowing warnings 2019-06-25 13:16:41 +02:00
Joakim Hove
6bbfd66744 Minor testing of UDQValue 2019-06-23 09:10:39 +02:00
Joakim Hove
3f2eefc638 UDQContext:
- add member const UDQParams&
- add functions has_well_var() and has_group_var()
2019-06-20 11:20:47 +02:00
Joakim Hove
c09bc36c03 UDQSet::eval - make sure to return well node 2019-06-16 08:42:54 +02:00
Joakim Hove
772bd3cee5 UDQ: Ensure that scalar right hand side is accepted into sets 2019-06-14 11:54:12 +02:00
Joakim Hove
edbc9d2af7 UDAValue: add reset() methods 2019-06-12 10:13:01 +02:00
Joakim Hove
44e21101bc UDAValue: the get<double>() method will return SI values 2019-06-12 10:13:01 +02:00
Joakim Hove
54af290cc0 Extend UDQ eval code
With this commit the code to evaluate UDQ values has been extended/refactored in
many ways:

 - There is an increased awarenwss of variable type, i.e. a well related UDQ
   versus a field related UDQ. The variable type flows through the AST, and it
   is verified that the expression to evaluate and the target variable are of
   compatible types.

 - Have added support for UDQ field variables and UDQ group variables.

 - The UDQSet type and the UDQDefine::eval() have been refactored to multiplex
   on all the UDQ types, and the specialized UDQWellSet has been removed.
2019-05-27 16:43:22 +02:00
Joakim Hove
4439882402 UDQ error test - use correct well variablec 2019-05-27 09:44:14 +02:00
Joakim Hove
9e288a9d78 Refactor SummaryState
- Change SummaryState::add() -> SummaryState::update(), the
   SummaryState::update() method is semantically aware of totals.

 - Add an internal variable to the SummaryState class to keep track of the
   elapsed simulation time.
2019-05-13 11:06:32 +02:00
Joakim Hove
b148769cc6 Internalize UDA values in the deck 2019-04-28 16:08:02 +02:00
Joakim Hove
656878d649 Add class UDAValue to hold UDA values from the Deck 2019-04-28 16:08:02 +02:00
Joakim Hove
bd0c0f6356 Internalize UDQ tokens in the UDQ define keyword 2019-04-08 15:12:15 +02:00
Joakim Hove
c9821faddc Changed UDQDefine to take UDQParams argument 2019-03-14 12:40:57 +01:00
Joakim Hove
066dca43ba UDQ Parsing - rest 2019-03-14 12:40:57 +01:00
Joakim Hove
16c9d7d04d UDQFunctionTable: const arg + default constructor 2019-03-14 09:28:26 +01:00
Joakim Hove
118f4dd3de Update eval_udq() in Summary 2019-03-14 09:28:26 +01:00
Joakim Hove
25d7e99413 Add UDQInput methods has_keyword() and has_unit() 2019-03-09 10:19:03 +01:00
Joakim Hove
ccba767b24 Add utility constructors and testing to UDQWellSet 2019-03-07 11:35:55 +01:00
Joakim Hove
585447fd22 Move UDQ action enum to UDQEnums 2019-03-07 11:35:55 +01:00
Joakim Hove
03a2bbdf80 Add UDQ / parsing test with '/' in data item 2019-03-05 07:15:29 +01:00
Joakim Hove
a91d47f191 Add name property to UDQSet 2019-02-25 11:15:12 +01:00
Joakim Hove
7425f8b988 Implement UDQ functions 2019-02-25 08:37:04 +01:00
Joakim Hove
945438b210 Add rng to UDQParams 2019-02-25 08:36:33 +01:00
Joakim Hove
b5542c4e56 Add UDQEnum type for the different variable types 2019-02-21 13:36:08 +01:00
Joakim Hove
40bd7b86b0 Renamed UDQ -> UDQInput 2019-02-21 13:36:08 +01:00
Joakim Hove
732c5ae4d2 Add class UDQAssign 2019-02-20 18:21:23 +01:00
Joakim Hove
999b06b0eb Add dervied class UDQWellSet : UDQSet 2019-02-20 18:21:23 +01:00
Joakim Hove
e27933270a Change UDQExpression() constructor to take enum 2019-02-20 18:21:23 +01:00
Joakim Hove
946d1cb877 Add subdirectory Schedule/UDQ/ 2019-02-18 08:58:20 +01:00
Joakim Hove
a1b8303ac3 Add class UDQSet() to hold UDQ values 2019-02-18 08:58:20 +01:00
Joakim Hove
3d4b467a2f Add UDQContext class to be used while evaluating UDQ keywords 2019-02-08 06:34:05 +01:00
Joakim Hove
42d08db25b Add UDQ configuration as DynamicState<> to schedule 2019-02-02 17:09:44 +01:00
Arne Morten Kvarving
4e00897117 changed: add some harmless comparisons to test
to avoid unused variable compiler warnings
2019-01-31 10:26:48 +01:00
Joakim Hove
27eaeb2ec9 Renamed UDQConfig -> UDQParams 2019-01-28 16:53:01 +01:00
Joakim Hove
2cd6fa2f49 Add overloads without ParseContext and ErrorGuard - update all tests 2019-01-04 13:59:28 +01:00
Joakim Hove
da8424e1e8 Add UDQ container class 2018-04-05 17:45:30 +02:00
Joakim Hove
8176c5a826 Add UDQExpression class - for one UDQ record 2018-04-05 17:45:30 +02:00
Joakim Hove
4a7410d412 Add UDQConfig object. 2018-04-05 17:42:23 +02:00