Compare commits

...

10 Commits

Author SHA1 Message Date
Arne Morten Kvarving
0aadd9c44e update redhat packaging 2015-04-27 10:16:08 +02:00
Arne Morten Kvarving
648e4f1ccb fix tests
- cannot use BOOST_CHECK_CLOSE around 0 due to a relative test
- slacken a tolerance significantly
2015-04-27 10:15:48 +02:00
Atgeirr Flø Rasmussen
df74688aad Merge pull request #795 from akva2/update_packaging_versions
bump versions for release
2015-04-27 09:45:50 +02:00
Arne Morten Kvarving
c7d547d4f2 bump versions for release 2015-04-24 14:47:50 +02:00
Atgeirr Flø Rasmussen
dedccd9644 Adjust parameters after testing. 2015-04-22 14:53:35 +02:00
Atgeirr Flø Rasmussen
ba467184cc Modify default parameters to be suitable for the Norne case. 2015-04-22 14:53:16 +02:00
Atgeirr Flø Rasmussen
a295108664 New method SimulatorReport::reportFullyImplicit().
It does not make sense to report transport and pressure separately
for fully implicit solvers. It still makes sense to separate solver
from init and output though.
2015-04-22 14:52:54 +02:00
Atgeirr Flø Rasmussen
81bcd2033c Silence PLT complaint spam.
While the warning is correct, it is not a good idea to spam
it for all wells and timesteps.
2015-04-22 14:52:38 +02:00
Atgeirr Flø Rasmussen
7afffb6a38 Merge branch 'master' into release/2015.04 2015-04-15 14:54:50 +02:00
Atgeirr Flø Rasmussen
d933582269 Bump version number. 2015-04-13 13:52:34 +02:00
10 changed files with 88 additions and 53 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
opm-core (2015.04-1~precise) precise; urgency=medium
* Release new version
-- Arne Morten Kvarving <arne.morten.kvarving@sintef.no> Fri, 24 Apr 2015 14:47:35 +0200
opm-core (2013.10-2~precise) precise; urgency=low
* New release

View File

@ -1,7 +1,7 @@
Module: opm-core
Description: Open Porous Media Initiative Core Library
# if you change this, make sure to also change opm/core/version.h
Version: 1.1
Label: 2013.10
Version: 2.0
Label: 2015.04
Maintainer: atgeirr@sintef.no
Depends: dune-common (>= 2.2) dune-istl (>= 2.2) opm-parser

View File

@ -68,9 +68,11 @@ namespace EclipseWriterDetails {
swat,
sgas);
if (well->getPLTActive(simulatorTimer.currentStepNum())) {
std::cerr << "PLT not supported, writing RFT data" << std::endl;
}
// TODO: replace this silenced warning with an appropriate
// use of the OpmLog facilities.
// if (well->getPLTActive(simulatorTimer.currentStepNum())) {
// std::cerr << "PLT not supported, writing RFT data" << std::endl;
// }
rft_nodes.push_back(ecl_node);
}

View File

@ -39,9 +39,9 @@ namespace Opm {
, growth_factor_( param.getDefault("solver.growthfactor", double(1.25) ) )
// default is 1 year, convert to seconds
, max_time_step_( unit::convert::from(param.getDefault("timestep.max_timestep_in_days", 365.0 ), unit::day) )
, solver_restart_max_( param.getDefault("solver.restart", int(3) ) )
, solver_verbose_( param.getDefault("solver.verbose", bool(false) ) )
, timestep_verbose_( param.getDefault("timestep.verbose", bool(false) ) )
, solver_restart_max_( param.getDefault("solver.restart", int(10) ) )
, solver_verbose_( param.getDefault("solver.verbose", bool(true) ) )
, timestep_verbose_( param.getDefault("timestep.verbose", bool(true) ) )
, last_timestep_( -1.0 )
{
// valid are "pid" and "pid+iteration"

View File

@ -50,6 +50,16 @@ namespace Opm
<< "\n Overall Linear Iterations: " << total_linear_iterations
<< std::endl;
}
void SimulatorReport::reportFullyImplicit(std::ostream& os)
{
os << "Total time taken (seconds): " << total_time
<< "\nSolver time (seconds): " << pressure_time
<< "\nOverall Newton Iterations: " << total_newton_iterations
<< "\nOverall Linear Iterations: " << total_linear_iterations
<< std::endl;
}
void SimulatorReport::reportParam(std::ostream& os)
{
os << "/timing/total_time=" << total_time

View File

@ -41,6 +41,8 @@ namespace Opm
void operator+=(const SimulatorReport& sr);
/// Print a report to the given stream.
void report(std::ostream& os);
/// Print a report, leaving out the transport time.
void reportFullyImplicit(std::ostream& os);
void reportParam(std::ostream& os);
};

View File

@ -6,6 +6,6 @@ extern const char* const opm_core_version;
/**
* Current API level (for use with DUNE_VERSION_xxx):
*/
#define OPM_CORE_VERSION_MAJOR 1
#define OPM_CORE_VERSION_MINOR 1
#define OPM_CORE_VERSION_MAJOR 2
#define OPM_CORE_VERSION_MINOR 0
#define OPM_CORE_VERSION_REVISION 0

View File

@ -2,10 +2,10 @@
# spec file for package opm-core
#
%define tag rc3
%define tag final
Name: opm-core
Version: 2013.10
Version: 2015.04
Release: 0
Summary: Open Porous Media - core library
License: GPL-3.0
@ -15,10 +15,9 @@ Source0: https://github.com/OPM/%{name}/archive/release/%{version}/%{tag}
BuildRequires: blas-devel lapack-devel dune-common-devel
BuildRequires: git suitesparse-devel cmake28 doxygen bc
BuildRequires: tinyxml-devel dune-istl-devel ert.ecl-devel
BuildRequires: opm-parser-devel boost148-devel
%{?el5:BuildRequires: gcc44 gcc44-c++}
%{!?el5:BuildRequires: gcc gcc-c++}
%{?el5:BuildRequires: boost141-devel}
%{!?el5:BuildRequires: boost-devel}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: libopm-core1 = %{version}
@ -81,7 +80,7 @@ This package contains the debug symbols for opm-core
# consider using -DUSE_VERSIONED_DIR=ON if backporting
%build
cmake28 -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTRIP_DEBUGGING_SYMBOLS=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DUSE_RUNPATH=OFF %{?el5:-DCMAKE_CXX_COMPILER=g++44 -DCMAKE_C_COMPILER=gcc44 -DBOOST_LIBRARYDIR=%{_libdir}/boost141 -DBOOST_INCLUDEDIR=/usr/include/boost141}
cmake28 -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTRIP_DEBUGGING_SYMBOLS=ON -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DUSE_RUNPATH=OFF %{?el5:-DCMAKE_CXX_COMPILER=g++44 -DCMAKE_C_COMPILER=gcc44 -DCMAKE_Fortran_COMPILER=gfortran44} -DBOOST_LIBRARYDIR=%{_libdir}/boost148 -DBOOST_INCLUDEDIR=/usr/include/boost148
make
%install

View File

@ -44,6 +44,14 @@
#include <string>
#include <vector>
#define CHECK(value, expected, reltol) \
{ \
if (std::fabs((expected)) < 1.e-14) \
BOOST_CHECK_SMALL((value), (reltol)); \
else \
BOOST_CHECK_CLOSE((value), (expected), (reltol)); \
}
BOOST_AUTO_TEST_SUITE ()
BOOST_AUTO_TEST_CASE (PhasePressure)
@ -443,7 +451,7 @@ BOOST_AUTO_TEST_CASE (DeckWithCapillary)
for (int phase = 0; phase < 3; ++phase) {
BOOST_REQUIRE(sats[phase].size() == s[phase].size());
for (size_t i = 0; i < s[phase].size(); ++i) {
BOOST_CHECK_CLOSE(sats[phase][i], s[phase][i], reltol);
CHECK(sats[phase][i], s[phase][i], reltol);
}
}
}
@ -504,8 +512,8 @@ BOOST_AUTO_TEST_CASE (DeckWithCapillaryOverlap)
BOOST_REQUIRE(sats[phase].size() == s_opm[phase].size());
for (size_t i = 0; i < s_opm[phase].size(); ++i) {
//std::cout << std::setprecision(10) << sats[phase][i] << '\n';
BOOST_CHECK_CLOSE(sats[phase][i], s_ecl[phase][i], reltol_ecl);
BOOST_CHECK_CLOSE(sats[phase][i], s_opm[phase][i], reltol);
CHECK(sats[phase][i], s_ecl[phase][i], reltol_ecl);
CHECK(sats[phase][i], s_opm[phase][i], reltol);
}
}
}
@ -565,8 +573,8 @@ BOOST_AUTO_TEST_CASE (DeckWithLiveOil)
BOOST_REQUIRE(sats[phase].size() == s_opm[phase].size());
for (size_t i = 0; i < s_opm[phase].size(); ++i) {
//std::cout << std::setprecision(10) << sats[phase][i] << '\n';
BOOST_CHECK_CLOSE(sats[phase][i], s_opm[phase][i], reltol);
BOOST_CHECK_CLOSE(sats[phase][i], s_ecl[phase][i], reltol_ecl);
CHECK(sats[phase][i], s_opm[phase][i], reltol);
CHECK(sats[phase][i], s_ecl[phase][i], reltol_ecl);
}
std::cout << std::endl;
}
@ -610,7 +618,7 @@ BOOST_AUTO_TEST_CASE (DeckWithLiveGas)
// but the answer we are checking is the result of an ODE
// solver, and it is unclear if we should check it against
// the true answer or something else.
const double reltol = 1.0e-6;
const double reltol = 5.0e-3;
const double reltol_ecl = 1.0;
BOOST_CHECK_CLOSE(pressures[0][first], 1.48215e+07, reltol_ecl); // eclipse
BOOST_CHECK_CLOSE(pressures[0][last], 1.54801e+07, reltol_ecl);
@ -645,8 +653,8 @@ BOOST_AUTO_TEST_CASE (DeckWithLiveGas)
BOOST_REQUIRE(sats[phase].size() == s_opm[phase].size());
for (size_t i = 0; i < s_opm[phase].size(); ++i) {
//std::cout << std::setprecision(10) << sats[phase][i] << '\n';
BOOST_CHECK_CLOSE(sats[phase][i], s_opm[phase][i], 100.*reltol);
BOOST_CHECK_CLOSE(sats[phase][i], s_ecl[phase][i], reltol_ecl);
CHECK(sats[phase][i], s_opm[phase][i], 100.*reltol);
CHECK(sats[phase][i], s_ecl[phase][i], reltol_ecl);
}
std::cout << std::endl;
}
@ -668,8 +676,8 @@ BOOST_AUTO_TEST_CASE (DeckWithLiveGas)
for (size_t i = 0; i < rv_opm.size(); ++i) {
//std::cout << std::setprecision(10) << sats[phase][i] << '\n';
BOOST_CHECK_CLOSE(rv[i], rv_opm[i], 100.*reltol);
BOOST_CHECK_CLOSE(rv[i], rv_ecl[i], reltol_ecl);
CHECK(rv[i], rv_opm[i], 100.*reltol);
CHECK(rv[i], rv_ecl[i], reltol_ecl);
}
}
@ -728,8 +736,8 @@ BOOST_AUTO_TEST_CASE (DeckWithRSVDAndRVVD)
BOOST_REQUIRE(sats[phase].size() == s_opm[phase].size());
for (size_t i = 0; i < s_opm[phase].size(); ++i) {
//std::cout << std::setprecision(10) << sats[phase][i] << '\n';
BOOST_CHECK_CLOSE(sats[phase][i], s_opm[phase][i], 100.*reltol);
BOOST_CHECK_CLOSE(sats[phase][i], s_ecl[phase][i], reltol_ecl);
CHECK(sats[phase][i], s_opm[phase][i], 100.*reltol);
CHECK(sats[phase][i], s_ecl[phase][i], reltol_ecl);
}
std::cout << std::endl;
}

View File

@ -44,6 +44,14 @@
#include <string>
#include <vector>
#define CHECK(value, expected, reltol) \
{ \
if (std::fabs((expected)) < 1.e-14) \
BOOST_CHECK_SMALL((value), (reltol)); \
else \
BOOST_CHECK_CLOSE((value), (expected), (reltol)); \
}
BOOST_AUTO_TEST_SUITE ()
BOOST_AUTO_TEST_CASE (GwsegStandard)
@ -96,11 +104,11 @@ BOOST_AUTO_TEST_CASE (GwsegStandard)
const double reltol = 1.0e-6;
for (int i=0; i<n; ++i) {
BOOST_CHECK_CLOSE(kr[i*np+wpos], krw[i], reltol);
BOOST_CHECK_CLOSE(kr[i*np+opos], kro[i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+wpos], DkrwDsw[i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+opos], DkroDsw[i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+np*gpos+opos], DkroDsg[i], reltol);
CHECK(kr[i*np+wpos], krw[i], reltol);
CHECK(kr[i*np+opos], kro[i], reltol);
CHECK(dkrds[i*np*np+wpos], DkrwDsw[i], reltol);
CHECK(dkrds[i*np*np+opos], DkroDsw[i], reltol);
CHECK(dkrds[i*np*np+np*gpos+opos], DkroDsg[i], reltol);
}
/*
@ -177,14 +185,14 @@ BOOST_AUTO_TEST_CASE (GwsegEPSBase)
double DkrwDsw[11] = {0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0};
double DkroDsw[11] = {-2.0, -2.0, -2.0, -2.0, -1.0, -1.0, -1.0, -1.0, 0.0, 0.0, 0.0};
double DkroDsg[11] = {-5.0, -5.0, -3.0, -2.0,-0.66666666666666741, -0.75, -0.8, -0.83333333333333237, 0.14285714285714296, 0.0, 0.0};
const double reltol = 1.0e-6;
for (int i=0; i<n; ++i) {
BOOST_CHECK_CLOSE(kr[i*np+wpos], krw[i], reltol);
BOOST_CHECK_CLOSE(kr[i*np+opos], kro[i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+wpos], DkrwDsw[i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+opos], DkroDsw[i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+np*gpos+opos], DkroDsg[i], reltol);
CHECK(kr[i*np+wpos], krw[i], reltol);
CHECK(kr[i*np+opos], kro[i], reltol);
CHECK(dkrds[i*np*np+wpos], DkrwDsw[i], reltol);
CHECK(dkrds[i*np*np+opos], DkroDsw[i], reltol);
CHECK(dkrds[i*np*np+np*gpos+opos], DkroDsg[i], reltol);
}
/*
@ -303,11 +311,11 @@ BOOST_AUTO_TEST_CASE (GwsegEPS_A)
const double reltol = 1.0e-3;
for (int i=0; i<n; ++i) {
BOOST_CHECK_CLOSE(kr[i*np+wpos], krw[icell][i], reltol);
BOOST_CHECK_CLOSE(kr[i*np+opos], kro[icell][i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+wpos], DkrwDsw[icell][i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+opos], DkroDsw[icell][i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+np*gpos+opos], DkroDsg[icell][i], reltol);
CHECK(kr[i*np+wpos], krw[icell][i], reltol);
CHECK(kr[i*np+opos], kro[icell][i], reltol);
CHECK(dkrds[i*np*np+wpos], DkrwDsw[icell][i], reltol);
CHECK(dkrds[i*np*np+opos], DkroDsw[icell][i], reltol);
CHECK(dkrds[i*np*np+np*gpos+opos], DkroDsg[icell][i], reltol);
}
/*
@ -549,11 +557,11 @@ BOOST_AUTO_TEST_CASE (GwsegEPS_C)
const double reltol = 1.0e-3;
for (int i=0; i<n; ++i) {
BOOST_CHECK_CLOSE(kr[i*np+wpos], krw[icell][i], reltol);
BOOST_CHECK_CLOSE(kr[i*np+opos], kro[icell][i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+wpos], DkrwDsw[icell][i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+opos], DkroDsw[icell][i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+np*gpos+opos], DkroDsg[icell][i], reltol);
CHECK(kr[i*np+wpos], krw[icell][i], reltol);
CHECK(kr[i*np+opos], kro[icell][i], reltol);
CHECK(dkrds[i*np*np+wpos], DkrwDsw[icell][i], reltol);
CHECK(dkrds[i*np*np+opos], DkroDsw[icell][i], reltol);
CHECK(dkrds[i*np*np+np*gpos+opos], DkroDsg[icell][i], reltol);
}
}
@ -610,11 +618,11 @@ BOOST_AUTO_TEST_CASE (GwsegEPS_D)
const double reltol = 1.0e-6;
for (int i=0; i<n; ++i) {
BOOST_CHECK_CLOSE(kr[i*np+wpos], krw[i], reltol);
BOOST_CHECK_CLOSE(kr[i*np+opos], kro[i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+wpos], DkrwDsw[i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+opos], DkroDsw[i], reltol);
BOOST_CHECK_CLOSE(dkrds[i*np*np+np*gpos+opos], DkroDsg[i], reltol);
CHECK(kr[i*np+wpos], krw[i], reltol);
CHECK(kr[i*np+opos], kro[i], reltol);
CHECK(dkrds[i*np*np+wpos], DkrwDsw[i], reltol);
CHECK(dkrds[i*np*np+opos], DkroDsw[i], reltol);
CHECK(dkrds[i*np*np+np*gpos+opos], DkroDsg[i], reltol);
}
/*