diff --git a/opm/parser/eclipse/Applications/opm-eclkwtest.cpp b/opm/parser/eclipse/Applications/opm-eclkwtest.cpp index ca5be8e0b..00d9ea420 100644 --- a/opm/parser/eclipse/Applications/opm-eclkwtest.cpp +++ b/opm/parser/eclipse/Applications/opm-eclkwtest.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include diff --git a/opm/parser/eclipse/Deck/Deck.cpp b/opm/parser/eclipse/Deck/Deck.cpp index 7215325f7..6ba64bb01 100644 --- a/opm/parser/eclipse/Deck/Deck.cpp +++ b/opm/parser/eclipse/Deck/Deck.cpp @@ -21,6 +21,7 @@ #include #include +#include #include namespace Opm { diff --git a/opm/parser/eclipse/Deck/Deck.hpp b/opm/parser/eclipse/Deck/Deck.hpp index f1a4288bb..83e7a7023 100644 --- a/opm/parser/eclipse/Deck/Deck.hpp +++ b/opm/parser/eclipse/Deck/Deck.hpp @@ -24,33 +24,32 @@ #include #include -#include - namespace Opm { + class DeckKeyword; class UnitSystem; class Deck { public: Deck(); - bool hasKeyword(DeckKeywordConstPtr keyword) const; + bool hasKeyword(std::shared_ptr< const DeckKeyword > keyword) const; bool hasKeyword( const std::string& keyword ) const; - void addKeyword( DeckKeywordConstPtr keyword); - DeckKeywordConstPtr getKeyword(const std::string& keyword , size_t index) const; - DeckKeywordConstPtr getKeyword(const std::string& keyword) const; - DeckKeywordConstPtr getKeyword(size_t index) const; + void addKeyword( std::shared_ptr< const DeckKeyword > keyword); + std::shared_ptr< const DeckKeyword > getKeyword(const std::string& keyword , size_t index) const; + std::shared_ptr< const DeckKeyword > getKeyword(const std::string& keyword) const; + std::shared_ptr< const DeckKeyword > getKeyword(size_t index) const; - size_t getKeywordIndex(DeckKeywordConstPtr keyword) const; + size_t getKeywordIndex(std::shared_ptr< const DeckKeyword > keyword) const; size_t numKeywords(const std::string& keyword) const; - const std::vector& getKeywordList(const std::string& keyword) const; + const std::vector>& getKeywordList(const std::string& keyword) const; size_t size() const; void initUnitSystem(); std::shared_ptr getDefaultUnitSystem() const; std::shared_ptr getActiveUnitSystem() const; - std::vector::const_iterator begin() const; - std::vector::const_iterator end() const; + std::vector>::const_iterator begin() const; + std::vector>::const_iterator end() const; template @@ -59,17 +58,17 @@ namespace Opm { } template - DeckKeywordConstPtr getKeyword(size_t index) const { + std::shared_ptr< const DeckKeyword > getKeyword(size_t index) const { return getkeyword( Keyword::keywordName , index ); } template - DeckKeywordConstPtr getKeyword() const { + std::shared_ptr< const DeckKeyword > getKeyword() const { return getKeyword( Keyword::keywordName ); } template - const std::vector& getKeywordList() const { + const std::vector>& getKeywordList() const { return getKeywordList( Keyword::keywordName ); } @@ -78,9 +77,9 @@ namespace Opm { std::shared_ptr m_activeUnits; private: - std::vector m_emptyList; - std::vector m_keywordList; - std::map > m_keywordMap; + std::vector> m_emptyList; + std::vector> m_keywordList; + std::map> > m_keywordMap; std::map m_keywordIndex; }; diff --git a/opm/parser/eclipse/Deck/DeckDoubleItem.cpp b/opm/parser/eclipse/Deck/DeckDoubleItem.cpp index 4752632d7..984679ea2 100644 --- a/opm/parser/eclipse/Deck/DeckDoubleItem.cpp +++ b/opm/parser/eclipse/Deck/DeckDoubleItem.cpp @@ -18,6 +18,7 @@ */ #include +#include #include #include diff --git a/opm/parser/eclipse/Deck/DeckDoubleItem.hpp b/opm/parser/eclipse/Deck/DeckDoubleItem.hpp index 2fec6270a..3854c2842 100644 --- a/opm/parser/eclipse/Deck/DeckDoubleItem.hpp +++ b/opm/parser/eclipse/Deck/DeckDoubleItem.hpp @@ -26,10 +26,11 @@ #include #include -#include namespace Opm { + class Dimension; + class DeckDoubleItem : public DeckItem { public: DeckDoubleItem(std::string name_, bool scalar = true) : DeckItem(name_, scalar) {} diff --git a/opm/parser/eclipse/Deck/DeckFloatItem.cpp b/opm/parser/eclipse/Deck/DeckFloatItem.cpp index 84acdc56f..2df9a44bf 100644 --- a/opm/parser/eclipse/Deck/DeckFloatItem.cpp +++ b/opm/parser/eclipse/Deck/DeckFloatItem.cpp @@ -18,6 +18,7 @@ */ #include +#include #include #include diff --git a/opm/parser/eclipse/Deck/DeckFloatItem.hpp b/opm/parser/eclipse/Deck/DeckFloatItem.hpp index 16147a327..ae232147a 100644 --- a/opm/parser/eclipse/Deck/DeckFloatItem.hpp +++ b/opm/parser/eclipse/Deck/DeckFloatItem.hpp @@ -26,7 +26,6 @@ #include #include -#include namespace Opm { diff --git a/opm/parser/eclipse/Deck/DeckIntItem.hpp b/opm/parser/eclipse/Deck/DeckIntItem.hpp index 8e5a914f6..a52788188 100644 --- a/opm/parser/eclipse/Deck/DeckIntItem.hpp +++ b/opm/parser/eclipse/Deck/DeckIntItem.hpp @@ -24,6 +24,7 @@ #include #include #include + #include namespace Opm { diff --git a/opm/parser/eclipse/Deck/DeckItem.hpp b/opm/parser/eclipse/Deck/DeckItem.hpp index 360091869..bfb0125de 100644 --- a/opm/parser/eclipse/Deck/DeckItem.hpp +++ b/opm/parser/eclipse/Deck/DeckItem.hpp @@ -20,14 +20,15 @@ #ifndef DECKITEM_HPP #define DECKITEM_HPP -#include - #include #include #include #include namespace Opm { + + class Dimension; + class DeckItem { public: DeckItem(const std::string& name , bool m_scalar = true); diff --git a/opm/parser/eclipse/Deck/DeckRecord.cpp b/opm/parser/eclipse/Deck/DeckRecord.cpp index 6c791b88e..8f1dee851 100644 --- a/opm/parser/eclipse/Deck/DeckRecord.cpp +++ b/opm/parser/eclipse/Deck/DeckRecord.cpp @@ -21,6 +21,7 @@ #include #include +#include #include diff --git a/opm/parser/eclipse/Deck/DeckRecord.hpp b/opm/parser/eclipse/Deck/DeckRecord.hpp index 320ce5d32..173c0d9da 100644 --- a/opm/parser/eclipse/Deck/DeckRecord.hpp +++ b/opm/parser/eclipse/Deck/DeckRecord.hpp @@ -20,34 +20,34 @@ #ifndef DECKRECORD_HPP #define DECKRECORD_HPP -#include #include #include #include #include -#include namespace Opm { + class DeckItem; + class DeckRecord { public: DeckRecord(); size_t size() const; - void addItem(DeckItemPtr deckItem); - DeckItemPtr getItem(size_t index) const; - DeckItemPtr getItem(const std::string& name) const; - DeckItemPtr getDataItem() const; + void addItem(std::shared_ptr< DeckItem > deckItem); + std::shared_ptr< DeckItem > getItem(size_t index) const; + std::shared_ptr< DeckItem > getItem(const std::string& name) const; + std::shared_ptr< DeckItem > getDataItem() const; bool hasItem(const std::string& name) const; template - DeckItemPtr getItem() const { + std::shared_ptr< DeckItem > getItem() const { return getItem( Item::itemName ); } private: - std::vector m_items; - std::map m_itemMap; + std::vector> m_items; + std::map> m_itemMap; }; typedef std::shared_ptr DeckRecordPtr; diff --git a/opm/parser/eclipse/Deck/DeckStringItem.hpp b/opm/parser/eclipse/Deck/DeckStringItem.hpp index 833c15d2f..68815dba8 100644 --- a/opm/parser/eclipse/Deck/DeckStringItem.hpp +++ b/opm/parser/eclipse/Deck/DeckStringItem.hpp @@ -24,6 +24,7 @@ #include #include #include + #include namespace Opm { diff --git a/opm/parser/eclipse/Deck/DeckTimeStep.hpp b/opm/parser/eclipse/Deck/DeckTimeStep.hpp index e042a7b6f..aa30f1d35 100644 --- a/opm/parser/eclipse/Deck/DeckTimeStep.hpp +++ b/opm/parser/eclipse/Deck/DeckTimeStep.hpp @@ -22,15 +22,11 @@ #include - namespace Opm { class DeckTimeStep : public Deck { public: DeckTimeStep(); - - private: - }; typedef std::shared_ptr DeckTimeStepPtr; diff --git a/opm/parser/eclipse/Deck/SCHEDULESection.cpp b/opm/parser/eclipse/Deck/SCHEDULESection.cpp index 8b87d93fb..77f914550 100644 --- a/opm/parser/eclipse/Deck/SCHEDULESection.cpp +++ b/opm/parser/eclipse/Deck/SCHEDULESection.cpp @@ -19,7 +19,9 @@ #include +#include #include +#include #include namespace Opm { diff --git a/opm/parser/eclipse/Deck/SCHEDULESection.hpp b/opm/parser/eclipse/Deck/SCHEDULESection.hpp index 81d8edb76..5a15963e2 100644 --- a/opm/parser/eclipse/Deck/SCHEDULESection.hpp +++ b/opm/parser/eclipse/Deck/SCHEDULESection.hpp @@ -21,24 +21,24 @@ #define SCHEDULESECTION_HPP -#include #include #include -#include namespace Opm { + class DeckTimeStep; + class SCHEDULESection : public Section { public: SCHEDULESection(DeckConstPtr deck); - DeckTimeStepConstPtr getDeckTimeStep(size_t timestep) const; + std::shared_ptr< const DeckTimeStep > getDeckTimeStep(size_t timestep) const; private: void populateDeckTimeSteps(); - std::vector m_decktimesteps; + std::vector< std::shared_ptr< DeckTimeStep > > m_decktimesteps; }; } diff --git a/opm/parser/eclipse/Deck/Section.cpp b/opm/parser/eclipse/Deck/Section.cpp index 8dd1ac3c6..5b4a35afd 100644 --- a/opm/parser/eclipse/Deck/Section.cpp +++ b/opm/parser/eclipse/Deck/Section.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/opm/parser/eclipse/Deck/tests/DeckRecordTests.cpp b/opm/parser/eclipse/Deck/tests/DeckRecordTests.cpp index 9d2f58198..71167efea 100644 --- a/opm/parser/eclipse/Deck/tests/DeckRecordTests.cpp +++ b/opm/parser/eclipse/Deck/tests/DeckRecordTests.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/opm/parser/eclipse/Deck/tests/DeckTests.cpp b/opm/parser/eclipse/Deck/tests/DeckTests.cpp index 5242e9a48..5b49bc72e 100644 --- a/opm/parser/eclipse/Deck/tests/DeckTests.cpp +++ b/opm/parser/eclipse/Deck/tests/DeckTests.cpp @@ -29,6 +29,7 @@ #include #include #include +#include using namespace Opm; diff --git a/opm/parser/eclipse/Deck/tests/SectionTests.cpp b/opm/parser/eclipse/Deck/tests/SectionTests.cpp index 2c06dde88..237288e63 100644 --- a/opm/parser/eclipse/Deck/tests/SectionTests.cpp +++ b/opm/parser/eclipse/Deck/tests/SectionTests.cpp @@ -23,7 +23,10 @@ #include #include #include + #include + +#include #include #include diff --git a/opm/parser/eclipse/EclipseState/EclipseState.cpp b/opm/parser/eclipse/EclipseState/EclipseState.cpp index 440d3ba74..c2f051f8b 100644 --- a/opm/parser/eclipse/EclipseState/EclipseState.cpp +++ b/opm/parser/eclipse/EclipseState/EclipseState.cpp @@ -19,6 +19,7 @@ #include +#include #include #include #include @@ -29,14 +30,16 @@ #include #include #include +#include #include #include -#include #include +#include #include -#include -#include #include +#include +#include +#include namespace Opm { diff --git a/opm/parser/eclipse/EclipseState/EclipseState.hpp b/opm/parser/eclipse/EclipseState/EclipseState.hpp index 1fde84511..3d0f47bd5 100644 --- a/opm/parser/eclipse/EclipseState/EclipseState.hpp +++ b/opm/parser/eclipse/EclipseState/EclipseState.hpp @@ -20,29 +20,34 @@ #ifndef OPM_ECLIPSE_STATE_HPP #define OPM_ECLIPSE_STATE_HPP -#include -#include -#include -#include - +#include #include +#include + namespace Opm { template< typename > class GridProperty; template< typename > class GridProperties; + class Box; + class BoxManager; class Deck; class DeckItem; + class DeckKeyword; + class EclipseGrid; class Fault; class FaultCollection; class InitConfig; class IOConfig; + class NNC; class ParseMode; class Schedule; class Section; class SimulationConfig; class TableManager; + class TransMult; + class UnitSystem; class EclipseState { public: diff --git a/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp b/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp index 466283a9c..e203926cd 100644 --- a/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp +++ b/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.cpp @@ -25,8 +25,12 @@ #include #include +#include #include #include +#include +#include +#include #include #include #include diff --git a/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp b/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp index a801bb5be..f10c2f4db 100644 --- a/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp +++ b/opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp @@ -22,18 +22,18 @@ #define ECLIPSE_GRID_HPP_ -#include -#include - #include #include #include #include #include +#include namespace Opm { + class Deck; + /** About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_grid_type @@ -126,18 +126,18 @@ namespace Opm { void assertCellInfo() const; - void initCartesianGrid(const std::vector& dims , DeckConstPtr deck); - void initCornerPointGrid(const std::vector& dims , DeckConstPtr deck); - void initDTOPSGrid(const std::vector& dims , DeckConstPtr deck); - void initDVDEPTHZGrid(const std::vector& dims , DeckConstPtr deck); - void initGrid(const std::vector& dims, DeckConstPtr deck); + void initCartesianGrid(const std::vector& dims , std::shared_ptr< const Deck > deck); + void initCornerPointGrid(const std::vector& dims , std::shared_ptr< const Deck > deck); + void initDTOPSGrid(const std::vector& dims , std::shared_ptr< const Deck > deck); + void initDVDEPTHZGrid(const std::vector& dims , std::shared_ptr< const Deck > deck); + void initGrid(const std::vector& dims, std::shared_ptr< const Deck > deck); - static void assertCornerPointKeywords(const std::vector& dims, DeckConstPtr deck); - static bool hasDVDEPTHZKeywords(DeckConstPtr deck); - static bool hasDTOPSKeywords(DeckConstPtr deck); + static void assertCornerPointKeywords(const std::vector& dims, std::shared_ptr< const Deck > deck); + static bool hasDVDEPTHZKeywords(std::shared_ptr< const Deck > deck); + static bool hasDTOPSKeywords(std::shared_ptr< const Deck > deck); static void assertVectorSize(const std::vector& vector , size_t expectedSize , const std::string& msg); - static std::vector createTOPSVector(const std::vector& dims , const std::vector& DZ , DeckConstPtr deck); - static std::vector createDVector(const std::vector& dims , size_t dim , const std::string& DKey , const std::string& DVKey, DeckConstPtr deck); + static std::vector createTOPSVector(const std::vector& dims , const std::vector& DZ , std::shared_ptr< const Deck > deck); + static std::vector createDVector(const std::vector& dims , size_t dim , const std::string& DKey , const std::string& DVKey, std::shared_ptr< const Deck > deck); static void scatterDim(const std::vector& dims , size_t dim , const std::vector& DV , std::vector& D); }; diff --git a/opm/parser/eclipse/EclipseState/Grid/FaultCollection.cpp b/opm/parser/eclipse/EclipseState/Grid/FaultCollection.cpp index 108c16e24..4ed518aa7 100644 --- a/opm/parser/eclipse/EclipseState/Grid/FaultCollection.cpp +++ b/opm/parser/eclipse/EclipseState/Grid/FaultCollection.cpp @@ -19,13 +19,16 @@ #include -#include - +#include +#include +#include +#include #include #include #include #include #include +#include namespace Opm { diff --git a/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.hpp b/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.hpp index 7609db1bc..187a66470 100644 --- a/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.hpp +++ b/opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.hpp @@ -21,7 +21,6 @@ #ifndef MULTREGTSCANNER_HPP #define MULTREGTSCANNER_HPP -#include #include #include @@ -30,6 +29,8 @@ namespace Opm { template< typename > class GridProperties; + class DeckKeyword; + namespace MULTREGT { @@ -49,7 +50,7 @@ namespace Opm { class MULTREGTRecord { public: - MULTREGTRecord(DeckRecordConstPtr deckRecord , const std::string& defaultRegion); + MULTREGTRecord(std::shared_ptr< const DeckRecord > deckRecord , const std::string& defaultRegion); Value m_srcRegion; Value m_targetRegion; @@ -67,12 +68,12 @@ namespace Opm { class MULTREGTScanner { public: - MULTREGTScanner(std::shared_ptr > cellRegionNumbers, const std::vector& keywords, const std::string& defaultRegion); + MULTREGTScanner(std::shared_ptr > cellRegionNumbers, const std::vector>& keywords, const std::string& defaultRegion); double getRegionMultiplier(size_t globalCellIdx1, size_t globalCellIdx2, FaceDir::DirEnum faceDir) const; private: - void addKeyword(DeckKeywordConstPtr deckKeyword , const std::string& defaultRegion); - void assertKeywordSupported(DeckKeywordConstPtr deckKeyword , const std::string& defaultRegion); + void addKeyword(std::shared_ptr< const DeckKeyword > deckKeyword , const std::string& defaultRegion); + void assertKeywordSupported(std::shared_ptr< const DeckKeyword > deckKeyword , const std::string& defaultRegion); std::vector< MULTREGTRecord > m_records; std::map m_searchMap; std::shared_ptr > m_cellRegionNumbers; diff --git a/opm/parser/eclipse/EclipseState/Grid/NNC.cpp b/opm/parser/eclipse/EclipseState/Grid/NNC.cpp index 11f61050c..cf1432bf9 100644 --- a/opm/parser/eclipse/EclipseState/Grid/NNC.cpp +++ b/opm/parser/eclipse/EclipseState/Grid/NNC.cpp @@ -18,6 +18,10 @@ */ #include +#include +#include +#include +#include #include #include #include diff --git a/opm/parser/eclipse/EclipseState/Grid/NNC.hpp b/opm/parser/eclipse/EclipseState/Grid/NNC.hpp index 1503e084e..57f1b9b37 100644 --- a/opm/parser/eclipse/EclipseState/Grid/NNC.hpp +++ b/opm/parser/eclipse/EclipseState/Grid/NNC.hpp @@ -20,12 +20,13 @@ #ifndef NNC_HPP #define NNC_HPP +#include +#include #include -#include - namespace Opm { + class Deck; class EclipseGrid; struct NNCdata { @@ -39,7 +40,7 @@ class NNC public: /// Construct from input deck. NNC(); - NNC(Opm::DeckConstPtr deck, std::shared_ptr< const EclipseGrid > eclipseGrid); + NNC(std::shared_ptr< const Deck > deck, std::shared_ptr< const EclipseGrid > eclipseGrid); void addNNC(const size_t cell1, const size_t cell2, const double trans); const std::vector& nncdata() const { return m_nnc; } size_t numNNC() const; diff --git a/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.cpp b/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.cpp index 5da5c5569..99c254765 100644 --- a/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.cpp +++ b/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.cpp @@ -23,6 +23,9 @@ #include +#include +#include +#include #include #include #include diff --git a/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp b/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp index d05234cc7..779c75ba4 100644 --- a/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp +++ b/opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp @@ -20,13 +20,16 @@ #ifndef OPM_IO_CONFIG_HPP #define OPM_IO_CONFIG_HPP -#include #include namespace Opm { template< typename > class DynamicState; + class DeckKeyword; + class GRIDSection; + class RUNSPECSection; + class SOLUTIONSection; class TimeMap; /*The IOConfig class holds data about input / ouput configurations diff --git a/opm/parser/eclipse/EclipseState/IOConfig/tests/IOConfigTest.cpp b/opm/parser/eclipse/EclipseState/IOConfig/tests/IOConfigTest.cpp index 9f1437699..e9b620df7 100644 --- a/opm/parser/eclipse/EclipseState/IOConfig/tests/IOConfigTest.cpp +++ b/opm/parser/eclipse/EclipseState/IOConfig/tests/IOConfigTest.cpp @@ -23,6 +23,8 @@ #include +#include +#include #include #include #include diff --git a/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp b/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp index ace18b8a0..b9ca93dc5 100644 --- a/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp +++ b/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include diff --git a/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp b/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp index 798881cfd..f442f9575 100644 --- a/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp +++ b/opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp @@ -20,21 +20,21 @@ #ifndef OPM_INIT_CONFIG_HPP #define OPM_INIT_CONFIG_HPP -#include - namespace Opm { + class Deck; + class InitConfig { public: - InitConfig(DeckConstPtr deck); + InitConfig(std::shared_ptr< const Deck > deck); bool getRestartInitiated() const; int getRestartStep() const; const std::string& getRestartRootName() const; private: - void initRestartKW(DeckConstPtr deck); + void initRestartKW(std::shared_ptr< const Deck > deck); bool m_restartInitiated; int m_restartStep; diff --git a/opm/parser/eclipse/EclipseState/InitConfig/tests/InitConfigTest.cpp b/opm/parser/eclipse/EclipseState/InitConfig/tests/InitConfigTest.cpp index 9d47b4a79..4f9f4abc5 100644 --- a/opm/parser/eclipse/EclipseState/InitConfig/tests/InitConfigTest.cpp +++ b/opm/parser/eclipse/EclipseState/InitConfig/tests/InitConfigTest.cpp @@ -23,6 +23,8 @@ #include +#include +#include #include #include #include diff --git a/opm/parser/eclipse/EclipseState/Schedule/Completion.cpp b/opm/parser/eclipse/EclipseState/Schedule/Completion.cpp index 020a2c73a..398f93fa0 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Completion.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Completion.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.cpp b/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.cpp index 757866ab4..33e9865ec 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.cpp @@ -17,12 +17,18 @@ along with OPM. If not, see . */ -#include -#include -#include -#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + namespace Opm { diff --git a/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.hpp b/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.hpp index 12096a663..1fe214e2d 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/MSW/Compsegs.hpp @@ -24,15 +24,15 @@ #include #include -#include -#include #include -#include -#include -#include namespace Opm { + class CompletionSet; + class DeckKeyword; + class EclipseGrid; + class SegmentSet; + struct Compsegs { int m_i; int m_j; @@ -53,15 +53,15 @@ namespace Opm { Compsegs(int i_in, int j_in, int k_in, int branch_number_in, double distance_start_in, double distance_end_in, WellCompletion::DirectionEnum dir_in, double center_depth_in, int segment_number_in); - static std::vector> compsegsFromCOMPSEGSKeyword(DeckKeywordConstPtr compsegsKeyword, - EclipseGridConstPtr grid); + static std::vector> compsegsFromCOMPSEGSKeyword(std::shared_ptr< const DeckKeyword > compsegsKeyword, + std::shared_ptr< const EclipseGrid > grid); // get the segment number information and depth information based on the information from SegmentSet - static void processCOMPSEGS(std::vector>& compsegs, SegmentSetConstPtr segment_set); + static void processCOMPSEGS(std::vector>& compsegs, std::shared_ptr< const SegmentSet > segment_set); // update the segment related information for Completions static void updateCompletionsWithSegment(const std::vector>& compsegs, - CompletionSetPtr completion_set); + std::shared_ptr< CompletionSet > completion_set); }; diff --git a/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp b/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp index f7860173b..16c3d6f82 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/MSW/Segment.hpp @@ -22,10 +22,6 @@ #include -#include -#include - - namespace Opm { class Segment { diff --git a/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.cpp b/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.cpp index dd2542924..e7cf5c939 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.cpp @@ -3,6 +3,9 @@ #include #include +#include +#include +#include #include #include diff --git a/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.hpp b/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.hpp index b71133256..813e735e2 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/MSW/SegmentSet.hpp @@ -28,6 +28,8 @@ namespace Opm { + class DeckKeyword; + class SegmentSet { public: SegmentSet(); @@ -44,13 +46,13 @@ namespace Opm { WellSegment::MultiPhaseModelEnum multiPhaseModel() const; int numberToLocation(const int segment_number) const; - void addSegment(SegmentConstPtr new_segment); + void addSegment(std::shared_ptr< const Segment > new_segment); - void segmentsFromWELSEGSKeyword(DeckKeywordConstPtr welsegsKeyword); + void segmentsFromWELSEGSKeyword(std::shared_ptr< const DeckKeyword > welsegsKeyword); SegmentSet* shallowCopy() const; - SegmentConstPtr operator[](size_t idx) const; + std::shared_ptr< const Segment > operator[](size_t idx) const; void orderSegments(); void processABS(); void processINC(const bool first_time); @@ -81,8 +83,7 @@ namespace Opm { // There are other three properties for segment related to thermal conduction, // while they are not supported by the keyword at the moment. - // std::vector m_segments; - std::vector m_segments; + std::vector> m_segments; // the mapping from the segment number to the // storage location in the vector std::map m_number_to_location; diff --git a/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp b/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp index 57ade661c..d9295656e 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp @@ -1,6 +1,6 @@ #ifndef DRSDT_HPP #define DRSDT_HPP -#include + #include #include diff --git a/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp b/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp index 54bd3143d..b7e242cf1 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp @@ -25,19 +25,27 @@ #include #include +#include +#include +#include +#include +#include #include #include +#include #include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -48,6 +56,7 @@ #include #include #include +#include #include namespace Opm { diff --git a/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp b/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp index f45ce141e..7adff6e33 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp @@ -24,7 +24,6 @@ #include -#include #include #include @@ -35,6 +34,9 @@ namespace Opm template< typename > class DynamicState; template< typename > class DynamicVector; + class Deck; + class DeckKeyword; + class DeckRecord; class EclipseGrid; class Events; class Group; @@ -45,6 +47,7 @@ namespace Opm class SCHEDULESection; class TimeMap; class Tuning; + class UnitSystem; class Well; const boost::gregorian::date defaultStartDate( 1983 , boost::gregorian::Jan , 1); diff --git a/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp b/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp index 59d4135d6..fe2446b20 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/TimeMap.cpp @@ -20,7 +20,10 @@ #include #include +#include #include +#include +#include #include diff --git a/opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp b/opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp index 74ddfba2e..1a10bf3e3 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp @@ -25,20 +25,20 @@ #include -#include -#include -#include - namespace Opm { + class Deck; + class DeckKeyword; + class DeckRecord; + class TimeMap { public: TimeMap(boost::posix_time::ptime startDate); - TimeMap(Opm::DeckConstPtr deck); + TimeMap(std::shared_ptr< const Deck > deck); void addTime(boost::posix_time::ptime newTime); void addTStep(boost::posix_time::time_duration step); - void addFromDATESKeyword( DeckKeywordConstPtr DATESKeyword ); - void addFromTSTEPKeyword( DeckKeywordConstPtr TSTEPKeyword ); + void addFromDATESKeyword( std::shared_ptr< const DeckKeyword > DATESKeyword ); + void addFromTSTEPKeyword( std::shared_ptr< const DeckKeyword > TSTEPKeyword ); void initFirstTimestepsMonths(); void initFirstTimestepsYears(); size_t size() const; @@ -57,7 +57,7 @@ namespace Opm { /// starting from start_timestep-1. bool isTimestepInFirstOfMonthsYearsSequence(size_t timestep, bool years = true, size_t start_timestep = 1, size_t frequency = 1) const; - static boost::posix_time::ptime timeFromEclipse(DeckRecordConstPtr dateRecord); + static boost::posix_time::ptime timeFromEclipse(std::shared_ptr< const DeckRecord > dateRecord); static boost::posix_time::ptime timeFromEclipse(int day , const std::string& month, int year, const std::string& eclipseTimeString = "00:00:00.000"); static boost::posix_time::time_duration dayTimeFromEclipse(const std::string& eclipseTimeString); private: diff --git a/opm/parser/eclipse/EclipseState/Schedule/Well.hpp b/opm/parser/eclipse/EclipseState/Schedule/Well.hpp index 0ecae4750..9fc50cde6 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Well.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Well.hpp @@ -21,13 +21,14 @@ #ifndef WELL_HPP_ #define WELL_HPP_ -#include -#include -#include -#include - #include #include +#include + +#include +#include +#include +#include namespace Opm { diff --git a/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.cpp b/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.cpp index 72b2ec35c..247620a72 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.cpp @@ -1,9 +1,12 @@ -#include -#include - #include #include +#include +#include +#include +#include + + namespace Opm { WellProductionProperties:: WellProductionProperties() diff --git a/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.hpp b/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.hpp index 3b438ab83..49d166388 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/WellProductionProperties.hpp @@ -20,10 +20,14 @@ #ifndef WELLPRODUCTIONPROPERTIES_HPP_HEADER_INCLUDED #define WELLPRODUCTIONPROPERTIES_HPP_HEADER_INCLUDED +#include + #include -#include namespace Opm { + + class DeckRecord; + class WellProductionProperties { public: double OilRate; @@ -43,8 +47,8 @@ namespace Opm { bool operator!=(const WellProductionProperties& other) const; WellProductionProperties(); - static WellProductionProperties history(double BHPLimit , DeckRecordConstPtr record, bool addGroupProductionControl = false); - static WellProductionProperties prediction(DeckRecordConstPtr record, bool addGroupProductionControl = false); + static WellProductionProperties history(double BHPLimit , std::shared_ptr< const DeckRecord > record, bool addGroupProductionControl = false); + static WellProductionProperties prediction(std::shared_ptr< const DeckRecord > record, bool addGroupProductionControl = false); bool hasProductionControl(WellProducer::ControlModeEnum controlModeArg) const { return (m_productionControls & controlModeArg) != 0; @@ -63,7 +67,7 @@ namespace Opm { private: int m_productionControls; - WellProductionProperties(DeckRecordConstPtr record); + WellProductionProperties(std::shared_ptr< const DeckRecord > record); void init(); }; diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/GeomodifierTests.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/GeomodifierTests.cpp index 56671247e..39b14c758 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/GeomodifierTests.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/GeomodifierTests.cpp @@ -29,6 +29,10 @@ #include #include +#include +#include +#include +#include #include #include #include diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTests.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTests.cpp index 357582779..7f4698fd9 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTests.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/GroupTests.cpp @@ -27,6 +27,7 @@ +#include #include #include #include diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleTests.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleTests.cpp index 6a68e0d48..560e62e02 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleTests.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/ScheduleTests.cpp @@ -37,9 +37,12 @@ #include #include #include +#include +#include #include #include #include +#include #include using namespace Opm; diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/TimeMapTest.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/TimeMapTest.cpp index af246b2b6..181eab6bf 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/TimeMapTest.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/TimeMapTest.cpp @@ -32,6 +32,7 @@ #include #include +#include #include #include #include diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/TuningTests.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/TuningTests.cpp index 2e710a607..465272207 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/TuningTests.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/TuningTests.cpp @@ -22,6 +22,7 @@ #include +#include #include #include #include diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/WellPropertiesTests.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/WellPropertiesTests.cpp index 2585990c8..9875dec7c 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/WellPropertiesTests.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/WellPropertiesTests.cpp @@ -17,16 +17,17 @@ along with OPM. If not, see . */ -#include -#include - #define BOOST_TEST_MODULE WellPropertiesTest #include -#include -#include - +#include +#include +#include #include +#include +#include +#include +#include #include diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/WellSolventTests.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/WellSolventTests.cpp index 1137ca7ea..76ebcdda6 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/WellSolventTests.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/WellSolventTests.cpp @@ -28,9 +28,11 @@ #include #include #include -#include -#include #include +#include +#include +#include +#include #include #include diff --git a/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp b/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp index c8c163357..65bbe976f 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp +++ b/opm/parser/eclipse/EclipseState/Schedule/tests/WellTests.cpp @@ -39,7 +39,7 @@ #include #include #include - +#include #include static Opm::TimeMapPtr createXDaysTimeMap(size_t numDays) { diff --git a/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.cpp b/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.cpp index 09b0dfb4b..ad7ec42f9 100644 --- a/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.cpp +++ b/opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.cpp @@ -19,6 +19,7 @@ #include +#include #include #include #include diff --git a/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.cpp b/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.cpp index 71e67d4c3..325fbee59 100644 --- a/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.cpp +++ b/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp b/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp index 0d8e99167..a85c87828 100644 --- a/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp +++ b/opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp @@ -20,23 +20,23 @@ #ifndef OPM_TRESHOLD_PRESSURES_HPP #define OPM_TRESHOLD_PRESSURES_HPP +#include #include -#include -#include - - namespace Opm { template< typename > class GridProperties; + class Deck; class ParseMode; + class RUNSPECSection; + class SOLUTIONSection; class ThresholdPressure { public: - ThresholdPressure(const ParseMode& parseMode , DeckConstPtr deck, std::shared_ptr> gridProperties); + ThresholdPressure(const ParseMode& parseMode , std::shared_ptr< const Deck > deck, std::shared_ptr> gridProperties); /* diff --git a/opm/parser/eclipse/EclipseState/Tables/PlymaxTable.hpp b/opm/parser/eclipse/EclipseState/Tables/PlymaxTable.hpp index a41062685..ae72d1674 100644 --- a/opm/parser/eclipse/EclipseState/Tables/PlymaxTable.hpp +++ b/opm/parser/eclipse/EclipseState/Tables/PlymaxTable.hpp @@ -23,6 +23,8 @@ namespace Opm { + class DeckRecord; + class PlymaxTable : public SimpleTable { public: diff --git a/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp b/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp index acd28c2d7..9ac20e5a9 100644 --- a/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp +++ b/opm/parser/eclipse/EclipseState/Tables/TableManager.hpp @@ -20,6 +20,8 @@ #ifndef OPM_TABLE_MANAGER_HPP #define OPM_TABLE_MANAGER_HPP +#include +#include #include #include @@ -38,7 +40,7 @@ #include #include - +#include namespace Opm { diff --git a/opm/parser/eclipse/EclipseState/Tables/Tables.cpp b/opm/parser/eclipse/EclipseState/Tables/Tables.cpp index 5e9a80713..98368ce94 100644 --- a/opm/parser/eclipse/EclipseState/Tables/Tables.cpp +++ b/opm/parser/eclipse/EclipseState/Tables/Tables.cpp @@ -17,12 +17,16 @@ along with OPM. If not, see . */ +#include +#include #include +#include #include #include #include #include #include +#include #include #include diff --git a/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.cpp b/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.cpp index 7a2ddb894..5982f341c 100644 --- a/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.cpp +++ b/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.cpp @@ -17,8 +17,14 @@ along with OPM. If not, see . */ +#include + +#include +#include +#include #include #include +#include #include diff --git a/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp b/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp index 155392939..e860088c3 100644 --- a/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp +++ b/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp @@ -18,9 +18,14 @@ */ #include +#include +#include +#include +#include #include #include +#include #include diff --git a/opm/parser/eclipse/EclipseState/Tables/tests/TableContainerTests.cpp b/opm/parser/eclipse/EclipseState/Tables/tests/TableContainerTests.cpp index 6e9fd7205..26077990c 100644 --- a/opm/parser/eclipse/EclipseState/Tables/tests/TableContainerTests.cpp +++ b/opm/parser/eclipse/EclipseState/Tables/tests/TableContainerTests.cpp @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include #include diff --git a/opm/parser/eclipse/EclipseState/checkDeck.cpp b/opm/parser/eclipse/EclipseState/checkDeck.cpp index ba7f0614d..cc4f731c6 100644 --- a/opm/parser/eclipse/EclipseState/checkDeck.cpp +++ b/opm/parser/eclipse/EclipseState/checkDeck.cpp @@ -19,7 +19,9 @@ #include "checkDeck.hpp" #include +#include +#include #include namespace Opm { diff --git a/opm/parser/eclipse/EclipseState/checkDeck.hpp b/opm/parser/eclipse/EclipseState/checkDeck.hpp index d9627cab2..b2ceeba74 100644 --- a/opm/parser/eclipse/EclipseState/checkDeck.hpp +++ b/opm/parser/eclipse/EclipseState/checkDeck.hpp @@ -20,9 +20,12 @@ #ifndef OPM_CHECK_DECK_HPP #define OPM_CHECK_DECK_HPP -#include +#include namespace Opm { + + class Deck; + enum DeckChecks { SectionTopology = 0x0001, @@ -36,7 +39,7 @@ enum DeckChecks { // some semantical correctness checks of the deck. this method adds a warning to // the deck object if any issue is found ... -bool checkDeck(DeckConstPtr deck, size_t enabledChecks = AllChecks); +bool checkDeck(std::shared_ptr< const Deck > deck, size_t enabledChecks = AllChecks); } diff --git a/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp b/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp index 84e4bfb46..1b14f3441 100644 --- a/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp +++ b/opm/parser/eclipse/EclipseState/tests/EclipseStateTests.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/opm/parser/eclipse/Generator/KeywordGenerator.cpp b/opm/parser/eclipse/Generator/KeywordGenerator.cpp index a07cae414..462be9caa 100644 --- a/opm/parser/eclipse/Generator/KeywordGenerator.cpp +++ b/opm/parser/eclipse/Generator/KeywordGenerator.cpp @@ -17,15 +17,18 @@ along with OPM. If not, see . */ -#include -#include #include +#include +#include +#include #include #include #include #include +#include +#include namespace Opm { diff --git a/opm/parser/eclipse/Generator/KeywordGenerator.hpp b/opm/parser/eclipse/Generator/KeywordGenerator.hpp index 13c1fa09c..db9491ba8 100644 --- a/opm/parser/eclipse/Generator/KeywordGenerator.hpp +++ b/opm/parser/eclipse/Generator/KeywordGenerator.hpp @@ -20,15 +20,13 @@ #ifndef KEYWORD_GENERATOR_HPP #define KEYWORD_GENERATOR_HPP -#include -#include -#include -#include -#include -#include +#include namespace Opm { + + class KeywordLoader; + class KeywordGenerator { public: diff --git a/opm/parser/eclipse/Generator/KeywordLoader.cpp b/opm/parser/eclipse/Generator/KeywordLoader.cpp index 3e8f84b24..4cb2651ca 100644 --- a/opm/parser/eclipse/Generator/KeywordLoader.cpp +++ b/opm/parser/eclipse/Generator/KeywordLoader.cpp @@ -26,6 +26,7 @@ #include #include +#include namespace Opm { diff --git a/opm/parser/eclipse/Generator/KeywordLoader.hpp b/opm/parser/eclipse/Generator/KeywordLoader.hpp index 0552b0f02..abbc446d4 100644 --- a/opm/parser/eclipse/Generator/KeywordLoader.hpp +++ b/opm/parser/eclipse/Generator/KeywordLoader.hpp @@ -20,14 +20,22 @@ #ifndef KEYWORD_LOADER_HPP #define KEYWORD_LOADER_HPP + +#include #include #include -#include +#include -#include -#include +namespace boost { + namespace filesystem { + class path; + } +} namespace Opm { + + class ParserKeyword; + class KeywordLoader { public: diff --git a/opm/parser/eclipse/Generator/tests/KeywordLoaderTests.cpp b/opm/parser/eclipse/Generator/tests/KeywordLoaderTests.cpp index 07c373213..54dbc90ac 100644 --- a/opm/parser/eclipse/Generator/tests/KeywordLoaderTests.cpp +++ b/opm/parser/eclipse/Generator/tests/KeywordLoaderTests.cpp @@ -31,6 +31,8 @@ #include +#include +#include BOOST_AUTO_TEST_CASE(EmptyKeywordLoader) { Opm::KeywordLoader loader(false); diff --git a/opm/parser/eclipse/IntegrationTests/BoxTest.cpp b/opm/parser/eclipse/IntegrationTests/BoxTest.cpp index e33f754ea..bbe8796c9 100644 --- a/opm/parser/eclipse/IntegrationTests/BoxTest.cpp +++ b/opm/parser/eclipse/IntegrationTests/BoxTest.cpp @@ -24,6 +24,8 @@ #include #include +#include + #include #include #include diff --git a/opm/parser/eclipse/IntegrationTests/CompletionsFromDeck.cpp b/opm/parser/eclipse/IntegrationTests/CompletionsFromDeck.cpp index 86a0da2df..caa281c88 100644 --- a/opm/parser/eclipse/IntegrationTests/CompletionsFromDeck.cpp +++ b/opm/parser/eclipse/IntegrationTests/CompletionsFromDeck.cpp @@ -26,8 +26,10 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/opm/parser/eclipse/IntegrationTests/EclipseGridCreateFromDeck.cpp b/opm/parser/eclipse/IntegrationTests/EclipseGridCreateFromDeck.cpp index 4127c3246..210992d1c 100644 --- a/opm/parser/eclipse/IntegrationTests/EclipseGridCreateFromDeck.cpp +++ b/opm/parser/eclipse/IntegrationTests/EclipseGridCreateFromDeck.cpp @@ -23,8 +23,10 @@ #include #include #include +#include #include +#include #include #include #include diff --git a/opm/parser/eclipse/IntegrationTests/IOConfigIntegrationTest.cpp b/opm/parser/eclipse/IntegrationTests/IOConfigIntegrationTest.cpp index f36936fa8..5dd2b5889 100644 --- a/opm/parser/eclipse/IntegrationTests/IOConfigIntegrationTest.cpp +++ b/opm/parser/eclipse/IntegrationTests/IOConfigIntegrationTest.cpp @@ -25,12 +25,14 @@ #include #include -#include +#include #include #include +#include #include #include -#include +#include +#include using namespace Opm; diff --git a/opm/parser/eclipse/IntegrationTests/IncludeTest.cpp b/opm/parser/eclipse/IntegrationTests/IncludeTest.cpp index 65f4c6cae..88bee7179 100644 --- a/opm/parser/eclipse/IntegrationTests/IncludeTest.cpp +++ b/opm/parser/eclipse/IntegrationTests/IncludeTest.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include diff --git a/opm/parser/eclipse/IntegrationTests/IntegrationTests.cpp b/opm/parser/eclipse/IntegrationTests/IntegrationTests.cpp index bff663162..3713581c1 100644 --- a/opm/parser/eclipse/IntegrationTests/IntegrationTests.cpp +++ b/opm/parser/eclipse/IntegrationTests/IntegrationTests.cpp @@ -20,13 +20,17 @@ #define BOOST_TEST_MODULE ParserIntegrationTests #include #include +#include #include +#include +#include -#include #include -#include +#include #include +#include +#include #include #include diff --git a/opm/parser/eclipse/IntegrationTests/ParseDATAWithDefault.cpp b/opm/parser/eclipse/IntegrationTests/ParseDATAWithDefault.cpp index 768dabf28..0e17f9981 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseDATAWithDefault.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseDATAWithDefault.cpp @@ -25,6 +25,8 @@ #include #include +#include +#include #include #include diff --git a/opm/parser/eclipse/IntegrationTests/ParseDENSITY.cpp b/opm/parser/eclipse/IntegrationTests/ParseDENSITY.cpp index d4b084ccb..3d1dcc9d4 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseDENSITY.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseDENSITY.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -40,8 +41,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE(ParseDENSITY) { ParserPtr parser(new Parser()); - boost::filesystem::path file("testdata/integration_tests/DENSITY/DENSITY1"); - DeckPtr deck = parser->parseFile(file.string(), ParseMode()); + std::string file("testdata/integration_tests/DENSITY/DENSITY1"); + DeckPtr deck = parser->parseFile(file, ParseMode()); DeckKeywordConstPtr densityKw = deck->getKeyword("DENSITY" , 0); diff --git a/opm/parser/eclipse/IntegrationTests/ParseEND.cpp b/opm/parser/eclipse/IntegrationTests/ParseEND.cpp index 24b14a301..0c5d97d36 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseEND.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseEND.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -38,9 +39,9 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( parse_END_OK ) { ParserPtr parser(new Parser()); - boost::filesystem::path fileWithTitleKeyword("testdata/integration_tests/END/END1.txt"); + std::string fileWithTitleKeyword("testdata/integration_tests/END/END1.txt"); - DeckPtr deck = parser->parseFile(fileWithTitleKeyword.string(), ParseMode()); + DeckPtr deck = parser->parseFile(fileWithTitleKeyword, ParseMode()); BOOST_CHECK_EQUAL(size_t(1), deck->size()); BOOST_CHECK_EQUAL (true, deck->hasKeyword("OIL")); @@ -50,9 +51,9 @@ BOOST_AUTO_TEST_CASE( parse_END_OK ) { BOOST_AUTO_TEST_CASE( parse_ENDINC_OK ) { ParserPtr parser(new Parser()); - boost::filesystem::path fileWithTitleKeyword("testdata/integration_tests/END/ENDINC1.txt"); + std::string fileWithTitleKeyword("testdata/integration_tests/END/ENDINC1.txt"); - DeckPtr deck = parser->parseFile(fileWithTitleKeyword.string(), ParseMode()); + DeckPtr deck = parser->parseFile(fileWithTitleKeyword, ParseMode()); BOOST_CHECK_EQUAL(size_t(1), deck->size()); BOOST_CHECK_EQUAL (true, deck->hasKeyword("OIL")); diff --git a/opm/parser/eclipse/IntegrationTests/ParseEQUIL.cpp b/opm/parser/eclipse/IntegrationTests/ParseEQUIL.cpp index 0b183f462..f92c23814 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseEQUIL.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseEQUIL.cpp @@ -24,6 +24,8 @@ #include #include +#include +#include #include #include #include @@ -58,8 +60,8 @@ BOOST_AUTO_TEST_CASE( parse_EQUIL_MISSING_DIMS ) { BOOST_AUTO_TEST_CASE( parse_EQUIL_OK ) { ParserPtr parser(new Parser()); - boost::filesystem::path pvtgFile("testdata/integration_tests/EQUIL/EQUIL1"); - DeckPtr deck = parser->parseFile(pvtgFile.string(), ParseMode()); + std::string pvtgFile("testdata/integration_tests/EQUIL/EQUIL1"); + DeckPtr deck = parser->parseFile(pvtgFile, ParseMode()); DeckKeywordConstPtr kw0 = deck->getKeyword("EQLDIMS" , 0); DeckKeywordConstPtr kw1 = deck->getKeyword("EQUIL" , 0); BOOST_CHECK_EQUAL( 3U , kw1->size() ); diff --git a/opm/parser/eclipse/IntegrationTests/ParseMULTREGT.cpp b/opm/parser/eclipse/IntegrationTests/ParseMULTREGT.cpp index b9bffddcf..bfb102bcb 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseMULTREGT.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseMULTREGT.cpp @@ -32,6 +32,7 @@ #include #include +#include #include using namespace Opm; diff --git a/opm/parser/eclipse/IntegrationTests/ParseMULTSEGWELL.cpp b/opm/parser/eclipse/IntegrationTests/ParseMULTSEGWELL.cpp index d316cc1ff..b6ff53fcf 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseMULTSEGWELL.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseMULTSEGWELL.cpp @@ -26,6 +26,9 @@ #include #include +#include +#include +#include #include #include #include @@ -35,8 +38,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( PARSE_MULTISEGMENT_ABS ) { ParserPtr parser(new Parser()); - boost::filesystem::path deckFile("testdata/integration_tests/SCHEDULE/SCHEDULE_MULTISEGMENT_WELL"); - DeckPtr deck = parser->parseFile(deckFile.string(), ParseMode()); + std::string deckFile("testdata/integration_tests/SCHEDULE/SCHEDULE_MULTISEGMENT_WELL"); + DeckPtr deck = parser->parseFile(deckFile, ParseMode()); // for WELSEGS keyword DeckKeywordConstPtr kw = deck->getKeyword("WELSEGS"); diff --git a/opm/parser/eclipse/IntegrationTests/ParseMiscible.cpp b/opm/parser/eclipse/IntegrationTests/ParseMiscible.cpp index 150b47668..ea3df4641 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseMiscible.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseMiscible.cpp @@ -25,6 +25,9 @@ #include #include +#include +#include +#include #include #include #include diff --git a/opm/parser/eclipse/IntegrationTests/ParsePLYADS.cpp b/opm/parser/eclipse/IntegrationTests/ParsePLYADS.cpp index 94ef4fe9e..3bf0eb7d8 100644 --- a/opm/parser/eclipse/IntegrationTests/ParsePLYADS.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParsePLYADS.cpp @@ -22,8 +22,10 @@ #include #include +#include #include +#include #include #include @@ -33,8 +35,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( PARSE_PLYADS_OK) { ParserPtr parser(new Parser()); - boost::filesystem::path deckFile("testdata/integration_tests/POLYMER/plyads.data"); - DeckPtr deck = parser->parseFile(deckFile.string()); + std::string deckFile("testdata/integration_tests/POLYMER/plyads.data"); + DeckPtr deck = parser->parseFile(deckFile); DeckKeywordConstPtr kw = deck->getKeyword("PLYADS"); DeckRecordConstPtr rec = kw->getRecord(0); DeckItemPtr item = rec->getItem(0); diff --git a/opm/parser/eclipse/IntegrationTests/ParsePLYADSS.cpp b/opm/parser/eclipse/IntegrationTests/ParsePLYADSS.cpp index a158b8e40..e0118e714 100644 --- a/opm/parser/eclipse/IntegrationTests/ParsePLYADSS.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParsePLYADSS.cpp @@ -21,9 +21,10 @@ #include #include -#include +#include #include +#include #include #include #include @@ -34,8 +35,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( PARSE_PLYADSS_OK) { ParserPtr parser(new Parser()); - boost::filesystem::path deckFile("testdata/integration_tests/POLYMER/plyadss.data"); - DeckPtr deck = parser->parseFile(deckFile.string() , ParseMode()); + std::string deckFile("testdata/integration_tests/POLYMER/plyadss.data"); + DeckPtr deck = parser->parseFile(deckFile, ParseMode()); DeckKeywordConstPtr kw = deck->getKeyword("PLYADSS"); BOOST_CHECK_EQUAL( kw->size() , 11U ); diff --git a/opm/parser/eclipse/IntegrationTests/ParsePLYDHFLF.cpp b/opm/parser/eclipse/IntegrationTests/ParsePLYDHFLF.cpp index bcccb557f..ba2b773cd 100644 --- a/opm/parser/eclipse/IntegrationTests/ParsePLYDHFLF.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParsePLYDHFLF.cpp @@ -24,6 +24,9 @@ #include #include +#include +#include +#include #include #include #include @@ -34,8 +37,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( PARSE_PLYDHFLF_OK) { ParserPtr parser(new Parser()); - boost::filesystem::path deckFile("testdata/integration_tests/POLYMER/plydhflf.data"); - DeckPtr deck = parser->parseFile(deckFile.string(), ParseMode()); + std::string deckFile("testdata/integration_tests/POLYMER/plydhflf.data"); + DeckPtr deck = parser->parseFile(deckFile, ParseMode()); DeckKeywordConstPtr kw = deck->getKeyword("PLYDHFLF"); DeckRecordConstPtr rec = kw->getRecord(0); DeckItemPtr item = rec->getItem(0); diff --git a/opm/parser/eclipse/IntegrationTests/ParsePLYSHLOG.cpp b/opm/parser/eclipse/IntegrationTests/ParsePLYSHLOG.cpp index b29e48403..eb8651edc 100644 --- a/opm/parser/eclipse/IntegrationTests/ParsePLYSHLOG.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParsePLYSHLOG.cpp @@ -24,6 +24,9 @@ #include #include +#include +#include +#include #include #include #include @@ -34,8 +37,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( PARSE_PLYSHLOG_OK) { ParserPtr parser(new Parser()); - boost::filesystem::path deckFile("testdata/integration_tests/POLYMER/plyshlog.data"); - DeckPtr deck = parser->parseFile(deckFile.string(), ParseMode()); + std::string deckFile("testdata/integration_tests/POLYMER/plyshlog.data"); + DeckPtr deck = parser->parseFile(deckFile, ParseMode()); DeckKeywordConstPtr kw = deck->getKeyword("PLYSHLOG"); DeckRecordConstPtr rec1 = kw->getRecord(0); // reference conditions diff --git a/opm/parser/eclipse/IntegrationTests/ParsePLYVISC.cpp b/opm/parser/eclipse/IntegrationTests/ParsePLYVISC.cpp index 43bd72406..ee81ffa6d 100644 --- a/opm/parser/eclipse/IntegrationTests/ParsePLYVISC.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParsePLYVISC.cpp @@ -24,6 +24,9 @@ #include #include +#include +#include +#include #include #include #include @@ -34,8 +37,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( PARSE_PLYVISC_OK) { ParserPtr parser(new Parser()); - boost::filesystem::path deckFile("testdata/integration_tests/POLYMER/plyvisc.data"); - DeckPtr deck = parser->parseFile(deckFile.string(), ParseMode()); + std::string deckFile("testdata/integration_tests/POLYMER/plyvisc.data"); + DeckPtr deck = parser->parseFile(deckFile, ParseMode()); DeckKeywordConstPtr kw = deck->getKeyword("PLYVISC"); DeckRecordConstPtr rec = kw->getRecord(0); DeckItemPtr item = rec->getItem(0); diff --git a/opm/parser/eclipse/IntegrationTests/ParsePORO.cpp b/opm/parser/eclipse/IntegrationTests/ParsePORO.cpp index 969f1367c..9be6f84aa 100644 --- a/opm/parser/eclipse/IntegrationTests/ParsePORO.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParsePORO.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -38,8 +39,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE(ParsePOROandPERMX) { ParserPtr parser(new Parser()); - boost::filesystem::path poroFile("testdata/integration_tests/PORO/PORO1"); - DeckPtr deck = parser->parseFile(poroFile.string(), ParseMode()); + std::string poroFile("testdata/integration_tests/PORO/PORO1"); + DeckPtr deck = parser->parseFile(poroFile, ParseMode()); DeckKeywordConstPtr kw1 = deck->getKeyword("PORO" , 0); DeckKeywordConstPtr kw2 = deck->getKeyword("PERMX" , 0); diff --git a/opm/parser/eclipse/IntegrationTests/ParsePVTG.cpp b/opm/parser/eclipse/IntegrationTests/ParsePVTG.cpp index 752580a87..4788dc03f 100644 --- a/opm/parser/eclipse/IntegrationTests/ParsePVTG.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParsePVTG.cpp @@ -24,8 +24,10 @@ #include -#include #include +#include +#include +#include #include #include diff --git a/opm/parser/eclipse/IntegrationTests/ParsePVTO.cpp b/opm/parser/eclipse/IntegrationTests/ParsePVTO.cpp index 1c8ba8a7c..495c6feef 100644 --- a/opm/parser/eclipse/IntegrationTests/ParsePVTO.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParsePVTO.cpp @@ -29,6 +29,8 @@ #include #include +#include +#include #include #include diff --git a/opm/parser/eclipse/IntegrationTests/ParseRSVD.cpp b/opm/parser/eclipse/IntegrationTests/ParseRSVD.cpp index fb8fbf2a8..967866aba 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseRSVD.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseRSVD.cpp @@ -24,6 +24,8 @@ #include #include +#include +#include #include #include #include @@ -38,8 +40,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( parse_EQUIL_OK ) { ParserPtr parser(new Parser()); - boost::filesystem::path pvtgFile("testdata/integration_tests/RSVD/RSVD.txt"); - DeckPtr deck = parser->parseFile(pvtgFile.string(), ParseMode()); + std::string pvtgFile("testdata/integration_tests/RSVD/RSVD.txt"); + DeckPtr deck = parser->parseFile(pvtgFile, ParseMode()); DeckKeywordConstPtr kw1 = deck->getKeyword("RSVD" , 0); BOOST_CHECK_EQUAL( 6U , kw1->size() ); diff --git a/opm/parser/eclipse/IntegrationTests/ParseSGOF.cpp b/opm/parser/eclipse/IntegrationTests/ParseSGOF.cpp index 3a22dbdb8..8b382912b 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseSGOF.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseSGOF.cpp @@ -5,6 +5,8 @@ #include #include +#include +#include #include #include diff --git a/opm/parser/eclipse/IntegrationTests/ParseSLGOF.cpp b/opm/parser/eclipse/IntegrationTests/ParseSLGOF.cpp index 88f0f2179..52064f39c 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseSLGOF.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseSLGOF.cpp @@ -7,6 +7,8 @@ #include #include +#include +#include #include #include diff --git a/opm/parser/eclipse/IntegrationTests/ParseSWOF.cpp b/opm/parser/eclipse/IntegrationTests/ParseSWOF.cpp index 85cae5709..73bafcbde 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseSWOF.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseSWOF.cpp @@ -25,6 +25,8 @@ #include #include +#include +#include #include #include diff --git a/opm/parser/eclipse/IntegrationTests/ParseTITLE.cpp b/opm/parser/eclipse/IntegrationTests/ParseTITLE.cpp index e82e2b5cf..667985cb2 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseTITLE.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseTITLE.cpp @@ -23,6 +23,8 @@ #include #include +#include +#include #include #include @@ -39,9 +41,9 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( parse_TITLE_OK ) { ParserPtr parser(new Parser()); - boost::filesystem::path fileWithTitleKeyword("testdata/integration_tests/TITLE/TITLE1.txt"); + std::string fileWithTitleKeyword("testdata/integration_tests/TITLE/TITLE1.txt"); - DeckPtr deck = parser->parseFile(fileWithTitleKeyword.string(), ParseMode()); + DeckPtr deck = parser->parseFile(fileWithTitleKeyword, ParseMode()); BOOST_CHECK_EQUAL(size_t(2), deck->size()); BOOST_CHECK_EQUAL (true, deck->hasKeyword("TITLE")); diff --git a/opm/parser/eclipse/IntegrationTests/ParseTOPS.cpp b/opm/parser/eclipse/IntegrationTests/ParseTOPS.cpp index f70847991..d3736bc8b 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseTOPS.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseTOPS.cpp @@ -37,9 +37,9 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( PARSE_TOPS_OK) { ParserPtr parser(new Parser()); - boost::filesystem::path deckFile("testdata/integration_tests/GRID/TOPS.DATA"); + std::string deckFile("testdata/integration_tests/GRID/TOPS.DATA"); ParseMode parseMode; - DeckPtr deck = parser->parseFile(deckFile.string(), parseMode); + DeckPtr deck = parser->parseFile(deckFile, parseMode); EclipseState state(deck , parseMode); EclipseGridConstPtr grid = state.getEclipseGrid(); diff --git a/opm/parser/eclipse/IntegrationTests/ParseTVDP.cpp b/opm/parser/eclipse/IntegrationTests/ParseTVDP.cpp index 638d0102f..3820ba27c 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseTVDP.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseTVDP.cpp @@ -37,8 +37,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE(ParseTVDP) { ParserPtr parser(new Parser()); - boost::filesystem::path poroFile("testdata/integration_tests/TVDP/TVDP1"); - DeckPtr deck = parser->parseFile(poroFile.string(), ParseMode()); + std::string poroFile("testdata/integration_tests/TVDP/TVDP1"); + DeckPtr deck = parser->parseFile(poroFile, ParseMode()); BOOST_CHECK_EQUAL( false , deck->hasKeyword("TVDP*")); BOOST_CHECK( deck->hasKeyword("TVDPA")); diff --git a/opm/parser/eclipse/IntegrationTests/ParseTVPD.cpp b/opm/parser/eclipse/IntegrationTests/ParseTVPD.cpp index 5e37363ef..14b03abb3 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseTVPD.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseTVPD.cpp @@ -36,8 +36,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE(AddDataKeywordFromJson_correctlyConfigured) { ParserPtr parser(new Parser()); - boost::filesystem::path poroFile("testdata/integration_tests/TVPD/TVPD1"); - DeckPtr deck = parser->parseFile(poroFile.string()); + std::string poroFile("testdata/integration_tests/TVPD/TVPD1"); + DeckPtr deck = parser->parseFile(poroFile); BOOST_CHECK( deck->hasKeyword("TVDPA")); BOOST_CHECK( deck->hasKeyword("TVDP1")); diff --git a/opm/parser/eclipse/IntegrationTests/ParseVFPPROD.cpp b/opm/parser/eclipse/IntegrationTests/ParseVFPPROD.cpp index c68d7f487..6a5166fcf 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseVFPPROD.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseVFPPROD.cpp @@ -26,6 +26,8 @@ #include #include +#include +#include #include #include #include @@ -40,10 +42,10 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( parse_VFPPROD_OK ) { ParserPtr parser(new Parser()); - boost::filesystem::path file("testdata/integration_tests/VFPPROD/VFPPROD1"); + std::string file("testdata/integration_tests/VFPPROD/VFPPROD1"); BOOST_CHECK( parser->isRecognizedKeyword("VFPPROD")); - DeckPtr deck = parser->parseFile(file.string(), ParseMode()); + DeckPtr deck = parser->parseFile(file, ParseMode()); DeckKeywordConstPtr VFPPROD1 = deck->getKeyword("VFPPROD" , 0); DeckKeywordConstPtr BPR = deck->getKeyword("BPR" , 0); diff --git a/opm/parser/eclipse/IntegrationTests/ParseWCONHIST.cpp b/opm/parser/eclipse/IntegrationTests/ParseWCONHIST.cpp index cb2a2b560..314c811a5 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseWCONHIST.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseWCONHIST.cpp @@ -22,6 +22,9 @@ #include #include +#include +#include +#include #include #include @@ -38,8 +41,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( parse_WCHONHIST_OK ) { ParserPtr parser(new Parser()); - boost::filesystem::path wconhistFile("testdata/integration_tests/WCONHIST/WCONHIST1"); - DeckPtr deck = parser->parseFile(wconhistFile.string(), ParseMode()); + std::string wconhistFile("testdata/integration_tests/WCONHIST/WCONHIST1"); + DeckPtr deck = parser->parseFile(wconhistFile, ParseMode()); DeckKeywordConstPtr kw1 = deck->getKeyword("WCONHIST" , 0); BOOST_CHECK_EQUAL( 3U , kw1->size() ); diff --git a/opm/parser/eclipse/IntegrationTests/ParseWellWithWildcards.cpp b/opm/parser/eclipse/IntegrationTests/ParseWellWithWildcards.cpp index a9ef81ad1..8fc182635 100644 --- a/opm/parser/eclipse/IntegrationTests/ParseWellWithWildcards.cpp +++ b/opm/parser/eclipse/IntegrationTests/ParseWellWithWildcards.cpp @@ -41,8 +41,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE( parse_WCONPROD_OK ) { ParserPtr parser(new Parser()); - boost::filesystem::path wconprodFile("testdata/integration_tests/WellWithWildcards/WCONPROD1"); - DeckPtr deck = parser->parseFile(wconprodFile.string(), ParseMode()); + std::string wconprodFile("testdata/integration_tests/WellWithWildcards/WCONPROD1"); + DeckPtr deck = parser->parseFile(wconprodFile, ParseMode()); std::shared_ptr grid = std::make_shared( 30,30,30); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(ParseMode() , grid , deck, ioConfig)); @@ -77,8 +77,8 @@ BOOST_AUTO_TEST_CASE( parse_WCONPROD_OK ) { BOOST_AUTO_TEST_CASE( parse_WCONINJE_OK ) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path wconprodFile("testdata/integration_tests/WellWithWildcards/WCONINJE1"); - DeckPtr deck = parser->parseFile(wconprodFile.string(), parseMode); + std::string wconprodFile("testdata/integration_tests/WellWithWildcards/WCONINJE1"); + DeckPtr deck = parser->parseFile(wconprodFile, parseMode); std::shared_ptr grid = std::make_shared( 30,30,30 ); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); diff --git a/opm/parser/eclipse/IntegrationTests/ScheduleCreateFromDeck.cpp b/opm/parser/eclipse/IntegrationTests/ScheduleCreateFromDeck.cpp index 79167928d..582aba64c 100644 --- a/opm/parser/eclipse/IntegrationTests/ScheduleCreateFromDeck.cpp +++ b/opm/parser/eclipse/IntegrationTests/ScheduleCreateFromDeck.cpp @@ -45,8 +45,8 @@ using namespace Opm; BOOST_AUTO_TEST_CASE(CreateSchedule) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE1"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE1"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); @@ -60,8 +60,8 @@ BOOST_AUTO_TEST_CASE(CreateSchedule) { BOOST_AUTO_TEST_CASE(CreateSchedule_Comments_After_Keywords) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMMENTS_AFTER_KEYWORDS"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMMENTS_AFTER_KEYWORDS"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); @@ -74,8 +74,8 @@ BOOST_AUTO_TEST_CASE(CreateSchedule_Comments_After_Keywords) { BOOST_AUTO_TEST_CASE(WCONPROD_MissingCmode) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_MISSING_CMODE"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_MISSING_CMODE"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; BOOST_CHECK_NO_THROW( new Schedule(parseMode , grid , deck, ioConfig) ); @@ -85,8 +85,8 @@ BOOST_AUTO_TEST_CASE(WCONPROD_MissingCmode) { BOOST_AUTO_TEST_CASE(WCONPROD_Missing_DATA) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_CMODE_MISSING_DATA"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_CMODE_MISSING_DATA"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; BOOST_CHECK_THROW( new Schedule(parseMode , grid , deck, ioConfig) , std::invalid_argument ); @@ -96,8 +96,8 @@ BOOST_AUTO_TEST_CASE(WCONPROD_Missing_DATA) { BOOST_AUTO_TEST_CASE(WellTestRefDepth) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(40,60,30); BOOST_CHECK_EQUAL(3, 3); IOConfigPtr ioConfig; @@ -116,8 +116,8 @@ BOOST_AUTO_TEST_CASE(WellTestRefDepth) { BOOST_AUTO_TEST_CASE(WellTestOpen) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(40,60,30); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); @@ -157,8 +157,8 @@ BOOST_AUTO_TEST_CASE(WellTestOpen) { BOOST_AUTO_TEST_CASE(WellTesting) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(40,60,30); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); @@ -274,8 +274,8 @@ BOOST_AUTO_TEST_CASE(WellTesting) { BOOST_AUTO_TEST_CASE(WellTestCOMPDAT_DEFAULTED_ITEMS) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_COMPDAT1"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(40,60,30); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid, deck, ioConfig)); @@ -285,8 +285,8 @@ BOOST_AUTO_TEST_CASE(WellTestCOMPDAT_DEFAULTED_ITEMS) { BOOST_AUTO_TEST_CASE(WellTestCOMPDAT) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(40,60,30); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); @@ -318,8 +318,8 @@ BOOST_AUTO_TEST_CASE(WellTestCOMPDAT) { BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_with_explicit_L0_parenting) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GRUPTREE_EXPLICIT_PARENTING"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GRUPTREE_EXPLICIT_PARENTING"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); @@ -348,8 +348,8 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_with_explicit_L0_parenting) { BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_correct) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GRUPTREE"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GRUPTREE"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; SchedulePtr schedule(new Schedule(parseMode , grid , deck, ioConfig)); @@ -368,8 +368,8 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_correct) { BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_iter_function) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; SchedulePtr schedule(new Schedule(parseMode , grid , deck, ioConfig)); @@ -396,8 +396,8 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_iter_function) BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_tree) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; SchedulePtr schedule(new Schedule(parseMode , grid , deck, ioConfig)); @@ -442,8 +442,8 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_WELSPECS_AND_GRUPTREE_correct_tree) { BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_WITH_REPARENT_correct_tree) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS_REPARENT"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS_REPARENT"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; SchedulePtr schedule(new Schedule(parseMode , grid , deck, ioConfig)); @@ -476,8 +476,8 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_GRUPTREE_WITH_REPARENT_correct_tree) { BOOST_AUTO_TEST_CASE(GroupTreeTest_PrintGrouptree) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELSPECS_GROUPS"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); @@ -491,8 +491,8 @@ BOOST_AUTO_TEST_CASE(GroupTreeTest_PrintGrouptree) { BOOST_AUTO_TEST_CASE( WellTestGroups ) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_GROUPS"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; SchedulePtr sched( new Schedule(parseMode , grid , deck, ioConfig)); @@ -534,8 +534,8 @@ BOOST_AUTO_TEST_CASE( WellTestGroups ) { BOOST_AUTO_TEST_CASE( WellTestGroupAndWellRelation ) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS_AND_GROUPS"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS_AND_GROUPS"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; SchedulePtr sched( new Schedule(parseMode , grid , deck, ioConfig)); @@ -564,8 +564,8 @@ BOOST_AUTO_TEST_CASE( WellTestGroupAndWellRelation ) { BOOST_AUTO_TEST_CASE(WellTestWELSPECSDataLoaded) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELLS2"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(40,60,30); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); @@ -598,8 +598,8 @@ BOOST_AUTO_TEST_CASE(WellTestWELSPECSDataLoaded) { BOOST_AUTO_TEST_CASE(WellTestWELSPECS_InvalidConfig_Throws) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELL_INVALID_WELSPECS"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELL_INVALID_WELSPECS"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; BOOST_CHECK_THROW(new Schedule(parseMode , grid , deck, ioConfig), std::invalid_argument); @@ -609,8 +609,8 @@ BOOST_AUTO_TEST_CASE(WellTestWELSPECS_InvalidConfig_Throws) { /* BOOST_AUTO_TEST_CASE(WellTestWELOPEN_ConfigWithIndexes_Throws) { ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELOPEN_INVALID"); - DeckPtr deck = parser->parseFile(scheduleFile.string()); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELOPEN_INVALID"); + DeckPtr deck = parser->parseFile(scheduleFile); std::shared_ptr grid = std::make_shared(10,10,3); BOOST_CHECK_THROW(new Schedule(grid , deck), std::logic_error); } @@ -618,8 +618,8 @@ BOOST_AUTO_TEST_CASE(WellTestWELOPEN_ConfigWithIndexes_Throws) { BOOST_AUTO_TEST_CASE(WellTestWELOPENControlsSet) { ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELOPEN"); - DeckPtr deck = parser->parseFile(scheduleFile.string()); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WELOPEN"); + DeckPtr deck = parser->parseFile(scheduleFile); std::shared_ptr grid = std::make_shared( 10,10,10 ); SchedulePtr sched(new Schedule(grid , deck)); @@ -638,8 +638,8 @@ BOOST_AUTO_TEST_CASE(WellTestWELOPENControlsSet) { BOOST_AUTO_TEST_CASE(WellTestWGRUPCONWellPropertiesSet) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WGRUPCON"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_WGRUPCON"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared( 10,10,10 ); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); @@ -697,8 +697,8 @@ COMPDAT \n\ BOOST_AUTO_TEST_CASE(OpmCode) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/wells_group.data"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/wells_group.data"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(10,10,3); IOConfigPtr ioConfig; BOOST_CHECK_NO_THROW( new Schedule(parseMode , grid , deck, ioConfig) ); @@ -709,8 +709,8 @@ BOOST_AUTO_TEST_CASE(OpmCode) { BOOST_AUTO_TEST_CASE(WELLS_SHUT) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_SHUT_WELL"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_SHUT_WELL"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared( 20,40,1 ); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); @@ -734,8 +734,8 @@ BOOST_AUTO_TEST_CASE(WELLS_SHUT) { BOOST_AUTO_TEST_CASE(WellTestWPOLYMER) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_POLYMER"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_POLYMER"); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared( 30,30,30); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); @@ -783,9 +783,9 @@ BOOST_AUTO_TEST_CASE(WellTestWPOLYMER) { BOOST_AUTO_TEST_CASE(TestEvents) { ParseMode parseMode; ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_EVENTS"); + std::string scheduleFile("testdata/integration_tests/SCHEDULE/SCHEDULE_EVENTS"); - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr grid = std::make_shared(40,40,30); IOConfigPtr ioConfig; SchedulePtr sched(new Schedule(parseMode , grid , deck, ioConfig)); diff --git a/opm/parser/eclipse/IntegrationTests/TransMultIntegrationTests.cpp b/opm/parser/eclipse/IntegrationTests/TransMultIntegrationTests.cpp index ade590f5d..df2679a17 100644 --- a/opm/parser/eclipse/IntegrationTests/TransMultIntegrationTests.cpp +++ b/opm/parser/eclipse/IntegrationTests/TransMultIntegrationTests.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -39,9 +40,9 @@ using namespace Opm; BOOST_AUTO_TEST_CASE(MULTFLT_IN_SCHEDULE) { ParserPtr parser(new Parser()); - boost::filesystem::path scheduleFile("testdata/integration_tests/TRANS/Deck1"); + std::string scheduleFile("testdata/integration_tests/TRANS/Deck1"); ParseMode parseMode; - DeckPtr deck = parser->parseFile(scheduleFile.string(), parseMode); + DeckPtr deck = parser->parseFile(scheduleFile, parseMode); std::shared_ptr eclState = std::make_shared( deck , parseMode ); std::shared_ptr trans = eclState->getTransMult(); std::shared_ptr schedule = eclState->getSchedule(); diff --git a/opm/parser/eclipse/OpmLog/CounterLog.hpp b/opm/parser/eclipse/OpmLog/CounterLog.hpp index aad3989c3..7e4ec00f4 100644 --- a/opm/parser/eclipse/OpmLog/CounterLog.hpp +++ b/opm/parser/eclipse/OpmLog/CounterLog.hpp @@ -20,13 +20,10 @@ #define OPM_COUNTERLOG_HPP #include -#include -#include #include #include #include -#include namespace Opm { /*! diff --git a/opm/parser/eclipse/OpmLog/Logger.cpp b/opm/parser/eclipse/OpmLog/Logger.cpp index a58f55f1e..7972cfc47 100644 --- a/opm/parser/eclipse/OpmLog/Logger.cpp +++ b/opm/parser/eclipse/OpmLog/Logger.cpp @@ -20,15 +20,12 @@ #include #include +#include #include #include - - - namespace Opm { - Logger::Logger() : m_globalMask(0), m_enabledTypes(0) diff --git a/opm/parser/eclipse/OpmLog/Logger.hpp b/opm/parser/eclipse/OpmLog/Logger.hpp index 00a80a69b..a244565f9 100644 --- a/opm/parser/eclipse/OpmLog/Logger.hpp +++ b/opm/parser/eclipse/OpmLog/Logger.hpp @@ -24,12 +24,13 @@ #include #include #include -#include -#include namespace Opm { + class LogBackend; + class Logger { + public: Logger(); void addMessage(int64_t messageType , const std::string& message) const; diff --git a/opm/parser/eclipse/OpmLog/OpmLog.cpp b/opm/parser/eclipse/OpmLog/OpmLog.cpp index e874f037a..cf0852960 100644 --- a/opm/parser/eclipse/OpmLog/OpmLog.cpp +++ b/opm/parser/eclipse/OpmLog/OpmLog.cpp @@ -16,8 +16,6 @@ You should have received a copy of the GNU General Public License along with OPM. If not, see . */ -#include -#include #include #include diff --git a/opm/parser/eclipse/OpmLog/OpmLog.hpp b/opm/parser/eclipse/OpmLog/OpmLog.hpp index 8699e9bfc..37f44879c 100644 --- a/opm/parser/eclipse/OpmLog/OpmLog.hpp +++ b/opm/parser/eclipse/OpmLog/OpmLog.hpp @@ -24,9 +24,10 @@ #include #include -#include + namespace Opm { + class LogBackend; /* The OpmLog class is a fully static class which manages a proper @@ -35,6 +36,7 @@ namespace Opm { class OpmLog { + public: static void addMessage(int64_t messageFlag , const std::string& message); diff --git a/opm/parser/eclipse/OpmLog/StreamLog.hpp b/opm/parser/eclipse/OpmLog/StreamLog.hpp index 80ba9cfaa..5796c53d3 100644 --- a/opm/parser/eclipse/OpmLog/StreamLog.hpp +++ b/opm/parser/eclipse/OpmLog/StreamLog.hpp @@ -20,8 +20,6 @@ #ifndef STREAMLOG_H #define STREAMLOG_H - -#include #include #include #include diff --git a/opm/parser/eclipse/OpmLog/TimerLog.hpp b/opm/parser/eclipse/OpmLog/TimerLog.hpp index dc338cfe9..7caf60ebf 100644 --- a/opm/parser/eclipse/OpmLog/TimerLog.hpp +++ b/opm/parser/eclipse/OpmLog/TimerLog.hpp @@ -21,15 +21,11 @@ #include +#include #include #include -#include -#include -#include -#include #include -#include /* This class is a simple demonstration of how the logging framework diff --git a/opm/parser/eclipse/Parser/ParseMode.cpp b/opm/parser/eclipse/Parser/ParseMode.cpp index 6d276465d..daa0ad0eb 100644 --- a/opm/parser/eclipse/Parser/ParseMode.cpp +++ b/opm/parser/eclipse/Parser/ParseMode.cpp @@ -20,12 +20,12 @@ #include #include -#include #include +#include #include -#include #include +#include namespace Opm { diff --git a/opm/parser/eclipse/Parser/Parser.cpp b/opm/parser/eclipse/Parser/Parser.cpp index 55a308c1a..1419c4f7c 100644 --- a/opm/parser/eclipse/Parser/Parser.cpp +++ b/opm/parser/eclipse/Parser/Parser.cpp @@ -17,23 +17,33 @@ along with OPM. If not, see . */ +#include #include #include +#include +#include + +#include #include -#include -#include -#include -#include -#include -#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include namespace Opm { + struct ParserState { const ParseMode& parseMode; Deck * deck; @@ -127,6 +137,30 @@ namespace Opm { }; + static boost::filesystem::path getIncludeFilePath(ParserState& parserState, std::string path) + { + const std::string pathKeywordPrefix("$"); + const std::string validPathNameCharacters("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"); + + size_t positionOfPathName = path.find(pathKeywordPrefix); + + if ( positionOfPathName != std::string::npos) { + std::string stringStartingAtPathName = path.substr(positionOfPathName+1); + size_t cutOffPosition = stringStartingAtPathName.find_first_not_of(validPathNameCharacters); + std::string stringToFind = stringStartingAtPathName.substr(0, cutOffPosition); + std::string stringToReplace = parserState.pathMap[stringToFind]; + boost::replace_all(path, pathKeywordPrefix + stringToFind, stringToReplace); + } + + boost::filesystem::path includeFilePath(path); + + if (includeFilePath.is_relative()) + includeFilePath = parserState.rootPath / includeFilePath; + + return includeFilePath; + } + + Parser::Parser(bool addDefault) { if (addDefault) addDefaultKeywords(); @@ -333,30 +367,6 @@ namespace Opm { return keywords; } - - boost::filesystem::path Parser::getIncludeFilePath(std::shared_ptr parserState, std::string path) const - { - const std::string pathKeywordPrefix("$"); - const std::string validPathNameCharacters("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"); - - size_t positionOfPathName = path.find(pathKeywordPrefix); - - if ( positionOfPathName != std::string::npos) { - std::string stringStartingAtPathName = path.substr(positionOfPathName+1); - size_t cutOffPosition = stringStartingAtPathName.find_first_not_of(validPathNameCharacters); - std::string stringToFind = stringStartingAtPathName.substr(0, cutOffPosition); - std::string stringToReplace = parserState->pathMap[stringToFind]; - boost::replace_all(path, pathKeywordPrefix + stringToFind, stringToReplace); - } - - boost::filesystem::path includeFilePath(path); - - if (includeFilePath.is_relative()) - includeFilePath = parserState->rootPath / includeFilePath; - - return includeFilePath; - } - bool Parser::parseState(std::shared_ptr parserState) const { bool stopParsing = false; @@ -382,7 +392,7 @@ namespace Opm { else if (parserState->rawKeyword->getKeywordName() == Opm::RawConsts::include) { RawRecordConstPtr firstRecord = parserState->rawKeyword->getRecord(0); std::string includeFileAsString = readValueToken(firstRecord->getItem(0)); - boost::filesystem::path includeFile = getIncludeFilePath(parserState, includeFileAsString); + boost::filesystem::path includeFile = getIncludeFilePath(*parserState, includeFileAsString); std::shared_ptr newParserState = parserState->includeState( includeFile ); diff --git a/opm/parser/eclipse/Parser/Parser.hpp b/opm/parser/eclipse/Parser/Parser.hpp index cfd133631..091a193e8 100644 --- a/opm/parser/eclipse/Parser/Parser.hpp +++ b/opm/parser/eclipse/Parser/Parser.hpp @@ -19,22 +19,29 @@ #ifndef OPM_PARSER_HPP #define OPM_PARSER_HPP -#include + +#include #include -#include #include +#include +#include -#include +namespace boost { + namespace filesystem { + class path; + } +} -#include - -#include -#include -#include -#include +namespace Json { + class JsonObject; +} namespace Opm { + class Deck; + class ParseMode; + class ParserKeyword; + class RawKeyword; struct ParserState; /// The hub of the parsing process. @@ -48,25 +55,25 @@ namespace Opm { static std::string stripComments(const std::string& inputString); /// The starting point of the parsing process. The supplied file is parsed, and the resulting Deck is returned. - DeckPtr parseFile(const std::string &dataFile, const ParseMode& parseMode) const; - DeckPtr parseString(const std::string &data, const ParseMode& parseMode) const; - DeckPtr parseStream(std::shared_ptr inputStream , const ParseMode& parseMode) const; + std::shared_ptr< Deck > parseFile(const std::string &dataFile, const ParseMode& parseMode) const; + std::shared_ptr< Deck > parseString(const std::string &data, const ParseMode& parseMode) const; + std::shared_ptr< Deck > parseStream(std::shared_ptr inputStream , const ParseMode& parseMode) const; Deck * newDeckFromFile(const std::string &dataFileName, const ParseMode& parseMode) const; Deck * newDeckFromString(const std::string &dataFileName, const ParseMode& parseMode) const; - DeckPtr parseFile(const std::string &dataFile, bool strict = true) const; - DeckPtr parseString(const std::string &data, bool strict = true) const; - DeckPtr parseStream(std::shared_ptr inputStream , bool strict = true) const; + std::shared_ptr< Deck > parseFile(const std::string &dataFile, bool strict = true) const; + std::shared_ptr< Deck > parseString(const std::string &data, bool strict = true) const; + std::shared_ptr< Deck > parseStream(std::shared_ptr inputStream , bool strict = true) const; /// Method to add ParserKeyword instances, these holding type and size information about the keywords and their data. void addParserKeyword(const Json::JsonObject& jsonKeyword); - void addParserKeyword(ParserKeywordConstPtr parserKeyword); + void addParserKeyword(std::shared_ptr< const ParserKeyword > parserKeyword); bool dropParserKeyword(const std::string& parserKeywordName); - ParserKeywordConstPtr getKeyword(const std::string& name) const; + std::shared_ptr< const ParserKeyword > getKeyword(const std::string& name) const; bool isRecognizedKeyword( const std::string& deckKeywordName) const; - ParserKeywordConstPtr getParserKeywordFromDeckName(const std::string& deckKeywordName) const; + std::shared_ptr< const ParserKeyword > getParserKeywordFromDeckName(const std::string& deckKeywordName) const; std::vector getAllDeckNames () const; void loadKeywords(const Json::JsonObject& jsonKeywords); @@ -91,7 +98,7 @@ namespace Opm { /*! * \brief Retrieve a ParserKeyword object given an internal keyword name. */ - ParserKeywordConstPtr getParserKeywordFromInternalName(const std::string& internalKeywordName) const; + std::shared_ptr< const ParserKeyword > getParserKeywordFromInternalName(const std::string& internalKeywordName) const; template @@ -102,22 +109,21 @@ namespace Opm { private: // associative map of the parser internal name and the corresponding ParserKeyword object - std::map m_internalParserKeywords; + std::map> m_internalParserKeywords; // associative map of deck names and the corresponding ParserKeyword object - std::map m_deckParserKeywords; + std::map> m_deckParserKeywords; // associative map of the parser internal names and the corresponding // ParserKeyword object for keywords which match a regular expression - std::map m_wildCardKeywords; + std::map> m_wildCardKeywords; bool hasWildCardKeyword(const std::string& keyword) const; - ParserKeywordConstPtr matchingKeyword(const std::string& keyword) const; + std::shared_ptr< const ParserKeyword > matchingKeyword(const std::string& keyword) const; bool tryParseKeyword(std::shared_ptr parserState) const; bool parseState(std::shared_ptr parserState) const; - RawKeywordPtr createRawKeyword(const std::string& keywordString, std::shared_ptr parserState) const; + std::shared_ptr< RawKeyword > createRawKeyword(const std::string& keywordString, std::shared_ptr parserState) const; void addDefaultKeywords(); - boost::filesystem::path getIncludeFilePath(std::shared_ptr parserState, std::string path) const; std::string doSpecialHandlingForTitleKeyword(std::string line, std::shared_ptr parserState) const; }; diff --git a/opm/parser/eclipse/Parser/ParserDoubleItem.hpp b/opm/parser/eclipse/Parser/ParserDoubleItem.hpp index ce8665e2e..15171f1ef 100644 --- a/opm/parser/eclipse/Parser/ParserDoubleItem.hpp +++ b/opm/parser/eclipse/Parser/ParserDoubleItem.hpp @@ -22,16 +22,17 @@ #include -#include - #include #include -#include - +namespace Json { + class JsonObject; +} namespace Opm { + class RawRecord; + class ParserDoubleItem : public ParserItem { public: ParserDoubleItem(const std::string& itemName); @@ -46,7 +47,7 @@ namespace Opm { const std::string& getDimension(size_t index) const; bool equalDimensions(const ParserItem& other) const; - DeckItemPtr scan(RawRecordPtr rawRecord) const; + DeckItemPtr scan(std::shared_ptr< RawRecord > rawRecord) const; bool equal(const ParserItem& other) const; std::string createCode() const; diff --git a/opm/parser/eclipse/Parser/ParserEnums.cpp b/opm/parser/eclipse/Parser/ParserEnums.cpp index 4286018ca..6c6949117 100644 --- a/opm/parser/eclipse/Parser/ParserEnums.cpp +++ b/opm/parser/eclipse/Parser/ParserEnums.cpp @@ -17,6 +17,7 @@ along with OPM. If not, see . */ +#include #include diff --git a/opm/parser/eclipse/Parser/ParserEnums.hpp b/opm/parser/eclipse/Parser/ParserEnums.hpp index 18e11ed4b..90ed4b5d0 100644 --- a/opm/parser/eclipse/Parser/ParserEnums.hpp +++ b/opm/parser/eclipse/Parser/ParserEnums.hpp @@ -21,7 +21,6 @@ #define PARSER_ENUMS_H #include -#include namespace Opm { diff --git a/opm/parser/eclipse/Parser/ParserFloatItem.hpp b/opm/parser/eclipse/Parser/ParserFloatItem.hpp index d2a62ca88..f297909ad 100644 --- a/opm/parser/eclipse/Parser/ParserFloatItem.hpp +++ b/opm/parser/eclipse/Parser/ParserFloatItem.hpp @@ -22,16 +22,18 @@ #include -#include - #include #include -#include +namespace Json { + class JsonObject; +} namespace Opm { + class RawRecord; + class ParserFloatItem : public ParserItem { public: @@ -47,7 +49,7 @@ namespace Opm { const std::string& getDimension(size_t index) const; bool equalDimensions(const ParserItem& other) const; - DeckItemPtr scan(RawRecordPtr rawRecord) const; + DeckItemPtr scan(std::shared_ptr< RawRecord > rawRecord) const; bool equal(const ParserItem& other) const; std::string createCode() const; diff --git a/opm/parser/eclipse/Parser/ParserIntItem.cpp b/opm/parser/eclipse/Parser/ParserIntItem.cpp index 0a2cd3d9c..85bc47674 100644 --- a/opm/parser/eclipse/Parser/ParserIntItem.cpp +++ b/opm/parser/eclipse/Parser/ParserIntItem.cpp @@ -18,8 +18,9 @@ along with OPM. If not, see . */ -#include -#include +#include + +#include #include #include diff --git a/opm/parser/eclipse/Parser/ParserIntItem.hpp b/opm/parser/eclipse/Parser/ParserIntItem.hpp index b525572ab..5e6e55ade 100644 --- a/opm/parser/eclipse/Parser/ParserIntItem.hpp +++ b/opm/parser/eclipse/Parser/ParserIntItem.hpp @@ -23,16 +23,18 @@ #include -#include - #include #include -#include +namespace Json { + class JsonObject; +} namespace Opm { + class RawRecord; + class ParserIntItem : public ParserItem { public: ParserIntItem(const std::string& itemName); @@ -41,7 +43,7 @@ namespace Opm { ParserIntItem(const std::string& itemName, ParserItemSizeEnum sizeType, int defaultValue); explicit ParserIntItem(const Json::JsonObject& jsonConfig); - DeckItemPtr scan(RawRecordPtr rawRecord) const; + std::shared_ptr< DeckItem > scan(std::shared_ptr< RawRecord > rawRecord) const; bool equal(const ParserItem& other) const; std::string createCode() const; @@ -55,8 +57,8 @@ namespace Opm { int m_default; }; - typedef std::shared_ptr ParserIntItemConstPtr; - typedef std::shared_ptr ParserIntItemPtr; + typedef std::shared_ptr< ParserIntItem > ParserIntItemPtr; + typedef std::shared_ptr< const ParserIntItem > ParserIntItemConstPtr; } #endif /* PARSERINTITEM_HPP */ diff --git a/opm/parser/eclipse/Parser/ParserItem.hpp b/opm/parser/eclipse/Parser/ParserItem.hpp index 74265a920..357b4a478 100644 --- a/opm/parser/eclipse/Parser/ParserItem.hpp +++ b/opm/parser/eclipse/Parser/ParserItem.hpp @@ -26,13 +26,15 @@ #include -#include - #include #include #include #include +namespace Json { + class JsonObject; +} + namespace Opm { class ParserItem { @@ -43,7 +45,7 @@ namespace Opm { virtual void push_backDimension(const std::string& dimension); virtual const std::string& getDimension(size_t index) const; - virtual DeckItemPtr scan(RawRecordPtr rawRecord) const = 0; + virtual std::shared_ptr< DeckItem > scan(std::shared_ptr< RawRecord > rawRecord) const = 0; virtual bool hasDimension() const; virtual size_t numDimensions() const; const std::string className() const; @@ -98,8 +100,8 @@ namespace Opm { std::string m_description; }; - typedef std::shared_ptr ParserItemConstPtr; typedef std::shared_ptr ParserItemPtr; + typedef std::shared_ptr ParserItemConstPtr; @@ -144,7 +146,7 @@ namespace Opm { /// returns a DeckItem object. /// NOTE: data are popped from the rawRecords deque! template - DeckItemPtr ParserItemScan(const ParserItemType * self , RawRecordPtr rawRecord) { + std::shared_ptr< DeckItem > ParserItemScan(const ParserItemType * self , std::shared_ptr< RawRecord > rawRecord) { std::shared_ptr deckItem = std::make_shared( self->name() , self->scalar() ); if (self->sizeType() == ALL) { diff --git a/opm/parser/eclipse/Parser/ParserKeyword.cpp b/opm/parser/eclipse/Parser/ParserKeyword.cpp index 5e3b3114b..ad0289382 100644 --- a/opm/parser/eclipse/Parser/ParserKeyword.cpp +++ b/opm/parser/eclipse/Parser/ParserKeyword.cpp @@ -21,12 +21,16 @@ #include +#include +#include #include -#include -#include #include -#include #include +#include +#include +#include +#include +#include #include diff --git a/opm/parser/eclipse/Parser/ParserKeyword.hpp b/opm/parser/eclipse/Parser/ParserKeyword.hpp index 779100320..ffd209bde 100644 --- a/opm/parser/eclipse/Parser/ParserKeyword.hpp +++ b/opm/parser/eclipse/Parser/ParserKeyword.hpp @@ -20,7 +20,6 @@ #define PARSER_KEYWORD_H #include -#include #include #include @@ -30,24 +29,21 @@ #include #endif -#include - -#include -#include -#include -#include -#include -#include -#include -#include - #include +#include +namespace Json { + class JsonObject; +} namespace Opm { - class ParserKeyword; - typedef std::shared_ptr ParserKeywordPtr; - typedef std::shared_ptr ParserKeywordConstPtr; + class Deck; + class DeckKeyword; + class ParseMode; + class ParserDoubleItem; + class ParserFloatItem; + class ParserRecord; + class RawKeyword; class ParserKeyword { public: @@ -77,9 +73,9 @@ namespace Opm { bool hasDimension() const; void addRecord(std::shared_ptr record); void addDataRecord(std::shared_ptr record); - ParserRecordPtr getRecord(size_t recordIndex) const; - std::vector::const_iterator recordBegin() const; - std::vector::const_iterator recordEnd() const; + std::shared_ptr< ParserRecord > getRecord(size_t recordIndex) const; + std::vector>::const_iterator recordBegin() const; + std::vector>::const_iterator recordEnd() const; const std::string className() const; const std::string& getName() const; size_t getFixedSize() const; @@ -100,7 +96,7 @@ namespace Opm { SectionNameSet::const_iterator validSectionNamesBegin() const; SectionNameSet::const_iterator validSectionNamesEnd() const; - DeckKeywordPtr parse(const ParseMode& parseMode , RawKeywordConstPtr rawKeyword) const; + std::shared_ptr< DeckKeyword > parse(const ParseMode& parseMode , std::shared_ptr< const RawKeyword > rawKeyword) const; enum ParserKeywordSizeEnum getSizeType() const; const std::pair& getSizeDefinitionPair() const; bool isDataKeyword() const; @@ -121,7 +117,7 @@ namespace Opm { #else boost::regex m_matchRegex; #endif - RecordVector m_records; + RecordVector> m_records; enum ParserKeywordSizeEnum m_keywordSizeType; size_t m_fixedSize; bool m_isTableCollection; @@ -136,9 +132,13 @@ namespace Opm { void initSizeKeyword(const Json::JsonObject& sizeObject); void commonInit(const std::string& name, ParserKeywordSizeEnum sizeType); void addItems( const Json::JsonObject& jsonConfig); - void initDoubleItemDimension( ParserDoubleItemPtr item, const Json::JsonObject itemConfig); - void initFloatItemDimension( ParserFloatItemPtr item, const Json::JsonObject itemConfig); + void initDoubleItemDimension( std::shared_ptr< ParserDoubleItem > item, const Json::JsonObject itemConfig); + void initFloatItemDimension( std::shared_ptr< ParserFloatItem > item, const Json::JsonObject itemConfig); }; + + typedef std::shared_ptr ParserKeywordPtr; + typedef std::shared_ptr ParserKeywordConstPtr; + } #endif diff --git a/opm/parser/eclipse/Parser/ParserRecord.cpp b/opm/parser/eclipse/Parser/ParserRecord.cpp index f25ae2550..96e7214a2 100644 --- a/opm/parser/eclipse/Parser/ParserRecord.cpp +++ b/opm/parser/eclipse/Parser/ParserRecord.cpp @@ -18,6 +18,7 @@ */ #include +#include #include #include #include diff --git a/opm/parser/eclipse/Parser/ParserRecord.hpp b/opm/parser/eclipse/Parser/ParserRecord.hpp index 3631363b6..92ab55da3 100644 --- a/opm/parser/eclipse/Parser/ParserRecord.hpp +++ b/opm/parser/eclipse/Parser/ParserRecord.hpp @@ -24,34 +24,34 @@ #include #include -#include -#include -#include -#include - - namespace Opm { + class Deck; + class DeckRecord; + class ParseMode; + class ParserItem; + class RawRecord; + class ParserRecord { public: ParserRecord(); size_t size() const; - void addItem( ParserItemConstPtr item ); - void addDataItem(ParserItemConstPtr item); - ParserItemConstPtr get(size_t index) const; - ParserItemConstPtr get(const std::string& itemName) const; - DeckRecordConstPtr parse(const ParseMode& parseMode , RawRecordPtr rawRecord) const; + void addItem( std::shared_ptr< const ParserItem > item ); + void addDataItem(std::shared_ptr< const ParserItem > item); + std::shared_ptr< const ParserItem > get(size_t index) const; + std::shared_ptr< const ParserItem > get(const std::string& itemName) const; + std::shared_ptr< const DeckRecord > parse(const ParseMode& parseMode , std::shared_ptr< RawRecord > rawRecord) const; bool isDataRecord() const; bool equal(const ParserRecord& other) const; bool hasDimension() const; bool hasItem(const std::string& itemName) const; void applyUnitsToDeck(const Deck& deck , std::shared_ptr deckRecord) const; - std::vector::const_iterator begin() const; - std::vector::const_iterator end() const; + std::vector>::const_iterator begin() const; + std::vector>::const_iterator end() const; private: bool m_dataRecord; - std::vector m_items; - std::map m_itemMap; + std::vector> m_items; + std::map> m_itemMap; }; typedef std::shared_ptr ParserRecordConstPtr; diff --git a/opm/parser/eclipse/Parser/ParserStringItem.hpp b/opm/parser/eclipse/Parser/ParserStringItem.hpp index b093c7b55..a0091b550 100644 --- a/opm/parser/eclipse/Parser/ParserStringItem.hpp +++ b/opm/parser/eclipse/Parser/ParserStringItem.hpp @@ -23,11 +23,13 @@ #include -#include - #include #include +namespace Json { + class JsonObject; +} + namespace Opm { class ParserStringItem : public ParserItem { diff --git a/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp b/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp index e370720c6..798f1a10d 100644 --- a/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp +++ b/opm/parser/eclipse/Parser/createDefaultKeywordList.cpp @@ -1,3 +1,5 @@ +#include + #include #include diff --git a/opm/parser/eclipse/Parser/tests/ParserIncludeTests.cpp b/opm/parser/eclipse/Parser/tests/ParserIncludeTests.cpp index 007d09cfd..b8e561c36 100644 --- a/opm/parser/eclipse/Parser/tests/ParserIncludeTests.cpp +++ b/opm/parser/eclipse/Parser/tests/ParserIncludeTests.cpp @@ -19,6 +19,7 @@ #define BOOST_TEST_MODULE ParserTests +#include #include #include diff --git a/opm/parser/eclipse/Parser/tests/ParserKeywordTests.cpp b/opm/parser/eclipse/Parser/tests/ParserKeywordTests.cpp index 41a10c6bb..f782064bf 100644 --- a/opm/parser/eclipse/Parser/tests/ParserKeywordTests.cpp +++ b/opm/parser/eclipse/Parser/tests/ParserKeywordTests.cpp @@ -25,13 +25,18 @@ #include #include + +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include - +#include #include +#include using namespace Opm; diff --git a/opm/parser/eclipse/Parser/tests/ParserRecordTests.cpp b/opm/parser/eclipse/Parser/tests/ParserRecordTests.cpp index c6c1310ab..bdb54c888 100644 --- a/opm/parser/eclipse/Parser/tests/ParserRecordTests.cpp +++ b/opm/parser/eclipse/Parser/tests/ParserRecordTests.cpp @@ -21,6 +21,7 @@ #define BOOST_TEST_MODULE ParserTests #include +#include #include #include #include diff --git a/opm/parser/eclipse/Parser/tests/ParserTests.cpp b/opm/parser/eclipse/Parser/tests/ParserTests.cpp index c095b50c3..101cb5a23 100644 --- a/opm/parser/eclipse/Parser/tests/ParserTests.cpp +++ b/opm/parser/eclipse/Parser/tests/ParserTests.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/opm/parser/eclipse/RawDeck/RawEnums.hpp b/opm/parser/eclipse/RawDeck/RawEnums.hpp index 09ae009a9..34f60ba47 100644 --- a/opm/parser/eclipse/RawDeck/RawEnums.hpp +++ b/opm/parser/eclipse/RawDeck/RawEnums.hpp @@ -20,9 +20,6 @@ #ifndef RAW_ENUMS_H #define RAW_ENUMS_H -#include -#include - namespace Opm { namespace Raw { diff --git a/opm/parser/eclipse/RawDeck/RawKeyword.cpp b/opm/parser/eclipse/RawDeck/RawKeyword.cpp index 2ab315f51..50fa6b713 100644 --- a/opm/parser/eclipse/RawDeck/RawKeyword.cpp +++ b/opm/parser/eclipse/RawDeck/RawKeyword.cpp @@ -17,12 +17,12 @@ along with OPM. If not, see . */ #include -#include #include -#include "RawKeyword.hpp" -#include "RawConsts.hpp" + #include -#include +#include +#include +#include namespace Opm { diff --git a/opm/parser/eclipse/RawDeck/RawKeyword.hpp b/opm/parser/eclipse/RawDeck/RawKeyword.hpp index c77bf6148..00f6af2c3 100644 --- a/opm/parser/eclipse/RawDeck/RawKeyword.hpp +++ b/opm/parser/eclipse/RawDeck/RawKeyword.hpp @@ -20,16 +20,16 @@ #ifndef RAWKEYWORD_HPP #define RAWKEYWORD_HPP -#include -#include -#include #include +#include +#include -#include #include namespace Opm { + class RawRecord; + /// Class representing a RawKeyword, meaning both the actual keyword phrase, and the records, /// represented as a list of RawRecord objects. /// The class also contains static functions to aid the parsing of the input file. @@ -44,7 +44,7 @@ namespace Opm { void addRawRecordString(const std::string& partialRecordString); size_t size() const; Raw::KeywordSizeEnum getSizeType() const; - RawRecordPtr getRecord(size_t index) const; + std::shared_ptr< RawRecord > getRecord(size_t index) const; static bool isKeywordPrefix(const std::string& line, std::string& keywordName); static bool isTerminator(std::string line); @@ -66,7 +66,7 @@ namespace Opm { size_t m_numTables; size_t m_currentNumTables; std::string m_name; - std::vector m_records; + std::vector> m_records; std::string m_partialRecordString; size_t m_lineNR; diff --git a/opm/parser/eclipse/RawDeck/StarToken.hpp b/opm/parser/eclipse/RawDeck/StarToken.hpp index 43714e93d..0c03a60e2 100644 --- a/opm/parser/eclipse/RawDeck/StarToken.hpp +++ b/opm/parser/eclipse/RawDeck/StarToken.hpp @@ -21,7 +21,6 @@ #define STAR_TOKEN_HPP #include -#include #include #include diff --git a/opm/parser/eclipse/RawDeck/tests/RawKeywordTests.cpp b/opm/parser/eclipse/RawDeck/tests/RawKeywordTests.cpp index d53516b74..7a9900b77 100644 --- a/opm/parser/eclipse/RawDeck/tests/RawKeywordTests.cpp +++ b/opm/parser/eclipse/RawDeck/tests/RawKeywordTests.cpp @@ -20,8 +20,10 @@ #define BOOST_TEST_MODULE RawKeywordTests #include #include -#include + #include +#include +#include using namespace Opm; diff --git a/opm/parser/eclipse/Units/UnitSystem.cpp b/opm/parser/eclipse/Units/UnitSystem.cpp index aedca48ec..2a9ff0661 100644 --- a/opm/parser/eclipse/Units/UnitSystem.cpp +++ b/opm/parser/eclipse/Units/UnitSystem.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include diff --git a/opm/parser/eclipse/Units/UnitSystem.hpp b/opm/parser/eclipse/Units/UnitSystem.hpp index 19e3e7ad4..53a035a47 100644 --- a/opm/parser/eclipse/Units/UnitSystem.hpp +++ b/opm/parser/eclipse/Units/UnitSystem.hpp @@ -24,10 +24,10 @@ #include #include -#include - namespace Opm { + class Dimension; + class UnitSystem { public: enum UnitType { diff --git a/opm/parser/eclipse/Units/tests/COMPSEGUnits.cpp b/opm/parser/eclipse/Units/tests/COMPSEGUnits.cpp index 888c88d06..dcdd91800 100644 --- a/opm/parser/eclipse/Units/tests/COMPSEGUnits.cpp +++ b/opm/parser/eclipse/Units/tests/COMPSEGUnits.cpp @@ -23,10 +23,13 @@ #include #include -#include -#include -#include #include +#include +#include +#include +#include +#include +#include using namespace Opm; diff --git a/opm/parser/eclipse/Utility/EquilWrapper.hpp b/opm/parser/eclipse/Utility/EquilWrapper.hpp index fbbbd6495..2a117f8a3 100644 --- a/opm/parser/eclipse/Utility/EquilWrapper.hpp +++ b/opm/parser/eclipse/Utility/EquilWrapper.hpp @@ -20,6 +20,7 @@ #define OPM_PARSER_EQUIL_WRAPPER_HPP #include +#include #include #include diff --git a/opm/parser/eclipse/Utility/SpecgridWrapper.hpp b/opm/parser/eclipse/Utility/SpecgridWrapper.hpp index 8c6562b5e..d8b04346f 100644 --- a/opm/parser/eclipse/Utility/SpecgridWrapper.hpp +++ b/opm/parser/eclipse/Utility/SpecgridWrapper.hpp @@ -20,6 +20,7 @@ #define OPM_PARSER_SPECGRID_WRAPPER_HPP #include +#include #include #include