Commit Graph

379 Commits

Author SHA1 Message Date
Bård Skaflestad
326449fe0b Fix Build After "Unused.hpp" Removal
Needed for configurations that don't have Dune-localfunctions or
which *do* have ALUGrid.
2022-08-04 15:12:33 +02:00
Arne Morten Kvarving
d6c378e6a9 remove use of Unused.hpp 2022-08-02 11:24:40 +02:00
Tor Harald Sandve
f513662aa9 Add transflux module and a test that uses it
Compute flux based on transmissibilites. The permeability is assumed to be diagonal and alligned with the local cell
2022-04-07 10:46:31 +02:00
Arne Morten Kvarving
c1f19b7447 disable conservativeness check
the check causes a segfault in release mode only on gcc9+
2021-10-27 09:56:09 +02:00
Arne Morten Kvarving
58dfda3082 adjust to enum changes in upstream 2021-05-05 21:59:50 +02:00
Markus Blatt
580f378e85 Use correct number of template arguments for fracture mode DUNE>2.7
The layout parameter has been deprecated some time ago and now removed
in DUNE > 2.7. This commit fixes its last usage in opm-models makes it
compiler with DUNE master.
2020-08-10 19:31:55 +02:00
Bernd Flemisch
d72de0f308 [cleanup] replace typedef by using 2020-06-10 13:49:42 +02:00
Bernd Flemisch
bdb7bac3e8 [properties] replace remaining macro calls 2020-06-10 13:07:19 +02:00
Bernd Flemisch
b809e9a4f7 [properties] replace SET_STRING_PROP calls
It's not possible to have `constexpr std::string`s in C++17. Taking
`std::string_view` gives conversion errors. Since this is all temporary
and will be replaced by pure runtime parameters anyway, use string
literals for the moment.
2020-06-09 11:15:16 +02:00
Bernd Flemisch
3ba67ebaa8 [properties] replace SET_TAG_PROP calls 2020-06-09 10:55:25 +02:00
Bernd Flemisch
cbffa2a7ba [properties] replace SET_SCALAR_PROP calls 2020-06-09 10:43:28 +02:00
Bernd Flemisch
725c022e69 [properties] replace BEGIN/END_PROPERTIES macro calls 2020-06-08 17:11:48 +02:00
Bernd Flemisch
880c5223ac [properties] replace macro calls by native C++ 2020-06-08 16:41:02 +02:00
Markus Blatt
431d5718e2 Fixed missing conversion ewoms->opm-models in header includes, 2019-10-24 14:19:54 +02:00
Arne Morten Kvarving
88a5e1db06 changed: ewoms/models/richards -> opm/models/richards 2019-09-19 11:08:59 +02:00
Arne Morten Kvarving
f558f5d98b changed: ewoms/models/pvs -> opm/models/pvs 2019-09-19 11:07:52 +02:00
Arne Morten Kvarving
09cdd3aadd changed: ewoms/models/ncp -> opm/models/ncp 2019-09-19 11:03:17 +02:00
Arne Morten Kvarving
d302771e6c changed: ewoms/io -> opm/models/io 2019-09-19 10:59:55 +02:00
Arne Morten Kvarving
9247935c8a changed: ewoms/models/immiscible -> opm/models/immiscible 2019-09-19 10:51:11 +02:00
Arne Morten Kvarving
72b5e42016 changed: ewoms/models/flash -> opm/models/flash 2019-09-19 10:32:32 +02:00
Arne Morten Kvarving
474ae4ded8 changed: ewoms/disc -> opm/models/discretization 2019-09-19 10:28:26 +02:00
Arne Morten Kvarving
f48ae0f7f1 changed: ewoms/models/blackoil -> opm/models/blackoil 2019-09-19 10:19:54 +02:00
Arne Morten Kvarving
e01f712294 changed: ewoms/common -> opm/models/utils 2019-09-19 10:14:17 +02:00
Arne Morten Kvarving
cf9252765c changed: ewoms/linear -> opm/simulators/linalg 2019-09-09 13:12:57 +02:00
Arne Morten Kvarving
799585f9d7 changed: namespace Ewoms -> namespace Opm 2019-09-05 16:21:10 +02:00
Robert Kloefkorn
661577daab [bugfix][dimworld] Fix mixup between Grid::dimension and
Grid::dimensionworld in GlobalPosition and similar.
2019-06-06 13:59:48 +02:00
Andreas Lauser
b77b97e5e6 Newton: Do not fiddle around with the user specified tolerance anymore
As a consquence, the property which sets this tolerance is renamed
from NewtonRawTolerance to NewtonTolerance.
2019-03-02 13:43:08 +01:00
Andreas Lauser
b44b650475 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, there were some pesky warnings in test_ecl_output which I don't
know how to fix:

```
tests/test_ecl_output.cc:218:73: warning: missing initializer for member ‘Opm::data::Connection::effective_Kh’ [-Wmissing-field-initializers]
```
2019-01-09 09:34:26 +01:00
Andreas Lauser
4e888fdfc8 make all header files includeable on their own right again
some property definitions and includes were missing.
2018-10-29 10:05:46 +01:00
Andreas Lauser
f8a817e8f2 implement line breaks in the usage message
i.e. for `--help`. this is surprisingly complicated...
2018-08-16 15:55:51 +02:00
Andreas Lauser
04c3e42b87 adapt to the fluid system naming convention change in opm-material 2018-07-27 12:56:19 +02:00
Andreas Lauser
aed7e15d2e fix extra compiler warnings
this is only relevant people who are masochistic enough to go beyond
`-Wall`. (note that at this warning level, there is plenty of noise from
Dune and other upstream dependencies.)
2018-07-02 09:17:56 +02:00
Andreas Lauser
acc93ff6e7 do explicit put properties into the the Ewoms::Properties namespace anymore
instead, do it implicitly by using the BEGIN_PROPERTIES and
END_PROPERTIES macros.
2018-06-15 20:22:07 +02:00
Andreas Lauser
1be1f15b47 parameter system: add support for positional parameters
further, this cleans up the code of the parameter system and the
startup routines a bit and finally, it adds positional parameters
support to ebos as well as brief descriptions to ebos and the lens
problem.
2018-06-14 11:13:30 +02:00
Andreas Lauser
81bc44ec6d fix the build on the latest dune master
Dune::set_singularity_limit() was removed and the ILU preconditioners
seem to have been refactored. The ILU refactoring included making the
order of the preconditioner a template parameter of the preconditioner
class, i.e., it can no longer be specified at runtime.

Note that the AMG code in the dune master currently produces quite a
few warnings because of the latter point, but as far as I can see,
there is nothing which can be done about this from outside of
dune-istl.
2018-03-12 14:31:36 +01:00
Andreas Lauser
2f4b835a16 rename the "grid manager" to "vanguard"
IMO the term "vanguard" expresses better what these classes are
supposed to do: level the ground for the cavalry. Normally this simply
means to create and distribute a grid object, but it can become quite
a bit more complicated, as exemplified by the vanguard classes of
ebos..
2018-02-08 16:26:58 +01:00
Andreas Lauser
e5344a2add adapt to the move of code from opm-common to opm-material 2018-02-08 12:11:20 +01:00
Andreas Lauser
0406d6780f refactor the boundary condition handling slightly
instead of passing a "minimal" fluid state that defines the
thermodynamic conditions on the domain boundary and the models
calculating everything they need based on this, it is now assumed that
all quantities needed by the code that computes the boundary fluxes
are defined. This simplifies the boundary flux computation code, it
allows to get rid of the `paramCache` argument for these methods and
to potentially speed things up because quantities do not get
re-calculated unconditionally.

on the flipside, this requires slightly more effort to define the
conditions at the boundary on the problem level and it makes it less
obvious which quantities are actually used. That said, one now has the
freedom to shoot oneself into the foot more easily when specifying
boundary conditions and also tools like valgrind or ASAN will normally
complain about undefined quantities if this happens.
2018-01-22 12:21:35 +01:00
Andreas Lauser
4f92ec5865 consistently rename "heat conduction" to "thermal conduction" and use "solid energy" laws
according to wikipedia the term "heat" is the energy transferred due
to a temperature gradient, i.e., it only makes sense if such a
gradient is present and this is not necessary for the storage term.

this means that technically the term "heat conductivity" is
meaningful, but "thermal conductivity" is IMO more consistent.

this has partially already been done in opm-material and eWoms it was
pretty inconsistent, so it also requires a patch in opm-material.
2018-01-04 15:27:02 +01:00
Andreas Lauser
ce6499a39b make the fracture problem compile again
it broke because of the recent refactoring of the energy material laws
in opm-material. The reason why nobody noticed is that this test
requires dune-alugrid to be compiled.
2018-01-03 18:53:03 +01:00
Andreas Lauser
db2977b0bf adapt to the refactoring of the thermal laws in opm-material 2017-12-11 17:39:56 +01:00
Andreas Lauser
aca56a43e3 make all headers self-sufficient again
after the recent changes, some additional headers are required to be
included.
2017-10-03 12:48:21 +02:00
Andreas Lauser
b93a61fd38 make the property system work with multiple compile units
so far, the linker bailed out due to duplicate definitions of
variables if multiple compile units used the same type tag. This is
problematic if the sources are split into separate compile units and
that use the same type tag; in particular, this applies for
traditional libraries.

Due to various C++ peculiarities, this patch complicates the internal
implementation of the property system quite a bit, but given that the
usage of it (as well as the compile time) stay unchanged, I do not
consider this to be a big problem. Note that the introspection code is
particularly problematic because it needs static initializers that do
not cause the linker to choke in the case of multiple compile units.

Finally, to prevent future regressions, this patch adds a unit test
for the lens problem which uses multiple compile units. (This test is
called lens_immiscible_ecfv_ad_mcu and basically identical to the
existing lens_immiscible_ecfv_ad test and I thus think that it is
pretty unimaginative -- improvement proposals are welcome.)
2017-09-03 15:27:35 +02:00
Andreas Lauser
2ff14fb13e remove the Stokes model
there seems to be only a *very* limited amount of interest, the code
of the model is quite complex and there are currently no suitable
discretizations for free-flow equations in eWoms (i.e., the model
tends to be very unstable and oscillates a lot). Combined, all of this
makes maintaining this model a pain in the back, so let's remove it
some interest in these kinds of problems surfaces and until
appropriate discretizations -- like staggered grid methods -- are
available.
2017-07-21 21:38:13 +02:00
Andreas Lauser
a626ab869e make the vertex centered FV method work with automatic differentiation
This works by having a "focus degree of freedom" during
linearization. When evaluating the local residual, all derivatives of
the residual/fluxes are with regard to the primary variables of that
DOF.

The two main offenders were the Forchheimer velocity model and the
model for the Stokes equations. To ensure that they continue to work,
the "powerinjection" and the "stokestest2c" problems are now both
compiled and tested with both, automatic differentiation and finite
differences, and the results of these tests is compared against the
same reference solution.

The majority of the time required to develop this patch was actually
required for testing: All tests compile and pass with debugging and
aggressive optimization flags with at least GCC 5, GCC 7 and clang
3.8, as well as Dune 2.3 and 2.4. Also, the results of flow_ebos stay
identical for Norne whilst the performance difference is below the
measurement noise on my machine. (the version with this patch applied
was actually about 1% faster.)
2017-07-21 18:35:08 +02:00
Andreas Lauser
8a10a4d901 adapt to the move of the valgrind client requests into the Opm namespace 2017-02-09 18:25:44 +01:00
Andreas Lauser
a9f53f9d87 Groundwater problem: use the conjugated gradient solver from dune-istl
the groundwater problem should be symmetric because it uses an
incompressible fluid, is a single phase problem and uses the
immiscible model. (i.e., there should never be a difference between
the upstream and the downstream cells.)

the main purpose of this commit is to have a test that uses a linear
solver wrapper which was generated by the internal
EWOMS_WRAP_ISTL_SOLVER macro.
2017-01-21 21:17:00 +01:00
Andreas Lauser
99304f9689 change the order of OPM_UNUSED and variable name
it seems like some compilers (GCC 4.9.2?) are picky about this and
require

```c++
TypeName VariableName __attribute__ ((__unused__))
```
2017-01-17 13:28:56 +01:00
Andreas Lauser
b1995f7dfb provide access to the prestine linear solvers of dune-istl
... and use the restarted GMRES solver in conjunction with a ILU-2
preconditioner for the water-air unit test.

I do not really recommend using these solvers because BiCGSTAB tends
to be 20% to 30% slower than our home-brewn implementation (this is
because the dune-istl solvers cannot use custom convergence criteria),
but dune-istl offers more choices than just BiCGStab and this
functionallity could be helpful when debugging issues related to
solving the linear systems of equations.

Note that regardless of how pedantic the interpretation of DUNE's
license is, there are no licensing issues with this code because we do
not distribute any files derived from DUNE anymore.
2017-01-02 15:45:41 +01:00
Andreas Lauser
d514667977 remove the modified version of the linear solvers from dune-istl
i.e., the solvers.hh file is removed. The main reason for this is that
it avoids having to distribute a file with a potentially incompatible
license (i.e., GPLv2 + template exception vs GPLv2+), but the
home-brewn bicgstab solver also seems to perform a tiny bit better.
2017-01-02 15:45:41 +01:00