mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
GeoMech with OdbReader Included in ResInsight Build
Preliminary, first shot. Added first iteration on basic visualization code.
This commit is contained in:
@@ -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)
|
||||
|
||||
21
ApplicationCode/GeoMech/OdbReader/OdbSetup.cmake
Normal file
21
ApplicationCode/GeoMech/OdbReader/OdbSetup.cmake
Normal 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)
|
||||
@@ -42,5 +42,6 @@ public:
|
||||
|
||||
virtual std::vector<double> timeSteps() = 0;
|
||||
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user