From 97ca1ef6139755a5d40cdabda0f0d182af785ee6 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Wed, 5 Oct 2022 12:01:06 -0400 Subject: [PATCH] support simmodsuite 18 --- cmake/FindSimModSuite.cmake | 4 ++-- parma/diffMC/.clang_complete | 2 +- test/runSimxAnisoAdapt.cc | 4 ---- test/simTranslate.cc | 23 ++++++++++++++++------- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/cmake/FindSimModSuite.cmake b/cmake/FindSimModSuite.cmake index 8be42efb2..d935a8661 100644 --- a/cmake/FindSimModSuite.cmake +++ b/cmake/FindSimModSuite.cmake @@ -84,7 +84,7 @@ string(REGEX REPLACE "${SIM_VERSION}") set(MIN_VALID_SIM_VERSION 12.0.190225) -set(MAX_VALID_SIM_VERSION 16.0-210623) +set(MAX_VALID_SIM_VERSION 18.0-220930) if( ${SKIP_SIMMETRIX_VERSION_CHECK} ) message(STATUS "Skipping Simmetrix SimModSuite version check." " This may result in undefined behavior") @@ -113,7 +113,7 @@ message(STATUS "SIM_ARCHOS ${SIM_ARCHOS}") option(SIM_PARASOLID "Use Parasolid through Simmetrix" OFF) if (SIM_PARASOLID) set(MIN_SIM_PARASOLID_VERSION 290) - set(MAX_SIM_PARASOLID_VERSION 330) + set(MAX_SIM_PARASOLID_VERSION 350) foreach(version RANGE ${MAX_SIM_PARASOLID_VERSION} ${MIN_SIM_PARASOLID_VERSION} -10) diff --git a/parma/diffMC/.clang_complete b/parma/diffMC/.clang_complete index 93a06dfc0..ae7332293 100644 --- a/parma/diffMC/.clang_complete +++ b/parma/diffMC/.clang_complete @@ -1,4 +1,4 @@ --D_HAVE_ZOLTAN_ +-D_PUMI_HAS_ZOLTAN_ -D_HAVE_PARMETIS_ -DFMDB_PARALLEL -DFMDB diff --git a/test/runSimxAnisoAdapt.cc b/test/runSimxAnisoAdapt.cc index a0c0389d8..d0aeacc16 100644 --- a/test/runSimxAnisoAdapt.cc +++ b/test/runSimxAnisoAdapt.cc @@ -14,10 +14,6 @@ #include "MeshSimAdapt.h" #include "SimDiscrete.h" #include "SimMessages.h" -#include "SimError.h" -#include "SimErrorCodes.h" -#include "SimMeshingErrorCodes.h" -#include "SimDiscreteErrorCodes.h" #include #include diff --git a/test/simTranslate.cc b/test/simTranslate.cc index 9b99255e2..c439f244f 100644 --- a/test/simTranslate.cc +++ b/test/simTranslate.cc @@ -11,8 +11,6 @@ #include "SimAdvModel.h" #include "SimUtil.h" #include "SimMessages.h" -#include "SimError.h" -#include "SimErrorCodes.h" #include "MeshSim.h" #include "SimAttribute.h" #include "AttributeTypes.h" @@ -26,6 +24,17 @@ #include "gmi_sim_config.h" #include +#if SIMMODSUITE_MAJOR_VERSION >= 18 + #include "SimInfo.h" + #include "SimInfoCodes.h" + #define SIM_ERROR(suffix,err) SimInfo_##suffix(err) + typedef pSimInfo pSimError; +#else + #include "SimError.h" + #include "SimErrorCodes.h" + #define SIM_ERROR(suffix,err) SimError_##suffix(err) +#endif + #ifdef SIM_PARASOLID #include "SimParasolidKrnl.h" #endif @@ -46,14 +55,14 @@ static std::string acisExt = ".sat"; static std::string paraExt = ".xmt_txt"; static std::string paraExtshort = ".x_t"; -void printSimError(pSimError err) -{ +void printSimError(pSimError err) { printf("Simmetrix error caught:\n"); - printf(" Error code: %d\n",SimError_code(err)); - printf(" Error string: %s\n",SimError_toString(err)); - SimError_delete(err); + printf(" Error code: %d\n",SIM_ERROR(code,err)); + printf(" Error string: %s\n",SIM_ERROR(code,err)); + SIM_ERROR(delete,err); } + void translateModel(std::string mdlName, pGModel* simmodel, pProgress& progress) { (void)progress;