Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update adjoint ewoms code #1

Merged

Conversation

atgeirr
Copy link

@atgeirr atgeirr commented Jan 21, 2019

No description provided.

andlaus and others added 30 commits December 19, 2018 14:07
Add support for the Multz option ALL in PINCH
Add ErrorGuard argument when parsing
since OPM/opm-material#310 has been merged, data for deactivated
phases is not stored anymore and can thus no longer be accessed/set.

this fixes OPM/opm-simulators#1686
ebos: fix explicit initialization for twophase cases
adapt to rename of XYTabulated2DFunction to IntervalTabulated2DFunction
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]
```
fix some masochistic compiler warnings for the GCC 9 pre-release
this calculates the error and convergence differently from the
standard Newton method.
albeit, we scale the error only to the cube root of the pore
volume. the rationale is that the same amount of mass can get lost
"along" a line for each timestep.

maybe it would be a good idea to do something like this for time step
size as well because taking multiple small time steps currently allows
a much larger error in the result than doing it in one big step.
also, tweak them a bit: increase the sum tolerance before scaling to
1e-3 and reduce the default number of strict iterations to 4.
…by a parameter

the parameter is called `EclNewtonSumToleranceExponent`. if it is set
to 1, the specified tolerance will be used directly. (this is not
desireable in the general case though, because at the same result
quality, the sum error for large reservoirs can be larger than for
small ones.)
ebos: introduce an EclNewtonMethod
In particular:
 - "wc -w" will have spaces in the output on BSD,
 - "python" defaults to python 3, so we must explicitly invoke python2.
Make runtest.sh also work on BSD/macOS.
This makes the code compile also when the local Evaluation type is double.
For adjoint backwards run, this logic is wrong. Flow provides its own timesteps
anyway, so disabling it for Flow allows all existing ewoms tests to succeed,
while allowing adjoint runs.
@hnil hnil merged commit a6218ce into hnil:merge_master_rebase_adjoint Jan 21, 2019
hnil pushed a commit that referenced this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants