///////////////////////////////////////////////////////////////////////////////// // // 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "RigCompletionData.h" #include "cvfVector3.h" #include class RicMswExportInfo; class RifTextDataTableFormatter; class RicMswBranch; class RicMswSegment; class RicMswValve; class RicMswCompletion; class RimWellPath; namespace RicMswTableFormatterTools { class WsegvalveData; class AicdWsegvalveData; class CvfVec3stComparator { public: bool operator()( const cvf::Vec3st& lhs, const cvf::Vec3st& rhs ) const { if ( lhs.z() == rhs.z() ) { if ( lhs.y() == rhs.y() ) { return lhs.x() < rhs.x(); } return lhs.y() < rhs.y(); } return lhs.z() < rhs.z(); } }; void generateWelsegsTable( RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo, double maxSegmentLength, bool exportCompletionSegmentsAfterMainBore ); void writeWelsegsSegmentsRecursively( RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo, gsl::not_null branch, gsl::not_null segmentNumber, double maxSegmentLength, bool exportCompletionSegmentsAfterMainBore, RicMswSegment* connectedToSegment ); void writeWelsegsSegment( RicMswSegment* segment, const RicMswSegment* previousSegment, RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo, double maxSegmentLength, gsl::not_null branch, int* segmentNumber ); void writeValveWelsegsSegment( const RicMswSegment* outletSegment, RicMswValve* valve, RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo, double maxSegmentLength, int* segmentNumber ); void writeCompletionWelsegsSegments( gsl::not_null outletSegment, gsl::not_null completion, RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo, double maxSegmentLength, int* segmentNumber ); void writeCompletionsForSegment( gsl::not_null outletSegment, gsl::not_null segment, RicMswValve** outletValve, RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo, double maxSegmentLength, int* segmentNumber ); void writeWelsegsCompletionCommentHeader( RifTextDataTableFormatter& formatter, RigCompletionData::CompletionType completionType ); void generateCompsegTables( RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo, bool exportLgrData ); void generateCompsegTable( RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo, gsl::not_null branch, bool exportSubGridIntersections, const std::set& exportCompletionTypes, gsl::not_null headerGenerated, gsl::not_null*> intersectedCells ); void generateCompsegHeader( RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo, RigCompletionData::CompletionType completionType, bool exportSubGridIntersections ); void generateWsegvalvTable( RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo ); void generateWsegvalvTableRecursively( gsl::not_null branch, const QString& wellNameForExport, std::map>& wsegvalveData ); void generateWsegAicdTable( RifTextDataTableFormatter& formatter, RicMswExportInfo& exportInfo ); void generateWsegAicdTableRecursively( RicMswExportInfo& exportInfo, gsl::not_null branch, std::map>& aicdValveData ); std::vector> createSubSegmentMDPairs( double startMD, double endMD, double maxSegmentLength ); double tvdFromMeasuredDepth( gsl::not_null wellPath, double measuredDepth ); void writeWsegvalHeader( RifTextDataTableFormatter& formatter ); } // namespace RicMswTableFormatterTools