diff --git a/CMakeLists.txt b/CMakeLists.txt index 0efd978..958e62b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,6 +109,9 @@ if (SIMMETRIX) if(${SIM_MAJOR_VER} LESS 18) target_compile_definitions(pumgen PUBLIC BEFORE_SIM_18) endif() + if(${SIM_MAJOR_VER} LESS 2024) + target_compile_definitions(pumgen PUBLIC BEFORE_SIM_2024) + endif() target_include_directories(pumgen PUBLIC ${SIMMETRIX_INCLUDE_DIR}) target_link_libraries(pumgen PUBLIC ${SIMMETRIX_LIBRARIES}) endif() diff --git a/src/input/SimModSuite.h b/src/input/SimModSuite.h index 416448a..e74907a 100644 --- a/src/input/SimModSuite.h +++ b/src/input/SimModSuite.h @@ -62,9 +62,6 @@ #include #include -// forward declare -pAManager SModel_attManager(pModel model); - /** * @todo Currently it is not supported to create more than one instance * of this class @@ -159,7 +156,11 @@ class SimModSuite : public FullStorageMeshData { logInfo(PMU_rank()) << "Starting the volume mesher"; pVolumeMesher volumeMesher = VolumeMesher_new(meshCase, m_simMesh); if (xmlFile != nullptr) { +#ifdef BEFORE_SIM_2024 VolumeMesher_setSmoothing(volumeMesher, MeshAtt.volumeSmoothingLevel); +#else + VolumeMesher_setSmoothLevel(volumeMesher, MeshAtt.volumeSmoothingLevel); +#endif VolumeMesher_setSmoothType(volumeMesher, static_cast(MeshAtt.volumeSmoothingType)); VolumeMesher_setOptimization(volumeMesher, MeshAtt.VolumeMesherOptimization); } @@ -448,8 +449,11 @@ class SimModSuite : public FullStorageMeshData { void extractCases(pGModel m_model, pACase& meshCase, const char* meshCaseName, pACase& analysisCase, const char* analysisCaseName) { logInfo(PMU_rank()) << "Extracting cases"; - pAManager attMngr = SModel_attManager(m_model); - +#ifdef BEFORE_SIM_2024 + pAManager attMngr = GM_attManager(m_model); +#else + pAManager attMngr = GM_attManager(m_model, false); +#endif MeshingOptions meshingOptions; meshCase = MS_newMeshCase(m_model); diff --git a/src/input/SimModSuiteApf.h b/src/input/SimModSuiteApf.h index ad07f30..88ed5f2 100644 --- a/src/input/SimModSuiteApf.h +++ b/src/input/SimModSuiteApf.h @@ -64,9 +64,6 @@ #include #include -// forward declare -pAManager SModel_attManager(pModel model); - /** * @todo Currently it is not supported to create more than one instance * of this class @@ -330,7 +327,12 @@ class SimModSuiteApf : public ApfMeshInput { void extractCases(pGModel m_model, pACase& meshCase, const char* meshCaseName, pACase& analysisCase, const char* analysisCaseName) { logInfo(PMU_rank()) << "Extracting cases"; - pAManager attMngr = SModel_attManager(m_model); + +#ifdef BEFORE_SIM_2024 + pAManager attMngr = GM_attManager(m_model); +#else + pAManager attMngr = GM_attManager(m_model, false); +#endif MeshingOptions meshingOptions; meshCase = MS_newMeshCase(m_model);