Commit Graph

914 Commits

Author SHA1 Message Date
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
Atgeirr Flø Rasmussen
c8aab83a62 Merge pull request #317 from GitPaean/adding_2D_cartisian_grid
Adding regular 2d cartesian interpolation for the injectivity simulation.
2018-12-11 12:56:28 +01:00
Kai Bao
17264e0873 addressing reviewing comments from PR#137 2018-12-11 10:58:49 +01:00
Kai Bao
25e01bd962 removing the duplicate code in XYTabulated2DFunction 2018-12-11 10:33:52 +01:00
Atgeirr Flø Rasmussen
b20c692b32 Merge pull request #316 from totto82/fix_swatinit
Avoid division by very small numbers when computing the swatinit scaling
2018-12-07 18:46:07 +01:00
Tor Harald Sandve
fa8ac7a891 Avoid division by very small numbers when computing the swatinit scaling
Fix unphysical capillary pressure scaling
2018-12-07 11:09:32 +01:00
Kai Bao
9bf6d01acc adding a test for XYTabulated2DFunction 2018-12-06 13:19:04 +01:00
Kai Bao
889ff8f0a5 some cleaning up of XYTabulated2DFunction 2018-12-03 10:30:27 +01:00
Kai Bao
bbfafad2da various fixes to make DynamicEvaluation work with simulations 2018-11-30 15:34:26 +01:00
Kai Bao
6c20ecad14 adding table XYTabulated2DFunction 2018-11-30 15:34:26 +01:00
Andreas Lauser
b3afa00d08 Merge pull request #312 from totto82/passCanonicalPhaseIdx
Pass canonical phaseIdx to setXXX() methods in fluidsystem
2018-10-29 18:45:46 +01:00
Tor Harald Sandve
e1105cbf0a Pass canonical phaseIdx to setXXX() methods in fluidsystem 2018-10-29 13:01:03 +01:00
Andreas Lauser
7c1d52346b Merge pull request #311 from andlaus/stylistic_BlackOilFluidState_cleanups
some minor coding style cleanups for BlackOilFluidState
2018-10-19 15:17:38 +02:00
Andreas Lauser
656d98721c some minor coding style cleanups for BlackOilFluidState
OPM/opm-material#310 introduced a few minor coding style
inconsistencies. this patch fixes them; none of its changes are
supposed to alter anything functionality-wise.
2018-10-19 14:15:01 +02:00
Tor Harald Sandve
ef5154951a BlackOilFluidState: Only store active phases in the two phase case 2018-10-18 12:41:29 +02:00
Andreas Lauser
20630fa856 Merge pull request #305 from andlaus/fix_gcc8_warnings
fix some GCC 8 warnings
2018-09-20 18:05:25 +02:00
Andreas Lauser
555bf7ad75 fix some GCC 8 warnings
the warnings about catching a polymorphic type by value. I agree that
this should not be done.
2018-09-18 14:03:53 +02:00
Bård Skaflestad
c765b21917 Merge pull request #304 from andlaus/remove_FluidSystems_namespace
remove the Opm::FluidSystems namespace
2018-07-27 21:05:11 +02:00
Andreas Lauser
6cb7df3541 remove the Opm::FluidSystems namespace
this has mildly annoyed me for quite some time, and finally managed to
bring myself to changing it: The Opm::FluidSystems namespace is pretty
useless because the number of classes contained within it is quite
small and mismatch between the naming convention of the file names the
actual classes is somewhat confusing IMO. Thus, this patch changes the
naming of fluid systems from `Opm::FluidSystems::Foo` to
`Opm::FooFluidSystem`.

(also, flat hierarchies currently seem to be popular with the cool
people!?)

this patch requires some simple mop-ups for `ewoms` and `opm-simulators`.
2018-07-27 12:57:09 +02:00
Atgeirr Flø Rasmussen
70e6fcb190 Merge pull request #303 from andlaus/fix_extra_warnings
Fix extra warnings
2018-07-05 14:29:52 +02:00
Andreas Lauser
e1f33492c8 EclMaterialLawManager: actually use the imbibition number array passed as argument
for some reason, the version of 311c1a6 that was merged did still use
the compressed cell index as the logically Cartesian one. I blame it
on the constant back-and-forth debugging when making that patch.
2018-07-05 12:50:54 +02:00
Andreas Lauser
8cde35ef7b MathToolbox: fix unused argument warning 2018-07-05 12:50:54 +02:00
Andreas Lauser
de6c6e8cfa Evaluation: update generated code 2018-07-05 12:50:54 +02:00
Andreas Lauser
b91f198747 update Evaluation-code generator to get rid of a few warnings in the generated code
these warnings require -Wextra or above but do not occur with -Wall.
2018-07-05 12:50:54 +02:00
Kai Bao
5c1ddaefab Merge pull request #302 from andlaus/dynamic_evaluation
Dynamically sized evaluations
2018-06-28 19:42:45 +02:00
Andreas Lauser
f316b0699e add an Opm::blank(Evaluation) function
this creates an uninitialized "compatible" evaluation that is
compatible with its argument. For primitive floating point types and
statically-sized Evaluations, this is identical to calling the default
constructor, for dynamically sized ones, it creates an uninitialized
Evaluation object of identical size as the argument.

thanks to [at]GitPaen for the heads up.
2018-06-28 17:27:48 +02:00
Andreas Lauser
328efa793c add dynamic evaluations to the unit test for dense-AD
this requires a medium-sized refactoring of the test.
2018-06-28 17:27:48 +02:00
Andreas Lauser
7b12d493d7 make the "shrubbery" of dense-AD aware of dynamic evaluations
i.e., adapt the math routines.
2018-06-28 17:27:48 +02:00
Andreas Lauser
362965c198 update the generated source files 2018-06-28 17:27:48 +02:00
Andreas Lauser
fec2428c3e evaluation code gen: add a dynamically-sized variant of evaluation
this works by passing -1 as the template argument for the number of
derivatives. most of the code is identical, but creation of such
objects requires the number of derivatives passed to the constructor
or the copy constructor must be used.

Finally `DynamicEvaluation<Scalar>` is provided as a more expressive
alias for `Evaluation<Scalar, -1>`.
2018-06-28 17:27:47 +02:00