Skip to content

Commit

Permalink
[src] Fix GridBaryCenters grid computation
Browse files Browse the repository at this point in the history
  • Loading branch information
epernod committed Jan 2, 2025
1 parent bdaef8b commit ae874be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/InfinyToolkit/MeshTools/GridBarycentersPositions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void GridBaryCentersPositions::computeSurfaceMeshGrid()
gridPos[j] = int(localCoord / steps[j]);
}

int vecPosition = gridPos[2] + gridPos[1] * grid[2] + gridPos[0] * grid[2] * grid[1];
int vecPosition = gridPos[2] + gridPos[1] * (grid[2]-1) + gridPos[0] * (grid[2]-1) * (grid[1]-1);
std::cout << "pos: " << fullPositions[i] << " | " << gridPos << " | " << vecPosition << std::endl;
m_indicesPerCell[vecPosition].push_back(i);
}
Expand Down

0 comments on commit ae874be

Please sign in to comment.