GeoMech with OdbReader Included in ResInsight Build

Preliminary, first shot.
Added first iteration on basic visualization code.
This commit is contained in:
Jacob Støren
2015-04-24 15:53:50 +02:00
parent 6dad519f30
commit a538be1775
15 changed files with 723 additions and 48 deletions

View File

@@ -17,3 +17,23 @@ add_library( ${PROJECT_NAME}
RifGeoMechReaderInterface.h
RifGeoMechReaderInterface.cpp
)
list(APPEND RI_ODB_LIBS
${RI_ODB_API_DIR}/lib/ABQSMAOdbDdbOdb.lib
${RI_ODB_API_DIR}/lib/ABQSMAOdbApi.lib
${RI_ODB_API_DIR}/lib/ABQSMAOdbCore.lib
${RI_ODB_API_DIR}/lib/ABQSMAOdbCoreGeom.lib
${RI_ODB_API_DIR}/lib/ABQSMAOdbAttrEO.lib
${RI_ODB_API_DIR}/lib/ABQSMAAbuBasicUtils.lib
${RI_ODB_API_DIR}/lib/ABQSMABasShared.lib
${RI_ODB_API_DIR}/lib/ABQSMABasCoreUtils.lib
${RI_ODB_API_DIR}/lib/ABQSMAStiCAE_StableTime.lib
${RI_ODB_API_DIR}/lib/ABQSMABasMem.lib
${RI_ODB_API_DIR}/lib/ABQSMAAbuGeom.lib
${RI_ODB_API_DIR}/lib/ABQSMARomDiagEx.lib
${RI_ODB_API_DIR}/lib/ABQSMASspUmaCore.lib
${RI_ODB_API_DIR}/lib/ABQSMASimInterface.lib
${RI_ODB_API_DIR}/lib/ABQSMAMtxCoreModule.lib
)
target_link_libraries(${PROJECT_NAME} ${RI_ODB_LIBS} RigGeoMechDataModel LibCore)

View File

@@ -0,0 +1,21 @@
# Copy Odb Dlls
set(RI_ODB_API_DIR C:/pfRoot/jjsOnJacobpcCsdep/User/Sigurd/OdbApiExperiments/OdbApi/x64 CACHE PATH "Path tho the ODB api from Simulia")
if (MSVC)
# Find all the dlls
file (GLOB RI_ALL_ODB_DLLS ${RI_ODB_API_DIR}/lib/*.dll)
# Strip off the path
foreach (aDLL ${RI_ALL_ODB_DLLS})
get_filename_component(filenameWithExt ${aDLL} NAME)
list(APPEND RI_ODB_DLLS ${filenameWithExt} )
endforeach(aDLL)
# Copy to target directory
foreach (aDLL ${RI_ODB_DLLS})
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${RI_ODB_API_DIR}/lib/${aDLL}" "$<TARGET_FILE_DIR:${PROJECT_NAME}>")
endforeach()
endif(MSVC)

View File

@@ -42,5 +42,6 @@ public:
virtual std::vector<double> timeSteps() = 0;
private:
};

View File

@@ -65,6 +65,7 @@ void readOdbFile(const std::string& fileName, RigGeoMechCaseData* geoMechCase)
odb_InstanceRepository instanceRepository = odb.rootAssembly().instances();
odb_InstanceRepositoryIT iter(instanceRepository);
for (iter.first(); !iter.isDone(); iter.next())
{
odb_Instance& inst = instanceRepository[iter.currentKey()];
@@ -102,6 +103,7 @@ void readOdbFile(const std::string& fileName, RigGeoMechCaseData* geoMechCase)
femPart->appendElement(elmType, odbElm.label(), odbElm.connectivity(nodeCount));
}
femPart->setElementPartId(geoMechCase->partCount());
geoMechCase->addFemPart(femPart);
}
}