#5101 clang-format: Adjusted penalties

Use lower absolute values to improve control of behavior
This commit is contained in:
Magne Sjaastad
2020-02-12 11:43:15 +01:00
parent 10f0abc9b5
commit c82df63e10
710 changed files with 3167 additions and 4721 deletions

View File

@@ -123,9 +123,8 @@ void RivFemElmVisibilityCalculator::computePropertyVisibility( cvf::UByteArray*
if ( resVarAddress.resultPosType == RIG_NODAL && resVarAddress.fieldName == "POR-Bar" )
resVarAddress.resultPosType = RIG_ELEMENT_NODAL;
const std::vector<float>& resVals = caseData->femPartResults()->resultValues( resVarAddress,
grid->elementPartId(),
timeStepIndex );
const std::vector<float>& resVals =
caseData->femPartResults()->resultValues( resVarAddress, grid->elementPartId(), timeStepIndex );
if ( !propertyFilter->isActive() ) continue;
if ( !propertyFilter->resultDefinition->hasResult() ) continue;
@@ -274,7 +273,8 @@ void RivFemElmVisibilityCalculator::computeOverriddenCellVisibility( cvf::UByteA
for ( int mcIdx = 0; mcIdx < cellCount; ++mcIdx )
{
( *elmVisibilities )[elmIdx] |= ( *totCellVisibility )[cellIndicesInMasterCase[mcIdx]]; // If any is visible, show
( *elmVisibilities )[elmIdx] |= ( *totCellVisibility )[cellIndicesInMasterCase[mcIdx]]; // If any is
// visible, show
}
}
}

View File

@@ -203,10 +203,9 @@ void RivFemPartGeometryGenerator::computeArrays()
continue; // Invisible face
}
int faceNodeCount = 0;
const int* localElmNodeIndicesForFace = RigFemTypes::localElmNodeIndicesForFace( eType,
lfIdx,
&faceNodeCount );
int faceNodeCount = 0;
const int* localElmNodeIndicesForFace =
RigFemTypes::localElmNodeIndicesForFace( eType, lfIdx, &faceNodeCount );
if ( faceNodeCount == 4 )
{
cvf::Vec3f quadVxs0( cvf::Vec3d( nodeCoordinates[elmNodeIndices[localElmNodeIndicesForFace[0]]] ) -

View File

@@ -125,8 +125,7 @@ void RivFemPartPartMgr::generatePartGeometry( RivFemPartGeometryGenerator& geoBu
part->setTransform( m_scaleTransform.p() );
// Set mapping from triangle face index to element index
cvf::ref<RivFemPickSourceInfo> si = new RivFemPickSourceInfo( m_gridIdx,
geoBuilder.triangleToElementMapper() );
cvf::ref<RivFemPickSourceInfo> si = new RivFemPickSourceInfo( m_gridIdx, geoBuilder.triangleToElementMapper() );
part->setSourceInfo( si.p() );
part->updateBoundingBox();
@@ -256,9 +255,8 @@ void RivFemPartPartMgr::updateCellResultColor( size_t timeStepIndex, RimGeoMechC
resVarAddress.resultPosType = RIG_ELEMENT_NODAL;
}
const std::vector<float>& resultValues = caseData->femPartResults()->resultValues( resVarAddress,
m_gridIdx,
(int)timeStepIndex );
const std::vector<float>& resultValues =
caseData->femPartResults()->resultValues( resVarAddress, m_gridIdx, (int)timeStepIndex );
const std::vector<size_t>* vxToResultMapping = nullptr;
int vxCount = 0;
@@ -267,8 +265,7 @@ void RivFemPartPartMgr::updateCellResultColor( size_t timeStepIndex, RimGeoMechC
{
vxToResultMapping = &( m_surfaceGenerator.quadVerticesToNodeIdxMapping() );
}
else if ( resVarAddress.resultPosType == RIG_ELEMENT_NODAL ||
resVarAddress.resultPosType == RIG_INTEGRATION_POINT ||
else if ( resVarAddress.resultPosType == RIG_ELEMENT_NODAL || resVarAddress.resultPosType == RIG_INTEGRATION_POINT ||
resVarAddress.resultPosType == RIG_FORMATION_NAMES )
{
vxToResultMapping = &( m_surfaceGenerator.quadVerticesToGlobalElmNodeIdx() );

View File

@@ -243,8 +243,7 @@ RivGeoMechPartMgr* RivGeoMechVizLogic::getUpdatedPartMgr( RivGeoMechPartMgrCache
else if ( pMgrKey.geometryType() == ALL_CELLS )
{
RivFemElmVisibilityCalculator::computeAllVisible( elmVisibility.p(),
caseData->femParts()->part( femPartIdx ) );
RivFemElmVisibilityCalculator::computeAllVisible( elmVisibility.p(), caseData->femParts()->part( femPartIdx ) );
}
else
{