Skip to content

Commit

Permalink
Reverting to use of -1 instead of offset for setting elment to elemen…
Browse files Browse the repository at this point in the history
…t connection
  • Loading branch information
dhyan1272 committed Aug 12, 2024
1 parent 6885608 commit aa47551
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pmpo_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,10 @@ void polympo_setMeshElm2ElmConn_f(MPMesh_ptr p_mpmesh, const int maxEdges, const
kkViewHostU<const int**> arrayHost(array,maxEdges,nCells); //Fortran is column-major
auto p_mesh = ((polyMPO::MPMesh*)p_mpmesh)->p_mesh;
PMT_ALWAYS_ASSERT(p_mesh->meshEditable());

auto p_MPs = ((polyMPO::MPMesh*)p_mpmesh)->p_MPs;
//int offset = p_MPs->getElmIDoffset();

int offset = p_MPs->getElmIDoffset();
//check the size
PMT_ALWAYS_ASSERT(maxEdges <= maxVtxsPerElm);
PMT_ALWAYS_ASSERT(nCells == p_mesh->getNumElements());
Expand All @@ -596,7 +598,7 @@ void polympo_setMeshElm2ElmConn_f(MPMesh_ptr p_mpmesh, const int maxEdges, const
auto elm2ElmConn = p_mesh->getElm2ElmConn();
Kokkos::parallel_for("set elm2ElmConn", nCells, KOKKOS_LAMBDA(const int elm){
for(int i=0; i<maxEdges; i++){
elm2ElmConn(elm,i+1) = elm2ElmArray(i,elm)-offset;
elm2ElmConn(elm,i+1) = elm2ElmArray(i,elm)-1;
}
});
}
Expand Down

0 comments on commit aa47551

Please sign in to comment.