From b5b13789b46f53ea97dc3a93a3fa08cdff0ec26b Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 19 Jun 2017 20:49:06 +0200 Subject: [PATCH] Add const to several geomech functions --- ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.cpp | 2 +- ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.h | 4 ++-- .../GeoMech/GeoMechDataModel/RigFemPartCollection.cpp | 2 +- .../GeoMech/GeoMechDataModel/RigFemPartCollection.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.cpp b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.cpp index dc2c4bee97..e4a5ba220a 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.cpp +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.cpp @@ -283,7 +283,7 @@ cvf::Vec3f RigFemPart::faceNormal(int elmIdx, int faceIdx) const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -float RigFemPart::characteristicElementSize() +float RigFemPart::characteristicElementSize() const { if (m_characteristicElementSize != std::numeric_limits::infinity()) return m_characteristicElementSize; diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.h b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.h index 7c8230e35c..5c856f5e45 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.h +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPart.h @@ -78,7 +78,7 @@ public: { return m_elmNeighbors[elementIndex].faceInNeighborElm[faceIndex]; } cvf::BoundingBox boundingBox() const; - float characteristicElementSize(); + float characteristicElementSize() const; const std::vector& possibleGridCornerElements() const { return m_possibleGridCornerElements; } void findIntersectingCells(const cvf::BoundingBox& inputBB, std::vector* elementIndices) const; @@ -106,7 +106,7 @@ private: std::vector< Neighbors > m_elmNeighbors; std::vector m_possibleGridCornerElements; - float m_characteristicElementSize; + mutable float m_characteristicElementSize; mutable cvf::BoundingBox m_boundingBox; mutable cvf::ref m_elementSearchTree; diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartCollection.cpp b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartCollection.cpp index cd735dea19..f0f7429c34 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartCollection.cpp +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartCollection.cpp @@ -88,7 +88,7 @@ size_t RigFemPartCollection::totalElementCount() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -float RigFemPartCollection::characteristicElementSize() +float RigFemPartCollection::characteristicElementSize() const { if (partCount()) { diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartCollection.h b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartCollection.h index 5f172de9b7..3e78e1d04d 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartCollection.h +++ b/ApplicationCode/GeoMech/GeoMechDataModel/RigFemPartCollection.h @@ -36,7 +36,7 @@ public: int partCount() const; size_t totalElementCount() const; - float characteristicElementSize(); + float characteristicElementSize() const; cvf::BoundingBox boundingBox() const;