2013-12-10 15:44:40 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-24 00:14:52 -05:00
|
|
|
// Copyright (C) Statoil ASA
|
|
|
|
// Copyright (C) Ceetron Solutions AS
|
2013-12-10 15:44:40 -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.
|
|
|
|
//
|
|
|
|
// 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"
|
2014-08-26 07:46:48 -05:00
|
|
|
#include "cvfStructGrid.h"
|
2013-12-10 15:44:40 -06:00
|
|
|
|
2014-08-26 07:46:48 -05:00
|
|
|
#include "cafFixedArray.h"
|
|
|
|
|
|
|
|
#include <cmath> // Needed for HUGE_VAL on Linux
|
2014-08-26 06:35:49 -05:00
|
|
|
#include <map>
|
2014-08-26 07:46:48 -05:00
|
|
|
#include <vector>
|
2013-12-10 15:44:40 -06:00
|
|
|
|
|
|
|
|
|
|
|
class RigMainGrid;
|
|
|
|
|
|
|
|
class RigConnection
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RigConnection( )
|
|
|
|
: m_c1GlobIdx(cvf::UNDEFINED_SIZE_T),
|
2013-12-11 07:55:14 -06:00
|
|
|
m_c1Face(cvf::StructGridInterface::NO_FACE),
|
2014-08-26 05:07:08 -05:00
|
|
|
m_c2GlobIdx(cvf::UNDEFINED_SIZE_T)
|
2013-12-10 15:44:40 -06:00
|
|
|
{}
|
|
|
|
|
2014-08-22 02:28:25 -05:00
|
|
|
bool hasCommonArea() const
|
|
|
|
{
|
|
|
|
return m_polygon.size() > 0;
|
|
|
|
}
|
|
|
|
|
2013-12-10 15:44:40 -06:00
|
|
|
size_t m_c1GlobIdx;
|
|
|
|
cvf::StructGridInterface::FaceType m_c1Face;
|
|
|
|
size_t m_c2GlobIdx;
|
|
|
|
|
2013-12-11 07:55:14 -06:00
|
|
|
std::vector<cvf::Vec3d> m_polygon;
|
2013-12-10 15:44:40 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class RigNNCData : public cvf::Object
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
RigNNCData();
|
|
|
|
|
|
|
|
void processConnections(const RigMainGrid& mainGrid);
|
|
|
|
|
|
|
|
std::vector<RigConnection>& connections() { return m_connections; }
|
|
|
|
const std::vector<RigConnection>& connections() const { return m_connections; };
|
|
|
|
|
2014-09-04 02:28:39 -05:00
|
|
|
std::vector<double>& makeConnectionScalarResult(size_t scalarResultIndex);
|
|
|
|
const std::vector<double>* connectionScalarResult(size_t scalarResultIndex) const;
|
2014-08-26 05:07:08 -05:00
|
|
|
|
2014-09-04 02:28:39 -05:00
|
|
|
void setCombTransmisibilityScalarResultIndex(size_t scalarResultIndex);
|
2014-08-26 05:07:08 -05:00
|
|
|
|
2014-09-04 02:28:39 -05:00
|
|
|
bool hasScalarValues(size_t scalarResultIndex);
|
2014-08-26 05:07:08 -05:00
|
|
|
|
2013-12-14 02:30:27 -06:00
|
|
|
private: // This section is possibly not needed
|
2014-08-08 03:02:26 -05:00
|
|
|
//const std::vector<size_t>& findConnectionIndices(size_t reservoirCellIndex, cvf::StructGridInterface::FaceType face) const;
|
2013-12-16 06:48:51 -06:00
|
|
|
//typedef std::map<size_t, caf::FixedArray<std::vector<size_t>, 7 > > ConnectionSearchMap;
|
|
|
|
//ConnectionSearchMap m_cellIdxToFaceToConnectionIdxMap;
|
2013-12-14 02:30:27 -06:00
|
|
|
|
|
|
|
private:
|
2013-12-10 15:44:40 -06:00
|
|
|
std::vector<RigConnection> m_connections;
|
2014-08-26 05:07:08 -05:00
|
|
|
std::map<size_t, std::vector<double> > m_connectionResults; ///< scalarResultIndex to value array map
|
2013-12-10 15:44:40 -06:00
|
|
|
};
|