diff --git a/.travis.yml b/.travis.yml index dc6d83ee8..7284f78fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,4 +45,4 @@ install: - opm-grid/travis/build-opm-grid.sh - opm-output/travis/build-opm-output.sh -script: opm-autodiff/travis/build-and-test-opm-autodiff.sh +script: opm-simulators/travis/build-and-test-opm-simulators.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b1dbd698..11227acef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,7 +118,7 @@ if (NOT EIGEN3_FOUND) ) include_directories (${CMAKE_BINARY_DIR}/eigen3-installed/include/eigen3) - add_dependencies (opmautodiff Eigen3) + add_dependencies (opmsimulators Eigen3) endif (NOT EIGEN3_FOUND) @@ -132,7 +132,7 @@ if (HAVE_OPM_DATA) set_tests_properties(flow_SPE1CASE2_restart PROPERTIES DEPENDS flow_SPE1CASE2) # Dependes on the restart file from test flow_SPE1CASE2 add_executable( test_restart tests/test_restart.cpp ) - target_link_libraries( test_restart opmautodiff ${Boost_LIBRARIES}) + target_link_libraries( test_restart opmsimulators ${Boost_LIBRARIES}) add_test( compare_restart_files ${CMAKE_BINARY_DIR}/bin/test_restart diff --git a/README.md b/README.md index 54ee48a04..1e0ed0850 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,16 @@ -# Open Porous Media Automatic Differentiation Library [![Build Status](https://travis-ci.org/OPM/opm-autodiff.svg?branch=master)](https://travis-ci.org/OPM/opm-autodiff) +# Open Porous Media Simulators and Automatic Differentiation Library [![Build Status](https://travis-ci.org/OPM/opm-simulators.svg?branch=master)](https://travis-ci.org/OPM/opm-simulators) CONTENT ------- -opm-autodiff contains a small library for automatic differentiation -built on the Eigen linear algebra package. It also contains some -experimental solver and simulator prototypes demonstrating how it can -be used. The most important parts are: +opm-simulators contains simulator programs for porous media flow. It +also contains a small library for automatic differentiation +built on the Eigen linear algebra package which is used by many of the +simulators to handle the building of Jacobians. The most important parts are: +* flow.cpp (a fully implicit black-oil simulator) * AutoDiffBlock.hpp (class for AD on vectorized data with sparse jacobians) -* AutoDiffHelpers.hpp (various utilities to simplify writing solvers) -* sim_fibo_ad.cpp (prototype fully implicit black-oil simulator) LICENSE ------- @@ -23,7 +22,7 @@ version 3 or later (GPLv3+). PLATFORMS --------- -The opm-autodiff module is designed to run on Linux platforms. It is +The opm-simulators module is designed to run on Linux platforms. It is also regularly run on Mac OS X. No efforts have been made to ensure that the code will compile and run on windows platforms. @@ -31,25 +30,25 @@ that the code will compile and run on windows platforms. REQUIREMENTS ------------ -opm-autodiff requires opm-core, and all its requirements (see -opm-core/README). In addition, opm-autodiff requires Eigen, version -3.1 (has not been tested with later versions). +opm-simulators requires opm-output, opm-core, and all their +requirements (see opm-core/README). In addition, opm-simulators +requires the Dune modue dune-istl and Eigen, version 3.1 (has not been +tested with later versions). DOWNLOADING ----------- For a read-only download: -git clone git://github.com/OPM/opm-autodiff.git +git clone git://github.com/OPM/opm-simulators.git -If you want to contribute, fork OPM/opm-autodiff on github. +If you want to contribute, fork OPM/opm-simulators on github. BUILDING -------- -See build instructions in opm-core/README, or at -http://opm-project.org/download.php. +See build instructions at http://opm-project.org/?page_id=36 DOCUMENTATION @@ -69,7 +68,7 @@ REPORTING ISSUES Issues can be reported in the Git issue tracker online at: - https://github.com/OPM/opm-autodiff/issues + https://github.com/OPM/opm-simulators/issues To help diagnose build errors, please provide a link to a build log together with the issue description. diff --git a/dune.module b/dune.module index 937297975..3c455cbe3 100644 --- a/dune.module +++ b/dune.module @@ -3,8 +3,8 @@ # and by the CMake build scripts. #################################################################### -Module: opm-autodiff -Description: Utilities for automatic differentiation and simulators based on AD +Module: opm-simulators +Description: Simulators and utilities for automatic differentiation Version: 2016.04-pre Label: 2016.04-pre Maintainer: atgeirr@sintef.no diff --git a/jenkins/README.md b/jenkins/README.md index 73818a075..c84a024f4 100644 --- a/jenkins/README.md +++ b/jenkins/README.md @@ -1,18 +1,18 @@ -# opm-autodiff jenkins build scripts: +# opm-simulators jenkins build scripts: -**build-opm-autodiff.sh**: +**build-opm-simulators.sh**: This is a helper script which contains functions for building, -testing and cloning opm-autodiff and its dependencies. +testing and cloning opm-simulators and its dependencies. **build.sh**: -This script will build dependencies, then build opm-autodiff and execute its tests. +This script will build dependencies, then build opm-simulators and execute its tests. It is intended for post-merge builds of the master branch. **build-pr.sh**: -This script will build dependencies, then build opm-autodiff and execute its tests. +This script will build dependencies, then build opm-simulators and execute its tests. It inspects the $ghbPrBuildComment environmental variable to obtain a pull request to use for ert, opm-common, opm-parser, opm-material, opm-core and -opm-grid (defaults to master) and then builds $sha1 of opm-autodiff. +opm-grid (defaults to master) and then builds $sha1 of opm-simulators. It is intended for pre-merge builds of pull requests. diff --git a/jenkins/build-opm-autodiff.sh b/jenkins/build-opm-simulators.sh similarity index 94% rename from jenkins/build-opm-autodiff.sh rename to jenkins/build-opm-simulators.sh index eac0a823f..690846835 100755 --- a/jenkins/build-opm-autodiff.sh +++ b/jenkins/build-opm-simulators.sh @@ -1,6 +1,6 @@ #!/bin/bash -function build_opm_autodiff { +function build_opm_simulators { # Build ERT pushd . mkdir -p $WORKSPACE/deps/ert @@ -58,10 +58,10 @@ function build_opm_autodiff { clone_and_build_module opm-output "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" $OPM_OUTPUT_REVISION $WORKSPACE/serial test $? -eq 0 || exit 1 - # Build opm-autodiff + # Build opm-simulators pushd . - mkdir serial/build-opm-autodiff - cd serial/build-opm-autodiff + mkdir serial/build-opm-simulators + cd serial/build-opm-simulators build_module "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install" 1 $WORKSPACE test $? -eq 0 || exit 1 popd diff --git a/jenkins/build-pr.sh b/jenkins/build-pr.sh index 4ddb28243..e4d517ee3 100755 --- a/jenkins/build-pr.sh +++ b/jenkins/build-pr.sh @@ -1,6 +1,6 @@ #!/bin/bash -source `dirname $0`/build-opm-autodiff.sh +source `dirname $0`/build-opm-simulators.sh ERT_REVISION=master OPM_COMMON_REVISION=master @@ -9,7 +9,7 @@ OPM_MATERIAL_REVISION=master OPM_CORE_REVISION=master OPM_GRID_REVISION=master OPM_OUTPUT_REVISION=master -OPM_AUTODIFF_REVISION=$sha1 +OPM_SIMULATORS_REVISION=$sha1 if grep -q "ert=" <<< $ghprbCommentBody then @@ -46,9 +46,9 @@ then OPM_OUTPUT_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-output=([0-9]+).*/\1/g'`/merge fi -echo "Building with ert=$ERT_REVISION opm-common=$OPM_COMMON_REVISION opm-parser=$OPM_PARSER_REVISION opm-material=$OPM_MATERIAL_REVISION opm-core=$OPM_CORE_REVISION opm-grid=$OPM_GRID_REVISION opm-output=$OPM_OUTPUT_REVISION opm-autodiff=$OPM_AUTODIFF_REVISION" +echo "Building with ert=$ERT_REVISION opm-common=$OPM_COMMON_REVISION opm-parser=$OPM_PARSER_REVISION opm-material=$OPM_MATERIAL_REVISION opm-core=$OPM_CORE_REVISION opm-grid=$OPM_GRID_REVISION opm-output=$OPM_OUTPUT_REVISION opm-simulators=$OPM_SIMULATORS_REVISION" -build_opm_autodiff +build_opm_simulators test $? -eq 0 || exit 1 -cp serial/build-opm-autodiff/testoutput.xml . +cp serial/build-opm-simulators/testoutput.xml . diff --git a/jenkins/build.sh b/jenkins/build.sh index d251a8a57..5c487c9a2 100755 --- a/jenkins/build.sh +++ b/jenkins/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -source `dirname $0`/build-opm-autodiff.sh +source `dirname $0`/build-opm-simulators.sh ERT_REVISION=master OPM_COMMON_REVISION=master @@ -10,7 +10,7 @@ OPM_CORE_REVISION=master OPM_GRID_REVISION=master OPM_OUTPUT_REVISION=master -build_opm_autodiff +build_opm_simulators test $? -eq 0 || exit 1 -cp serial/build-opm-autodiff/testoutput.xml . +cp serial/build-opm-simulators/testoutput.xml . diff --git a/jenkins/run-norne.sh b/jenkins/run-norne.sh index 064affb25..b8073d774 100755 --- a/jenkins/run-norne.sh +++ b/jenkins/run-norne.sh @@ -17,7 +17,7 @@ cd deps/opm-data # Run the norne case cd norne -$WORKSPACE/serial/build-opm-autodiff/bin/flow deck_filename=NORNE_ATW2013.DATA output_dir=OPM +$WORKSPACE/serial/build-opm-simulators/bin/flow deck_filename=NORNE_ATW2013.DATA output_dir=OPM test $? -eq 0 || exit 1 PATH=$WORKSPACE/serial/install/bin:$PATH ./plotwells.sh diff --git a/jenkins/run-polymer.sh b/jenkins/run-polymer.sh index ea2994eeb..1fd99aead 100755 --- a/jenkins/run-polymer.sh +++ b/jenkins/run-polymer.sh @@ -18,7 +18,7 @@ cd deps/opm-data # Run the simple2D polymer case cd polymer_test_suite/simple2D -$WORKSPACE/serial/build-opm-autodiff/bin/flow_polymer run.param +$WORKSPACE/serial/build-opm-simulators/bin/flow_polymer run.param test $? -eq 0 || exit 1 cd ../.. diff --git a/jenkins/run-spe.sh b/jenkins/run-spe.sh index 2cf97eeb4..084da551b 100755 --- a/jenkins/run-spe.sh +++ b/jenkins/run-spe.sh @@ -17,15 +17,15 @@ cd deps/opm-data # Run the SPE1/3/9 cases cd spe1 -$WORKSPACE/serial/build-opm-autodiff/bin/flow deck_filename=SPE1CASE2.DATA +$WORKSPACE/serial/build-opm-simulators/bin/flow deck_filename=SPE1CASE2.DATA test $? -eq 0 || exit 1 cd .. cd spe3 -$WORKSPACE/serial/build-opm-autodiff/bin/flow max_iter=50 deck_filename=SPE3CASE1.DATA +$WORKSPACE/serial/build-opm-simulators/bin/flow max_iter=50 deck_filename=SPE3CASE1.DATA test $? -eq 0 || exit 1 cd .. cd spe9 -$WORKSPACE/serial/build-opm-autodiff/bin/flow max_iter=50 deck_filename=SPE9_CP.DATA +$WORKSPACE/serial/build-opm-simulators/bin/flow max_iter=50 deck_filename=SPE9_CP.DATA test $? -eq 0 || exit 1 cd .. diff --git a/m4/opm_autodiff.m4 b/m4/opm_autodiff.m4 deleted file mode 100644 index 2a6296469..000000000 --- a/m4/opm_autodiff.m4 +++ /dev/null @@ -1,12 +0,0 @@ -dnl -*- autoconf -*- - -dnl locate opm-autodiff library itself; this macro is called by every module -dnl that depends on opm-autodiff. -AC_DEFUN([OPM_AUTODIFF_CHECK_MODULE], -[ - OPM_CHECK_PKG_MODULE([opm-autodiff],[1.0],[Utilities for automatic differentiation and simulators based on AD]) -]) - -dnl find all prerequisites of opm-autodiff; nothing to do here since this -dnl is done by the CMake module and then stored in the -config file. -AC_DEFUN([OPM_AUTODIFF_CHECKS],[]) diff --git a/opm/autodiff/opm-autodiff_doxygen_main.hpp b/opm/autodiff/opm-simulators_doxygen_main.hpp similarity index 68% rename from opm/autodiff/opm-autodiff_doxygen_main.hpp rename to opm/autodiff/opm-simulators_doxygen_main.hpp index 80391d6c5..006089b5c 100644 --- a/opm/autodiff/opm-autodiff_doxygen_main.hpp +++ b/opm/autodiff/opm-simulators_doxygen_main.hpp @@ -1,5 +1,5 @@ /* - Copyright 2013 SINTEF ICT, Applied Mathematics. + Copyright 2013, 2016 SINTEF ICT, Applied Mathematics. This file is part of the Open Porous Media project (OPM). @@ -17,11 +17,21 @@ along with OPM. If not, see . */ -#ifndef OPM_OPM-AUTODIFF_DOXYGEN_MAIN_HEADER_INCLUDED -#define OPM_OPM-AUTODIFF_DOXYGEN_MAIN_HEADER_INCLUDED +#ifndef OPM_OPM-SIMULATORS_DOXYGEN_MAIN_HEADER_INCLUDED +#define OPM_OPM-SIMULATORS_DOXYGEN_MAIN_HEADER_INCLUDED -/** \mainpage Documentation for the opm-autodiff library. +/** \mainpage Documentation for the opm-simulators library. + + +

Solvers and simulators

+ +The opm-simulators module contains a diverse set of simulator programs. +Notable simulator programs include +- examples/flow.cpp, a fully implicit black-oil simulator. +- examples/flow_polymer.cpp, a version of Flow that supports polymer EOR simulation +- examples/flow_solvent.cpp, a version of Flow that supports solvent EOR simulation +- examples/sim_2p_incomp_ad.cpp, a sequential incompressible 2-phase simulator.

Automatic differentiation

@@ -36,14 +46,6 @@ include Opm::HelperOps, Opm::UpwindSelector, Opm::subset, Opm::superset, Opm::Selector, Opm::collapseJacs, Opm::vertcat, Opm::Span and Opm::sign. -

Solvers and simulators

- -There are some solvers and simulators in opm-autodiff. They should all -be considered experimental prototypes at this point. Notable simulator -prototypes include -- examples/sim_fibo_ad.cpp, a fully implicit black-oil simulator. -- examples/sim_2p_incomp_ad.cpp, a sequential incompressible 2-phase simulator. - */ -#endif // OPM_OPM-AUTODIFF_DOXYGEN_MAIN_HEADER_INCLUDED +#endif // OPM_OPM-SIMULATORS_DOXYGEN_MAIN_HEADER_INCLUDED diff --git a/travis/build-and-test-opm-autodiff.sh b/travis/build-and-test-opm-simulators.sh similarity index 56% rename from travis/build-and-test-opm-autodiff.sh rename to travis/build-and-test-opm-simulators.sh index ee9c08208..adbc884aa 100755 --- a/travis/build-and-test-opm-autodiff.sh +++ b/travis/build-and-test-opm-simulators.sh @@ -2,7 +2,7 @@ set -ex pushd . > /dev/null -opm-autodiff/travis/build-opm-autodiff.sh -cd opm-autodiff/build +opm-simulators/travis/build-opm-simulators.sh +cd opm-simulators/build ctest --output-on-failure popd > /dev/null diff --git a/travis/build-opm-autodiff.sh b/travis/build-opm-simulators.sh similarity index 88% rename from travis/build-opm-autodiff.sh rename to travis/build-opm-simulators.sh index 289a3a639..c0b5b08c8 100755 --- a/travis/build-opm-autodiff.sh +++ b/travis/build-opm-simulators.sh @@ -2,7 +2,7 @@ set -ex pushd . > /dev/null -cd opm-autodiff +cd opm-simulators mkdir build cd build cmake -D SUPERLU_ROOT=../../SuperLU ../