mirror of
https://github.com/OPM/opm-upscaling.git
synced 2026-08-27 05:27:10 -05:00
Merge branch 'master' of https://github.com/OPM/opm-upscaling
This commit is contained in:
+13
-7
@@ -41,14 +41,8 @@ set (${project}_DEPS
|
||||
opm-porsol REQUIRED"
|
||||
)
|
||||
|
||||
# C++ project
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
project (${${project}_NAME})
|
||||
enable_language (C)
|
||||
enable_language (CXX)
|
||||
|
||||
# additional search modules
|
||||
set (${project}_MODULE_DIR "${PROJECT_SOURCE_DIR}/cmake/Modules")
|
||||
set (${project}_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
|
||||
list (APPEND CMAKE_MODULE_PATH ${${project}_MODULE_DIR})
|
||||
|
||||
# include special
|
||||
@@ -62,6 +56,16 @@ if (CMAKE_VERSION VERSION_LESS "2.8.7")
|
||||
list (APPEND CMAKE_MODULE_PATH "${${project}_MODULE_DIR}/compat-2.8.7")
|
||||
endif (CMAKE_VERSION VERSION_LESS "2.8.7")
|
||||
|
||||
# don't write default flags into the cache, preserve that for user set values
|
||||
include (AddOptions)
|
||||
no_default_options ()
|
||||
|
||||
# C++ project
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
project (${${project}_NAME})
|
||||
enable_language (C)
|
||||
enable_language (CXX)
|
||||
|
||||
# print system information to better pinpoint issues from log alone
|
||||
include (UseSystemInfo)
|
||||
system_info ()
|
||||
@@ -181,6 +185,8 @@ opm_compile_satellites (${project} examples "" "")
|
||||
enable_testing ()
|
||||
include (CTest)
|
||||
|
||||
include (TestUpscalingBinaries)
|
||||
|
||||
# make datafiles necessary for tests available in output directory
|
||||
opm_data (tests datafiles "${tests_DIR}")
|
||||
opm_compile_satellites (${project} tests "" "${tests_REGEXP}")
|
||||
|
||||
@@ -42,6 +42,16 @@ list (APPEND TEST_SOURCE_FILES
|
||||
# originally generated with the command:
|
||||
# find tests -name '*.xml' -a ! -wholename '*/not-unit/*' -printf '\t%p\n' | sort
|
||||
list (APPEND TEST_DATA_FILES
|
||||
tests/input_data/grids/PeriodicTilted.grdecl
|
||||
tests/input_data/grids/27cellsAniso.grdecl
|
||||
tests/input_data/grids/27cellsIso.grdecl
|
||||
tests/input_data/grids/EightCells.grdecl
|
||||
tests/input_data/grids/Hummocky.grdecl
|
||||
tests/input_data/reference_solutions/upscale_perm_BCp_PeriodicTilted.txt
|
||||
tests/input_data/reference_solutions/upscale_perm_BCflp_27cellsAniso.txt
|
||||
tests/input_data/reference_solutions/upscale_perm_BCflp_27cellsIso.txt
|
||||
tests/input_data/reference_solutions/upscale_perm_BCfl_EightCells.txt
|
||||
tests/input_data/reference_solutions/upscale_perm_BCflp_Hummocky.txt
|
||||
)
|
||||
|
||||
# originally generated with the command:
|
||||
@@ -62,6 +72,7 @@ list (APPEND EXAMPLE_SOURCE_FILES
|
||||
examples/upscale_relpermvisc.cpp
|
||||
examples/upscale_singlephase.cpp
|
||||
examples/upscale_steadystate_implicit.cpp
|
||||
tests/compare_upscaling_results.cpp
|
||||
)
|
||||
|
||||
# programs listed here will not only be compiled, but also marked for
|
||||
|
||||
@@ -59,3 +59,24 @@ function (add_options langs builds)
|
||||
endforeach (build)
|
||||
endforeach (lang)
|
||||
endfunction (add_options lang build)
|
||||
|
||||
# set varname to flag unless user has specified something that matches regex
|
||||
function (set_default_option varname flag regex)
|
||||
if (NOT "$ENV{CXXFLAGS}" MATCHES "${regex}"
|
||||
AND NOT "${CMAKE_CXX_FLAGS}" MATCHES "${regex}"
|
||||
AND NOT "${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}" MATCHES "${regex}")
|
||||
set (${varname} ${flag} PARENT_SCOPE)
|
||||
else (NOT "$ENV{CXXFLAGS}" MATCHES "${regex}"
|
||||
AND NOT "${CMAKE_CXX_FLAGS}" MATCHES "${regex}"
|
||||
AND NOT "${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}" MATCHES "${regex}")
|
||||
set (${varname} PARENT_SCOPE)
|
||||
endif (NOT "$ENV{CXXFLAGS}" MATCHES "${regex}"
|
||||
AND NOT "${CMAKE_CXX_FLAGS}" MATCHES "${regex}"
|
||||
AND NOT "${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}" MATCHES "${regex}")
|
||||
endfunction (set_default_option)
|
||||
|
||||
# note: this must be called before project()
|
||||
macro (no_default_options)
|
||||
# prevent the platform probe to set options
|
||||
set (CMAKE_NOT_USING_CONFIG_FLAGS TRUE)
|
||||
endmacro (no_default_options)
|
||||
|
||||
@@ -21,7 +21,7 @@ find_opm_package (
|
||||
dune-istl REQUIRED;
|
||||
opm-core REQUIRED;
|
||||
dune-cornerpoint REQUIRED;
|
||||
opm-porsol REQUIRED;
|
||||
opm-porsol REQUIRED
|
||||
"
|
||||
# header to search for
|
||||
"opm/upscaling/SinglePhaseUpscaler.hpp"
|
||||
|
||||
@@ -1,11 +1,27 @@
|
||||
# - Default settings for the build
|
||||
|
||||
include (UseCompVer)
|
||||
include(TestCXXAcceptsFlag)
|
||||
|
||||
macro (opm_defaults opm)
|
||||
# build debug by default
|
||||
# if we are installing a development version (default when checking out of
|
||||
# VCS), then remember which directories were used when configuring. package
|
||||
# distribution should disable this option.
|
||||
option (USE_RUNPATH "Embed original dependency paths in installed library" ON)
|
||||
if (USE_RUNPATH)
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
check_cxx_accepts_flag ("-Wl,--enable-new-dtags" HAVE_RUNPATH)
|
||||
if (HAVE_RUNPATH)
|
||||
list (APPEND ${opm}_LINKER_FLAGS "-Wl,--enable-new-dtags")
|
||||
endif (HAVE_RUNPATH)
|
||||
endif (CMAKE_COMPILER_IS_GNUCXX)
|
||||
# set this to avoid CMake stripping it off again
|
||||
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
endif (USE_RUNPATH)
|
||||
|
||||
# build release by default
|
||||
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
||||
set (CMAKE_BUILD_TYPE "Debug")
|
||||
set (CMAKE_BUILD_TYPE "Release")
|
||||
endif (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
# default to building a static library, but let user override
|
||||
|
||||
@@ -199,9 +199,13 @@ macro (find_opm_package module deps header lib defs prog conf)
|
||||
set (_deps)
|
||||
foreach (_dep IN ITEMS ${deps})
|
||||
separate_arguments (_args UNIX_COMMAND ${_dep})
|
||||
find_and_append_package_to (${module} ${_args} ${${module}_QUIET})
|
||||
list (GET _args 0 _name_only)
|
||||
list (APPEND _deps ${_name_only})
|
||||
if (_args)
|
||||
find_and_append_package_to (${module} ${_args} ${${module}_QUIET})
|
||||
list (GET _args 0 _name_only)
|
||||
list (APPEND _deps ${_name_only})
|
||||
else (_args)
|
||||
message (WARNING "Empty dependency in find module for ${module} (check for trailing semi-colon)")
|
||||
endif (_args)
|
||||
endforeach (_dep)
|
||||
|
||||
# since find_and_append_package_to is a macro, this variable have
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
# Add tests to check if the upscaling binaries calculates correctly
|
||||
#
|
||||
# Tests are added in two steps (see already added tests below for examples):
|
||||
#
|
||||
# 1) Add test that runs the binary and output results to a file:
|
||||
# add_test(<testname> <command>)
|
||||
# <command> refers to the command used to run the binary with input variables in a terminal
|
||||
#
|
||||
# 2) Add test that compares the output from the previous test:
|
||||
# add_test(<testname> ${PROJECT_BINARY_DIR}/bin/compare_upscaling_results <path_to_refSoln> <path_to_newSoln>
|
||||
# ${tol} <number_of_result_rows> <number_of_result_cols>)
|
||||
# This test should depend on the first test, so include:
|
||||
# set_tests_properties(<test1> PROPERTIES DEPENDS <test2>)
|
||||
#
|
||||
# Some naming conventions:
|
||||
# The first test should be named: run_<binary_name>_<options>_<model_name>
|
||||
# The second test: compare_<binary_name>_<options>_<model_name>
|
||||
#
|
||||
# Test models and reference solutions are available in ${PROJECT_BINARY_DIR}/tests/input_data.
|
||||
# New test data can be made available in the build tree by including them in CMakeLists_files.cmake,
|
||||
# under 'APPEND TEST_SOURCE_FILES'.
|
||||
|
||||
|
||||
# Set absolute tolerance to be used for testing
|
||||
set(tol 1e-2)
|
||||
|
||||
# Define some paths
|
||||
set(RESULT_PATH ${PROJECT_BINARY_DIR}/tests/results/)
|
||||
set(INPUT_DATA_PATH ${PROJECT_BINARY_DIR}/tests/input_data/)
|
||||
|
||||
# Create directory to store upscaling results in
|
||||
file(MAKE_DIRECTORY ${RESULT_PATH})
|
||||
|
||||
|
||||
###########################################################################
|
||||
# TEST: upscale_perm
|
||||
###########################################################################
|
||||
|
||||
# Define macro that performs the two steps mentioned above for upscale_perm
|
||||
# Input:
|
||||
# - gridname: basename (no extension) of grid model
|
||||
# - bcs: Boundary condition type (f, l or p, or combinations of these)
|
||||
# - rows: Number of rows in result file that is to be compared
|
||||
# This macro assumes that ${gridname}.grdecl is found in directory ${INPUT_DATA_PATH}grids/
|
||||
# and that upscale_perm_BC${bcs}_${gridname}.txt is found in ${INPUT_DATA_PATH}reference_solutions
|
||||
macro (add_test_upscale_perm gridname bcs rows)
|
||||
# Add test that runs upscale_perm and outputs the results to file
|
||||
add_test(run_upscale_perm_BC${bcs}_${gridname}
|
||||
${PROJECT_BINARY_DIR}/bin/upscale_perm
|
||||
-bc ${bcs}
|
||||
-output ${RESULT_PATH}upscale_perm_BC${bcs}_${gridname}.txt
|
||||
${INPUT_DATA_PATH}grids/${gridname}.grdecl)
|
||||
# Add test that compare the results from the previous test with a reference solution
|
||||
add_test(compare_upscale_perm_BC${bcs}_${gridname}
|
||||
${PROJECT_BINARY_DIR}/bin/compare_upscaling_results
|
||||
${INPUT_DATA_PATH}reference_solutions/upscale_perm_BC${bcs}_${gridname}.txt
|
||||
${RESULT_PATH}upscale_perm_BC${bcs}_${gridname}.txt
|
||||
${tol}
|
||||
${rows} 3)
|
||||
# Set dependency of the two tests
|
||||
set_tests_properties(compare_upscale_perm_BC${bcs}_${gridname} PROPERTIES DEPENDS
|
||||
run_upscale_perm_BC${bcs}_${gridname})
|
||||
endmacro (add_test_upscale_perm gridname bcs)
|
||||
|
||||
# Add tests for different models
|
||||
add_test_upscale_perm(PeriodicTilted p 3)
|
||||
add_test_upscale_perm(27cellsAniso flp 9)
|
||||
add_test_upscale_perm(27cellsIso flp 9)
|
||||
add_test_upscale_perm(EightCells fl 6)
|
||||
add_test_upscale_perm(Hummocky flp 9)
|
||||
@@ -13,11 +13,16 @@ include (AddOptions)
|
||||
|
||||
# only debugging using the GNU toolchain is supported for now
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
# default debug level, if not specified by the user
|
||||
set_default_option (_dbg_flag "-ggdb3" "(^|\ )-g")
|
||||
|
||||
# add debug symbols to *all* targets, regardless. there WILL come a
|
||||
# time when you need to find a bug which only manifests itself in a
|
||||
# release target on a production system!
|
||||
message (STATUS "Generating debug symbols: -ggdb3")
|
||||
add_options (ALL_LANGUAGES ALL_BUILDS "-ggdb3")
|
||||
if (_dbg_flag)
|
||||
message (STATUS "Generating debug symbols: ${_dbg_flag}")
|
||||
add_options (ALL_LANGUAGES ALL_BUILDS "${_dbg_flag}")
|
||||
endif (_dbg_flag)
|
||||
|
||||
# extracting the debug info is done by a separate utility in the GNU
|
||||
# toolchain. check that this is actually installed.
|
||||
|
||||
@@ -3,25 +3,26 @@
|
||||
include(TestCXXAcceptsFlag)
|
||||
include (AddOptions)
|
||||
|
||||
# mapping from profile name (in CMAKE_BUILD_TYPE) to variable part
|
||||
set (_prof_DEBUG "Debug")
|
||||
set (_prof_RELEASE "Release;RelWithDebInfo;MinSizeRel")
|
||||
|
||||
# if we are building a debug target, then disable all optimizations
|
||||
# otherwise, turn them on. indicate to the code what we have done
|
||||
# so it can turn on assertions etc.
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
# use these options for debug builds - no optimizations
|
||||
add_options (
|
||||
ALL_LANGUAGES
|
||||
"Debug"
|
||||
"-O0" "-DDEBUG"
|
||||
)
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
# extra flags passed for optimization
|
||||
set (_opt_flags "")
|
||||
|
||||
# link-time (a.k.a. global) optimizations
|
||||
check_cxx_accepts_flag ("-flto" HAVE_LINK_OPTS)
|
||||
if (HAVE_LINK_OPTS)
|
||||
list (APPEND _opt_flags "-flto")
|
||||
endif (HAVE_LINK_OPTS)
|
||||
option (WHOLE_PROG_OPTIM "Whole program optimization (lto)" ON)
|
||||
if (WHOLE_PROG_OPTIM)
|
||||
check_cxx_accepts_flag ("-flto" HAVE_LINK_OPTS)
|
||||
if (HAVE_LINK_OPTS)
|
||||
list (APPEND _opt_flags "-flto")
|
||||
endif (HAVE_LINK_OPTS)
|
||||
endif (WHOLE_PROG_OPTIM)
|
||||
|
||||
# native instruction set tuning
|
||||
option (WITH_NATIVE "Use native instruction set" ON)
|
||||
@@ -32,10 +33,29 @@ if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
endif (HAVE_MTUNE)
|
||||
endif (WITH_NATIVE)
|
||||
|
||||
# default optimization flags, if not set by user
|
||||
set_default_option (_opt_dbg "-O0" "(^|\ )-O")
|
||||
set_default_option (_opt_rel "-O3" "(^|\ )-O")
|
||||
|
||||
# use these options for debug builds - no optimizations
|
||||
add_options (ALL_LANGUAGES "${_prof_DEBUG}" ${_opt_dbg} "-DDEBUG")
|
||||
|
||||
# use these options for release builds - full optimization
|
||||
add_options (
|
||||
ALL_LANGUAGES
|
||||
"Release;RelWithDebInfo;MinSizeRel"
|
||||
"-O3" "-DNDEBUG" ${_opt_flags}
|
||||
)
|
||||
add_options (ALL_LANGUAGES "${_prof_RELEASE}" ${_opt_rel} "-DNDEBUG" ${_opt_flags})
|
||||
|
||||
else (CMAKE_COMPILER_IS_GNUCXX)
|
||||
# default information from system
|
||||
foreach (lang IN ITEMS C CXX Fortran)
|
||||
if (lang STREQUAL "Fortran")
|
||||
set (_lang F)
|
||||
else (lang STREQUAL "Fortran")
|
||||
set (_lang ${lang})
|
||||
endif (lang STREQUAL "Fortran")
|
||||
foreach (profile IN ITEMS DEBUG RELEASE)
|
||||
if (NOT CMAKE_${lang}_FLAGS_${profile})
|
||||
add_options (${lang} "${_prof_${profile}}"
|
||||
"$ENV{${_lang}FLAGS} ${CMAKE_${lang}_FLAGS_${profile}_INIT}")
|
||||
endif (NOT CMAKE_${lang}_FLAGS_${profile})
|
||||
endforeach (profile)
|
||||
endforeach (lang)
|
||||
endif (CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
@@ -8,6 +8,9 @@ function (system_info)
|
||||
else (CMAKE_SYSTEM MATCHES "Linux")
|
||||
message (STATUS "Operating system: ${CMAKE_SYSTEM}")
|
||||
endif (CMAKE_SYSTEM MATCHES "Linux")
|
||||
|
||||
target_architecture (TARGET_CPU)
|
||||
message (STATUS "Target architecture: ${TARGET_CPU}")
|
||||
endfunction (system_info)
|
||||
|
||||
# probe various system files that may be found
|
||||
@@ -15,6 +18,7 @@ function (distro_name varname)
|
||||
file (GLOB has_os_release /etc/os-release)
|
||||
file (GLOB has_lsb_release /etc/lsb-release)
|
||||
file (GLOB has_sys_release /etc/system-release)
|
||||
set (_descr)
|
||||
# start with /etc/os-release,
|
||||
# see <http://0pointer.de/blog/projects/os-release.html>
|
||||
if (NOT has_os_release STREQUAL "")
|
||||
@@ -22,13 +26,16 @@ function (distro_name varname)
|
||||
# previous "standard", used on older Ubuntu and Debian
|
||||
elseif (NOT has_lsb_release STREQUAL "")
|
||||
read_release (DISTRIB_DESCRIPTION FROM /etc/lsb-release INTO _descr)
|
||||
# RHEL/CentOS etc. has just a text-file
|
||||
elseif (NOT has_sys_release STREQUAL "")
|
||||
file (READ /etc/system-release _descr)
|
||||
else (NOT has_lsb_release STREQUAL "")
|
||||
# no yet known release file found
|
||||
set (_descr "unknown")
|
||||
endif (NOT has_os_release STREQUAL "")
|
||||
# RHEL/CentOS etc. has just a text-file
|
||||
if (NOT _descr)
|
||||
if (NOT has_sys_release STREQUAL "")
|
||||
file (READ /etc/system-release _descr)
|
||||
else (NOT has_sys_release STREQUAL "")
|
||||
# no yet known release file found
|
||||
set (_descr "unknown")
|
||||
endif (NOT has_sys_release STREQUAL "")
|
||||
endif (NOT _descr)
|
||||
# return from function (into appropriate variable)
|
||||
string (STRIP "${_descr}" _descr)
|
||||
set (${varname} "${_descr}" PARENT_SCOPE)
|
||||
@@ -40,7 +47,7 @@ function (read_release valuename FROM filename INTO varname)
|
||||
REGEX "^${valuename}="
|
||||
)
|
||||
string (REGEX REPLACE
|
||||
"^${valuename}=\"?\(.*\)" "\\1" ${varname} ${_distrib}
|
||||
"^${valuename}=\"?\(.*\)" "\\1" ${varname} "${_distrib}"
|
||||
)
|
||||
# remove trailing quote that got globbed by the wildcard (greedy match)
|
||||
string (REGEX REPLACE
|
||||
@@ -48,3 +55,120 @@ function (read_release valuename FROM filename INTO varname)
|
||||
)
|
||||
set (${varname} "${${varname}}" PARENT_SCOPE)
|
||||
endfunction (read_release valuename FROM filename INTO varname)
|
||||
|
||||
# the following code is adapted from commit f7467762 of the code at
|
||||
# <https://github.com/petroules/solar-cmake/blob/master/TargetArch.cmake>
|
||||
# which is Copyright (c) 2012 Petroules Corporation, and which at the
|
||||
# time of download (2013-04-07 12:30 CET) is made available with a BSD license.
|
||||
#
|
||||
# it attempts to compile a program which detects the architecture from the
|
||||
# preprocessor symbols and communicate this back to us through an error message(!)
|
||||
function (target_architecture output_var)
|
||||
# OS X is capable of building for *several* architectures at once in
|
||||
# the Mach-O binary, and there is a variable that tells us which those
|
||||
# are, but they may be in any order, so they must be normalized
|
||||
if (APPLE AND CMAKE_OSX_ARCHITECTURES)
|
||||
# detect each of the possible candidates as a separate flag
|
||||
set (osx_arch_list i386 x86_64)
|
||||
foreach (osx_arch IN ITEMS ${CMAKE_OSX_ARCHITECTURES})
|
||||
foreach (candidate IN LISTS osx_arch_list)
|
||||
if ("${osx_arch}" STREQUAL "${candidate}")
|
||||
set (osx_arch_${candidate} TRUE)
|
||||
endif ("${osx_arch}" STREQUAL "${candidate}")
|
||||
endforeach (candidate)
|
||||
endforeach (osx_arch)
|
||||
|
||||
# add all architectures back in normalized order
|
||||
foreach (candidate IN LISTS osx_arch_list)
|
||||
if (osx_arch_${candidate})
|
||||
list (APPEND ARCH ${candidate})
|
||||
endif (osx_arch_${candidate})
|
||||
endforeach (candidate)
|
||||
|
||||
else (APPLE AND CMAKE_OSX_ARCHITECTURES)
|
||||
# use the preprocessor defines to determine which target architectures
|
||||
# that are available
|
||||
set (arch_c_src "
|
||||
#if defined(__arm__) || defined(__TARGET_ARCH_ARM)
|
||||
# if defined(__ARM_ARCH_7__) \\
|
||||
|| defined(__ARM_ARCH_7A__) \\
|
||||
|| defined(__ARM_ARCH_7R__) \\
|
||||
|| defined(__ARM_ARCH_7M__) \\
|
||||
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7)
|
||||
# error cmake_ARCH armv7
|
||||
# elif defined(__ARM_ARCH_6__) \\
|
||||
|| defined(__ARM_ARCH_6J__) \\
|
||||
|| defined(__ARM_ARCH_6T2__) \\
|
||||
|| defined(__ARM_ARCH_6Z__) \\
|
||||
|| defined(__ARM_ARCH_6K__) \\
|
||||
|| defined(__ARM_ARCH_6ZK__) \\
|
||||
|| defined(__ARM_ARCH_6M__) \\
|
||||
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6)
|
||||
# error cmake_ARCH armv6
|
||||
# elif defined(__ARM_ARCH_5TEJ__) \\
|
||||
|| (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5)
|
||||
# error cmake_ARCH armv5
|
||||
# else
|
||||
# error cmake_ARCH arm
|
||||
# endif
|
||||
#elif defined(__i386) \\
|
||||
|| defined(__i386__) \\
|
||||
|| defined(_M_IX86)
|
||||
# error cmake_ARCH i386
|
||||
#elif defined(__x86_64) \\
|
||||
|| defined(__x86_64__) \\
|
||||
|| defined(__amd64) \\
|
||||
|| defined(_M_X64)
|
||||
# error cmake_ARCH x86_64
|
||||
#elif defined(__ia64) \\
|
||||
|| defined(__ia64__) \\
|
||||
|| defined(_M_IA64)
|
||||
# error cmake_ARCH ia64
|
||||
#elif defined(__ppc__) \\
|
||||
|| defined(__ppc) \\
|
||||
|| defined(__powerpc__) \\
|
||||
|| defined(_ARCH_COM) \\
|
||||
|| defined(_ARCH_PWR) \\
|
||||
|| defined(_ARCH_PPC) \\
|
||||
|| defined(_M_MPPC) \\
|
||||
|| defined(_M_PPC)
|
||||
# if defined(__ppc64__) \\
|
||||
|| defined(__powerpc64__) \\
|
||||
|| defined(__64BIT__)
|
||||
# error cmake_ARCH ppc64
|
||||
# else
|
||||
# error cmake_ARCH ppc
|
||||
# endif
|
||||
#else
|
||||
# error cmake_ARCH unknown
|
||||
#endif
|
||||
")
|
||||
|
||||
# write a temporary program that can be compiled to get the result
|
||||
set (tmp_dir "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp")
|
||||
set (arch_c "${tmp_dir}/arch.c")
|
||||
file (WRITE "${arch_c}" "${arch_c_src}")
|
||||
try_compile (
|
||||
compile_result_unused
|
||||
"${tmp_dir}"
|
||||
"${arch_c}"
|
||||
CMAKE_FLAGS CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
|
||||
OUTPUT_VARIABLE ARCH
|
||||
)
|
||||
|
||||
# parse the architecture name from the compiler output
|
||||
string (REGEX MATCH "cmake_ARCH ([a-zA-Z0-9_]+)" ARCH "${ARCH}")
|
||||
|
||||
# get rid of the value marker leaving just the architecture name
|
||||
string (REPLACE "cmake_ARCH " "" ARCH "${ARCH}")
|
||||
|
||||
# if we are compiling with an unknown architecture this variable should
|
||||
# already be set to "unknown" but in the case that it's empty (i.e. due
|
||||
# to a typo in the code), then set it to unknown
|
||||
if (NOT ARCH)
|
||||
set (ARCH "unknown")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set (${output_var} "${ARCH}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
include (AddOptions)
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
message (STATUS "All warnings enabled: -Wall")
|
||||
add_options (ALL_LANGUAGES ALL_BUILDS "-Wall")
|
||||
# default warnings flags, if not set by user
|
||||
set_default_option (_warn_flag "-Wall" "(^|\ )-W")
|
||||
if (_warn_flag)
|
||||
message (STATUS "All warnings enabled: ${_warn_flag}")
|
||||
add_options (ALL_LANGUAGES ALL_BUILDS "${_warn_flag}")
|
||||
endif (_warn_flag)
|
||||
endif (CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
@@ -17,7 +17,10 @@ Optional Features:
|
||||
--enable-shared build a shared library [default=yes]
|
||||
--enable-static build a static library [default=no]. Note: only one
|
||||
of the options shared and static may be built.
|
||||
--disable-debug build a release version of the library [default=no]
|
||||
--enable-debug build a non-optimized version of the library
|
||||
[default=no]
|
||||
--disable-runpath do not use RUNPATH in installed library [default=yes]
|
||||
--disable-lto do not use whole program optimization [default=yes]
|
||||
--disable-pch do not use precompiled headers (if buggy compiler)
|
||||
--disable-silent-rules print every compilation statement as executed
|
||||
--enable-system-debug put .debug files in global GDB debug dir
|
||||
@@ -81,7 +84,8 @@ invalid_opt () {
|
||||
|
||||
# default values
|
||||
prefix=/usr/local
|
||||
buildtype=Debug
|
||||
#buildtype=" -DCMAKE_BUILD_TYPE=Debug"
|
||||
buildtype=
|
||||
#pch_use=" -DPRECOMPILE_HEADERS:BOOL=ON"
|
||||
pch_use=
|
||||
#use_openmp=" -DUSE_OPENMP=OFF"
|
||||
@@ -91,6 +95,10 @@ use_mpi=
|
||||
silent_rules=
|
||||
#debug_loc=" -DSYSTEM_DEBUG=OFF"
|
||||
debug_loc=
|
||||
#use_lto=" -DWHOLE_PROG_OPTIM=ON"
|
||||
use_lto=
|
||||
#use_runpath=" -DUSE_RUNPATH=OFF"
|
||||
use_runpath=
|
||||
|
||||
# default is to warn for unknown options, but this can be disabled
|
||||
option_check=yes
|
||||
@@ -206,7 +214,7 @@ for OPT in "$@"; do
|
||||
pkgname=""
|
||||
;;
|
||||
debug)
|
||||
buildtype=Release
|
||||
buildtype=" -DCMAKE_BUILD_TYPE=Release"
|
||||
# special flag: don't disable any particular package
|
||||
pkgname=""
|
||||
;;
|
||||
@@ -214,6 +222,10 @@ for OPT in "$@"; do
|
||||
pch_use=" -DPRECOMPILE_HEADERS:BOOL=OFF"
|
||||
pkgname=""
|
||||
;;
|
||||
runpath)
|
||||
use_runpath=" -DUSE_RUNPATH=OFF"
|
||||
pkgname=""
|
||||
;;
|
||||
silent-rules)
|
||||
silent_rules=" -DCMAKE_VERBOSE_MAKEFILE=ON"
|
||||
pkgname=""
|
||||
@@ -222,6 +234,11 @@ for OPT in "$@"; do
|
||||
debug_loc=" -DSYSTEM_DEBUG=OFF"
|
||||
pkgname=""
|
||||
;;
|
||||
wpo |\
|
||||
lto )
|
||||
use_lto=" -DWHOLE_PROG_OPTIM=OFF"
|
||||
pkgname=""
|
||||
;;
|
||||
openmp)
|
||||
use_openmp=" -DUSE_OPENMP=OFF"
|
||||
pkgname=""
|
||||
@@ -271,10 +288,18 @@ for OPT in "$@"; do
|
||||
# special flag; don't set shared/static
|
||||
shared=""
|
||||
;;
|
||||
debug)
|
||||
buildtype=" -DCMAKE_BUILD_TYPE=Debug"
|
||||
shared=""
|
||||
;;
|
||||
pch)
|
||||
pch_use=" -DPRECOMPILE_HEADERS:BOOL=ON"
|
||||
shared=""
|
||||
;;
|
||||
runpath)
|
||||
use_runpath=" -DUSE_RUNPATH=ON"
|
||||
shared=""
|
||||
;;
|
||||
# this flag is just for compatibility with the deprecation
|
||||
# flag in DUNE, so we can build without warnings
|
||||
fieldvector-size-is-method)
|
||||
@@ -323,7 +348,7 @@ for a in "${VARS[@]}"; do
|
||||
done
|
||||
|
||||
# pass everything on to CMake
|
||||
CMDLINE="env ${ENVVARS} ${CMAKE_COMMAND} \"${srcdir}\" \"-DCMAKE_INSTALL_PREFIX=$prefix\" -DCMAKE_BUILD_TYPE=${buildtype}${pch_use}${silent_rules}${debug_loc}${use_openmp}${use_mpi} ${FEATURES}"
|
||||
CMDLINE="env ${ENVVARS} ${CMAKE_COMMAND} \"${srcdir}\" \"-DCMAKE_INSTALL_PREFIX=$prefix\"${buildtype}${pch_use}${silent_rules}${debug_loc}${use_openmp}${use_mpi}${use_lto}${use_runpath} ${FEATURES}"
|
||||
echo --- calling CMake ---
|
||||
echo ${CMDLINE}
|
||||
eval exec ${CMDLINE}
|
||||
|
||||
Vendored
+6
@@ -1,3 +1,9 @@
|
||||
opm-upscaling (2013.03-3) precise; urgency=low
|
||||
|
||||
* Fix dependencies for -bin package
|
||||
|
||||
-- Arne Morten Kvarving <arne.morten.kvarving@sintef.no> Mon, 08 Apr 2013 17:08:46 +0200
|
||||
|
||||
opm-upscaling (2013.03-2) precise; urgency=low
|
||||
|
||||
* Updated to be compatible with launchpad+precise
|
||||
|
||||
Vendored
+2
-2
@@ -16,7 +16,7 @@ Vcs-Browser: https://github.com/OPM/opm-upscaling
|
||||
|
||||
Package: libopm-upscaling1-dev
|
||||
Section: libdevel
|
||||
Architecture: all
|
||||
Architecture: any
|
||||
Multi-Arch: foreign
|
||||
Depends: libopm-upscaling1 (= ${binary:Version})
|
||||
Provides: libopm-upscaling-dev
|
||||
@@ -28,7 +28,7 @@ Package: libopm-upscaling1-bin
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Multi-Arch: foreign
|
||||
Depends: libopm-upscaling1 (= ${binary:Version})
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Provides: libopm-upscaling-bin
|
||||
Suggests: libopm-upscaling-doc
|
||||
Description: OPM upscaling library -- applications
|
||||
|
||||
Vendored
+1
-1
@@ -19,7 +19,7 @@ override_dh_auto_build:
|
||||
dh_auto_build --buildsystem=cmake
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure --buildsystem=cmake -- -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_DOCDIR=share/doc/libopm-upscaling1
|
||||
dh_auto_configure --buildsystem=cmake -- -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_DOCDIR=share/doc/libopm-upscaling1 -DUSE_RUNPATH=OFF
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install -- install-html
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#include <opm/core/io/eclipse/CornerpointChopper.hpp>
|
||||
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
|
||||
#include <opm/core/utility/MonotCubicInterpolator.hpp>
|
||||
|
||||
@@ -18,8 +18,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
|
||||
#include <opm/core/io/eclipse/CornerpointChopper.hpp>
|
||||
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#include <opm/core/io/eclipse/CornerpointChopper.hpp>
|
||||
#include <opm/core/io/eclipse/EclipseGridParser.hpp>
|
||||
#include <opm/core/io/eclipse/EclipseGridInspector.hpp>
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#include <opm/core/io/eclipse/CornerpointChopper.hpp>
|
||||
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
|
||||
#include <opm/porsol/common/setupBoundaryConditions.hpp>
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#include <map>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
|
||||
//#define VERBOSE
|
||||
#include <opm/upscaling/SteadyStateUpscalerImplicit.hpp>
|
||||
|
||||
@@ -40,8 +40,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -54,8 +54,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -51,8 +51,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
#include <cstring>
|
||||
|
||||
@@ -45,8 +45,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -59,8 +59,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -69,8 +69,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#include <opm/upscaling/SinglePhaseUpscaler.hpp>
|
||||
#include <opm/core/utility/Units.hpp>
|
||||
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
|
||||
//#define VERBOSE
|
||||
#include <opm/upscaling/SteadyStateUpscalerImplicit.hpp>
|
||||
|
||||
@@ -578,12 +578,11 @@ void ElasticityUpscale<GridType>::loadMaterialsFromGrid(const std::string& file)
|
||||
if (parser.hasField("YOUNGMOD") && parser.hasField("POISSONMOD")) {
|
||||
Emod = parser.getFloatingPointValue("YOUNGMOD");
|
||||
Poiss = parser.getFloatingPointValue("POISSONMOD");
|
||||
} else if (parser.hasField("PERMX") && parser.hasField("PORO")) {
|
||||
Emod = parser.getFloatingPointValue("PERMX");
|
||||
Poiss = parser.getFloatingPointValue("PORO");
|
||||
} else if (parser.hasField("LAMEMOD") && parser.hasField("SHEARMOD")) {
|
||||
std::vector<double> lame = parser.getFloatingPointValue("LAMEMOD");
|
||||
std::vector<double> shear = parser.getFloatingPointValue("SHEARMOD");
|
||||
Emod.resize(lame.size());
|
||||
Poiss.resize(lame.size());
|
||||
for (size_t i=0;i<lame.size();++i) {
|
||||
Emod[i] = shear[i]*(3*lame[i]+2*shear[i])/(lame[i]+shear[i]);
|
||||
Poiss[i] = 0.5*lame[i]/(lame[i]+shear[i]);
|
||||
@@ -591,10 +590,16 @@ void ElasticityUpscale<GridType>::loadMaterialsFromGrid(const std::string& file)
|
||||
} else if (parser.hasField("BULKMOD") && parser.hasField("SHEARMOD")) {
|
||||
std::vector<double> bulk = parser.getFloatingPointValue("BULKMOD");
|
||||
std::vector<double> shear = parser.getFloatingPointValue("SHEARMOD");
|
||||
Emod.resize(bulk.size());
|
||||
Poiss.resize(bulk.size());
|
||||
for (size_t i=0;i<bulk.size();++i) {
|
||||
Emod[i] = 9*bulk[i]*shear[i]/(3*bulk[i]+shear[i]);
|
||||
Poiss[i] = 0.5*(3*bulk[i]-2*shear[i])/(3*bulk[i]+shear[i]);
|
||||
}
|
||||
} else if (parser.hasField("PERMX") && parser.hasField("PORO")) {
|
||||
std::cerr << "WARNING: Using PERMX and PORO for elastic material properties" << std::endl;
|
||||
Emod = parser.getFloatingPointValue("PERMX");
|
||||
Poiss = parser.getFloatingPointValue("PORO");
|
||||
} else {
|
||||
std::cerr << "No material data found in eclipse file, aborting" << std::endl;
|
||||
exit(1);
|
||||
|
||||
@@ -126,6 +126,7 @@ namespace Opm
|
||||
int max_it_;
|
||||
double max_stepsize_;
|
||||
double dt_sat_tol_;
|
||||
bool use_maxdiff_;
|
||||
TransportSolver transport_solver_;
|
||||
GridAdapter grid_adapter_;
|
||||
};
|
||||
|
||||
@@ -66,7 +66,8 @@ namespace Opm
|
||||
sat_change_year_(1.0e-5),
|
||||
max_it_(100),
|
||||
max_stepsize_(1e4),
|
||||
dt_sat_tol_(1e-2)
|
||||
dt_sat_tol_(1e-2),
|
||||
use_maxdiff_(true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -93,6 +94,7 @@ namespace Opm
|
||||
dt_sat_tol_ = param.getDefault("dt_sat_tol", dt_sat_tol_);
|
||||
max_it_ = param.getDefault("max_it", max_it_);
|
||||
max_stepsize_ = Opm::unit::convert::from(param.getDefault("max_stepsize", max_stepsize_),Opm::unit::year);
|
||||
use_maxdiff_ = param.getDefault("use_maxdiff", use_maxdiff_);
|
||||
transport_solver_.init(param);
|
||||
// Set viscosities and densities if given.
|
||||
double v1_default = this->res_prop_.viscosityFirstPhase();
|
||||
@@ -165,6 +167,17 @@ namespace Opm
|
||||
MESSAGE("Warning: Gravity is experimental for flow solver.");
|
||||
}
|
||||
|
||||
// Put pore volume in vector.
|
||||
std::vector<double> pore_vol;
|
||||
pore_vol.reserve(num_cells);
|
||||
double tot_pore_vol = 0.0;
|
||||
typedef typename GridInterface::CellIterator CellIter;
|
||||
for (CellIter c = this->ginterf_.cellbegin(); c != this->ginterf_.cellend(); ++c) {
|
||||
double cell_pore_vol = c->volume()*this->res_prop_.porosity(c->index());
|
||||
pore_vol.push_back(cell_pore_vol);
|
||||
tot_pore_vol += cell_pore_vol;
|
||||
}
|
||||
|
||||
// Set up initial saturation profile.
|
||||
std::vector<double> saturation = initial_saturation;
|
||||
|
||||
@@ -248,17 +261,31 @@ namespace Opm
|
||||
// Comparing old to new.
|
||||
int num_cells = saturation.size();
|
||||
double maxdiff = 0.0;
|
||||
double euclidean_diff = 0.0;
|
||||
for (int i = 0; i < num_cells; ++i) {
|
||||
maxdiff = std::max(maxdiff, std::fabs(saturation[i] - saturation_old[i]));
|
||||
const double sat_diff_cell = saturation[i] - saturation_old[i];
|
||||
maxdiff = std::max(maxdiff, std::fabs(sat_diff_cell));
|
||||
euclidean_diff += sat_diff_cell * sat_diff_cell * pore_vol[i];
|
||||
}
|
||||
euclidean_diff = std::sqrt(euclidean_diff / tot_pore_vol);
|
||||
double ds_year;
|
||||
if (use_maxdiff_) {
|
||||
ds_year = maxdiff*Opm::unit::year/stepsize;
|
||||
std::cout << "Maximum saturation change/year: " << ds_year << std::endl;
|
||||
if (maxdiff < dt_sat_tol_) {
|
||||
stepsize=std::min(max_stepsize_,2*stepsize);
|
||||
}
|
||||
}
|
||||
else {
|
||||
ds_year = euclidean_diff*Opm::unit::year/stepsize;
|
||||
std::cout << "Euclidean saturation change/year: " << ds_year << std::endl;
|
||||
if (euclidean_diff < dt_sat_tol_) {
|
||||
stepsize=std::min(max_stepsize_,2*stepsize);
|
||||
}
|
||||
}
|
||||
double ds_year = maxdiff*Opm::unit::year/stepsize;
|
||||
std::cout << "Maximum saturation change/year: " << ds_year << std::endl;
|
||||
if (ds_year < sat_change_year_) {
|
||||
stationary = true;
|
||||
}
|
||||
if (maxdiff< dt_sat_tol_) {
|
||||
stepsize=std::min(max_stepsize_,2*stepsize);
|
||||
}
|
||||
} else {
|
||||
std::cerr << "Cutting time step\n";
|
||||
init_saturation = saturation_old;
|
||||
|
||||
@@ -306,8 +306,10 @@ namespace Opm
|
||||
if (canon_bid - 1 == 2*flow_dir) {
|
||||
++num_side1;
|
||||
if (flow_dir == pdrop_dir && flux > 0.0) {
|
||||
#ifdef VERBOSE
|
||||
std::cerr << "Flow may be in wrong direction at bid: " << f->boundaryId()<<" (canonical: "<<canon_bid
|
||||
<< ") Magnitude: " << std::fabs(flux) << std::endl;
|
||||
#endif
|
||||
// THROW("Detected outflow at entry face: " << face);
|
||||
}
|
||||
side1_flux += flux*norm_comp;
|
||||
@@ -316,8 +318,10 @@ namespace Opm
|
||||
ASSERT(canon_bid - 1 == 2*flow_dir + 1);
|
||||
++num_side2;
|
||||
if (flow_dir == pdrop_dir && flux < 0.0) {
|
||||
#ifdef VERBOSE
|
||||
std::cerr << "Flow may be in wrong direction at bid: " << f->boundaryId()
|
||||
<< " Magnitude: " << std::fabs(flux) << std::endl;
|
||||
#endif
|
||||
// THROW("Detected inflow at exit face: " << face);
|
||||
}
|
||||
side2_flux += flux*norm_comp;
|
||||
|
||||
@@ -35,7 +35,6 @@ Requires: blas-devel
|
||||
Requires: lapack-devel
|
||||
Requires: suitesparse-devel
|
||||
Requires: libopm-upscaling1 = %{version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description devel
|
||||
This package contains the development and header files for opm-upscaling
|
||||
@@ -61,7 +60,7 @@ This package contains the applications for opm-upscaling
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
cmake28 -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version}
|
||||
cmake28 -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DUSE_RUNPATH=OFF
|
||||
make
|
||||
|
||||
%install
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
Copyright 2013 Statoil ASA
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
#include <opm/porsol/common/Matrix.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace Opm;
|
||||
|
||||
typedef FullMatrix<double, OwnData, COrdering> Matrix;
|
||||
|
||||
|
||||
/// @brief
|
||||
/// Read result file and store results in a matrix.
|
||||
///
|
||||
/// @param [in] filename
|
||||
/// Path to result file to be read. Lines starting with '#' are ignored.
|
||||
///
|
||||
/// @param [in] rows
|
||||
/// Number of rows in result file
|
||||
///
|
||||
/// @param [in] cols
|
||||
/// Number of cols in result file
|
||||
Matrix readResultFile(const char* filename, int rows, int cols) {
|
||||
|
||||
Matrix result(rows, cols, (const double*)0);
|
||||
|
||||
// Check if filename is readable
|
||||
ifstream resultfile(filename, ios::in);
|
||||
if (resultfile.fail()) {
|
||||
cerr << "Error: Filename " << filename << " not found or not readable." << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Read file and put results into matrix result
|
||||
double value;
|
||||
int row = 0;
|
||||
int col = 0;
|
||||
string line;
|
||||
while (getline(resultfile, line)) {
|
||||
if (line[0] == '#') // Skip lines starting with #
|
||||
continue;
|
||||
istringstream iss(line);
|
||||
while (iss >> value) {
|
||||
// Check if input file contains more rows or columns than specified
|
||||
if (row >= rows) {
|
||||
cerr << "Error: More rows in " << filename << " than specified." << endl;
|
||||
exit(1);
|
||||
}
|
||||
else if (col >= cols) {
|
||||
cerr << "Error: More columns in " << filename << " than specified." << endl;
|
||||
exit(1);
|
||||
}
|
||||
else {
|
||||
result(row, col) = value;
|
||||
++col;
|
||||
}
|
||||
}
|
||||
col = 0;
|
||||
++row;
|
||||
}
|
||||
resultfile.close();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// @brief
|
||||
/// Test if two matrices are equal within a relative tolerance
|
||||
///
|
||||
/// @param [in] refSoln
|
||||
/// Reference solution stored as a matrix
|
||||
///
|
||||
/// @param [in] newSoln
|
||||
/// Solution to compare with
|
||||
///
|
||||
/// @param [in] tol
|
||||
/// Absolute tolerance
|
||||
bool matrixAlmostEqual(Matrix refSoln, Matrix newSoln, double tol) {
|
||||
|
||||
ASSERT(refSoln.numRows() == newSoln.numRows());
|
||||
ASSERT(refSoln.numCols() == newSoln.numCols());
|
||||
// Test element by element
|
||||
for (int row=0; row<refSoln.numRows(); ++row) {
|
||||
for (int col=0; col<refSoln.numCols(); ++col) {
|
||||
double absDiff = abs(refSoln(row,col) - newSoln(row,col));
|
||||
if (absDiff > tol) return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// @brief
|
||||
/// Tests if two result files are equal
|
||||
///
|
||||
/// Command input variables;
|
||||
/// 1) Path to reference solution file
|
||||
/// 2) Path to new solution file to compare with
|
||||
/// 3) Absolute tolerance
|
||||
/// 4) Number of rows in result files to be compared
|
||||
/// 5) Number of columns in result files to be compared
|
||||
///
|
||||
/// The results in the input files are read and compared to eachother within a given absolute tolerance.
|
||||
/// Lines starting with '#' are ignored. Returns 1 if test fails, 0 otherwise. If test failes, both
|
||||
/// solutions are printed to screen.
|
||||
int main(int varnum, char** vararg) {
|
||||
|
||||
// Check if the correct number of variables are given
|
||||
if (varnum != 6) {
|
||||
cout << "Error: Wrong number of input variables, should be five!" << endl
|
||||
<< "Usage: ./test_upscaling_results refSolnFile newSolnFile tol rows cols" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Process input
|
||||
const char* refSolnFile(vararg[1]);
|
||||
const char* newSolnFile(vararg[2]);
|
||||
double tol = atof(vararg[3]);
|
||||
int rows = atoi(vararg[4]);
|
||||
int cols = atoi(vararg[5]);
|
||||
|
||||
// Read result files into Matrix objects
|
||||
Matrix refSoln = readResultFile(refSolnFile, rows, cols);
|
||||
Matrix newSoln = readResultFile(newSolnFile, rows, cols);
|
||||
|
||||
// Compare results
|
||||
bool test = matrixAlmostEqual(refSoln, newSoln, tol);
|
||||
if (! test) {
|
||||
cout << endl << "Verification error: Calculated solution not equal to reference solution "
|
||||
<< "within an absolute tolerance of " << tol << "." << endl
|
||||
<< "Calculated solution:" << endl
|
||||
<< newSoln
|
||||
<< "Reference solution:" << endl
|
||||
<< refSoln << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
--
|
||||
-- Regular 3x3x3 cornerpoint grid for testing purposes
|
||||
-- Porosity is entirely random.
|
||||
-- Permx is exponentially correlated to porosity
|
||||
-- Copyright 2010 Statoil ASA
|
||||
-- CC-BY-SA 3.0
|
||||
|
||||
|
||||
SPECGRID
|
||||
3 3 3 1 F /
|
||||
|
||||
COORD
|
||||
0 0 0 0 0 1
|
||||
0.333333 0 0 0.333333 0 1
|
||||
0.666667 0 0 0.666667 0 1
|
||||
1 0 0 1 0 1
|
||||
0 0.333333 0 0 0.333333 1
|
||||
0.333333 0.333333 0 0.333333 0.333333 1
|
||||
0.666667 0.333333 0 0.666667 0.333333 1
|
||||
1 0.333333 0 1 0.333333 1
|
||||
0 0.666667 0 0 0.666667 1
|
||||
0.333333 0.666667 0 0.333333 0.666667 1
|
||||
0.666667 0.666667 0 0.666667 0.666667 1
|
||||
1 0.666667 0 1 0.666667 1
|
||||
0 1 0 0 1 1
|
||||
0.333333 1 0 0.333333 1 1
|
||||
0.666667 1 0 0.666667 1 1
|
||||
1 1 0 1 1 1
|
||||
/
|
||||
|
||||
ZCORN
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333
|
||||
0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333
|
||||
0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333
|
||||
0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333
|
||||
0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333
|
||||
0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333
|
||||
0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667
|
||||
0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667
|
||||
0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667
|
||||
0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667
|
||||
0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667
|
||||
0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667
|
||||
0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1
|
||||
/
|
||||
|
||||
ACTNUM
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
/
|
||||
|
||||
PORO
|
||||
0.257815 0.190238 0.129186
|
||||
0.0161844 0.324159 0.212772
|
||||
0.135038 0.0159073 0.32653
|
||||
0.137728 0.310078 0.0267721
|
||||
0.117152 0.0197441 0.222426
|
||||
0.14356 0.321484 0.0268927
|
||||
0.150828 0.0246572 0.148487
|
||||
0.240549 0.0696985 0.0171716
|
||||
0.25113 0.0244694 0.0272895
|
||||
/
|
||||
|
||||
PERMX
|
||||
5.29064e+06 22820.4 166.537
|
||||
0.0184694 1.11066e+09 140288
|
||||
266.893 0.0180616 1.34452e+09
|
||||
331.49 3.57055e+08 0.0433534
|
||||
63.1409 0.0246061 305422
|
||||
530.388 8.9521e+08 0.0437768
|
||||
952.768 0.0365596 788.934
|
||||
1.31592e+06 1.37863 0.0199988
|
||||
3.08721e+06 0.0360105 0.0451994
|
||||
/
|
||||
|
||||
PERMY
|
||||
5.29064e+06 22820.4 166.537
|
||||
0.0184694 1.11066e+09 140288
|
||||
266.893 0.0180616 1.34452e+09
|
||||
331.49 3.57055e+08 0.0433534
|
||||
63.1409 0.0246061 305422
|
||||
530.388 8.9521e+08 0.0437768
|
||||
952.768 0.0365596 788.934
|
||||
1.31592e+06 1.37863 0.0199988
|
||||
3.08721e+06 0.0360105 0.0451994
|
||||
/
|
||||
PERMZ
|
||||
64.0367 8.55438 1.38791
|
||||
0.0479136 462.098 16.7384
|
||||
1.65223 0.0475198 495.915
|
||||
1.79005 303.783 0.0656798
|
||||
0.969781 0.0532734 22.3153
|
||||
2.12968 426.693 0.0659162
|
||||
2.64452 0.0616696 2.46636
|
||||
38.2887 0.235924 0.0493435
|
||||
52.4756 0.0613257 0.0667
|
||||
/
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
--
|
||||
-- Regular 3x3x3 cornerpoint grid for testing purposes
|
||||
-- Porosity is entirely random.
|
||||
-- Permx is exponentially correlated to porosity
|
||||
-- Copyright 2010 Statoil ASA
|
||||
-- CC-BY-SA 3.0
|
||||
|
||||
|
||||
SPECGRID
|
||||
3 3 3 1 F /
|
||||
|
||||
COORD
|
||||
0 0 0 0 0 1
|
||||
0.333333 0 0 0.333333 0 1
|
||||
0.666667 0 0 0.666667 0 1
|
||||
1 0 0 1 0 1
|
||||
0 0.333333 0 0 0.333333 1
|
||||
0.333333 0.333333 0 0.333333 0.333333 1
|
||||
0.666667 0.333333 0 0.666667 0.333333 1
|
||||
1 0.333333 0 1 0.333333 1
|
||||
0 0.666667 0 0 0.666667 1
|
||||
0.333333 0.666667 0 0.333333 0.666667 1
|
||||
0.666667 0.666667 0 0.666667 0.666667 1
|
||||
1 0.666667 0 1 0.666667 1
|
||||
0 1 0 0 1 1
|
||||
0.333333 1 0 0.333333 1 1
|
||||
0.666667 1 0 0.666667 1 1
|
||||
1 1 0 1 1 1
|
||||
/
|
||||
|
||||
ZCORN
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0 0 0 0 0 0
|
||||
0 0 0 0 0 0 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333
|
||||
0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333
|
||||
0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333
|
||||
0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333
|
||||
0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333
|
||||
0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.333333
|
||||
0.333333 0.333333 0.333333 0.333333 0.333333 0.333333 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667
|
||||
0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667
|
||||
0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667
|
||||
0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667
|
||||
0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667
|
||||
0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 0.666667
|
||||
0.666667 0.666667 0.666667 0.666667 0.666667 0.666667 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1
|
||||
/
|
||||
|
||||
ACTNUM
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
/
|
||||
|
||||
PORO
|
||||
0.257815 0.190238 0.129186
|
||||
0.0161844 0.324159 0.212772
|
||||
0.135038 0.0159073 0.32653
|
||||
0.137728 0.310078 0.0267721
|
||||
0.117152 0.0197441 0.222426
|
||||
0.14356 0.321484 0.0268927
|
||||
0.150828 0.0246572 0.148487
|
||||
0.240549 0.0696985 0.0171716
|
||||
0.25113 0.0244694 0.0272895
|
||||
/
|
||||
|
||||
PERMX
|
||||
5.29064e+06 22820.4 166.537
|
||||
0.0184694 1.11066e+09 140288
|
||||
266.893 0.0180616 1.34452e+09
|
||||
331.49 3.57055e+08 0.0433534
|
||||
63.1409 0.0246061 305422
|
||||
530.388 8.9521e+08 0.0437768
|
||||
952.768 0.0365596 788.934
|
||||
1.31592e+06 1.37863 0.0199988
|
||||
3.08721e+06 0.0360105 0.0451994
|
||||
/
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
-- Copyright Statoil ASA 2010
|
||||
-- License: CC-BY-SA, www.creativecommons.org
|
||||
|
||||
|
||||
SPECGRID
|
||||
2 2 2 1 F /
|
||||
|
||||
|
||||
COORD
|
||||
0.000 0.000 0.000 0.000 0.000 1.000
|
||||
0.500 0.000 0.000 0.500 0.000 1.000
|
||||
1.000 0.000 0.000 1.000 0.000 1.000
|
||||
0.000 0.500 0.000 0.000 0.500 1.000
|
||||
0.500 0.500 0.000 0.500 0.500 1.000
|
||||
1.000 0.500 0.000 1.000 0.500 1.000
|
||||
0.000 1.000 0.000 0.000 1.000 1.000
|
||||
0.500 1.000 0.000 0.500 1.000 1.000
|
||||
1.000 1.000 0.000 1.000 1.000 1.000
|
||||
|
||||
/
|
||||
|
||||
|
||||
ZCORN
|
||||
0.000 0.000 0.000 0.000 0.000 0.000
|
||||
0.000 0.000 0.000 0.000 0.000 0.000
|
||||
0.000 0.000 0.000 0.000 0.500 0.500
|
||||
0.500 0.500 0.500 0.500 0.500 0.500
|
||||
0.500 0.500 0.500 0.500 0.500 0.500
|
||||
0.500 0.500 0.500 0.500 0.500 0.500
|
||||
0.500 0.500 0.500 0.500 0.500 0.500
|
||||
0.500 0.500 0.500 0.500 0.500 0.500
|
||||
1.000 1.000 1.000 1.000 1.000 1.000
|
||||
1.000 1.000 1.000 1.000 1.000 1.000
|
||||
1.000 1.000 1.000 1.000
|
||||
/
|
||||
|
||||
ACTNUM
|
||||
1 1 1 1 1 1 1 1
|
||||
/
|
||||
|
||||
PERMX
|
||||
19 2 25 20 5 4 2 7
|
||||
/
|
||||
|
||||
PORO
|
||||
0.24 0.14 0.28 0.24 0.1 0.15 0.17 0.09
|
||||
/
|
||||
|
||||
SATNUM
|
||||
1 2 1 1 2 2 2 2
|
||||
/
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,28 @@
|
||||
###############################################################################
|
||||
# Results from upscaling permeability.
|
||||
#
|
||||
# Finished: Tue May 7 09:34:56 2013
|
||||
# Hostname: tr-lcdapp02
|
||||
#
|
||||
# Eclipse file: EightCells.grdecl
|
||||
# Porosity : 0.17625
|
||||
#
|
||||
# Options used:
|
||||
# Boundary conditions: Fixed (no-flow) Linear
|
||||
# minPerm: 1e-9
|
||||
#
|
||||
# If both linear and fixed boundary conditions are calculated,
|
||||
# the nonperiodic tesselation is done only once
|
||||
#
|
||||
#
|
||||
# Upscaled permeability for fixed boundary conditions:
|
||||
# Tesselation time: 0 s
|
||||
# Computation time: 0 s
|
||||
8.96511 0 0
|
||||
0 8.80634 0
|
||||
0 0 6.52958
|
||||
# Upscaled permeability for linear boundary conditions:
|
||||
# Computation time: 0 s
|
||||
10.5 -1.125 -1.625
|
||||
-1.125 10.5 1.5
|
||||
-1.625 1.5 10.5
|
||||
@@ -0,0 +1,34 @@
|
||||
###############################################################################
|
||||
# Results from upscaling permeability.
|
||||
#
|
||||
# Finished: Tue May 7 09:32:04 2013
|
||||
# Hostname: tr-lcdapp02
|
||||
#
|
||||
# Eclipse file: 27cellsAniso.grdecl
|
||||
# Porosity : 0.143998
|
||||
#
|
||||
# Options used:
|
||||
# Boundary conditions: Fixed (no-flow) Periodic Linear
|
||||
# minPerm: 1e-9
|
||||
#
|
||||
# If both linear and fixed boundary conditions are calculated,
|
||||
# the nonperiodic tesselation is done only once
|
||||
#
|
||||
#
|
||||
# Upscaled permeability for fixed boundary conditions:
|
||||
# Tesselation time: 0 s
|
||||
# Computation time: 0.01 s
|
||||
8831.12 0 0
|
||||
0 10009 0
|
||||
0 0 14.9685
|
||||
# Upscaled permeability for linear boundary conditions:
|
||||
# Computation time: 0 s
|
||||
5.01162e+07 -4.98516e+07 53.3926
|
||||
-4.98723e+07 5.01426e+07 25.1329
|
||||
158.862 141.892 91.8173
|
||||
# Upscaled permeability for periodic boundary conditions:
|
||||
# Tesselation time: 0 s
|
||||
# Computation time: 0.01 s
|
||||
230.852 173.033 -0.365783
|
||||
173.033 563.617 -2.09658
|
||||
-0.365783 -2.09657 4.84122
|
||||
@@ -0,0 +1,34 @@
|
||||
###############################################################################
|
||||
# Results from upscaling permeability.
|
||||
#
|
||||
# Finished: Tue May 7 09:32:37 2013
|
||||
# Hostname: tr-lcdapp02
|
||||
#
|
||||
# Eclipse file: 27cellsIso.grdecl
|
||||
# Porosity : 0.143998
|
||||
#
|
||||
# Options used:
|
||||
# Boundary conditions: Fixed (no-flow) Periodic Linear
|
||||
# minPerm: 1e-9
|
||||
#
|
||||
# If both linear and fixed boundary conditions are calculated,
|
||||
# the nonperiodic tesselation is done only once
|
||||
#
|
||||
#
|
||||
# Upscaled permeability for fixed boundary conditions:
|
||||
# Tesselation time: 0 s
|
||||
# Computation time: 0.01 s
|
||||
10064.2 0 0
|
||||
0 12907.6 0
|
||||
0 0 203.673
|
||||
# Upscaled permeability for linear boundary conditions:
|
||||
# Computation time: 0 s
|
||||
7.5229e+07 -3.7408e+07 3.73528e+07
|
||||
-3.74089e+07 7.51635e+07 3.71125e+07
|
||||
3.73545e+07 3.71134e+07 7.52298e+07
|
||||
# Upscaled permeability for periodic boundary conditions:
|
||||
# Tesselation time: 0 s
|
||||
# Computation time: 0.01 s
|
||||
408.828 277.862 -22.9108
|
||||
277.862 694.287 -83.306
|
||||
-22.9108 -83.306 297.767
|
||||
@@ -0,0 +1,34 @@
|
||||
###############################################################################
|
||||
# Results from upscaling permeability.
|
||||
#
|
||||
# Finished: Thu May 16 13:21:16 2013
|
||||
# Hostname: tr-lcdapp02
|
||||
#
|
||||
# Eclipse file: /private/laods/opm/RH5/unit_testing/opm-upscaling/build/tests/input_data/grids/Hummocky.grdecl
|
||||
# Porosity : 0.263508
|
||||
#
|
||||
# Options used:
|
||||
# Boundary conditions: Fixed (no-flow) Periodic Linear
|
||||
# minPerm: 1e-9
|
||||
#
|
||||
# If both linear and fixed boundary conditions are calculated,
|
||||
# the nonperiodic tesselation is done only once
|
||||
#
|
||||
#
|
||||
# Upscaled permeability for fixed boundary conditions:
|
||||
# Tesselation time: 0.05 s
|
||||
# Computation time: 3 s
|
||||
146.257 0 0
|
||||
0 149.446 0
|
||||
0 0 10.063
|
||||
# Upscaled permeability for linear boundary conditions:
|
||||
# Computation time: 1.64 s
|
||||
170.951 -12.0406 9.11501
|
||||
-14.3799 171.651 11.8823
|
||||
-5.52312 -1.48332 17.3043
|
||||
# Upscaled permeability for periodic boundary conditions:
|
||||
# Tesselation time: 0.07 s
|
||||
# Computation time: 3.69 s
|
||||
133.755 -0.0960423 -2.38163
|
||||
-0.0960412 140.541 -0.553565
|
||||
-2.38166 -0.553589 10.1719
|
||||
@@ -0,0 +1,23 @@
|
||||
###############################################################################
|
||||
# Results from upscaling permeability.
|
||||
#
|
||||
# Finished: Tue May 7 08:42:58 2013
|
||||
# Hostname: tr-lcdapp02
|
||||
#
|
||||
# Eclipse file: PeriodicTilted.grdecl
|
||||
# Porosity : 0.34
|
||||
#
|
||||
# Options used:
|
||||
# Boundary conditions: Periodic
|
||||
# minPerm: 1e-9
|
||||
#
|
||||
# If both linear and fixed boundary conditions are calculated,
|
||||
# the nonperiodic tesselation is done only once
|
||||
#
|
||||
#
|
||||
# Upscaled permeability for periodic boundary conditions:
|
||||
# Tesselation time: 0.06 s
|
||||
# Computation time: 1.17 s
|
||||
472.996 9.34102e-05 -144.893
|
||||
4.8044e-05 549.996 -0.00250519
|
||||
-144.894 -2.53723e-05 254.094
|
||||
@@ -34,8 +34,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#define VERBOSE
|
||||
|
||||
#include <opm/upscaling/SteadyStateUpscalerManager.hpp>
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
//#define VERBOSE
|
||||
|
||||
#include <opm/upscaling/SteadyStateUpscalerManager.hpp>
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
#define VERBOSE
|
||||
|
||||
#include <opm/upscaling/SteadyStateUpscalerManager.hpp>
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <opm/core/utility/have_boost_redef.hpp>
|
||||
|
||||
|
||||
//#define VERBOSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user