diff --git a/ApplicationCode/ReservoirDataModel/RigGridManager.cpp b/ApplicationCode/ReservoirDataModel/RigGridManager.cpp index f920a8825a..f79b148425 100644 --- a/ApplicationCode/ReservoirDataModel/RigGridManager.cpp +++ b/ApplicationCode/ReservoirDataModel/RigGridManager.cpp @@ -1,28 +1,28 @@ ///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2011-2012 Statoil ASA, Ceetron AS -// +// // ResInsight is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// +// // ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. -// -// See the GNU General Public License at +// +// See the GNU General Public License at // for more details. // ///////////////////////////////////////////////////////////////////////////////// #include "RigGridManager.h" + #include "RigEclipseCaseData.h" #include "RigMainGrid.h" - //-------------------------------------------------------------------------------------------------- -/// +/// //-------------------------------------------------------------------------------------------------- void RigGridManager::addCase(RigEclipseCaseData* eclipseCase) { @@ -31,7 +31,7 @@ void RigGridManager::addCase(RigEclipseCaseData* eclipseCase) } //-------------------------------------------------------------------------------------------------- -/// +/// //-------------------------------------------------------------------------------------------------- void RigGridManager::removeCase(RigEclipseCaseData* eclipseCase) { @@ -46,7 +46,7 @@ void RigGridManager::removeCase(RigEclipseCaseData* eclipseCase) } //-------------------------------------------------------------------------------------------------- -/// +/// //-------------------------------------------------------------------------------------------------- RigMainGrid* RigGridManager::findEqualGrid(RigMainGrid* candidateGrid) { @@ -61,9 +61,8 @@ RigMainGrid* RigGridManager::findEqualGrid(RigMainGrid* candidateGrid) return nullptr; } - //-------------------------------------------------------------------------------------------------- -/// +/// //-------------------------------------------------------------------------------------------------- bool RigGridManager::isEqual(RigMainGrid* gridA, RigMainGrid* gridB) { @@ -87,7 +86,7 @@ bool RigGridManager::isEqual(RigMainGrid* gridA, RigMainGrid* gridB) } //-------------------------------------------------------------------------------------------------- -/// +/// //-------------------------------------------------------------------------------------------------- void RigGridManager::clear() { @@ -95,9 +94,10 @@ void RigGridManager::clear() } //-------------------------------------------------------------------------------------------------- -/// +/// //-------------------------------------------------------------------------------------------------- -bool RigGridManager::isGridDimensionsEqual(const std::vector< std::vector >& mainCaseGridDimensions, const std::vector< std::vector >& caseGridDimensions) +bool RigGridManager::isGridDimensionsEqual(const std::vector>& mainCaseGridDimensions, + const std::vector>& caseGridDimensions) { if (mainCaseGridDimensions.size() != caseGridDimensions.size()) { @@ -112,14 +112,13 @@ bool RigGridManager::isGridDimensionsEqual(const std::vector< std::vector > if (mainCaseGridDimensions[j][0] != caseGridDimensions[j][0]) return false; // nx if (mainCaseGridDimensions[j][1] != caseGridDimensions[j][1]) return false; // ny if (mainCaseGridDimensions[j][2] != caseGridDimensions[j][2]) return false; // nz - } return true; } //-------------------------------------------------------------------------------------------------- -/// +/// //-------------------------------------------------------------------------------------------------- bool RigGridManager::isMainGridDimensionsEqual(RigMainGrid* gridA, RigMainGrid* gridB) { @@ -127,18 +126,18 @@ bool RigGridManager::isMainGridDimensionsEqual(RigMainGrid* gridA, RigMainGrid* if (gridA == gridB) return true; - if( gridA->cellCountI() != gridB->cellCountI()) return false; - if( gridA->cellCountJ() != gridB->cellCountJ()) return false; - if( gridA->cellCountK() != gridB->cellCountK()) return false; + if (gridA->cellCountI() != gridB->cellCountI()) return false; + if (gridA->cellCountJ() != gridB->cellCountJ()) return false; + if (gridA->cellCountK() != gridB->cellCountK()) return false; return true; } //-------------------------------------------------------------------------------------------------- -/// +/// //-------------------------------------------------------------------------------------------------- -RigGridManager::CaseToGridMap::CaseToGridMap(RigEclipseCaseData* eclipseCase, RigMainGrid* mainGrid) : -m_eclipseCase(eclipseCase), - m_mainGrid(mainGrid) +RigGridManager::CaseToGridMap::CaseToGridMap(RigEclipseCaseData* eclipseCase, RigMainGrid* mainGrid) + : m_eclipseCase(eclipseCase) + , m_mainGrid(mainGrid) { } diff --git a/ApplicationCode/ReservoirDataModel/RigGridManager.h b/ApplicationCode/ReservoirDataModel/RigGridManager.h index d7b75e9c87..df4c4d3fae 100644 --- a/ApplicationCode/ReservoirDataModel/RigGridManager.h +++ b/ApplicationCode/ReservoirDataModel/RigGridManager.h @@ -1,17 +1,17 @@ ///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2011-2012 Statoil ASA, Ceetron AS -// +// // ResInsight is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// +// // ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or // FITNESS FOR A PARTICULAR PURPOSE. -// -// See the GNU General Public License at +// +// See the GNU General Public License at // for more details. // ///////////////////////////////////////////////////////////////////////////////// @@ -19,8 +19,8 @@ #pragma once #include "cvfBase.h" -#include "cvfObject.h" #include "cvfCollection.h" +#include "cvfObject.h" #include @@ -31,16 +31,17 @@ class RigGridManager : public cvf::Object { public: void addCase(RigEclipseCaseData* eclipseCase); - + void removeCase(RigEclipseCaseData* eclipseCase); - + RigMainGrid* findEqualGrid(RigMainGrid* candidateGrid); void clear(); static bool isEqual(RigMainGrid* gridA, RigMainGrid* gridB); - static bool isGridDimensionsEqual(const std::vector< std::vector >& mainCaseGridDimensions, const std::vector< std::vector >& caseGridDimensions); static bool isMainGridDimensionsEqual(RigMainGrid* gridA, RigMainGrid* gridB); + static bool isGridDimensionsEqual(const std::vector>& mainCaseGridDimensions, + const std::vector>& caseGridDimensions); private: class CaseToGridMap : public cvf::Object @@ -48,11 +49,10 @@ private: public: CaseToGridMap(RigEclipseCaseData* eclipseCase, RigMainGrid* mainGrid); - RigEclipseCaseData* m_eclipseCase; - RigMainGrid* m_mainGrid; + RigEclipseCaseData* m_eclipseCase; + RigMainGrid* m_mainGrid; }; - private: cvf::Collection m_caseToGrid; };