From 0560457cd2d5aac62c36a4fce3a0dd76db08eac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Tue, 28 Apr 2015 09:21:27 +0200 Subject: [PATCH] Added C3D8 elements. Removed unused close() Close (or something similar) will be added when needed. --- .../OdbReader/RifGeoMechReaderInterface.h | 1 - .../GeoMech/OdbReader/RifOdbReader.cpp | 19 ++++++++++--------- .../GeoMech/OdbReader/RifOdbReader.h | 1 - 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ApplicationCode/GeoMech/OdbReader/RifGeoMechReaderInterface.h b/ApplicationCode/GeoMech/OdbReader/RifGeoMechReaderInterface.h index 9fc3decbe8..b2b3fbbb38 100644 --- a/ApplicationCode/GeoMech/OdbReader/RifGeoMechReaderInterface.h +++ b/ApplicationCode/GeoMech/OdbReader/RifGeoMechReaderInterface.h @@ -38,7 +38,6 @@ public: virtual ~RifGeoMechReaderInterface(); virtual bool readFemParts(const std::string& fileName, RigFemPartCollection* geoMechCase) = 0; - virtual void close() = 0; virtual std::vector timeSteps() = 0; virtual std::vector scalarNodeResultNames() = 0; diff --git a/ApplicationCode/GeoMech/OdbReader/RifOdbReader.cpp b/ApplicationCode/GeoMech/OdbReader/RifOdbReader.cpp index fd4206da14..25a52f572c 100644 --- a/ApplicationCode/GeoMech/OdbReader/RifOdbReader.cpp +++ b/ApplicationCode/GeoMech/OdbReader/RifOdbReader.cpp @@ -25,11 +25,14 @@ #include #include +#include std::map initFemTypeMap() { std::map typeMap; typeMap["C3D8R"] = HEX8; + typeMap["C3D8"] = HEX8; + typeMap["C3D8P"] = HEX8; typeMap["CAX4"] = CAX4; return typeMap; @@ -105,7 +108,13 @@ void readOdbFile(const std::string& fileName, RigFemPartCollection* femParts) // Get the type it = odbElmTypeToRigElmTypeMap.find(odbElm.type().cStr()); - if (it == odbElmTypeToRigElmTypeMap.end()) continue; // Unsupported type + if (it == odbElmTypeToRigElmTypeMap.end()) + { + #if 0 + std::cout << "Unsupported element type :" << odbElm.type().cStr() << std::endl; + #endif + continue; // Unsupported type + } RigElementType elmType = it->second; @@ -160,14 +169,6 @@ bool RifOdbReader::readFemParts(const std::string& fileName, RigFemPartCollectio return true; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RifOdbReader::close() -{ - -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/GeoMech/OdbReader/RifOdbReader.h b/ApplicationCode/GeoMech/OdbReader/RifOdbReader.h index fc6f1472cf..7fd1bc7e83 100644 --- a/ApplicationCode/GeoMech/OdbReader/RifOdbReader.h +++ b/ApplicationCode/GeoMech/OdbReader/RifOdbReader.h @@ -38,7 +38,6 @@ public: virtual ~RifOdbReader(); virtual bool readFemParts(const std::string& fileName, RigFemPartCollection* femParts); - virtual void close(); virtual std::vector timeSteps(); virtual std::vector scalarNodeResultNames() {return std::vector ();};