Skip to content

Commit

Permalink
Merge pull request #73 from SeisSol/thomas/smoothing_2024
Browse files Browse the repository at this point in the history
Adapt to simmetrix version 2024 breaking changes
  • Loading branch information
davschneller authored Jul 15, 2024
2 parents 1ca869c + 30a8d39 commit 20226b6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
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

0 comments on commit 20226b6

Please sign in to comment.