https://linen.dev logo
What could be the reason that `syncPointList` does...
# programming
t
What could be the reason that
syncPointList
does not seem to be summing the entries among different processors for this kind of thing?
Copy code
// New point is calculated as average of each projected neighbour point
    vectorList newPoints(mesh.nPoints(), ZERO_VECTOR);
    labelList nPoints(mesh.nPoints(), 0);

    forAll (neighIs, neighI)
    {
        const point neighPoint = mesh.points()[neighIs[neighI]];
        const point projPoint = projectPointToClosestEdge(neighPoint, em, closestEdgePointI);
        newPoints[pointI] += projPoint;
        ++nPoints[pointI];
    }

    // Synchronize among processors (using sum combination)
    syncTools::syncPointList
    (
        mesh,
        newPoints,
        plusEqOp<vector>(),
        UNDEF_VECTOR               // null value
    );

    syncTools::syncPointList
    (
        mesh,
        nPoints,
        plusEqOp<label>(),
        UNDEF_LABEL               // null value
    );