mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-09 15:43:07 -06:00
#3268 MSW Fracture Export: Add activeFractures
This commit is contained in:
parent
8afc30d6f8
commit
7cd6c29c9c
@ -373,29 +373,61 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
|
||||
{
|
||||
if (exportSettings.includeFractures())
|
||||
{
|
||||
QString fileName = QString("%1-Fracture-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
||||
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
||||
bool anyActiveFractures = false;
|
||||
|
||||
for (const auto wellPath : wellPaths)
|
||||
for (const auto& wellPath : wellPaths)
|
||||
{
|
||||
auto fractures = wellPath->fractureCollection()->fractures();
|
||||
exportWellSegments(exportSettings.caseToApply, exportFile, wellPath, fractures);
|
||||
if (!wellPath->fractureCollection()->activeFractures().empty())
|
||||
{
|
||||
anyActiveFractures = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (anyActiveFractures)
|
||||
{
|
||||
QString fileName = QString("%1-Fracture-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
||||
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
||||
|
||||
for (const auto wellPath : wellPaths)
|
||||
{
|
||||
auto fractures = wellPath->fractureCollection()->activeFractures();
|
||||
if (!fractures.empty())
|
||||
{
|
||||
exportWellSegments(exportSettings.caseToApply, exportFile, wellPath, fractures);
|
||||
}
|
||||
}
|
||||
exportFile->close();
|
||||
}
|
||||
exportFile->close();
|
||||
}
|
||||
|
||||
if (exportSettings.includeFishbones())
|
||||
{
|
||||
QString fileName = QString("%1-Fishbone-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
||||
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
||||
bool anyFishbones = false;
|
||||
|
||||
for (const auto wellPath : wellPaths)
|
||||
for (const auto& wellPath : wellPaths)
|
||||
{
|
||||
auto fishbones = wellPath->fishbonesCollection()->activeFishbonesSubs();
|
||||
exportWellSegments(exportSettings.caseToApply, exportFile, wellPath, fishbones);
|
||||
if (!wellPath->fishbonesCollection()->activeFishbonesSubs().empty())
|
||||
{
|
||||
anyFishbones = true;
|
||||
}
|
||||
}
|
||||
|
||||
exportFile->close();
|
||||
if (anyFishbones)
|
||||
{
|
||||
QString fileName = QString("%1-Fishbone-Welsegs").arg(exportSettings.caseToApply->caseUserDescription());
|
||||
QFilePtr exportFile = openFileForExport(exportSettings.folder, fileName);
|
||||
|
||||
for (const auto wellPath : wellPaths)
|
||||
{
|
||||
auto fishbones = wellPath->fishbonesCollection()->activeFishbonesSubs();
|
||||
if (!fishbones.empty())
|
||||
{
|
||||
exportWellSegments(exportSettings.caseToApply, exportFile, wellPath, fishbones);
|
||||
}
|
||||
}
|
||||
|
||||
exportFile->close();
|
||||
}
|
||||
}
|
||||
|
||||
if (false && exportSettings.includePerforations())
|
||||
@ -1636,18 +1668,7 @@ RicMswExportInfo RicWellPathExportCompletionDataFeatureImpl::generateFishbonesMs
|
||||
RicMswExportInfo RicWellPathExportCompletionDataFeatureImpl::generateFracturesMswExportInfo(RimEclipseCase* caseToApply,
|
||||
const RimWellPath* wellPath)
|
||||
{
|
||||
std::vector<RimWellPathFracture*> fractures;
|
||||
|
||||
if (wellPath->fractureCollection()->isChecked())
|
||||
{
|
||||
for (RimWellPathFracture* fracture : wellPath->fractureCollection()->fractures())
|
||||
{
|
||||
if (fracture->isChecked())
|
||||
{
|
||||
fractures.push_back(fracture);
|
||||
}
|
||||
}
|
||||
}
|
||||
std::vector<RimWellPathFracture*> fractures = wellPath->fractureCollection()->activeFractures();
|
||||
|
||||
return generateFracturesMswExportInfo(caseToApply, wellPath, fractures);
|
||||
}
|
||||
|
@ -125,6 +125,27 @@ std::vector<RimWellPathFracture*> RimWellPathFractureCollection::fractures() con
|
||||
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();
|
||||
ReferenceMDType referenceMDType() const;
|
||||
double manualReferenceMD() const;
|
||||
|
||||
std::vector<RimWellPathFracture*> fractures() const;
|
||||
std::vector<RimWellPathFracture*> activeFractures() const;
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||
|
Loading…
Reference in New Issue
Block a user