2013-02-11 15:12:53 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2014-09-23 15:04:57 +02:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2013-02-11 15:12:53 +01: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-09-06 10:40:57 +02:00
|
|
|
//
|
2013-02-11 15:12:53 +01: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-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2013-02-11 15:12:53 +01:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2026-01-09 16:04:19 +01:00
|
|
|
#include "RigBoundingBoxIjk.h"
|
2025-10-03 11:06:36 +02:00
|
|
|
#include "RigTypeSafeIndex.h"
|
|
|
|
|
|
2025-11-12 19:48:07 +01:00
|
|
|
#include "cafVecIjk.h"
|
2019-09-06 10:40:57 +02:00
|
|
|
#include "cvfBoundingBox.h"
|
2013-02-11 15:12:53 +01:00
|
|
|
#include "cvfObject.h"
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2013-03-21 10:31:58 +01:00
|
|
|
class RigActiveCellInfo : public cvf::Object
|
2013-02-11 15:12:53 +01:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
RigActiveCellInfo();
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setReservoirCellCount( size_t reservoirCellCount );
|
|
|
|
|
size_t reservoirCellCount() const;
|
|
|
|
|
size_t reservoirActiveCellCount() const;
|
2013-02-11 15:12:53 +01:00
|
|
|
|
2026-03-03 14:38:15 +01:00
|
|
|
bool isActive( ReservoirCellIndex reservoirCellIndex ) const;
|
|
|
|
|
ActiveCellIndex cellResultIndex( ReservoirCellIndex reservoirCellIndex ) const;
|
|
|
|
|
void setCellResultIndex( ReservoirCellIndex reservoirCellIndex, ActiveCellIndex globalResultCellIndex );
|
2025-10-03 11:06:36 +02:00
|
|
|
std::vector<ReservoirCellIndex> activeReservoirCellIndices() const;
|
2013-02-11 15:12:53 +01:00
|
|
|
|
2022-11-24 10:44:03 +01:00
|
|
|
void setGridCount( size_t gridCount );
|
|
|
|
|
void setGridActiveCellCounts( size_t gridIndex, size_t activeCellCount );
|
|
|
|
|
size_t gridActiveCellCounts( size_t gridIndex ) const;
|
|
|
|
|
void computeDerivedData();
|
2013-02-11 15:12:53 +01:00
|
|
|
|
2026-01-09 16:04:19 +01:00
|
|
|
void setIjkBoundingBox( const RigBoundingBoxIjk<caf::VecIjk0>& boundingBox );
|
|
|
|
|
const RigBoundingBoxIjk<caf::VecIjk0>& ijkBoundingBox() const;
|
2013-02-11 15:12:53 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::BoundingBox geometryBoundingBox() const;
|
|
|
|
|
void setGeometryBoundingBox( cvf::BoundingBox bb );
|
2013-02-11 15:12:53 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void clear();
|
2013-03-21 15:31:47 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void addLgr( size_t cellCount );
|
2018-10-19 10:40:54 +02:00
|
|
|
|
2013-02-11 15:12:53 +01:00
|
|
|
private:
|
|
|
|
|
class GridActiveCellCounts
|
|
|
|
|
{
|
|
|
|
|
public:
|
2017-03-06 11:58:07 +01:00
|
|
|
GridActiveCellCounts();
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
size_t activeCellCount() const;
|
|
|
|
|
void setActiveCellCount( size_t activeCellCount );
|
2013-02-11 15:12:53 +01:00
|
|
|
|
|
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
size_t m_activeCellCount;
|
2013-02-11 15:12:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
std::vector<GridActiveCellCounts> m_perGridActiveCellInfo;
|
2013-02-13 13:50:37 +01:00
|
|
|
|
2026-03-03 14:38:15 +01:00
|
|
|
std::vector<ActiveCellIndex> m_reservoirCellToActiveCell;
|
|
|
|
|
std::vector<ReservoirCellIndex> m_activeReservoirCells;
|
2013-02-11 15:12:53 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
size_t m_reservoirActiveCellCount;
|
2013-02-11 15:12:53 +01:00
|
|
|
|
2026-01-09 16:04:19 +01:00
|
|
|
RigBoundingBoxIjk<caf::VecIjk0> m_ijkBoundingBox;
|
2013-02-11 15:12:53 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::BoundingBox m_activeCellsBoundingBox;
|
2013-02-11 15:12:53 +01:00
|
|
|
};
|