mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3268 MSW Fracture Export: Add activeFractures
This commit is contained in:
@@ -372,19 +372,47 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
|||||||
if (exportSettings.includeMsw)
|
if (exportSettings.includeMsw)
|
||||||
{
|
{
|
||||||
if (exportSettings.includeFractures())
|
if (exportSettings.includeFractures())
|
||||||
|
{
|
||||||
|
bool anyActiveFractures = false;
|
||||||
|
|
||||||
|
for (const auto& wellPath : wellPaths)
|
||||||
|
{
|
||||||
|
if (!wellPath->fractureCollection()->activeFractures().empty())
|
||||||
|
{
|
||||||
|
anyActiveFractures = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (anyActiveFractures)
|
||||||
{
|
{
|
||||||
QString fileName = QString("%1-Fracture-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
QString fileName = QString("%1-Fracture-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
||||||
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
||||||
|
|
||||||
for (const auto wellPath : wellPaths)
|
for (const auto wellPath : wellPaths)
|
||||||
{
|
{
|
||||||
auto fractures = wellPath->fractureCollection()->fractures();
|
auto fractures = wellPath->fractureCollection()->activeFractures();
|
||||||
|
if (!fractures.empty())
|
||||||
|
{
|
||||||
exportWellSegments(exportSettings.caseToApply, exportFile, wellPath, fractures);
|
exportWellSegments(exportSettings.caseToApply, exportFile, wellPath, fractures);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
exportFile->close();
|
exportFile->close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (exportSettings.includeFishbones())
|
if (exportSettings.includeFishbones())
|
||||||
|
{
|
||||||
|
bool anyFishbones = false;
|
||||||
|
|
||||||
|
for (const auto& wellPath : wellPaths)
|
||||||
|
{
|
||||||
|
if (!wellPath->fishbonesCollection()->activeFishbonesSubs().empty())
|
||||||
|
{
|
||||||
|
anyFishbones = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (anyFishbones)
|
||||||
{
|
{
|
||||||
QString fileName = QString("%1-Fishbone-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
QString fileName = QString("%1-Fishbone-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
||||||
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
||||||
@@ -392,11 +420,15 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
|||||||
for (const auto wellPath : wellPaths)
|
for (const auto wellPath : wellPaths)
|
||||||
{
|
{
|
||||||
auto fishbones = wellPath->fishbonesCollection()->activeFishbonesSubs();
|
auto fishbones = wellPath->fishbonesCollection()->activeFishbonesSubs();
|
||||||
|
if (!fishbones.empty())
|
||||||
|
{
|
||||||
exportWellSegments(exportSettings.caseToApply, exportFile, wellPath, fishbones);
|
exportWellSegments(exportSettings.caseToApply, exportFile, wellPath, fishbones);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
exportFile->close();
|
exportFile->close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (false && exportSettings.includePerforations())
|
if (false && exportSettings.includePerforations())
|
||||||
{
|
{
|
||||||
@@ -1636,18 +1668,7 @@ RicMswExportInfo RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMs
|
|||||||
RicMswExportInfo RicWellPathExportCompletionDataFeatureImpl::generateFracturesMswExportInfo(RimEclipseCase* caseToApply,
|
RicMswExportInfo RicWellPathExportCompletionDataFeatureImpl::generateFracturesMswExportInfo(RimEclipseCase* caseToApply,
|
||||||
const RimWellPath* wellPath)
|
const RimWellPath* wellPath)
|
||||||
{
|
{
|
||||||
std::vector<RimWellPathFracture*> fractures;
|
std::vector<RimWellPathFracture*> fractures = wellPath->fractureCollection()->activeFractures();
|
||||||
|
|
||||||
if (wellPath->fractureCollection()->isChecked())
|
|
||||||
{
|
|
||||||
for (RimWellPathFracture* fracture : wellPath->fractureCollection()->fractures())
|
|
||||||
{
|
|
||||||
if (fracture->isChecked())
|
|
||||||
{
|
|
||||||
fractures.push_back(fracture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return generateFracturesMswExportInfo(caseToApply, wellPath, fractures);
|
return generateFracturesMswExportInfo(caseToApply, wellPath, fractures);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,6 +125,27 @@ std::vector<RimWellPathFracture*> RimWellPathFractureCollection::fractures() con
|
|||||||
return m_fractures.childObjects();
|
return m_fractures.childObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<RimWellPathFracture*> RimWellPathFractureCollection::activeFractures() const
|
||||||
|
{
|
||||||
|
std::vector<RimWellPathFracture*> active;
|
||||||
|
|
||||||
|
if (isChecked())
|
||||||
|
{
|
||||||
|
for (const auto& f : fractures())
|
||||||
|
{
|
||||||
|
if (f->isChecked())
|
||||||
|
{
|
||||||
|
active.push_back(f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return active;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ public:
|
|||||||
void setUnitSystemSpecificDefaults();
|
void setUnitSystemSpecificDefaults();
|
||||||
ReferenceMDType referenceMDType() const;
|
ReferenceMDType referenceMDType() const;
|
||||||
double manualReferenceMD() const;
|
double manualReferenceMD() const;
|
||||||
|
|
||||||
std::vector<RimWellPathFracture*> fractures() const;
|
std::vector<RimWellPathFracture*> fractures() const;
|
||||||
|
std::vector<RimWellPathFracture*> activeFractures() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||||
|
|||||||
Reference in New Issue
Block a user