Update clang-format.yml (#10068)

* Update to clang-format-15
Removed two custom .clang-format files in subfolders of AppFwk

* Fixes by clang-format
This commit is contained in:
Magne Sjaastad
2023-04-13 07:05:53 +02:00
committed by GitHub
parent 310b54ef93
commit 952e766c2f
230 changed files with 2010 additions and 2019 deletions

View File

@@ -704,7 +704,8 @@ std::vector<cvf::Vec3d> RicExportFractureCompletionsImpl::computeWellPointsInFra
RiaLogging::info( QString( "Angle: %1 degrees." ).arg( cvf::Math::toDegrees( angle ) ) );
auto rotMat = cvf::GeometryTools::rotationMatrixBetweenVectors( directionToStartPos, directionToStartPosInFracturePlane );
auto rotatePoint = []( const cvf::Vec3d& point, const cvf::Vec3d& offset, auto rotMat ) {
auto rotatePoint = []( const cvf::Vec3d& point, const cvf::Vec3d& offset, auto rotMat )
{
cvf::Vec3d p = point - offset;
p.transformPoint( rotMat );
p += offset;

View File

@@ -412,7 +412,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::computeStaticCompletionsForWellPath( RimWellPath* wellPath,
std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::computeStaticCompletionsForWellPath( RimWellPath* wellPath,
RimEclipseCase* eclipseCase )
{
std::vector<RigCompletionData> completionsPerEclipseCell;
@@ -448,7 +448,7 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::compu
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::computeDynamicCompletionsForWellPath( RimWellPath* wellPath,
std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::computeDynamicCompletionsForWellPath( RimWellPath* wellPath,
RimEclipseCase* eclipseCase,
size_t timeStepIndex )
{
@@ -761,8 +761,8 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspecsToFile( RimEclips
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile( RimEclipseCase* gridCase,
QFilePtr exportFile,
void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile( RimEclipseCase* gridCase,
QFilePtr exportFile,
const std::map<QString, std::vector<RigCompletionData>>& completions )
{
QTextStream stream( exportFile.get() );

View File

@@ -102,14 +102,14 @@ public:
calculateCellMainDirection( RimEclipseCase* eclipseCase, size_t globalCellIndex, const cvf::Vec3d& lengthsInCell );
static TransmissibilityData
calculateTransmissibilityData( RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const cvf::Vec3d& internalCellLengths,
double skinFactor,
double wellRadius,
size_t globalCellIndex,
bool useLateralNTG,
size_t volumeScaleConstant = 1,
calculateTransmissibilityData( RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const cvf::Vec3d& internalCellLengths,
double skinFactor,
double wellRadius,
size_t globalCellIndex,
bool useLateralNTG,
size_t volumeScaleConstant = 1,
RigCompletionData::CellDirection directionForVolumeScaling = RigCompletionData::CellDirection::DIR_I );
static double calculateDFactor( RimEclipseCase* eclipseCase,

View File

@@ -115,14 +115,18 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions( c
auto allCompletions = wellPath->allCompletionsRecursively();
bool exportFractures =
exportSettings.includeFractures() && std::any_of( allCompletions.begin(), allCompletions.end(), []( auto completion ) {
return completion->isEnabled() && completion->componentType() == RiaDefines::WellPathComponentType::FRACTURE;
} );
exportSettings.includeFractures() &&
std::any_of( allCompletions.begin(),
allCompletions.end(),
[]( auto completion )
{ return completion->isEnabled() && completion->componentType() == RiaDefines::WellPathComponentType::FRACTURE; } );
bool exportFishbones =
exportSettings.includeFishbones() && std::any_of( allCompletions.begin(), allCompletions.end(), []( auto completion ) {
return completion->isEnabled() && completion->componentType() == RiaDefines::WellPathComponentType::FISHBONES;
} );
exportSettings.includeFishbones() &&
std::any_of( allCompletions.begin(),
allCompletions.end(),
[]( auto completion )
{ return completion->isEnabled() && completion->componentType() == RiaDefines::WellPathComponentType::FISHBONES; } );
if ( exportSettings.fileSplit() == RicExportCompletionDataSettingsUi::ExportSplit::SPLIT_ON_WELL && !unifiedWellPathFile )
{
@@ -157,11 +161,14 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions( c
}
else
{
bool anyPerforationsPresent =
exportSettings.includeFractures() && std::any_of( allCompletions.begin(), allCompletions.end(), []( auto completion ) {
return completion->isEnabled() &&
completion->componentType() == RiaDefines::WellPathComponentType::PERFORATION_INTERVAL;
} );
bool anyPerforationsPresent = exportSettings.includeFractures() &&
std::any_of( allCompletions.begin(),
allCompletions.end(),
[]( auto completion ) {
return completion->isEnabled() &&
completion->componentType() ==
RiaDefines::WellPathComponentType::PERFORATION_INTERVAL;
} );
QString perforationText = anyPerforationsPresent ? "Perforation_" : "";
QString fileName =
@@ -202,11 +209,11 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions( c
else
{
QString fileName = QString( "%1_Fracture_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
fileName,
"",
exportSettings.exportDataSourceAsComment() );
lgrExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
lgrExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
fileName + "_LGR",
"",
exportSettings.exportDataSourceAsComment() );
@@ -237,11 +244,11 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForAllCompletions( c
else
{
QString fileName = QString( "%1_Fishbones_MSW_%2" ).arg( wellPath->name(), exportSettings.caseToApply->caseUserDescription() );
exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
exportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
fileName,
"",
exportSettings.exportDataSourceAsComment() );
lgrExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
lgrExportFile = RicWellPathExportCompletionsFileTools::openFileForExport( exportSettings.folder,
fileName + "_LGR",
"",
exportSettings.exportDataSourceAsComment() );
@@ -350,7 +357,8 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForFractures( RimEcl
RicMswExportInfo& exportInfo,
const RimWellPath* wellPath,
bool completionSegmentsAfterMainBore,
bool exportLgrData ) {
bool exportLgrData )
{
formatter.setOptionalComment( exportDataSourceAsComment );
double maxSegmentLength = wellPath->mswCompletionParameters()->maxSegmentLength();
@@ -555,9 +563,9 @@ void RicWellPathExportMswCompletionsImpl::updateDataForMultipleItemsInSameGridCe
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo( const RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
double initialMD,
void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo( const RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
double initialMD,
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
bool enableSegmentSplitting,
gsl::not_null<RicMswExportInfo*> exportInfo,
@@ -572,14 +580,14 @@ void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo( const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo( const RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
double initialMD,
void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo( const RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
double initialMD,
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
const std::vector<RimFishbones*>& fishbonesSubs,
bool enableSegmentSplitting,
gsl::not_null<RicMswExportInfo*> exportInfo,
gsl::not_null<RicMswBranch*> branch )
const std::vector<RimFishbones*>& fishbonesSubs,
bool enableSegmentSplitting,
gsl::not_null<RicMswExportInfo*> exportInfo,
gsl::not_null<RicMswBranch*> branch )
{
std::vector<WellPathCellIntersectionInfo> filteredIntersections =
filterIntersections( cellIntersections, initialMD, wellPath->wellPathGeometry(), eclipseCase );
@@ -762,12 +770,12 @@ void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfoForWell(
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo( RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
double initialMD,
bool RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo( RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
double initialMD,
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
gsl::not_null<RicMswExportInfo*> exportInfo,
gsl::not_null<RicMswBranch*> branch )
gsl::not_null<RicMswExportInfo*> exportInfo,
gsl::not_null<RicMswBranch*> branch )
{
auto mswParameters = wellPath->mswCompletionParameters();
auto fractures = wellPath->fractureCollection()->activeFractures();
@@ -827,13 +835,13 @@ bool RicWellPathExportMswCompletionsImpl::generateFracturesMswExportInfo( RimEcl
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicWellPathExportMswCompletionsImpl::generatePerforationsMswExportInfo( RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
int timeStep,
double initialMD,
bool RicWellPathExportMswCompletionsImpl::generatePerforationsMswExportInfo( RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
int timeStep,
double initialMD,
const std::vector<WellPathCellIntersectionInfo>& cellIntersections,
gsl::not_null<RicMswExportInfo*> exportInfo,
gsl::not_null<RicMswBranch*> branch )
gsl::not_null<RicMswExportInfo*> exportInfo,
gsl::not_null<RicMswBranch*> branch )
{
auto perforationIntervals = wellPath->perforationIntervalCollection()->activePerforations();
@@ -938,9 +946,9 @@ std::vector<WellPathCellIntersectionInfo> RicWellPathExportMswCompletionsImpl::g
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RicWellPathExportMswCompletionsImpl::computeIntitialMeasuredDepth( const RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const RimMswCompletionParameters* mswParameters,
double RicWellPathExportMswCompletionsImpl::computeIntitialMeasuredDepth( const RimEclipseCase* eclipseCase,
const RimWellPath* wellPath,
const RimMswCompletionParameters* mswParameters,
const std::vector<WellPathCellIntersectionInfo>& allIntersections )
{
if ( allIntersections.empty() ) return 0.0;
@@ -1866,10 +1874,10 @@ std::vector<RimWellPath*> RicWellPathExportMswCompletionsImpl::wellPathsWithTieI
///
//--------------------------------------------------------------------------------------------------
std::pair<double, double>
RicWellPathExportMswCompletionsImpl::calculateOverlapWithActiveCells( double startMD,
double endMD,
RicWellPathExportMswCompletionsImpl::calculateOverlapWithActiveCells( double startMD,
double endMD,
const std::vector<WellPathCellIntersectionInfo>& wellPathIntersections,
const RigActiveCellInfo* activeCellInfo )
const RigActiveCellInfo* activeCellInfo )
{
for ( const WellPathCellIntersectionInfo& intersection : wellPathIntersections )
{

View File

@@ -122,10 +122,10 @@ private:
gsl::not_null<const RigWellPath*> wellPathGeometry,
gsl::not_null<const RimEclipseCase*> eclipseCase );
static std::pair<double, double> calculateOverlapWithActiveCells( double startMD,
double endMD,
static std::pair<double, double> calculateOverlapWithActiveCells( double startMD,
double endMD,
const std::vector<WellPathCellIntersectionInfo>& wellPathIntersections,
const RigActiveCellInfo* activeCellInfo );
const RigActiveCellInfo* activeCellInfo );
static void createWellPathSegments( gsl::not_null<RicMswBranch*> branch,
const std::vector<WellPathCellIntersectionInfo>& cellSegmentIntersections,
@@ -167,10 +167,10 @@ private:
gsl::not_null<RicMswSegment*> segment,
bool* foundSubGridIntersections );
static std::vector<RigCompletionData> generatePerforationIntersections( gsl::not_null<const RimWellPath*> wellPath,
static std::vector<RigCompletionData> generatePerforationIntersections( gsl::not_null<const RimWellPath*> wellPath,
gsl::not_null<const RimPerforationInterval*> perforationInterval,
int timeStep,
gsl::not_null<const RimEclipseCase*> eclipseCase );
int timeStep,
gsl::not_null<const RimEclipseCase*> eclipseCase );
static void assignPerforationIntersections( const std::vector<RigCompletionData>& completionData,
gsl::not_null<RicMswCompletion*> perforationCompletion,

View File

@@ -628,7 +628,7 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureCompletionSummar
RifTextDataTableColumn( "" ), // Fracture
RifTextDataTableColumn( "" ), // Template
floatNumberColumn( "" ), // Tr
floatNumberColumn( "" ), //#con
floatNumberColumn( "" ), // #con
floatNumberColumn( "" ), // Fcd
RifTextDataTableColumn( "", RifTextDataTableDoubleFormatting( RIF_FLOAT, 1 ), RIGHT ), // Area
RifTextDataTableColumn( meanText, RifTextDataTableDoubleFormatting( RIF_FLOAT, 1 ), RIGHT ), // KfWf