Skip to content

Commit 8e310cf

Browse files
committed
iParticleNew Issue
1 parent c52bfa7 commit 8e310cf

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

src/pmpo_MPMesh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ void MPMesh::push(){
345345

346346
static int count=0;
347347
std::cout<<"Push"<<" "<<count<<std::endl;
348-
348+
if(count>473) exit(-1);
349349
Kokkos::Timer timer;
350350

351351
p_mesh->computeRotLatLonIncr();

src/pmpo_c.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,11 @@ void polympo_setAppIDFunc_f(MPMesh_ptr p_mpmesh, IntVoidFunc getNext, void* appI
213213
}
214214

215215
void polympo_setMPASAppIDFunc_f(MPMesh_ptr p_mpmesh, VoidVoidFunc getMPASAppID, void* arg1, void*arg2, void*arg3,
216-
const int arg4) {
216+
const int arg4, const int arg5) {
217217
checkMPMeshValid(p_mpmesh);
218218
auto p_MPs = ((polyMPO::MPMesh*)p_mpmesh)->p_MPs;
219-
std::function<int(int)> polyMPO_getMPASAppID = [getMPASAppID, arg1, arg2, arg3, arg4](int iCell)
220-
{ int iParticleNew; getMPASAppID(arg1, arg2, arg3, arg4, iCell, iParticleNew); return iParticleNew;};
219+
std::function<int(int)> polyMPO_getMPASAppID = [getMPASAppID, arg1, arg2, arg3, arg4, arg5](int iCell)
220+
{ int iParticleNew; getMPASAppID(arg1, arg2, arg3, arg4, iCell, iParticleNew, arg5); return iParticleNew;};
221221
p_MPs->setAppIDFunc(polyMPO_getMPASAppID);
222222
}
223223

src/pmpo_c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void polympo_finishRebuildMPs_f(MPMesh_ptr p_mpmesh);
2525

2626
void polympo_setAppIDFunc_f(MPMesh_ptr p_mpmesh, IntVoidFunc getNext, void* appIDs);
2727
void polympo_setMPASAppIDFunc_f(MPMesh_ptr p_mpmesh, VoidVoidFunc getMPASAppID, void* arg1, void* arg2, void*arg3,
28-
const int arg4);
28+
const int arg4, const int arg5);
2929

3030
void polympo_getMPCurElmID_f(MPMesh_ptr p_mpmesh, const int numMPs, int* elmIDs);
3131
void polympo_setMPLatLonRotatedFlag_f(MPMesh_ptr p_mpmesh, const int isRotateFlag);

src/pmpo_defines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
typedef void* MPMesh_ptr;
99
//Function that receives void* and returns an int
1010
typedef int (*IntVoidFunc)(void*);
11-
typedef void (*VoidVoidFunc)(void*, void*, void*, const int, int, int);
11+
typedef void (*VoidVoidFunc)(void*, void*, void*, const int, int, int, const int);
1212

1313
using space_t = Kokkos::DefaultExecutionSpace::memory_space;
1414

src/pmpo_fortran.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ subroutine polympo_setAppIDFunc(mpMesh, getNext, appIDs) &
118118
!> @param appIDs(in) Pointer to opaque data application data structure (that may contain all available app IDs)
119119
!---------------------------------------------------------------------------
120120
subroutine polympo_setMPASAppIDFunc(mpMesh, getMPASAppID, &
121-
arg1, arg2, arg3, arg4) &
121+
arg1, arg2, arg3, arg4, arg5) &
122122
bind(C, NAME='polympo_setMPASAppIDFunc_f')
123123
use :: iso_c_binding
124124
type(c_ptr), value :: mpMesh
@@ -127,6 +127,7 @@ subroutine polympo_setMPASAppIDFunc(mpMesh, getMPASAppID, &
127127
type(c_ptr), value :: arg2
128128
type(c_ptr), value :: arg3
129129
integer(c_int), intent(in), value :: arg4
130+
integer(c_int), intent(in), value :: arg5
130131
end subroutine
131132

132133

src/pmpo_materialPoints.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ void MaterialPoints::migrate() {
195195

196196
for(int i=0; i<numReceivedMPs_host(0); i++){
197197
printf("Trying to find an ID for a material point\n");
198-
auto xx = getNextAppID(receivedMPs2Elm_host(i));
198+
auto xx = getNextAppID(receivedMPs2Elm_host(i)+1);
199199
}
200200

201201
if (getOpMode() == polyMPO::MP_DEBUG)

0 commit comments

Comments
 (0)