Integrate Refactor solver sources and dual MSVC CMake builds

This commit is contained in:
KOKO\Mimi
2026-10-18 02:10:51 +09:00
parent 7ee32e5837
commit 12d51480de
218 changed files with 17842 additions and 9689 deletions
+7 -12
View File
@@ -27,11 +27,6 @@ using U = std::vector<std::uint64_t>;
using B = std::vector<std::uint8_t>;
using D = std::vector<double>;
using S = std::vector<std::string>;
std::vector<double> Values(const Vector& vector) {
D result;
for (std::size_t i = 0; i < vector.Size(); ++i) result.push_back(vector[i]);
return result;
}
void Parent(hid_t file, const std::string& path) {
const auto parent = path.substr(0, path.find_last_of('/'));
if (!parent.empty() && H5Lexists(file, parent.c_str(), H5P_DEFAULT) <= 0)
@@ -110,11 +105,11 @@ void FrameData(SolidPlan& plan, const Domain& domain, std::size_t frame,
value.doubles = {{dynamic ? "time" : "load_factor", coordinate}};
plan.datasets.push_back(std::move(value));
};
add(Data(root + "/nodal/displacement", {n, 3}, Values(u), "U1,U2,U3",
add(Data(root + "/nodal/displacement", {n, 3}, CopyVectorValues(u), "U1,U2,U3",
"length", "nodal"));
add(Data(root + "/nodal/reaction", {n, 3}, Values(rf), "RF1,RF2,RF3", "force",
add(Data(root + "/nodal/reaction", {n, 3}, CopyVectorValues(rf), "RF1,RF2,RF3", "force",
"nodal"));
add(Data(root + "/nodal/residual", {n, 3}, Values(r), "R1,R2,R3", "force",
add(Data(root + "/nodal/residual", {n, 3}, CopyVectorValues(r), "R1,R2,R3", "force",
"nodal"));
D stress, strain;
Check(points.size() == 8 * e, "Solid point count is invalid.");
@@ -249,7 +244,7 @@ void Model(SolidPlan& plan, const Domain& domain, const DofManager& dofs) {
for (std::size_t i = 0; i < domain.Elements().Size(); ++i) {
auto element = factory.Create(domain.Elements()[i], domain);
Check(element.HasValue(), "Solid factory reference failed.");
const auto* hex = dynamic_cast<const Hex8Element*>(element.Value().get());
auto hex = factory.BindSolidTrial(*element.Value());
Check(hex != nullptr, "Solid kernel identity failed.");
auto response = hex->EvaluateLinear(Vector{24});
Check(response.HasValue(), "Solid reference recovery failed.");
@@ -426,15 +421,15 @@ Result<SolidPlan> BuildSolidPlan(const Domain& domain, SolidStateView view,
plan.datasets.push_back(std::move(data));
};
add(Data(root + "/nodal/velocity", {domain.Nodes().size(), 3},
Values(frame.velocity), "V1,V2,V3", "length/time", "nodal"));
CopyVectorValues(frame.velocity), "V1,V2,V3", "length/time", "nodal"));
auto a = Data(root + "/nodal/acceleration", {domain.Nodes().size(), 3},
Values(frame.acceleration), "A1,A2,A3", "length/time^2",
CopyVectorValues(frame.acceleration), "A1,A2,A3", "length/time^2",
"nodal");
a.strings["acceleration_kind"] = "physical";
add(std::move(a));
a = Data(root + "/nodal/algorithmic_acceleration",
{domain.Nodes().size(), 3},
Values(frame.algorithmic_acceleration), "A1,A2,A3",
CopyVectorValues(frame.algorithmic_acceleration), "A1,A2,A3",
"length/time^2", "nodal");
a.strings["acceleration_kind"] = "algorithmic";
add(std::move(a));