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
|
||||
//
|
||||
//
|
||||
// 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 <http://www.gnu.org/licenses/gpl.html>
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// 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<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())
|
||||
{
|
||||
@ -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][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)
|
||||
{
|
||||
}
|
||||
|
@ -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 <http://www.gnu.org/licenses/gpl.html>
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
@ -19,8 +19,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfObject.h"
|
||||
#include "cvfCollection.h"
|
||||
#include "cvfObject.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -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<int> >& mainCaseGridDimensions, const std::vector< std::vector<int> >& caseGridDimensions);
|
||||
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:
|
||||
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<CaseToGridMap> m_caseToGrid;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user