Skip to content

Commit 97ff898

Browse files
committed
support simmodsuite 12.0-180713
the M_splitMeshOnGFace function changed from having four arguments to two arguments in version 12.0-180606
1 parent cd3191f commit 97ff898

6 files changed

+31
-8
lines changed

cmake/FindSimModSuite.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ string(REGEX REPLACE
7474
"${SIM_VERSION}")
7575

7676
set(MIN_VALID_SIM_VERSION 11.0.170826)
77-
set(MAX_VALID_SIM_VERSION 12.0.171207)
77+
set(MAX_VALID_SIM_VERSION 12.0.180713)
7878
if( (SIM_DOT_VERSION VERSION_LESS MIN_VALID_SIM_VERSION) OR
7979
(SIM_DOT_VERSION VERSION_GREATER MAX_VALID_SIM_VERSION) )
8080
MESSAGE(FATAL_ERROR

phasta/CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ set(SOURCES
2323
phiotimer.cc
2424
)
2525

26+
if(ENABLE_SIMMETRIX AND SIMMODSUITE_SimAdvMeshing_FOUND)
27+
if(SIM_DOT_VERSION VERSION_GREATER 12.0.180605)
28+
set(SOURCES ${SOURCES} splitMeshOnGFace_2arg.cpp)
29+
else()
30+
set(SOURCES ${SOURCES} splitMeshOnGFace_4arg.cpp)
31+
endif()
32+
endif()
33+
2634
if(PUMI_FORTRAN_INTERFACE)
2735
enable_language(Fortran)
2836
set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/mod_files)

phasta/phInterfaceCutter.cc

+2-7
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@
1212
#include "SimPartitionedMesh.h"
1313
#include "SimModel.h"
1414
#include "SimUtil.h"
15-
#endif
16-
17-
/* forward declare simmetrix API M_splitMeshOnGFace;
18-
once it is ready in published code, remove this */
19-
#ifdef HAVE_SIMMETRIX
20-
extern void M_splitMeshOnGFace(pUnstructuredMesh, pGFace, int keepOrig, pPList nosplit);
15+
#include "splitMeshOnGFace.h"
2116
#endif
2217

2318
namespace apf {
@@ -223,7 +218,7 @@ void cutInterfaceSIM(apf::Mesh2* m, BCs& bcs)
223218
printf("cutting face %d:\n",GEN_tag(modelFace));
224219
counter = M_numVerticesInClosure(mesh, modelFace);
225220
printf(" num. of mesh vertices on interface before cut: %d\n",counter);
226-
M_splitMeshOnGFace(pmesh, modelFace, 0, 0);
221+
splitMeshOnGFace(pmesh, modelFace);
227222
counter = M_numVerticesInClosure(mesh, modelFace);
228223
printf(" num. of mesh vertices on interface after cut: %d\n",counter);
229224
}

phasta/splitMeshOnGFace.h

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef SPLITMESHONGFACE_H_
2+
#define SPLITMESHONGFACE_H_
3+
#include "SimMeshTools.h" /*declares M_splitMeshOnGFace*/
4+
5+
namespace ph {
6+
void splitMeshOnGFace(pUnstructuredMesh pmesh, pGFace gf);
7+
}
8+
#endif

phasta/splitMeshOnGFace_2arg.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include "splitMeshOnGFace.h"
2+
3+
void ph::splitMeshOnGFace(pUnstructuredMesh pmesh, pGFace gf) {
4+
M_splitMeshOnGFace(pmesh, gf);
5+
}

phasta/splitMeshOnGFace_4arg.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "splitMeshOnGFace.h"
2+
3+
extern void M_splitMeshOnGFace(pUnstructuredMesh, pGFace, int keepOrig, pPList nosplit);
4+
5+
void ph::splitMeshOnGFace(pUnstructuredMesh pmesh, pGFace gf) {
6+
M_splitMeshOnGFace(pmesh, gf, 0, 0);
7+
}

0 commit comments

Comments
 (0)