feat(equation-and-linear-solve): step 0 — symmetric-csr-assembly
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <fesa/assembly/symmetric_csr.hpp>
|
||||
|
||||
namespace fesa {
|
||||
|
||||
struct EquationSystem final {
|
||||
SymmetricCsr stiffness;
|
||||
std::vector<double> force;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <fesa/assembly/equation_system.hpp>
|
||||
#include <fesa/fem/dof_manager.hpp>
|
||||
#include <fesa/model/domain.hpp>
|
||||
|
||||
namespace fesa {
|
||||
|
||||
[[nodiscard]] EquationSystem assemble_serial(
|
||||
const Domain& domain,
|
||||
const DofManager& dofs);
|
||||
|
||||
} // namespace fesa
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
namespace fesa {
|
||||
|
||||
// Zero-based CSR containing only the upper triangle. Column indices are
|
||||
// strictly increasing within each row.
|
||||
struct SymmetricCsr final {
|
||||
std::size_t order;
|
||||
std::vector<std::int32_t> row_offsets;
|
||||
std::vector<std::int32_t> column_indices;
|
||||
std::vector<double> values;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
Reference in New Issue
Block a user