Skip to content

Commit

Permalink
patchkernel: fix evaluation of barycentric coordinates
Browse files Browse the repository at this point in the history
CG functions expect vertices ordered in CCW order.
  • Loading branch information
andrea-iob committed Jun 13, 2024
1 parent 0c842cf commit 9fd0fe0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/patchkernel/surface_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ void SurfaceKernel::evalBarycentricCoordinates(long id, const std::array<double,

default:
{
ConstProxyVector<long> vertexIds = cell_->getVertexIds();
ConstProxyVector<long> vertexIds = getFacetOrderedVertexIds(*cell_);

std::size_t nVertices = vertexIds.size();
BITPIT_CREATE_WORKSPACE(vertexCoords, std::array<double BITPIT_COMMA 3>, nVertices, ReferenceElementInfo::MAX_ELEM_VERTICES);
Expand Down

0 comments on commit 9fd0fe0

Please sign in to comment.