2013-02-13 07:50:37 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
2019-03-25 01:38:33 -05:00
|
|
|
//
|
2013-02-13 07:50:37 -06:00
|
|
|
// 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.
|
2019-03-25 01:38:33 -05:00
|
|
|
//
|
2013-02-13 07:50:37 -06:00
|
|
|
// 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.
|
2019-03-25 01:38:33 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2013-02-13 07:50:37 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2013-02-14 03:08:56 -06:00
|
|
|
#include "cvfCollection.h"
|
2019-03-25 01:38:33 -05:00
|
|
|
#include "cvfObject.h"
|
2013-02-14 03:08:56 -06:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class RigMainGrid;
|
2017-01-10 02:51:39 -06:00
|
|
|
class RigEclipseCaseData;
|
2013-02-14 03:08:56 -06:00
|
|
|
|
2013-03-22 09:43:42 -05:00
|
|
|
class RigGridManager : public cvf::Object
|
2013-02-14 03:08:56 -06:00
|
|
|
{
|
|
|
|
public:
|
2019-09-06 03:40:57 -05:00
|
|
|
void addCase( RigEclipseCaseData* eclipseCase );
|
2019-03-25 01:38:33 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void removeCase( RigEclipseCaseData* eclipseCase );
|
2019-03-25 01:38:33 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
RigMainGrid* findEqualGrid( RigMainGrid* candidateGrid );
|
2013-02-14 03:08:56 -06:00
|
|
|
|
2013-03-08 01:36:30 -06:00
|
|
|
void clear();
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
static bool isEqual( RigMainGrid* gridA, RigMainGrid* gridB );
|
2022-11-17 08:51:01 -06:00
|
|
|
static bool isMainGridDimensionsEqual( const RigMainGrid* gridA, const RigMainGrid* gridB );
|
2019-09-06 03:40:57 -05:00
|
|
|
static bool isGridDimensionsEqual( const std::vector<std::vector<int>>& mainCaseGridDimensions,
|
|
|
|
const std::vector<std::vector<int>>& caseGridDimensions );
|
2019-03-25 01:36:33 -05:00
|
|
|
|
2013-04-07 10:27:45 -05:00
|
|
|
private:
|
2013-02-14 06:16:56 -06:00
|
|
|
class CaseToGridMap : public cvf::Object
|
2013-02-14 03:08:56 -06:00
|
|
|
{
|
|
|
|
public:
|
2019-09-06 03:40:57 -05:00
|
|
|
CaseToGridMap( RigEclipseCaseData* eclipseCase, RigMainGrid* mainGrid );
|
2013-02-14 03:08:56 -06:00
|
|
|
|
2019-03-25 01:38:33 -05:00
|
|
|
RigEclipseCaseData* m_eclipseCase;
|
|
|
|
RigMainGrid* m_mainGrid;
|
2013-02-14 03:08:56 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
2013-02-14 06:16:56 -06:00
|
|
|
cvf::Collection<CaseToGridMap> m_caseToGrid;
|
2013-02-28 02:59:36 -06:00
|
|
|
};
|