Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to simmetrix version 2024 breaking changes #73

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
14 changes: 9 additions & 5 deletions src/input/SimModSuite.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@
#include <string>
#include <vector>

// forward declare
pAManager SModel_attManager(pModel model);

/**
* @todo Currently it is not supported to create more than one instance
* of this class
Expand Down Expand Up @@ -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<int>(MeshAtt.volumeSmoothingType));
VolumeMesher_setOptimization(volumeMesher, MeshAtt.VolumeMesherOptimization);
}
Expand Down Expand Up @@ -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);

Expand Down
10 changes: 6 additions & 4 deletions src/input/SimModSuiteApf.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@
#include <string>
#include <vector>

// forward declare
pAManager SModel_attManager(pModel model);

/**
* @todo Currently it is not supported to create more than one instance
* of this class
Expand Down Expand Up @@ -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);
Expand Down
Loading