mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixes by clang-format
This commit is contained in:
@@ -63,7 +63,7 @@ enum class CsvLineBasedColumnType
|
||||
ERROR_VALUE,
|
||||
COMMENTS
|
||||
};
|
||||
const std::vector<QString> CSV_LINE_BASED_COL_NAMES = {"DATE", "VECTOR", "VALUE", "ERROR", "COMMENTS"};
|
||||
const std::vector<QString> CSV_LINE_BASED_COL_NAMES = { "DATE", "VECTOR", "VALUE", "ERROR", "COMMENTS" };
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
||||
@@ -309,7 +309,7 @@ bool RifEclipseInputFileTools::exportGrid( const QString& fileName,
|
||||
cvf::Vec2f origin( mapAxes[2] - minPoint2f.x(), mapAxes[3] - minPoint2f.y() );
|
||||
cvf::Vec2f xPoint = cvf::Vec2f( mapAxes[4], mapAxes[5] ) - minPoint2f;
|
||||
cvf::Vec2f yPoint = cvf::Vec2f( mapAxes[0], mapAxes[1] ) - minPoint2f;
|
||||
mapAxes = {yPoint.x(), yPoint.y(), origin.x(), origin.y(), xPoint.x(), xPoint.y()};
|
||||
mapAxes = { yPoint.x(), yPoint.y(), origin.x(), origin.y(), xPoint.x(), xPoint.y() };
|
||||
|
||||
mapAxisTrans.setTranslation( mapAxisTrans.translation() - minPoint3d );
|
||||
}
|
||||
|
||||
@@ -36,27 +36,27 @@ std::vector<size_t> RifEclipseUserDataKeywordTools::requiredItemsPerLineForKeywo
|
||||
switch ( firstLetter )
|
||||
{
|
||||
case 'B':
|
||||
return {3}; // Block triplet
|
||||
return { 3 }; // Block triplet
|
||||
case 'C':
|
||||
return {1, 3}; // Well Name and completion triplet
|
||||
return { 1, 3 }; // Well Name and completion triplet
|
||||
case 'G':
|
||||
return {1}; // Group
|
||||
return { 1 }; // Group
|
||||
case 'R':
|
||||
return {1}; // Region number
|
||||
return { 1 }; // Region number
|
||||
case 'S':
|
||||
return {1, 1}; // Well name and segment number
|
||||
return { 1, 1 }; // Well name and segment number
|
||||
case 'W':
|
||||
return {1}; // Well Name
|
||||
return { 1 }; // Well Name
|
||||
}
|
||||
|
||||
std::string firstTwoLetters = identifier.substr( 0, 2 );
|
||||
|
||||
if ( firstTwoLetters == "LB" )
|
||||
return {1, 3}; // LGR name and block triplet
|
||||
return { 1, 3 }; // LGR name and block triplet
|
||||
else if ( firstTwoLetters == "LC" )
|
||||
return {1, 1, 3}; // LGR name, well name and block triplet
|
||||
return { 1, 1, 3 }; // LGR name, well name and block triplet
|
||||
else if ( firstTwoLetters == "LW" )
|
||||
return {1, 1}; // LGR name and well name
|
||||
return { 1, 1 }; // LGR name and well name
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ bool RifEclipseUserDataParserTools::isAComment( const std::string& word )
|
||||
std::vector<std::string> RifEclipseUserDataParserTools::splitLineAndRemoveComments( const std::string& line )
|
||||
{
|
||||
std::istringstream iss( line );
|
||||
std::vector<std::string> words{std::istream_iterator<std::string>{iss}, std::istream_iterator<std::string>{}};
|
||||
std::vector<std::string> words{ std::istream_iterator<std::string>{ iss }, std::istream_iterator<std::string>{} };
|
||||
|
||||
for ( auto wordsIterator = words.begin(); wordsIterator != words.end(); ++wordsIterator )
|
||||
{
|
||||
|
||||
@@ -32,10 +32,10 @@ RifEnsembleStatisticsReader::RifEnsembleStatisticsReader( RimEnsembleStatisticsC
|
||||
m_ensembleStatCase = ensStatCase;
|
||||
|
||||
m_allResultAddresses = std::set<RifEclipseSummaryAddress>(
|
||||
{RifEclipseSummaryAddress::ensembleStatisticsAddress( ENSEMBLE_STAT_P10_QUANTITY_NAME, "" ),
|
||||
RifEclipseSummaryAddress::ensembleStatisticsAddress( ENSEMBLE_STAT_P50_QUANTITY_NAME, "" ),
|
||||
RifEclipseSummaryAddress::ensembleStatisticsAddress( ENSEMBLE_STAT_P90_QUANTITY_NAME, "" ),
|
||||
RifEclipseSummaryAddress::ensembleStatisticsAddress( ENSEMBLE_STAT_MEAN_QUANTITY_NAME, "" )} );
|
||||
{ RifEclipseSummaryAddress::ensembleStatisticsAddress( ENSEMBLE_STAT_P10_QUANTITY_NAME, "" ),
|
||||
RifEclipseSummaryAddress::ensembleStatisticsAddress( ENSEMBLE_STAT_P50_QUANTITY_NAME, "" ),
|
||||
RifEclipseSummaryAddress::ensembleStatisticsAddress( ENSEMBLE_STAT_P90_QUANTITY_NAME, "" ),
|
||||
RifEclipseSummaryAddress::ensembleStatisticsAddress( ENSEMBLE_STAT_MEAN_QUANTITY_NAME, "" ) } );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
// vertex indices
|
||||
//
|
||||
|
||||
static const size_t cellMappingECLRi[8] = {0, 1, 3, 2, 4, 5, 7, 6};
|
||||
static const size_t cellMappingECLRi[8] = { 0, 1, 3, 2, 4, 5, 7, 6 };
|
||||
|
||||
//**************************************************************************************************
|
||||
// Static functions
|
||||
|
||||
@@ -59,10 +59,10 @@ std::set<RifEclipseRftAddress> RifReaderEnsembleStatisticsRft::eclipseRftAddress
|
||||
}
|
||||
else if ( regularAddress.wellLogChannel() == RifEclipseRftAddress::PRESSURE )
|
||||
{
|
||||
std::set<RifEclipseRftAddress::RftWellLogChannelType> statChannels = {RifEclipseRftAddress::PRESSURE_P10,
|
||||
RifEclipseRftAddress::PRESSURE_P50,
|
||||
RifEclipseRftAddress::PRESSURE_P90,
|
||||
RifEclipseRftAddress::PRESSURE_MEAN};
|
||||
std::set<RifEclipseRftAddress::RftWellLogChannelType> statChannels = { RifEclipseRftAddress::PRESSURE_P10,
|
||||
RifEclipseRftAddress::PRESSURE_P50,
|
||||
RifEclipseRftAddress::PRESSURE_P90,
|
||||
RifEclipseRftAddress::PRESSURE_MEAN };
|
||||
for ( auto channel : statChannels )
|
||||
{
|
||||
statisticsAddresses.insert(
|
||||
|
||||
@@ -330,7 +330,7 @@ std::set<QDateTime> RifReaderFmuRft::availableTimeSteps( const QString& wellName
|
||||
auto it = m_allWellObservations.find( wellName );
|
||||
if ( it != m_allWellObservations.end() )
|
||||
{
|
||||
return {it->second.dateTime};
|
||||
return { it->second.dateTime };
|
||||
}
|
||||
return {};
|
||||
}
|
||||
@@ -362,7 +362,7 @@ std::set<RifEclipseRftAddress::RftWellLogChannelType> RifReaderFmuRft::available
|
||||
|
||||
if ( !m_allWellObservations.empty() )
|
||||
{
|
||||
return {RifEclipseRftAddress::TVD, RifEclipseRftAddress::MD, RifEclipseRftAddress::PRESSURE};
|
||||
return { RifEclipseRftAddress::TVD, RifEclipseRftAddress::MD, RifEclipseRftAddress::PRESSURE };
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -83,9 +83,9 @@ void RifSurfaceImporter::readGocadFile( const QString& filename, RigGocadData* g
|
||||
if ( firstToken.compare( "VRTX" ) == 0 )
|
||||
{
|
||||
int vertexId = -1;
|
||||
double x{std::numeric_limits<double>::infinity()};
|
||||
double y{std::numeric_limits<double>::infinity()};
|
||||
double z{std::numeric_limits<double>::infinity()};
|
||||
double x{ std::numeric_limits<double>::infinity() };
|
||||
double y{ std::numeric_limits<double>::infinity() };
|
||||
double z{ std::numeric_limits<double>::infinity() };
|
||||
std::string endVertex;
|
||||
|
||||
lineStream >> vertexId >> x >> y >> z >> endVertex;
|
||||
@@ -104,9 +104,9 @@ void RifSurfaceImporter::readGocadFile( const QString& filename, RigGocadData* g
|
||||
else if ( firstToken.compare( "PVRTX" ) == 0 )
|
||||
{
|
||||
int vertexId = -1;
|
||||
double x{std::numeric_limits<double>::infinity()};
|
||||
double y{std::numeric_limits<double>::infinity()};
|
||||
double z{std::numeric_limits<double>::infinity()};
|
||||
double x{ std::numeric_limits<double>::infinity() };
|
||||
double y{ std::numeric_limits<double>::infinity() };
|
||||
double z{ std::numeric_limits<double>::infinity() };
|
||||
|
||||
lineStream >> vertexId >> x >> y >> z;
|
||||
|
||||
@@ -129,9 +129,9 @@ void RifSurfaceImporter::readGocadFile( const QString& filename, RigGocadData* g
|
||||
}
|
||||
else if ( firstToken.compare( "TRGL" ) == 0 )
|
||||
{
|
||||
int id1{-1};
|
||||
int id2{-1};
|
||||
int id3{-1};
|
||||
int id1{ -1 };
|
||||
int id2{ -1 };
|
||||
int id3{ -1 };
|
||||
|
||||
lineStream >> id1 >> id2 >> id3;
|
||||
|
||||
@@ -261,7 +261,7 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceImporter::re
|
||||
|
||||
// Add point
|
||||
|
||||
surfaceDataPoints.push_back( {i, j, {x, y, z}, values} );
|
||||
surfaceDataPoints.push_back( { i, j, { x, y, z }, values } );
|
||||
|
||||
minI = std::min( minI, i );
|
||||
minJ = std::min( minJ, j );
|
||||
@@ -440,7 +440,7 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>>
|
||||
if ( z > 0.0 ) z = -z;
|
||||
|
||||
// Add point
|
||||
surfacePoints.push_back( {x, y, z} );
|
||||
surfacePoints.push_back( { x, y, z } );
|
||||
|
||||
if ( surfacePoints.size() > 1 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user