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:
@@ -284,7 +284,7 @@ cvf::Vec3i RigFemPartGrid::findMainIJKFaces( int elementIndex ) const
|
||||
// Find the Z (for K) first. Then select among the other two the Y (for J),
|
||||
// and select the remaining for I
|
||||
|
||||
int mainElmDirectionIdxForIJK[3] = {-1, -1, -1};
|
||||
int mainElmDirectionIdxForIJK[3] = { -1, -1, -1 };
|
||||
for ( int cIdx = 2; cIdx >= 0; --cIdx ) // Check Z first as it is more important
|
||||
{
|
||||
double maxAbsComp = -1.0;
|
||||
|
||||
@@ -200,10 +200,10 @@ void findReferenceElementForNode( const RigFemPart& part, size_t nodeIdx, size_t
|
||||
{
|
||||
cvf::ubyte faceNodes[4];
|
||||
grid->cellFaceVertexIndices( intersection.m_face, faceNodes );
|
||||
std::vector<size_t> topFaceCoords( {nodeIndices[faceNodes[0]],
|
||||
nodeIndices[faceNodes[1]],
|
||||
nodeIndices[faceNodes[2]],
|
||||
nodeIndices[faceNodes[3]]} );
|
||||
std::vector<size_t> topFaceCoords( { nodeIndices[faceNodes[0]],
|
||||
nodeIndices[faceNodes[1]],
|
||||
nodeIndices[faceNodes[2]],
|
||||
nodeIndices[faceNodes[3]] } );
|
||||
|
||||
refElement->elementIdx = elemIdx;
|
||||
refElement->intersectionPointToCurrentNodeDistance = nodeToIntersectionDistance;
|
||||
|
||||
@@ -70,12 +70,12 @@ RigFemScalarResultFrames* RigFemPartResultCalculatorMudWeightWindow::calculate(
|
||||
CVF_ASSERT( isMatching( resVarAddr ) );
|
||||
|
||||
const std::vector<RimMudWeightWindowParameters::ParameterType> parameterTypes =
|
||||
{RimMudWeightWindowParameters::ParameterType::WELL_DEVIATION,
|
||||
RimMudWeightWindowParameters::ParameterType::WELL_AZIMUTH,
|
||||
RimMudWeightWindowParameters::ParameterType::UCS,
|
||||
RimMudWeightWindowParameters::ParameterType::POISSONS_RATIO,
|
||||
RimMudWeightWindowParameters::ParameterType::K0_FG,
|
||||
RimMudWeightWindowParameters::ParameterType::OBG0};
|
||||
{ RimMudWeightWindowParameters::ParameterType::WELL_DEVIATION,
|
||||
RimMudWeightWindowParameters::ParameterType::WELL_AZIMUTH,
|
||||
RimMudWeightWindowParameters::ParameterType::UCS,
|
||||
RimMudWeightWindowParameters::ParameterType::POISSONS_RATIO,
|
||||
RimMudWeightWindowParameters::ParameterType::K0_FG,
|
||||
RimMudWeightWindowParameters::ParameterType::OBG0 };
|
||||
|
||||
caf::ProgressInfo frameCountProgress( m_resultCollection->frameCount() * ( 5 + parameterTypes.size() ), "" );
|
||||
frameCountProgress.setProgressDescription( "Calculating Mud Weight Window" );
|
||||
|
||||
@@ -352,7 +352,7 @@ void RigFemPartResultsCollection::setBiotCoefficientParameters( double biotFixed
|
||||
m_biotResultAddress = biotResultAddress;
|
||||
|
||||
// Invalidate all results which depends on biot coefficient (directly or indirectly)
|
||||
for ( auto elementType : {RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT} )
|
||||
for ( auto elementType : { RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT } )
|
||||
{
|
||||
deleteResult(
|
||||
RigFemResultAddress( elementType, "COMPRESSIBILITY", "PORE", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
@@ -1246,8 +1246,8 @@ bool RigFemPartResultsCollection::isResultInSet( const RigFemResultAddress&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<RigFemResultAddress> RigFemPartResultsCollection::normalizedResults()
|
||||
{
|
||||
std::set<std::string> validFields = {"SE", "ST"};
|
||||
std::set<std::string> validComponents = {"S11", "S22", "S33", "S12", "S13", "S23", "S1", "S2", "S3", "SM"};
|
||||
std::set<std::string> validFields = { "SE", "ST" };
|
||||
std::set<std::string> validComponents = { "S11", "S22", "S33", "S12", "S13", "S23", "S1", "S2", "S3", "SM" };
|
||||
|
||||
std::set<RigFemResultAddress> results;
|
||||
for ( auto field : validFields )
|
||||
@@ -1282,7 +1282,7 @@ bool RigFemPartResultsCollection::isNormalizableResult( const RigFemResultAddres
|
||||
std::set<RigFemResultAddress> RigFemPartResultsCollection::referenceCaseDependentResults()
|
||||
{
|
||||
std::set<RigFemResultAddress> results;
|
||||
for ( auto elementType : {RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT} )
|
||||
for ( auto elementType : { RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT } )
|
||||
{
|
||||
results.insert(
|
||||
RigFemResultAddress( elementType, "COMPRESSIBILITY", "PORE", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
@@ -1306,7 +1306,7 @@ std::set<RigFemResultAddress> RigFemPartResultsCollection::referenceCaseDependen
|
||||
std::set<RigFemResultAddress> RigFemPartResultsCollection::mudWeightWindowResults()
|
||||
{
|
||||
std::set<RigFemResultAddress> results;
|
||||
for ( auto elmType : {RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT} )
|
||||
for ( auto elmType : { RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT } )
|
||||
{
|
||||
results.insert( RigFemResultAddress( elmType, "MUD-WEIGHT", "MWW", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
results.insert( RigFemResultAddress( elmType, "MUD-WEIGHT", "MWM", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
@@ -1323,7 +1323,7 @@ std::set<RigFemResultAddress> RigFemPartResultsCollection::mudWeightWindowResult
|
||||
std::set<RigFemResultAddress> RigFemPartResultsCollection::initialPermeabilityDependentResults()
|
||||
{
|
||||
std::set<RigFemResultAddress> results;
|
||||
for ( auto elementType : {RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT} )
|
||||
for ( auto elementType : { RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT } )
|
||||
{
|
||||
results.insert( RigFemResultAddress( elementType, "PORO-PERM", "PHI", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
results.insert( RigFemResultAddress( elementType, "PORO-PERM", "DPHI", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
@@ -1534,7 +1534,7 @@ const RigFemPartCollection* RigFemPartResultsCollection::parts() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::string> RigFemPartResultsCollection::getStressComponentNames( bool includeShear )
|
||||
{
|
||||
std::vector<std::string> componentNames = {"S11", "S22", "S33", "S1", "S2", "S3"};
|
||||
std::vector<std::string> componentNames = { "S11", "S22", "S33", "S1", "S2", "S3" };
|
||||
if ( includeShear )
|
||||
{
|
||||
componentNames.push_back( "S12" );
|
||||
@@ -1550,7 +1550,7 @@ std::vector<std::string> RigFemPartResultsCollection::getStressComponentNames( b
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::string> RigFemPartResultsCollection::getStressAnisotropyComponentNames()
|
||||
{
|
||||
return {"SA12", "SA13", "SA23"};
|
||||
return { "SA12", "SA13", "SA23" };
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1558,7 +1558,7 @@ std::vector<std::string> RigFemPartResultsCollection::getStressAnisotropyCompone
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::string> RigFemPartResultsCollection::getStressGradientComponentNames( bool includeShear )
|
||||
{
|
||||
std::vector<std::string> directions = {"X", "Y", "Z"};
|
||||
std::vector<std::string> directions = { "X", "Y", "Z" };
|
||||
std::vector<std::string> stressComponentNames = getStressComponentNames( includeShear );
|
||||
|
||||
std::vector<std::string> stressGradientComponentNames;
|
||||
@@ -1769,7 +1769,7 @@ void RigFemPartResultsCollection::setWaterDensityShearSlipIndicator( double wate
|
||||
{
|
||||
m_waterDensityShearSlipIndicator = waterDensity;
|
||||
|
||||
for ( auto elementType : {RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT} )
|
||||
for ( auto elementType : { RIG_ELEMENT_NODAL, RIG_INTEGRATION_POINT } )
|
||||
{
|
||||
deleteResult( RigFemResultAddress( elementType, "ST", "DPN", RigFemResultAddress::allTimeLapsesValue() ) );
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RigFemTypes::elementNodeCount( RigElementType elmType )
|
||||
{
|
||||
static int elementTypeCounts[3] = {8, 8, 4};
|
||||
static int elementTypeCounts[3] = { 8, 8, 4 };
|
||||
|
||||
return elementTypeCounts[elmType];
|
||||
}
|
||||
@@ -38,7 +38,7 @@ int RigFemTypes::elementNodeCount( RigElementType elmType )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RigFemTypes::elementFaceCount( RigElementType elmType )
|
||||
{
|
||||
const static int elementFaceCounts[3] = {6, 6, 1};
|
||||
const static int elementFaceCounts[3] = { 6, 6, 1 };
|
||||
|
||||
return elementFaceCounts[elmType];
|
||||
}
|
||||
@@ -58,8 +58,9 @@ int RigFemTypes::elementFaceCount( RigElementType elmType )
|
||||
|
||||
const int* RigFemTypes::localElmNodeIndicesForFace( RigElementType elmType, int faceIdx, int* faceNodeCount )
|
||||
{
|
||||
static const int HEX8_Faces[6][4] = {{1, 2, 6, 5}, {0, 4, 7, 3}, {3, 7, 6, 2}, {0, 1, 5, 4}, {4, 5, 6, 7}, {0, 3, 2, 1}};
|
||||
static const int CAX4_Faces[4] = {0, 1, 2, 3};
|
||||
static const int HEX8_Faces[6][4] =
|
||||
{ { 1, 2, 6, 5 }, { 0, 4, 7, 3 }, { 3, 7, 6, 2 }, { 0, 1, 5, 4 }, { 4, 5, 6, 7 }, { 0, 3, 2, 1 } };
|
||||
static const int CAX4_Faces[4] = { 0, 1, 2, 3 };
|
||||
|
||||
switch ( elmType )
|
||||
{
|
||||
@@ -82,7 +83,7 @@ const int* RigFemTypes::localElmNodeIndicesForFace( RigElementType elmType, int
|
||||
|
||||
int RigFemTypes::oppositeFace( RigElementType elmType, int faceIdx )
|
||||
{
|
||||
static const int HEX8_OppositeFaces[6] = {1, 0, 3, 2, 5, 4};
|
||||
static const int HEX8_OppositeFaces[6] = { 1, 0, 3, 2, 5, 4 };
|
||||
|
||||
switch ( elmType )
|
||||
{
|
||||
@@ -107,7 +108,7 @@ int RigFemTypes::oppositeFace( RigElementType elmType, int faceIdx )
|
||||
|
||||
const int* RigFemTypes::localElmNodeToIntegrationPointMapping( RigElementType elmType )
|
||||
{
|
||||
static const int HEX8_Mapping[8] = {0, 1, 3, 2, 4, 5, 7, 6};
|
||||
static const int HEX8_Mapping[8] = { 0, 1, 3, 2, 4, 5, 7, 6 };
|
||||
|
||||
switch ( elmType )
|
||||
{
|
||||
|
||||
@@ -38,14 +38,14 @@ std::array<cvf::Vec3d, 8> RigHexGradientTools::gradients( const std::array<cvf::
|
||||
gradientsUVW[7] = cvf::Vec3d( forwardFD( values, 7, 6 ), forwardFD( values, 4, 7 ), forwardFD( values, 3, 7 ) );
|
||||
|
||||
std::array<cvf::Vec3d, 8> NC;
|
||||
NC[0] = {-1, -1, -1};
|
||||
NC[1] = {1, -1, -1};
|
||||
NC[2] = {1, 1, -1};
|
||||
NC[3] = {-1, 1, -1};
|
||||
NC[4] = {-1, -1, 1};
|
||||
NC[5] = {1, -1, 1};
|
||||
NC[6] = {1, 1, 1};
|
||||
NC[7] = {-1, 1, 1};
|
||||
NC[0] = { -1, -1, -1 };
|
||||
NC[1] = { 1, -1, -1 };
|
||||
NC[2] = { 1, 1, -1 };
|
||||
NC[3] = { -1, 1, -1 };
|
||||
NC[4] = { -1, -1, 1 };
|
||||
NC[5] = { 1, -1, 1 };
|
||||
NC[6] = { 1, 1, 1 };
|
||||
NC[7] = { -1, 1, 1 };
|
||||
|
||||
std::array<cvf::Vec3d, 8> gradientsXYZ;
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ RigElementType toRigElementType( const odb_String& odbTypeName )
|
||||
|
||||
const int* localElmNodeToIntegrationPointMapping( RigElementType elmType )
|
||||
{
|
||||
static const int HEX8_Mapping[8] = {0, 1, 3, 2, 4, 5, 7, 6};
|
||||
static const int HEX8_Mapping[8] = { 0, 1, 3, 2, 4, 5, 7, 6 };
|
||||
|
||||
switch ( elmType )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user