2013-12-03 13:30:32 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2014-09-24 00:14:52 -05:00
|
|
|
// Copyright (C) Statoil ASA
|
|
|
|
// Copyright (C) Ceetron Solutions AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2013-12-03 13:30:32 -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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2013-12-03 13:30:32 -06: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 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2013-12-03 13:30:32 -06:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
2019-09-05 02:43:17 -05:00
|
|
|
|
2013-12-03 13:30:32 -06:00
|
|
|
#include "cvfObject.h"
|
|
|
|
|
|
|
|
#include "cvfCellRange.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cvfStructGridGeometryGenerator.h"
|
2013-12-03 13:30:32 -06:00
|
|
|
|
|
|
|
namespace cvf
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
class StructGridInterface;
|
|
|
|
class ModelBasicList;
|
|
|
|
class Transform;
|
|
|
|
class Part;
|
|
|
|
} // namespace cvf
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2022-03-25 12:15:22 -05:00
|
|
|
class RigNNCData;
|
|
|
|
class RigConnectionContainer;
|
2013-12-03 13:30:32 -06:00
|
|
|
class RigFault;
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
|
|
|
|
|
|
|
class RivFaultGeometryGenerator : public cvf::Object
|
|
|
|
{
|
|
|
|
public:
|
2023-02-26 03:48:40 -06:00
|
|
|
RivFaultGeometryGenerator( const cvf::StructGridInterface* grid, const RigFault* fault, RigNNCData* nncData, bool computeNativeFaultFaces );
|
2018-10-18 12:45:57 -05:00
|
|
|
~RivFaultGeometryGenerator() override;
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setCellVisibility( const cvf::UByteArray* cellVisibilities );
|
|
|
|
|
2013-12-03 13:30:32 -06:00
|
|
|
// Mapping between cells and geometry
|
|
|
|
|
2020-02-12 04:13:38 -06:00
|
|
|
const cvf::StructGridQuadToCellFaceMapper* quadToCellFaceMapper() { return m_quadMapper.p(); }
|
|
|
|
const cvf::StuctGridTriangleToCellFaceMapper* triangleToCellFaceMapper() { return m_triangleMapper.p(); }
|
2013-12-03 13:30:32 -06:00
|
|
|
|
|
|
|
// Generated geometry
|
2022-03-25 12:15:22 -05:00
|
|
|
cvf::ref<cvf::DrawableGeo> generateSurface( bool onlyShowFacesWithDefinedNeighbors );
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<cvf::DrawableGeo> createMeshDrawable();
|
|
|
|
cvf::ref<cvf::DrawableGeo> createOutlineMeshDrawable( double creaseAngle );
|
2013-12-03 13:30:32 -06:00
|
|
|
|
2017-03-16 06:02:07 -05:00
|
|
|
private:
|
2022-03-25 12:15:22 -05:00
|
|
|
void computeArrays( bool onlyShowFacesWithDefinedNeighbors );
|
|
|
|
|
2021-12-20 01:52:22 -06:00
|
|
|
bool hasConnection( size_t cellIdx,
|
|
|
|
cvf::StructGridInterface::FaceType face,
|
|
|
|
const RigConnectionContainer& conns,
|
|
|
|
const std::vector<size_t>& nncConnectionIndices );
|
2013-12-03 13:30:32 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
// Input
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::cref<cvf::StructGridInterface> m_grid;
|
|
|
|
cvf::cref<RigFault> m_fault;
|
|
|
|
cvf::cref<cvf::UByteArray> m_cellVisibility;
|
2022-03-25 12:15:22 -05:00
|
|
|
cvf::ref<RigNNCData> m_nncData;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
|
|
|
bool m_computeNativeFaultFaces;
|
2013-12-03 13:30:32 -06:00
|
|
|
|
|
|
|
// Created arrays
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<cvf::Vec3fArray> m_vertices;
|
|
|
|
|
2013-12-03 13:30:32 -06:00
|
|
|
// Mappings
|
2019-09-06 03:40:57 -05:00
|
|
|
std::vector<size_t> m_quadsToGridCells;
|
|
|
|
std::vector<cvf::StructGridInterface::FaceType> m_quadsToFace;
|
2014-06-24 10:19:30 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
cvf::ref<cvf::StructGridQuadToCellFaceMapper> m_quadMapper;
|
|
|
|
cvf::ref<cvf::StuctGridTriangleToCellFaceMapper> m_triangleMapper;
|
2013-12-03 13:30:32 -06:00
|
|
|
};
|