#2360 Elm Props: Use correct index to id map

This commit is contained in:
Rebecca Cox
2018-01-12 11:21:59 +01:00
parent 6aa2d99587
commit b08e382dae
4 changed files with 107 additions and 12 deletions

View File

@@ -85,6 +85,7 @@ public:
cvf::Vec3f faceNormal(int elmentIndex, int faceIndex) const;
const RigFemPartGrid* structGrid() const;
const std::vector<int>& elementIdxToId() const { return m_elementId; }
private:
int m_elementPartId;

View File

@@ -97,8 +97,6 @@ bool RigGeoMechCaseData::openAndReadFemParts(std::string* errorMessage)
m_readerInterface = new RifOdbReader;
#endif
m_elementPropertyReader = new RifElementPropertyReader;
if (m_readerInterface.notNull() && m_readerInterface->openFile(m_geoMechCaseFileName, errorMessage))
{
m_femParts = new RigFemPartCollection();
@@ -110,6 +108,7 @@ bool RigGeoMechCaseData::openAndReadFemParts(std::string* errorMessage)
progress.incrementProgress();
progress.setProgressDescription("Calculating element neighbors");
m_elementPropertyReader = new RifElementPropertyReader(m_femParts->part(0)->elementIdxToId());
// Initialize results containers
m_femPartResultsColl = new RigFemPartResultsCollection(m_readerInterface.p(), m_elementPropertyReader.p(), m_femParts.p());