feat(deterministic-parallel-assembly): step 0 — canonical-contribution-order
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <span>
|
||||
#include <vector>
|
||||
|
||||
#include <fesa/assembly/symmetric_csr.hpp>
|
||||
#include <fesa/model/ids.hpp>
|
||||
|
||||
namespace fesa {
|
||||
|
||||
struct MatrixContribution final {
|
||||
std::size_t row;
|
||||
std::size_t column;
|
||||
ElementId element;
|
||||
std::uint16_t local_order;
|
||||
double value;
|
||||
};
|
||||
|
||||
[[nodiscard]] std::vector<MatrixContribution> canonicalize_contributions(
|
||||
std::span<const MatrixContribution> contributions);
|
||||
|
||||
[[nodiscard]] SymmetricCsr merge_contributions(
|
||||
std::size_t order,
|
||||
std::span<const MatrixContribution> canonical);
|
||||
|
||||
} // namespace fesa
|
||||
Reference in New Issue
Block a user