mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Whitespace
This commit is contained in:
parent
58d369d32b
commit
5c316cecdd
@ -1,28 +1,28 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
||||||
//
|
//
|
||||||
// ResInsight is free software: you can redistribute it and/or modify
|
// ResInsight is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
//
|
//
|
||||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||||
// for more details.
|
// for more details.
|
||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "RigGridManager.h"
|
#include "RigGridManager.h"
|
||||||
|
|
||||||
#include "RigEclipseCaseData.h"
|
#include "RigEclipseCaseData.h"
|
||||||
#include "RigMainGrid.h"
|
#include "RigMainGrid.h"
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RigGridManager::addCase(RigEclipseCaseData* eclipseCase)
|
void RigGridManager::addCase(RigEclipseCaseData* eclipseCase)
|
||||||
{
|
{
|
||||||
@ -31,7 +31,7 @@ void RigGridManager::addCase(RigEclipseCaseData* eclipseCase)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RigGridManager::removeCase(RigEclipseCaseData* eclipseCase)
|
void RigGridManager::removeCase(RigEclipseCaseData* eclipseCase)
|
||||||
{
|
{
|
||||||
@ -46,7 +46,7 @@ void RigGridManager::removeCase(RigEclipseCaseData* eclipseCase)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigMainGrid* RigGridManager::findEqualGrid(RigMainGrid* candidateGrid)
|
RigMainGrid* RigGridManager::findEqualGrid(RigMainGrid* candidateGrid)
|
||||||
{
|
{
|
||||||
@ -61,9 +61,8 @@ RigMainGrid* RigGridManager::findEqualGrid(RigMainGrid* candidateGrid)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RigGridManager::isEqual(RigMainGrid* gridA, RigMainGrid* gridB)
|
bool RigGridManager::isEqual(RigMainGrid* gridA, RigMainGrid* gridB)
|
||||||
{
|
{
|
||||||
@ -87,7 +86,7 @@ bool RigGridManager::isEqual(RigMainGrid* gridA, RigMainGrid* gridB)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RigGridManager::clear()
|
void RigGridManager::clear()
|
||||||
{
|
{
|
||||||
@ -95,9 +94,10 @@ void RigGridManager::clear()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RigGridManager::isGridDimensionsEqual(const std::vector< std::vector<int> >& mainCaseGridDimensions, const std::vector< std::vector<int> >& caseGridDimensions)
|
bool RigGridManager::isGridDimensionsEqual(const std::vector<std::vector<int>>& mainCaseGridDimensions,
|
||||||
|
const std::vector<std::vector<int>>& caseGridDimensions)
|
||||||
{
|
{
|
||||||
if (mainCaseGridDimensions.size() != caseGridDimensions.size())
|
if (mainCaseGridDimensions.size() != caseGridDimensions.size())
|
||||||
{
|
{
|
||||||
@ -112,14 +112,13 @@ bool RigGridManager::isGridDimensionsEqual(const std::vector< std::vector<int> >
|
|||||||
if (mainCaseGridDimensions[j][0] != caseGridDimensions[j][0]) return false; // nx
|
if (mainCaseGridDimensions[j][0] != caseGridDimensions[j][0]) return false; // nx
|
||||||
if (mainCaseGridDimensions[j][1] != caseGridDimensions[j][1]) return false; // ny
|
if (mainCaseGridDimensions[j][1] != caseGridDimensions[j][1]) return false; // ny
|
||||||
if (mainCaseGridDimensions[j][2] != caseGridDimensions[j][2]) return false; // nz
|
if (mainCaseGridDimensions[j][2] != caseGridDimensions[j][2]) return false; // nz
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RigGridManager::isMainGridDimensionsEqual(RigMainGrid* gridA, RigMainGrid* gridB)
|
bool RigGridManager::isMainGridDimensionsEqual(RigMainGrid* gridA, RigMainGrid* gridB)
|
||||||
{
|
{
|
||||||
@ -127,18 +126,18 @@ bool RigGridManager::isMainGridDimensionsEqual(RigMainGrid* gridA, RigMainGrid*
|
|||||||
|
|
||||||
if (gridA == gridB) return true;
|
if (gridA == gridB) return true;
|
||||||
|
|
||||||
if( gridA->cellCountI() != gridB->cellCountI()) return false;
|
if (gridA->cellCountI() != gridB->cellCountI()) return false;
|
||||||
if( gridA->cellCountJ() != gridB->cellCountJ()) return false;
|
if (gridA->cellCountJ() != gridB->cellCountJ()) return false;
|
||||||
if( gridA->cellCountK() != gridB->cellCountK()) return false;
|
if (gridA->cellCountK() != gridB->cellCountK()) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigGridManager::CaseToGridMap::CaseToGridMap(RigEclipseCaseData* eclipseCase, RigMainGrid* mainGrid) :
|
RigGridManager::CaseToGridMap::CaseToGridMap(RigEclipseCaseData* eclipseCase, RigMainGrid* mainGrid)
|
||||||
m_eclipseCase(eclipseCase),
|
: m_eclipseCase(eclipseCase)
|
||||||
m_mainGrid(mainGrid)
|
, m_mainGrid(mainGrid)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
||||||
//
|
//
|
||||||
// ResInsight is free software: you can redistribute it and/or modify
|
// ResInsight is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
// (at your option) any later version.
|
// (at your option) any later version.
|
||||||
//
|
//
|
||||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
//
|
//
|
||||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||||
// for more details.
|
// for more details.
|
||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -19,8 +19,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "cvfBase.h"
|
#include "cvfBase.h"
|
||||||
#include "cvfObject.h"
|
|
||||||
#include "cvfCollection.h"
|
#include "cvfCollection.h"
|
||||||
|
#include "cvfObject.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -31,16 +31,17 @@ class RigGridManager : public cvf::Object
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void addCase(RigEclipseCaseData* eclipseCase);
|
void addCase(RigEclipseCaseData* eclipseCase);
|
||||||
|
|
||||||
void removeCase(RigEclipseCaseData* eclipseCase);
|
void removeCase(RigEclipseCaseData* eclipseCase);
|
||||||
|
|
||||||
RigMainGrid* findEqualGrid(RigMainGrid* candidateGrid);
|
RigMainGrid* findEqualGrid(RigMainGrid* candidateGrid);
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
static bool isEqual(RigMainGrid* gridA, RigMainGrid* gridB);
|
static bool isEqual(RigMainGrid* gridA, RigMainGrid* gridB);
|
||||||
static bool isGridDimensionsEqual(const std::vector< std::vector<int> >& mainCaseGridDimensions, const std::vector< std::vector<int> >& caseGridDimensions);
|
|
||||||
static bool isMainGridDimensionsEqual(RigMainGrid* gridA, RigMainGrid* gridB);
|
static bool isMainGridDimensionsEqual(RigMainGrid* gridA, RigMainGrid* gridB);
|
||||||
|
static bool isGridDimensionsEqual(const std::vector<std::vector<int>>& mainCaseGridDimensions,
|
||||||
|
const std::vector<std::vector<int>>& caseGridDimensions);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class CaseToGridMap : public cvf::Object
|
class CaseToGridMap : public cvf::Object
|
||||||
@ -48,11 +49,10 @@ private:
|
|||||||
public:
|
public:
|
||||||
CaseToGridMap(RigEclipseCaseData* eclipseCase, RigMainGrid* mainGrid);
|
CaseToGridMap(RigEclipseCaseData* eclipseCase, RigMainGrid* mainGrid);
|
||||||
|
|
||||||
RigEclipseCaseData* m_eclipseCase;
|
RigEclipseCaseData* m_eclipseCase;
|
||||||
RigMainGrid* m_mainGrid;
|
RigMainGrid* m_mainGrid;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cvf::Collection<CaseToGridMap> m_caseToGrid;
|
cvf::Collection<CaseToGridMap> m_caseToGrid;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user