Files
ResInsight/ApplicationLibCode/ProjectDataModel/Faults/RimFaultReactivationDataAccess.h
jonjenssen 7494302275 Fault Reactivation updates (#10727)
* Generate reservoir element sets
* Add support for materials
* Add local coordinate system support for exported model
2023-10-18 09:10:08 +02:00

64 lines
2.1 KiB
C++

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2021 - 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 "cvfObject.h"
#include "cvfVector3.h"
#include <map>
#include <vector>
class RimEclipseCase;
class RigEclipseCaseData;
class RigResultAccessor;
class RigMainGrid;
//==================================================================================================
///
///
//==================================================================================================
class RimFaultReactivationDataAccess
{
public:
RimFaultReactivationDataAccess( RimEclipseCase* thecase, size_t timeStepIndex );
~RimFaultReactivationDataAccess();
void useCellIndexAdjustment( std::map<size_t, size_t> adjustments );
double porePressureAtPosition( const cvf::Vec3d& position, double defaultPorePressureGradient ) const;
size_t timeStepIndex() const;
static size_t
findAdjustedCellIndex( const cvf::Vec3d& position, const RigMainGrid* grid, const std::map<size_t, size_t>& cellIndexAdjustmentMap );
bool elementHasValidData( std::vector<cvf::Vec3d> elementCorners ) const;
protected:
static double calculatePorePressure( double depth, double gradient );
private:
RimEclipseCase* m_case;
RigEclipseCaseData* m_caseData;
const RigMainGrid* m_mainGrid;
size_t m_timeStepIndex;
cvf::ref<RigResultAccessor> m_resultAccessor;
std::map<size_t, size_t> m_cellIndexAdjustment;
};