diff --git a/cmake/FindSimModSuite.cmake b/cmake/FindSimModSuite.cmake index 5c87e6726..87bc8bccf 100644 --- a/cmake/FindSimModSuite.cmake +++ b/cmake/FindSimModSuite.cmake @@ -84,7 +84,7 @@ string(REGEX REPLACE "${SIM_VERSION}") set(MIN_VALID_SIM_VERSION 16.0.210606) -set(MAX_VALID_SIM_VERSION 17.0.220403) +set(MAX_VALID_SIM_VERSION 2023.1-231028) 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 360) foreach(version RANGE ${MAX_SIM_PARASOLID_VERSION} ${MIN_SIM_PARASOLID_VERSION} -10) diff --git a/src/mixed_writeMesh.cpp b/src/mixed_writeMesh.cpp index 8d326f55c..511bac86a 100644 --- a/src/mixed_writeMesh.cpp +++ b/src/mixed_writeMesh.cpp @@ -1,18 +1,26 @@ #include "MeshSim.h" #include "SimDiscrete.h" #include "SimMessages.h" -#include "SimError.h" -#include "SimErrorCodes.h" -#include "SimMeshingErrorCodes.h" -#include "SimDiscreteErrorCodes.h" #include using namespace std; #include "Omega_h_comm.hpp" #include "Omega_h_mesh.hpp" #include "Omega_h_file.hpp" +#include "Omega_h_simConfig.h" using namespace Omega_h; +#if SIMMODSUITE_MAJOR_VERSION >= 18 && SIMMODSUITE_MINOR_VERSION >= 220930 + #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 + void messageHandler(int type, const char *msg) { switch (type) { @@ -104,9 +112,9 @@ void hex_gen(CommPtr comm, std::string const mesh_dir) { vReturn, eReturn, mesh_path.c_str(), model_path.c_str()); } catch (pSimError err) { cerr<<"SimModSuite error caught:"<