diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index 24ee6395b..7a38c79ae 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -53,22 +53,15 @@ list (APPEND MAIN_SOURCE_FILES opm/grid/cpgpreprocess/uniquepoints.c opm/grid/UnstructuredGrid.c opm/grid/grid_equal.cpp + opm/grid/transmissibility/trans_tpfa.c opm/grid/utility/compressedToCartesian.cpp opm/grid/utility/cartesianToCompressed.cpp + opm/grid/utility/extractPvtTableIndex.cpp opm/grid/utility/StopWatch.cpp + opm/grid/utility/VelocityInterpolation.cpp opm/grid/utility/WachspressCoord.cpp ) -if (opm-common_FOUND) - list(APPEND MAIN_SOURCE_FILES - opm/grid/utility/VelocityInterpolation.cpp - opm/grid/transmissibility/trans_tpfa.c) -endif() - -if(HAVE_ECL_INPUT) - list(APPEND MAIN_SOURCE_FILES opm/grid/utility/extractPvtTableIndex.cpp) -endif() - # originally generated with the command: # find tests/not-unit/ -name \*.cpp -o \*.cc list (APPEND ATTIC_FILES @@ -85,11 +78,13 @@ list (APPEND ATTIC_FILES list (APPEND TEST_SOURCE_FILES tests/test_cartgrid.cpp tests/test_column_extract.cpp + tests/test_compressedpropertyaccess.cpp tests/cpgrid/distribution_test.cpp tests/cpgrid/entityrep_test.cpp tests/cpgrid/entity_test.cpp tests/cpgrid/facetag_test.cpp tests/cpgrid/geometry_test.cpp + tests/cpgrid/grid_nnc.cpp tests/cpgrid/orientedentitytable_test.cpp tests/cpgrid/partition_iterator_test.cpp tests/cpgrid/zoltan_test.cpp @@ -98,20 +93,13 @@ list (APPEND TEST_SOURCE_FILES tests/test_minpvprocessor.cpp # tests/grid_test.cc tests/p2pcommunicator_test.cc + tests/test_regionmapping.cpp + tests/test_quadratures.cpp tests/test_repairzcorn.cpp tests/test_sparsetable.cpp - tests/test_quadratures.cpp + tests/test_ug.cpp tests/test_compressed_cartesian_mapping.cpp - ) - -if(HAVE_ECL_INPUT) - list(APPEND TEST_SOURCE_FILES - tests/test_regionmapping.cpp - tests/test_ug.cpp - tests/test_compressedpropertyaccess.cpp - tests/cpgrid/grid_nnc.cpp - ) -endif() +) # originally generated with the command: # find tests -name '*.xml' -a ! -wholename '*/not-unit/*' -printf '\t%p\n' | sort @@ -126,19 +114,17 @@ list (APPEND TEST_DATA_FILES # originally generated with the command: # find tutorials examples -name '*.c*' -printf '\t%p\n' | sort list (APPEND EXAMPLE_SOURCE_FILES - examples/finitevolume/finitevolume.cc - examples/mirror_grid.cpp - ) + examples/finitevolume/finitevolume.cc + examples/grdecl2vtu.cpp + examples/mirror_grid.cpp +) # programs listed here will not only be compiled, but also marked for # installation list (APPEND PROGRAM_SOURCE_FILES - examples/mirror_grid.cpp - ) -if(HAVE_ECL_INPUT) - list(APPEND EXAMPLE_SOURCE_FILES examples/grdecl2vtu.cpp) - list(APPEND PROGRAM_SOURCE_FILES examples/grdecl2vtu.cpp) -endif() + examples/mirror_grid.cpp + examples/grdecl2vtu.cpp +) # originally generated with the command: # find dune -name '*.h*' -a ! -name '*-pch.hpp' -printf '\t%p\n' | sort @@ -217,7 +203,6 @@ list (APPEND PUBLIC_HEADER_FILES opm/grid/utility/StopWatch.hpp opm/grid/utility/VelocityInterpolation.hpp opm/grid/utility/WachspressCoord.hpp - opm/grid/utility/ErrorMacros.hpp opm/grid/utility/OpmParserIncludes.hpp opm/grid/utility/platform_dependent/disable_warnings.h opm/grid/utility/platform_dependent/reenable_warnings.h diff --git a/opm-grid-prereqs.cmake b/opm-grid-prereqs.cmake index f46198892..f1094bdfb 100644 --- a/opm-grid-prereqs.cmake +++ b/opm-grid-prereqs.cmake @@ -12,8 +12,6 @@ set (opm-grid_CONFIG_VAR HAVE_DUNE_ISTL HAVE_MPI HAVE_ZOLTAN - HAVE_OPM_COMMON - HAVE_ECL_INPUT ) # dependencies diff --git a/opm/grid/CellQuadrature.hpp b/opm/grid/CellQuadrature.hpp index 6954fb2fc..cb614f866 100644 --- a/opm/grid/CellQuadrature.hpp +++ b/opm/grid/CellQuadrature.hpp @@ -21,7 +21,7 @@ #define OPM_CELLQUADRATURE_HEADER_INCLUDED #include -#include +#include #include #include diff --git a/opm/grid/CpGrid.hpp b/opm/grid/CpGrid.hpp index 8b012c7d8..655789af5 100644 --- a/opm/grid/CpGrid.hpp +++ b/opm/grid/CpGrid.hpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include // Warning suppression for Dune includes. #include @@ -257,7 +257,6 @@ namespace Dune void writeSintefLegacyFormat(const std::string& grid_prefix) const; -#if HAVE_ECL_INPUT /// Read the Eclipse grid format ('grdecl'). /// \param ecl_grid the high-level object from opm-parser which represents the simulation's grid /// \param periodic_extension if true, the grid will be (possibly) refined, so that @@ -269,7 +268,6 @@ namespace Dune void processEclipseFormat(const Opm::EclipseGrid& ecl_grid, bool periodic_extension, bool turn_normals = false, bool clip_z = false, const std::vector& poreVolume = std::vector(), const Opm::NNC& = Opm::NNC()); -#endif /// Read the Eclipse grid format ('grdecl'). /// \param input_data the data in grdecl format, declared in preprocess.h. diff --git a/opm/grid/FaceQuadrature.hpp b/opm/grid/FaceQuadrature.hpp index 8bb2e8d2e..ac29ae766 100644 --- a/opm/grid/FaceQuadrature.hpp +++ b/opm/grid/FaceQuadrature.hpp @@ -20,7 +20,7 @@ #ifndef OPM_FACEQUADRATURE_HEADER_INCLUDED #define OPM_FACEQUADRATURE_HEADER_INCLUDED -#include +#include #include #include diff --git a/opm/grid/GridHelpers.cpp b/opm/grid/GridHelpers.cpp index 522d5ac39..9c7cf0d08 100644 --- a/opm/grid/GridHelpers.cpp +++ b/opm/grid/GridHelpers.cpp @@ -323,7 +323,6 @@ FaceCellTraits::Type faceCells(const UnstructuredGrid& grid) } -#if HAVE_ECL_INPUT Opm::EclipseGrid createEclipseGrid(const UnstructuredGrid& grid, const Opm::EclipseGrid& inputGrid ) { const int * dims = UgGridHelpers::cartDims( grid ); @@ -345,7 +344,6 @@ Opm::EclipseGrid createEclipseGrid(const UnstructuredGrid& grid, const Opm::Ecli throw std::invalid_argument("Size mismatch - dimensions of inputGrid argument and current UnstructuredGrid instance disagree"); } } -#endif } } diff --git a/opm/grid/GridHelpers.hpp b/opm/grid/GridHelpers.hpp index 06b52edfa..d8c873a46 100644 --- a/opm/grid/GridHelpers.hpp +++ b/opm/grid/GridHelpers.hpp @@ -223,11 +223,9 @@ struct CellVolumeIteratorTraits correctly represented in the EclipseGrid created by this method. */ -#if HAVE_ECL_INPUT /// \brief Construct an EclipseGrid instance based on the inputGrid, with modifications to /// zcorn and actnum from the dune UnstructuredGrid. Opm::EclipseGrid createEclipseGrid(const UnstructuredGrid& grid, const Opm::EclipseGrid& inputGrid ); -#endif /// \brief Get an iterator over the cell volumes of a grid positioned at the first cell. const double* beginCellVolumes(const UnstructuredGrid& grid); diff --git a/opm/grid/GridManager.cpp b/opm/grid/GridManager.cpp index 470f738a4..525606ed2 100644 --- a/opm/grid/GridManager.cpp +++ b/opm/grid/GridManager.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include @@ -36,7 +36,6 @@ namespace Opm { -#if HAVE_ECL_INPUT /// Construct a 3d corner-point grid from a deck. GridManager::GridManager(const Opm::EclipseGrid& inputGrid) : ug_(0) @@ -51,7 +50,6 @@ namespace Opm { initFromEclipseGrid(inputGrid, poreVolumes); } -#endif /// Construct a 2d cartesian grid with cells of unit size. @@ -127,7 +125,6 @@ namespace Opm -#if HAVE_ECL_INPUT // Construct corner-point grid from EclipseGrid. void GridManager::initFromEclipseGrid(const Opm::EclipseGrid& inputGrid, const std::vector& poreVolumes) @@ -173,8 +170,6 @@ namespace Opm } -#endif - diff --git a/opm/grid/GridManager.hpp b/opm/grid/GridManager.hpp index c19210179..dd927e585 100644 --- a/opm/grid/GridManager.hpp +++ b/opm/grid/GridManager.hpp @@ -41,7 +41,6 @@ namespace Opm { public: -#if HAVE_ECL_INPUT /// Construct a grid from an EclipseState::EclipseGrid instance. explicit GridManager(const Opm::EclipseGrid& inputGrid); @@ -52,7 +51,6 @@ namespace Opm /// \input[in] poreVolumes one element per logical cartesian grid element GridManager(const Opm::EclipseGrid& inputGrid, const std::vector& poreVolumes); -#endif /// Construct a 2d cartesian grid with cells of unit size. GridManager(int nx, int ny); @@ -85,11 +83,9 @@ namespace Opm GridManager(const GridManager& other); GridManager& operator=(const GridManager& other); -#if HAVE_ECL_INPUT // Construct corner-point grid from EclipseGrid. void initFromEclipseGrid(const Opm::EclipseGrid& inputGrid, const std::vector& poreVolumes); -#endif // The managed UnstructuredGrid. UnstructuredGrid* ug_; diff --git a/opm/grid/MinpvProcessor.hpp b/opm/grid/MinpvProcessor.hpp index f2ba95dd7..e73bafd4a 100644 --- a/opm/grid/MinpvProcessor.hpp +++ b/opm/grid/MinpvProcessor.hpp @@ -21,7 +21,7 @@ #define OPM_MINPVPROCESSOR_HEADER_INCLUDED -#include +#include #include #include diff --git a/opm/grid/common/GeometryHelpers.hpp b/opm/grid/common/GeometryHelpers.hpp index 5dac88b0b..4880da0a8 100644 --- a/opm/grid/common/GeometryHelpers.hpp +++ b/opm/grid/common/GeometryHelpers.hpp @@ -39,7 +39,7 @@ #include -#include +#include #include "Volumes.hpp" namespace Dune diff --git a/opm/grid/common/WellConnections.cpp b/opm/grid/common/WellConnections.cpp index 56b548ce8..60586524e 100644 --- a/opm/grid/common/WellConnections.cpp +++ b/opm/grid/common/WellConnections.cpp @@ -42,7 +42,6 @@ void WellConnections::init(const std::vector& wells, const std::array& cartesianSize, const std::vector& cartesian_to_compressed) { -#if HAVE_ECL_INPUT well_indices_.resize(wells.size()); // We assume that we know all the wells. @@ -64,7 +63,6 @@ void WellConnections::init(const std::vector& wells, } ++index; } -#endif } std::vector > @@ -76,7 +74,6 @@ postProcessPartitioningForWells(std::vector& parts, // Contains for each process the indices of the wells assigned to it. std::vector > well_indices_on_proc(no_procs); -#if HAVE_ECL_INPUT if( ! well_connections.size() ) { // No wells to be processed @@ -127,7 +124,6 @@ postProcessPartitioningForWells(std::vector& parts, well_indices_on_proc[owner].push_back(well_index); ++well_index; } -#endif return well_indices_on_proc; @@ -143,7 +139,6 @@ computeDefunctWellNames(const std::vector >& wells_on_proc, // We need to use well names as only they are consistent. std::unordered_set defunct_well_names; -#if HAVE_ECL_INPUT std::vector my_well_indices; const int well_information_tag = 267553; @@ -190,7 +185,6 @@ computeDefunctWellNames(const std::vector >& wells_on_proc, defunct_well_names.insert(wells[defunct-defunct_wells.begin()].name()); } } -#endif return defunct_well_names; } diff --git a/opm/grid/cpgrid/CpGrid.cpp b/opm/grid/cpgrid/CpGrid.cpp index a38763f28..fcb0f1421 100644 --- a/opm/grid/cpgrid/CpGrid.cpp +++ b/opm/grid/cpgrid/CpGrid.cpp @@ -268,7 +268,6 @@ CpGrid::scatterGrid(EdgeWeightMethod method, const std::vector& poreVolume = std::vector(), const Opm::NNC& nncs = Opm::NNC()); -#endif /// Read the Eclipse grid format ('grdecl'). /// \param input_data the data in grdecl format, declared in preprocess.h. diff --git a/opm/grid/cpgrid/EntityRep.hpp b/opm/grid/cpgrid/EntityRep.hpp index d5263d98e..68eaf28b9 100644 --- a/opm/grid/cpgrid/EntityRep.hpp +++ b/opm/grid/cpgrid/EntityRep.hpp @@ -69,7 +69,7 @@ namespace Dune //#include -#include +#include #include //#include #include diff --git a/opm/grid/cpgrid/Geometry.hpp b/opm/grid/cpgrid/Geometry.hpp index be06aedd7..2cc31b4c3 100644 --- a/opm/grid/cpgrid/Geometry.hpp +++ b/opm/grid/cpgrid/Geometry.hpp @@ -52,7 +52,7 @@ #include #include -#include +#include namespace Dune { diff --git a/opm/grid/cpgrid/GridHelpers.cpp b/opm/grid/cpgrid/GridHelpers.cpp index e541c3cee..d069428c7 100644 --- a/opm/grid/cpgrid/GridHelpers.cpp +++ b/opm/grid/cpgrid/GridHelpers.cpp @@ -30,7 +30,6 @@ namespace Opm namespace UgGridHelpers { -#if HAVE_ECL_INPUT EclipseGrid createEclipseGrid(const Dune::CpGrid& grid, const EclipseGrid& inputGrid) { const int * dims = cartDims( grid ); @@ -52,7 +51,6 @@ EclipseGrid createEclipseGrid(const Dune::CpGrid& grid, const EclipseGrid& input throw std::invalid_argument("Size mismatch - dimensions of inputGrid argument and current Dune CpGrid instance disagree"); } } -#endif int numCells(const Dune::CpGrid& grid) { diff --git a/opm/grid/cpgrid/GridHelpers.hpp b/opm/grid/cpgrid/GridHelpers.hpp index f9aa0654d..d9f3e16b5 100644 --- a/opm/grid/cpgrid/GridHelpers.hpp +++ b/opm/grid/cpgrid/GridHelpers.hpp @@ -406,11 +406,9 @@ const int* cartDims(const Dune::CpGrid& grid); /// in the underlying structured grid. const int* globalCell(const Dune::CpGrid&); -#if HAVE_ECL_INPUT /// Construct an EclipseGrid instance based on the inputGrid, with modifications to /// zcorn and actum from the dune CPGrid EclipseGrid createEclipseGrid(const Dune::CpGrid& grid, const EclipseGrid& inputGrid); -#endif CellCentroidTraits::IteratorType beginCellCentroids(const Dune::CpGrid& grid); diff --git a/opm/grid/cpgrid/Indexsets.hpp b/opm/grid/cpgrid/Indexsets.hpp index 3bac983b1..576810b86 100644 --- a/opm/grid/cpgrid/Indexsets.hpp +++ b/opm/grid/cpgrid/Indexsets.hpp @@ -37,7 +37,7 @@ along with OPM. If not, see . #define OPM_INDEXSETS_HEADER #include -#include +#include #include "GlobalIdMapping.hpp" #include "Intersection.hpp" diff --git a/opm/grid/cpgrid/Intersection.hpp b/opm/grid/cpgrid/Intersection.hpp index a64096c69..144017cd7 100644 --- a/opm/grid/cpgrid/Intersection.hpp +++ b/opm/grid/cpgrid/Intersection.hpp @@ -41,7 +41,7 @@ #include -#include +#include // The next statement is a layering violation: we only #include // preprocess.h to get at its "enum face_tag" definition. Enum diff --git a/opm/grid/cpgrid/Iterators.hpp b/opm/grid/cpgrid/Iterators.hpp index 3231d1e24..077316ac6 100644 --- a/opm/grid/cpgrid/Iterators.hpp +++ b/opm/grid/cpgrid/Iterators.hpp @@ -38,7 +38,7 @@ along with OPM. If not, see . #include #include "PartitionIteratorRule.hpp" -#include +#include namespace Dune { diff --git a/opm/grid/cpgrid/processEclipseFormat.cpp b/opm/grid/cpgrid/processEclipseFormat.cpp index 5f2fe1382..fc048ce49 100644 --- a/opm/grid/cpgrid/processEclipseFormat.cpp +++ b/opm/grid/cpgrid/processEclipseFormat.cpp @@ -69,11 +69,9 @@ namespace Dune // Forward declarations. namespace { -#if HAVE_ECL_INPUT std::vector getSanitizedZCORN(const ::Opm::EclipseGrid& ecl_grid, const ::std::vector& actnum); -#endif typedef std::array coord_t; typedef std::array cellz_t; @@ -112,7 +110,6 @@ namespace Dune namespace cpgrid { -#if HAVE_ECL_INPUT void CpGridData::processEclipseFormat(const Opm::EclipseGrid& ecl_grid, bool periodic_extension, bool turn_normals, bool clip_z, const std::vector& poreVolume, const Opm::NNC& nncs) { @@ -232,7 +229,6 @@ namespace cpgrid processEclipseFormat(g, nnc_cells, z_tolerance, false, turn_normals); } } -#endif // #if HAVE_ECL_INPUT enum { NNCFace = -1 }; @@ -306,7 +302,6 @@ namespace cpgrid namespace { -#if HAVE_ECL_INPUT std::vector getSanitizedZCORN(const ::Opm::EclipseGrid& ecl_grid, const ::std::vector& actnumData) @@ -353,7 +348,6 @@ namespace cpgrid return zcornData; } -#endif typedef std::array coord_t; typedef std::array cellz_t; diff --git a/opm/grid/cpgrid/readSintefLegacyFormat.cpp b/opm/grid/cpgrid/readSintefLegacyFormat.cpp index 02022c41e..55ca1f4bc 100644 --- a/opm/grid/cpgrid/readSintefLegacyFormat.cpp +++ b/opm/grid/cpgrid/readSintefLegacyFormat.cpp @@ -40,7 +40,7 @@ #include #include -#include +#include #include "CpGridData.hpp" namespace Dune diff --git a/opm/grid/cpgrid/writeSintefLegacyFormat.cpp b/opm/grid/cpgrid/writeSintefLegacyFormat.cpp index d4e82a467..0baedf6b8 100644 --- a/opm/grid/cpgrid/writeSintefLegacyFormat.cpp +++ b/opm/grid/cpgrid/writeSintefLegacyFormat.cpp @@ -41,7 +41,7 @@ #include #include -#include +#include #include "CpGridData.hpp" namespace Dune diff --git a/opm/grid/grid_equal.cpp b/opm/grid/grid_equal.cpp index d4f0ad1e5..18e962c47 100644 --- a/opm/grid/grid_equal.cpp +++ b/opm/grid/grid_equal.cpp @@ -1,7 +1,5 @@ #include -#if HAVE_ECL_INPUT - #include // C string.h to get memcmp() #include @@ -78,5 +76,3 @@ grid_equal(const struct UnstructuredGrid * grid1 , const struct UnstructuredGrid } else return false; } - -#endif // #if HAVE_ECL_INPUT diff --git a/opm/grid/polyhedralgrid/grid.hh b/opm/grid/polyhedralgrid/grid.hh index f23d63e08..9daa1591f 100644 --- a/opm/grid/polyhedralgrid/grid.hh +++ b/opm/grid/polyhedralgrid/grid.hh @@ -294,7 +294,6 @@ namespace Dune /** \name Construction and Destruction * \{ */ -#if HAVE_ECL_INPUT /** \brief constructor * * \param[in] deck Opm Eclipse deck @@ -311,7 +310,6 @@ namespace Dune { init(); } -#endif /** \brief constructor * @@ -788,7 +786,6 @@ namespace Dune protected: -#if HAVE_ECL_INPUT UnstructuredGridType* createGrid( const Opm::Deck& deck, const std::vector< double >& poreVolumes ) const { const int* rawactnum = deck.hasKeyword("ACTNUM") @@ -840,7 +837,6 @@ namespace Dune } return cgrid; } -#endif public: using Base::getRealImplementation; diff --git a/opm/grid/utility/ErrorMacros.hpp b/opm/grid/utility/ErrorMacros.hpp deleted file mode 100644 index 5554fd41c..000000000 --- a/opm/grid/utility/ErrorMacros.hpp +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright 2013 Andreas Lauser - Copyright 2009, 2010 SINTEF ICT, Applied Mathematics. - Copyright 2009, 2010 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 . -*/ -#ifndef OPM_GRID_ERRORMACROS_HEADER_INCLUDED -#define OPM_GRID_ERRORMACROS_HEADER_INCLUDED - -#if HAVE_OPM_COMMON -#include -#else - -// reimplementation of OPM macro when opm-common is not present - -#include -#include -#include -#include -#include - -// macros for reporting to stderr -#ifdef OPM_VERBOSE // Verbose mode -# include -# define OPM_REPORT do { std::cerr << "[" << __FILE__ << ":" << __LINE__ << "] " } while (false) -# define OPM_MESSAGE(x) do { OPM_REPORT; std::cerr << x << "\n"; } while (false) -# define OPM_MESSAGE_IF(cond, m) do {if(cond) OPM_MESSAGE(m);} while (false) -#else // non-verbose mode (default) -# define OPM_REPORT do {} while (false) -# define OPM_MESSAGE(x) do {} while (false) -# define OPM_MESSAGE_IF(cond, m) do {} while (false) -#endif - -// Macro to throw an exception. NOTE: For this macro to work, the -// exception class must exhibit a constructor with the signature -// (const std::string &message). Since this condition is not fulfilled -// for the std::exception, you should use this macro with some -// exception class derived from either std::logic_error or -// std::runtime_error. -// -// Usage: OPM_THROW(ExceptionClass, "Error message " << value); -#define OPM_THROW(Exception, message) \ - do { \ - std::ostringstream oss__; \ - oss__ << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \ - throw Exception(oss__.str()); \ - } while (false) - -// Same as OPM_THROW, except for not making an OpmLog::error() call. -// -// Usage: OPM_THROW_NOLOG(ExceptionClass, "Error message " << value); -#define OPM_THROW_NOLOG(Exception, message) \ - do { \ - std::ostringstream oss__; \ - oss__ << "[" << __FILE__ << ":" << __LINE__ << "] " << message; \ - throw Exception(oss__.str()); \ - } while (false) - -// throw an exception if a condition is true -#define OPM_ERROR_IF(condition, message) do {if(condition){ OPM_THROW(std::logic_error, message);}} while(false) - -#endif // #if HAVE_OPM_COMMON - -#endif // OPM_ERRORMACROS_HPP diff --git a/opm/grid/utility/OpmParserIncludes.hpp b/opm/grid/utility/OpmParserIncludes.hpp index 22339d828..915685ae3 100644 --- a/opm/grid/utility/OpmParserIncludes.hpp +++ b/opm/grid/utility/OpmParserIncludes.hpp @@ -19,7 +19,6 @@ #ifndef OPM_GRID_OPMPARSERINCLUDES_HEADER_INCLUDED #define OPM_GRID_OPMPARSERINCLUDES_HEADER_INCLUDED -#if HAVE_ECL_INPUT #include #include #include @@ -34,15 +33,5 @@ namespace Dune { typedef Opm::EclipseState OpmEclipseStateType; } } -#else // #if HAVE_ECL_INPUT - -namespace Dune { - namespace cpgrid { - typedef int OpmWellType; - typedef int OpmEclipseStateType; - } -} - -#endif // #if HAVE_ECL_INPUT #endif // #ifndef OPM_GRID_OPMPARSERINCLUDES_HEADER_INCLUDED diff --git a/opm/grid/utility/SparseTable.hpp b/opm/grid/utility/SparseTable.hpp index f94e7f9c8..60c14ccf0 100644 --- a/opm/grid/utility/SparseTable.hpp +++ b/opm/grid/utility/SparseTable.hpp @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include diff --git a/opm/grid/utility/StopWatch.cpp b/opm/grid/utility/StopWatch.cpp index 075ce7cce..9afaac026 100644 --- a/opm/grid/utility/StopWatch.cpp +++ b/opm/grid/utility/StopWatch.cpp @@ -37,7 +37,7 @@ #endif #include #include -#include +#include namespace Opm { diff --git a/opm/grid/utility/platform_dependent/disable_warnings.h b/opm/grid/utility/platform_dependent/disable_warnings.h index 7ca9a789c..647fc846b 100644 --- a/opm/grid/utility/platform_dependent/disable_warnings.h +++ b/opm/grid/utility/platform_dependent/disable_warnings.h @@ -19,8 +19,6 @@ #ifndef OPM_GRID_UTILITY_DISABLE_WARNINGS_HEADER_INCLUDED #define OPM_GRID_UTILITY_DISABLE_WARNINGS_HEADER_INCLUDED -#if HAVE_OPM_COMMON #include -#endif #endif diff --git a/opm/grid/utility/platform_dependent/reenable_warnings.h b/opm/grid/utility/platform_dependent/reenable_warnings.h index e2daf8de7..c9e34e5e4 100644 --- a/opm/grid/utility/platform_dependent/reenable_warnings.h +++ b/opm/grid/utility/platform_dependent/reenable_warnings.h @@ -19,8 +19,6 @@ #ifndef OPM_GRID_UTILITY_DISABLE_WARNINGS_HEADER_INCLUDED #define OPM_GRID_UTILITY_DISABLE_WARNINGS_HEADER_INCLUDED -#if HAVE_OPM_COMMON #include -#endif #endif diff --git a/tests/grid_test.cc b/tests/grid_test.cc index 78ae8f2df..bd6770df5 100644 --- a/tests/grid_test.cc +++ b/tests/grid_test.cc @@ -163,20 +163,16 @@ int main(int argc, char** argv ) dgfFile << "8 8 8" << std::endl; dgfFile << "#" << std::endl; -#if HAVE_ECL_INPUT Opm::Parser parser; Opm::ParseContext parseContext; const auto deck = parser.parseString(deckString , parseContext); std::vector porv; -#endif // test PolyhedralGrid { typedef Dune::PolyhedralGrid< 3, 3 > Grid; -#if HAVE_ECL_INPUT Grid grid(deck, porv); testGrid( grid, "polyhedralgrid" ); -#endif //Dune::GridPtr< Grid > gridPtr( dgfFile ); //testGrid( *gridPtr, "polyhedralgrid-dgf" ); } @@ -184,7 +180,6 @@ int main(int argc, char** argv ) // test CpGrid { typedef Dune::CpGrid Grid; -#if HAVE_ECL_INPUT Grid grid; const int* actnum = deck.hasKeyword("ACTNUM") ? deck.getKeyword("ACTNUM").getIntData().data() : nullptr; Opm::EclipseGrid ecl_grid(deck , actnum); @@ -194,7 +189,6 @@ int main(int argc, char** argv ) Opm::UgGridHelpers::createEclipseGrid( grid , ecl_grid ); testGrid( grid, "cpgrid2" ); -#endif Dune::GridPtr< Grid > gridPtr( dgfFile ); //testGrid( *gridPtr, "cpgrid-dgf" ); } diff --git a/tests/test_column_extract.cpp b/tests/test_column_extract.cpp index de75e67f7..d84e1e691 100644 --- a/tests/test_column_extract.cpp +++ b/tests/test_column_extract.cpp @@ -126,7 +126,6 @@ BOOST_AUTO_TEST_CASE(DisjointColumn) correct_answer[4].resize(1); correct_answer[9].resize(1); -#if HAVE_ECL_INPUT Opm::Parser parser; Opm::Deck deck = parser.parseString(grdecl); Opm::EclipseGrid ep = Opm::EclipseGrid(deck); @@ -158,5 +157,4 @@ BOOST_AUTO_TEST_CASE(DisjointColumn) BOOST_CHECK_EQUAL_COLLECTIONS((*xb).begin(), (*xb).end(), (*cb).begin(), (*cb).end()); } -#endif }