Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix connectivity definition in the adapter #315

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions Interface.C
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,6 @@ void preciceAdapter::Interface::configureMesh(const fvMesh& mesh, const std::str
{
vertices[verticesIndex++] = faceNodes[i][d];
}
if (meshConnectivity_)
{
verticesMap.emplace(std::make_tuple(faceNodes[i][0], faceNodes[i][1], faceNodes[i][2]), -1);
}
}
}

Expand All @@ -261,11 +257,9 @@ void preciceAdapter::Interface::configureMesh(const fvMesh& mesh, const std::str

if (meshConnectivity_)
{
// Build the map between OpenFOAM vertices and preCICE vertex IDs
verticesIndex = 0;
for (auto& key : verticesMap)
for (std::size_t i = 0; i < vertexIDs_.size(); ++i)
{
key.second = vertexIDs_[verticesIndex++];
verticesMap.emplace(std::make_tuple(vertices[3 * i], vertices[3 * i + 1], vertices[3 * i + 2]), vertexIDs_[i]);
}

for (uint j = 0; j < patchIDs_.size(); j++)
Expand Down
Loading