diff --git a/ApplicationCode/Commands/CompletionCommands/RicWellPathExportCompletionDataFeature.cpp b/ApplicationCode/Commands/CompletionCommands/RicWellPathExportCompletionDataFeature.cpp index a4d3b22b91..f14b8d6f37 100644 --- a/ApplicationCode/Commands/CompletionCommands/RicWellPathExportCompletionDataFeature.cpp +++ b/ApplicationCode/Commands/CompletionCommands/RicWellPathExportCompletionDataFeature.cpp @@ -1045,9 +1045,9 @@ CellDirection RicWellPathExportCompletionDataFeature::calculateDirectionInCell(R eclipseCase->results(RiaDefines::MATRIX_MODEL)->findOrLoadScalarResult(RiaDefines::STATIC_NATIVE, "DZ"); cvf::ref dzAccessObject = RigResultAccessorFactory::createFromUiResultName(eclipseCaseData, 0, RiaDefines::MATRIX_MODEL, 0, "DZ"); - double xLengthFraction = abs(lengthsInCell.x() / dxAccessObject->cellScalarGlobIdx(cellIndex)); - double yLengthFraction = abs(lengthsInCell.y() / dyAccessObject->cellScalarGlobIdx(cellIndex)); - double zLengthFraction = abs(lengthsInCell.z() / dzAccessObject->cellScalarGlobIdx(cellIndex)); + double xLengthFraction = fabs(lengthsInCell.x() / dxAccessObject->cellScalarGlobIdx(cellIndex)); + double yLengthFraction = fabs(lengthsInCell.y() / dyAccessObject->cellScalarGlobIdx(cellIndex)); + double zLengthFraction = fabs(lengthsInCell.z() / dzAccessObject->cellScalarGlobIdx(cellIndex)); if (xLengthFraction > yLengthFraction && xLengthFraction > zLengthFraction) { diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp index 5d9b8c7b78..6ee750394b 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartResultsCollection.cpp @@ -1797,7 +1797,7 @@ void RigFemPartResultsCollection::calculateGammaFromFrames(int partIndex, float por = srcPORFrameData[nodeIdx]; - if ( por == inf || abs(por) < 0.01e6*1.0e-5 ) + if ( por == inf || fabs(por) < 0.01e6*1.0e-5 ) dstFrameData[elmNodResIdx] = inf; else dstFrameData[elmNodResIdx] = srcSTFrameData[elmNodResIdx]/por; diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp b/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp index d6c504fd0b..f44a3b0d4f 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp @@ -213,7 +213,7 @@ cvf::Vec3d RimFracture::fracturePosition() const //-------------------------------------------------------------------------------------------------- double RimFracture::wellFractureAzimuthDiff() const { - double wellDifference = abs(wellAzimuthAtFracturePosition() - azimuth); + double wellDifference = fabs(wellAzimuthAtFracturePosition() - azimuth); return wellDifference; } diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFractureTemplate.cpp b/ApplicationCode/ProjectDataModel/Completions/RimFractureTemplate.cpp index 126f27a8a6..f87945748c 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFractureTemplate.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimFractureTemplate.cpp @@ -120,7 +120,7 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie { if (fracture->fractureTemplate() == this) { - if (changedField == &azimuthAngle && (abs(oldValue.toDouble() - fracture->azimuth()) < 1e-5)) + if (changedField == &azimuthAngle && (fabs(oldValue.toDouble() - fracture->azimuth()) < 1e-5)) { fracture->azimuth = azimuthAngle; } @@ -152,15 +152,15 @@ void RimFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* changedFie { if (fracture->fractureTemplate() == this) { - if (changedField == &perforationLength && (abs(oldValue.toDouble() - fracture->perforationLength()) < 1e-5)) + if (changedField == &perforationLength && (fabs(oldValue.toDouble() - fracture->perforationLength()) < 1e-5)) { fracture->perforationLength = perforationLength; } - if (changedField == &perforationEfficiency && (abs(oldValue.toDouble() - fracture->perforationEfficiency()) < 1e-5)) + if (changedField == &perforationEfficiency && (fabs(oldValue.toDouble() - fracture->perforationEfficiency()) < 1e-5)) { fracture->perforationEfficiency = perforationEfficiency; } - if (changedField == &wellDiameter && (abs(oldValue.toDouble() - fracture->wellDiameter()) < 1e-5)) + if (changedField == &wellDiameter && (fabs(oldValue.toDouble() - fracture->wellDiameter()) < 1e-5)) { fracture->wellDiameter = wellDiameter; } diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp b/ApplicationCode/ReservoirDataModel/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp index ba4d57960f..70a27dcf21 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp +++ b/ApplicationCode/ReservoirDataModel/RigEclipseToStimPlanCellTransmissibilityCalculator.cpp @@ -180,9 +180,9 @@ void RigEclipseToStimPlanCellTransmissibilityCalculator::calculateStimPlanCellsM fracturePlane.setFromPointAndNormal(static_cast(m_fractureTransform.translation()), static_cast(m_fractureTransform.col(2))); - Ax += abs(area*(fracturePlane.normal().dot(localY))); - Ay += abs(area*(fracturePlane.normal().dot(localX))); - Az += abs(area*(fracturePlane.normal().dot(localZ))); + Ax += fabs(area*(fracturePlane.normal().dot(localY))); + Ay += fabs(area*(fracturePlane.normal().dot(localX))); + Az += fabs(area*(fracturePlane.normal().dot(localZ))); } double fractureArea = 0.0; diff --git a/ApplicationCode/ReservoirDataModel/RigSimulationWellCoordsAndMD.cpp b/ApplicationCode/ReservoirDataModel/RigSimulationWellCoordsAndMD.cpp index ffcdca2356..3a4f6fe839 100644 --- a/ApplicationCode/ReservoirDataModel/RigSimulationWellCoordsAndMD.cpp +++ b/ApplicationCode/ReservoirDataModel/RigSimulationWellCoordsAndMD.cpp @@ -159,7 +159,7 @@ double RigSimulationWellCoordsAndMD::simWellAzimuthAngle(const cvf::Vec3d& posit cvf::Vec3d direction = p2 - p1; - if (abs(direction.y()) > 1e-5) + if (fabs(direction.y()) > 1e-5) { double atanValue = direction.x() / direction.y(); azimuthAngle = atan(atanValue); @@ -200,7 +200,7 @@ double RigSimulationWellCoordsAndMD::simWellDipAngle(const cvf::Vec3d& position) double horizonal = sqrt(pow(direction.x(), 2) + pow(direction.y(), 2)); double vertical = direction.z(); - if (abs(vertical) > 1e-5) + if (fabs(vertical) > 1e-5) { double atanValue = vertical / horizonal; dipAngle = atan(atanValue); diff --git a/ApplicationCode/ReservoirDataModel/RigStimPlanFractureDefinition.cpp b/ApplicationCode/ReservoirDataModel/RigStimPlanFractureDefinition.cpp index 115a8ce23d..bf3b17d63b 100644 --- a/ApplicationCode/ReservoirDataModel/RigStimPlanFractureDefinition.cpp +++ b/ApplicationCode/ReservoirDataModel/RigStimPlanFractureDefinition.cpp @@ -461,7 +461,7 @@ bool RigStimPlanFractureDefinition::timeStepExisist(double timeStepValueToCheck) { for (double timeStep : m_timeSteps) { - if (abs(timeStepValueToCheck - timeStep) < 1e-5) return true; + if (fabs(timeStepValueToCheck - timeStep) < 1e-5) return true; } return false; } @@ -487,7 +487,7 @@ size_t RigStimPlanFractureDefinition::getTimeStepIndex(double timeStepValue) size_t index = 0; while (index < m_timeSteps.size()) { - if (abs(m_timeSteps[index] - timeStepValue) < 1e-4) + if (fabs(m_timeSteps[index] - timeStepValue) < 1e-4) { return index; }