2013-02-11 08:12:53 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// 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>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cvfBase.h"
|
|
|
|
#include "cvfObject.h"
|
|
|
|
#include "cvfVector3.h"
|
|
|
|
#include "cvfBoundingBox.h"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-21 04:31:58 -05:00
|
|
|
class RigActiveCellInfo : public cvf::Object
|
2013-02-11 08:12:53 -06:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
RigActiveCellInfo();
|
|
|
|
|
2013-02-12 00:11:32 -06:00
|
|
|
void setGlobalCellCount(size_t globalCellCount);
|
2013-02-11 08:12:53 -06:00
|
|
|
|
2013-02-12 00:11:32 -06:00
|
|
|
bool isActiveInMatrixModel(size_t globalCellIndex) const;
|
|
|
|
size_t activeIndexInMatrixModel(size_t globalCellIndex) const;
|
|
|
|
void setActiveIndexInMatrixModel(size_t globalCellIndex, size_t globalActiveCellIndex);
|
2013-02-11 08:12:53 -06:00
|
|
|
|
2013-02-12 00:11:32 -06:00
|
|
|
void setGridCount(size_t gridCount);
|
2013-03-13 05:50:31 -05:00
|
|
|
void setGridActiveCellCounts(size_t gridIndex, size_t matrixActiveCellCount);
|
2013-03-13 07:42:27 -05:00
|
|
|
void gridActiveCellCounts(size_t gridIndex, size_t& matrixActiveCellCount);
|
2013-02-12 00:11:32 -06:00
|
|
|
void computeDerivedData();
|
2013-02-11 08:12:53 -06:00
|
|
|
|
2013-02-12 00:11:32 -06:00
|
|
|
size_t globalMatrixModelActiveCellCount() const;
|
2013-02-11 08:12:53 -06:00
|
|
|
|
2013-02-12 00:11:32 -06:00
|
|
|
void setMatrixModelActiveCellsBoundingBox(const cvf::Vec3st& min, const cvf::Vec3st& max);
|
|
|
|
void matrixModelActiveCellsBoundingBox(cvf::Vec3st& min, cvf::Vec3st& max) const;
|
2013-02-11 08:12:53 -06:00
|
|
|
|
2013-02-13 04:04:45 -06:00
|
|
|
cvf::BoundingBox matrixActiveCellsGeometryBoundingBox() const;
|
|
|
|
void setMatrixActiveCellsGeometryBoundingBox(cvf::BoundingBox bb);
|
2013-02-11 08:12:53 -06:00
|
|
|
|
2013-03-21 09:31:47 -05:00
|
|
|
void clear();
|
|
|
|
|
2013-02-11 08:12:53 -06:00
|
|
|
private:
|
|
|
|
class GridActiveCellCounts
|
|
|
|
{
|
|
|
|
public:
|
2013-02-12 00:11:32 -06:00
|
|
|
size_t matrixModelActiveCellCount() const;
|
|
|
|
void setMatrixModelActiveCellCount(size_t activeMatrixModelCellCount);
|
2013-02-11 08:12:53 -06:00
|
|
|
|
|
|
|
private:
|
2013-02-12 00:11:32 -06:00
|
|
|
size_t m_matrixModelActiveCellCount;
|
2013-02-11 08:12:53 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
2013-02-13 06:50:37 -06:00
|
|
|
std::vector<GridActiveCellCounts> m_perGridActiveCellInfo;
|
|
|
|
|
2013-03-13 07:42:27 -05:00
|
|
|
std::vector<size_t> m_activeInMatrixModel;
|
2013-02-11 08:12:53 -06:00
|
|
|
|
2013-03-13 07:42:27 -05:00
|
|
|
size_t m_globalMatrixModelActiveCellCount;
|
2013-02-11 08:12:53 -06:00
|
|
|
|
2013-03-13 07:42:27 -05:00
|
|
|
cvf::Vec3st m_activeCellPositionMin;
|
|
|
|
cvf::Vec3st m_activeCellPositionMax;
|
2013-02-11 08:12:53 -06:00
|
|
|
|
2013-03-13 07:42:27 -05:00
|
|
|
cvf::BoundingBox m_matrixActiveCellsBoundingBox;
|
2013-02-11 08:12:53 -06:00
|
|
|
};
|