For the pow2(n)'th time: MATLAB indices are one-based...

This commit is contained in:
Bård Skaflestad
2010-08-30 21:32:49 +00:00
parent f7fe7325b8
commit 9cdeab3f04

View File

@@ -148,8 +148,8 @@ generate_coarse_faces(struct coarse_topology *topo)
if (fld != NULL) {
pi = mxGetData(fld);
for (f = 0; f < topo->nfaces; f++) {
pi[f + 0*topo->nfaces] = topo->neighbours[2*f + 0];
pi[f + 1*topo->nfaces] = topo->neighbours[2*f + 1];
pi[f + 0*topo->nfaces] = topo->neighbours[2*f + 0] + 1;
pi[f + 1*topo->nfaces] = topo->neighbours[2*f + 1] + 1;
}
mxSetField(faces, 0, "neighbors", fld);