Commit Graph

843 Commits

Author SHA1 Message Date
Arne Morten Kvarving
51bf76a061 mark unused parameters as OPM_UNUSED 2019-06-26 10:55:33 +02:00
Atgeirr Flø Rasmussen
02f7359570 Merge pull request #343 from akva2/janitoring
quell unhandled value in switch warning
2019-06-19 10:06:48 +02:00
Arne Morten Kvarving
cd6eb3cc38 quell unhandled value in switch warning 2019-06-19 08:48:46 +02:00
Andreas Lauser
961ddcbd37 Merge pull request #342 from atgeirr/enable-onefase
Enable onephase
2019-06-18 17:34:03 +02:00
hnil
f2711be107 Small changes to try to make onephase work 2019-06-18 14:47:59 +02:00
Atgeirr Flø Rasmussen
6cfd9b5740 Merge pull request #340 from andlaus/unify_eval_creation
unify the creation of evalutions
2019-06-14 09:16:29 +02:00
Atgeirr Flø Rasmussen
609c88e4d4 Merge pull request #339 from GitPaean/creating_zero_one_constant
adding createConstantOne and createConstantZero to Evaluations
2019-06-13 14:41:15 +02:00
Andreas Lauser
819ee5bbf2 Evaluation code generator: add a missing OPM_UNUSED
thanks to [at]GitPaean for the catch!
2019-06-12 15:10:17 +02:00
Andreas Lauser
663a5bcc2b Merge pull request #2 from GitPaean/andlaus-unify_eval_creation
fixing the compilation problem related to DenseAD
2019-06-12 15:01:51 +02:00
Kai Bao
292e84ec08 fixing the compilation problem related to DenseAD 2019-06-12 14:53:54 +02:00
Andreas Lauser
3b933ae42a unify the creation of evalutions
to create a constant, there are now always the three functions

Opm::constant<Eval>(value);
Opm::constant<Eval>(numDeriv, value);
Opm::constant<Eval>(x, value); // with 'x' being the 'template' of the returned value

If a given call does not make sense, an exception is thrown:

- Plain floating point objects like `float`, `double` or `quad`
  complain if the specified number of derivatives is not zero.
- Statically sized evaluations throw if the specified number of
  derivatives of passed to the function is not equal to their static
  size.
- Dynamically sized evaluations complain if the number of derivatives
  cannot be determined.

The third variant of `Opm::constant()` works unconditionally. The
`Opm::variable()` helpers are modified analogously.
2019-06-12 11:50:37 +02:00
Kai Bao
0c005595c4 adding createConstantOne and createConstantZero to Evaluations 2019-06-11 09:48:44 +02:00
Andreas Lauser
d5df7ab935 Merge pull request #337 from totto82/log10
Add log10 AD function
2019-06-03 13:45:33 +02:00
Tor Harald Sandve
a62ea4b0f1 Add log10 AD function 2019-06-03 11:22:42 +02:00
Tor Harald Sandve
c1d66b3699 Merge pull request #332 from andlaus/fix_max_oil_sat
black oil PVT: make the maximum oil saturation a evaluation
2019-05-07 10:19:38 +02:00
Andreas Lauser
14351c5794 black oil PVT: make the maximum oil saturation a evaluation
the maximum oil saturation *can* depend on the most current solution,
so it needs to include derivatives. Note that this fix should not
change the converged solution, only the convergence behaviour, i.e.,
if changes in the results are encountered, these are likely only
numerical noise.
2019-05-03 14:30:30 +02:00
Andreas Lauser
438653d0b5 UniformXTabulated2DFunction: minor cleanups 2019-05-03 14:30:30 +02:00
Atgeirr Flø Rasmussen
77c963167f Merge pull request #328 from atgeirr/interpolation_2d_miscibility_fix
Interpolation 2d miscibility fix
2019-04-02 08:20:02 +02:00
Atgeirr Flø Rasmussen
f8d11efe82 Added explanatory comments about the use of 'shift'. 2019-04-01 14:08:18 +02:00
Atgeirr Flø Rasmussen
322c6fb0ff Address review issues. 2019-03-29 11:48:35 +01:00
Andreas Lauser
e51ea63933 Merge pull request #330 from andlaus/maintainance
add missing <vector> include
2019-03-26 15:51:07 +01:00
Andreas Lauser
523ee1007a add missing <vector> include 2019-03-26 13:10:18 +01:00
Atgeirr Flø Rasmussen
215af283e2 Stop interpolating between unsaturated/saturated regions.
This is possible since the new interpolation ensures continuity
up to the boundary between the regions.
2019-03-22 14:18:48 +01:00
hnil
5399d72477 Change 2D interpolation of live oil and wet gas.
Interpolation is now done parallel to the saturated/unsaturated boundary lines,
instead of axis-aligned.
2019-03-22 14:08:28 +01:00
Andreas Lauser
3b9c8e190f Merge pull request #327 from GitPaean/improving_dynamic_evaluation
Improving dynamic evaluation
2019-03-22 10:00:13 +01:00
Kai Bao
6fe8e1c74f adding a few more tests for DynamicEvaluation in test_densead 2019-03-22 08:51:16 +01:00
Kai Bao
a1396bb237 Doxygen documents for FastSmallVector 2019-03-21 21:56:28 +01:00
Kai Bao
0ce7a779da updating genEvalSpecializations.py 2019-03-21 13:16:49 +01:00
Kai Bao
bf4bf1aa1f adding staticSize to the template parameters for Evaluation and DynamicEvaluation 2019-03-21 11:51:45 +01:00
Kai Bao
36905ccefc Merge pull request #1 from andlaus/fix_FastSmallVector
clean up the new FastSmallVector class
2019-03-20 12:58:24 +01:00
Andreas Lauser
1e7d566a93 clean up the new FastSmallVector class
also, this fixes some potential memory leaks if vectors of different
sizes are assigned and it fixes the assignment-to-self (`x = x`) case.
2019-03-20 12:41:57 +01:00
Kai Bao
a8f5501e15 update genEvalSpecializations.py 2019-03-15 14:16:14 +01:00
Kai Bao
e4d23d201e making DynamicEvaluation using FastSmallVector 2019-03-15 13:38:07 +01:00
Kai Bao
c633e70f81 adding FastSmallVector to be used by DynamicEvaluation 2019-03-15 13:23:33 +01:00
Andreas Lauser
1ca8ab813c Merge pull request #325 from andlaus/BlackOilIndexTraits
BlackOilFluidSystem: make it easy to change the indices of phases and components
2019-03-11 14:47:33 +01:00
Andreas Lauser
e72b27fd8b BlackOilFluidSystem: make it easy to change the indices of phases and components
this is done by introducing an "IndexTraits" template parameter to the
BlackOilFluidSystem class which only specifies
`{oil,gas,water}{Phase,Comp}Idx`. By default, nothing which faces user
code changes.
2019-03-11 13:48:37 +01:00
Andreas Lauser
3fa1adc514 Merge pull request #323 from totto82/fix_visct
Fix issues with temperature dependent viscosity
2019-01-29 12:19:14 +01:00
Tor Harald Sandve
99e2d4c2ec Fix issues with temperature dependent viscosity 2019-01-29 11:12:38 +01:00
Arne Morten Kvarving
f4f6164831 Merge pull request #322 from andlaus/add_jenkins_pre-build_hook
add a pre build check to ensure that the Evaluation code is identical with the one produced by the code generator
2019-01-21 14:23:05 +01:00
Andreas Lauser
0d3e38e1a1 pre-build.sh: print a message for the non-error case as well.
thanks to [at]akva2 for the suggestion.
2019-01-17 14:06:09 +01:00
Andreas Lauser
d07d3cf5eb add a pre build check to ensure that the Evaluation code is identical with the one produced by the code generator 2019-01-09 14:29:58 +01:00
Tor Harald Sandve
26c607b086 Merge pull request #321 from andlaus/fix_masochistic_warnings
fix some masochistic compiler warnings for the GCC 9 pre-release
2019-01-09 12:16:16 +01:00
Andreas Lauser
7c104e82d6 fix some masochistic compiler warnings for the GCC 9 pre-release
the flags which I used are
```
-pedantic \
-Wall \
-Wextra \
-Wformat-nonliteral \
-Wcast-align
-Wpointer-arith \
-Wmissing-declarations \
-Wcast-qual \
-Wshadow
-Wwrite-strings \
-Wchar-subscripts \
-Wredundant-decls \
-fstrict-overflow \
-O3 \
-march=native \
-DNDEBUG=1
```

note that some heavy filtering is not the worst idea because DUNE is
far from not emiting any warnings with these flags.

also, if quadruple precision math is enabled, GCC complains that a
non-standard floating point signifier suffix is used in quad.hpp. As
far as I can see there's nothing that can be done about that.
2019-01-09 09:35:08 +01:00
Andreas Lauser
f4330e9771 Merge pull request #319 from andlaus/fix_style_issues
Fix coding style issues and rename XYTabulated2DFunction
2019-01-08 13:34:06 +01:00
Joakim Hove
556e2bbf92 Merge pull request #320 from joakim-hove/error-guard
Do not create ParseContext in tests
2019-01-08 07:48:04 +01:00
Joakim Hove
d4332da83e Do not create ParseContext in tests 2019-01-07 12:23:11 +01:00
Andreas Lauser
7c1bda6df1 rename XYTabulated2DFunction to IntervalTabulated2DFunction
... because every 2D function depends on two variables which are
usually called X and Y. The name of that class is still clunky,
suggestions are appreciated.

(also, UniformXTabulated2DFunction is a bad name. I also take
suggestions for that.)
2018-12-20 13:38:03 +01:00
Andreas Lauser
7a4c6546b4 fix some coding style isses in new class XYTabulated2DFunction and its test 2018-12-20 13:38:03 +01:00
Andreas Lauser
20b6068a87 Merge pull request #318 from GitPaean/fixing_gen_eval_python
fixing genEvalSpecializations.py instead of editing Evaluationn directly
2018-12-18 13:21:19 +01:00
Kai Bao
120410e468 fixing genEvalSpecializations.py instead of editing Evaluationn directly 2018-12-18 11:51:00 +01:00