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

Feature/fixes #161

Merged
merged 3 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion src/atlas/interpolation/Cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ class MatrixCache final : public Cache {
public:
MatrixCache() = default;
MatrixCache(const Cache& c);
MatrixCache(const MatrixCache& c) : MatrixCache(Cache(c)) {}
MatrixCache(Matrix&& m);
MatrixCache(std::shared_ptr<const Matrix> m, const std::string& uid = "");
MatrixCache(const Matrix* m);
Expand Down
7 changes: 3 additions & 4 deletions src/atlas/redistribution/detail/RedistributeGeneric.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,9 @@ std::vector<IdxUid> getUidVec(const FunctionSpace& functionspace) {

// Check UIDs are unique.
if (ATLAS_BUILD_TYPE_DEBUG) {
const size_t vecSize = uidVec.size();
std::unique(uidVec.begin(), uidVec.end(),
[](const IdxUid& a, const IdxUid& b) { return a.second == b.second; });
ATLAS_ASSERT(uidVec.size() == vecSize, "Unique ID set has duplicate members");
auto first_duplicate = std::adjacent_find(
uidVec.begin(), uidVec.end(), [](const IdxUid& a, const IdxUid& b) { return a.second == b.second; });
ATLAS_ASSERT(uidVec.end() == first_duplicate, "Unique ID set has duplicate members");
}

return uidVec;
Expand Down
Loading