2025-04-28 17:46:35 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2025- Equinor ASA
|
|
|
|
|
//
|
|
|
|
|
// 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 "RimEclipseCase.h"
|
|
|
|
|
|
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
|
2025-05-07 16:09:56 +02:00
|
|
|
#include <expected>
|
|
|
|
|
|
2025-04-28 17:46:35 +02:00
|
|
|
//==================================================================================================
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
class RimCornerPointCase : public RimEclipseCase
|
|
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
RimCornerPointCase();
|
|
|
|
|
~RimCornerPointCase() override;
|
|
|
|
|
|
|
|
|
|
bool openEclipseGridFile() override;
|
|
|
|
|
|
|
|
|
|
bool importAsciiInputProperties( const QStringList& fileNames ) override;
|
|
|
|
|
|
|
|
|
|
QString locationOnDisc() const override;
|
|
|
|
|
|
2025-05-07 16:09:56 +02:00
|
|
|
static std::expected<RimCornerPointCase*, QString> createFromCoordinatesArray( const int nx,
|
|
|
|
|
const int ny,
|
|
|
|
|
const int nz,
|
|
|
|
|
const std::vector<float>& coord,
|
|
|
|
|
const std::vector<float>& zcorn,
|
|
|
|
|
const std::vector<float>& actnum );
|
2025-04-28 17:46:35 +02:00
|
|
|
|
2025-12-23 14:02:08 +01:00
|
|
|
static std::expected<void, QString> replaceGridFromCoordinatesArray( RimCornerPointCase& cornerPointCase,
|
|
|
|
|
const int nx,
|
|
|
|
|
const int ny,
|
|
|
|
|
const int nz,
|
|
|
|
|
const std::vector<float>& coord,
|
|
|
|
|
const std::vector<float>& zcorn,
|
|
|
|
|
const std::vector<float>& actnum );
|
|
|
|
|
|
2025-04-28 17:46:35 +02:00
|
|
|
protected:
|
|
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
|
|
|
|
|
|
static void buildGrid( RigEclipseCaseData& eclipseCaseData,
|
|
|
|
|
const int nx,
|
|
|
|
|
const int ny,
|
|
|
|
|
const int nz,
|
|
|
|
|
const std::vector<float>& coord,
|
|
|
|
|
const std::vector<float>& zcorn,
|
|
|
|
|
const std::vector<float>& actnum );
|
|
|
|
|
|
2026-06-05 10:39:52 +02:00
|
|
|
static void createActnumResult( RigEclipseCaseData& eclipseCaseData );
|
|
|
|
|
|
2026-06-12 16:13:54 +02:00
|
|
|
static void computeDepthRelatedResults( RimCornerPointCase& cornerPointCase );
|
|
|
|
|
|
2025-04-28 17:46:35 +02:00
|
|
|
static std::array<cvf::Vec3d, 8> getCorners( const RigMainGrid& grid,
|
|
|
|
|
const std::vector<float>& coord,
|
|
|
|
|
const std::vector<float>& zcorn,
|
|
|
|
|
const size_t cellIdx,
|
|
|
|
|
const cvf::Vec3d& offset,
|
|
|
|
|
const cvf::Vec3d& scale );
|
|
|
|
|
};
|