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
+33 -10
View File
@@ -13,11 +13,15 @@
#include "fesa/core/source_identity.h"
#include "fesa/core/status.h"
#include "fesa/math/vector.h"
#include "fesa/model/domain.h"
#include "io/hdf5/hdf5_raii.h"
#include "math/finite_values.h"
namespace fesa::hdf5_internal {
using math_internal::IsFinite;
inline constexpr std::size_t kDofsPerNode = 6U;
inline constexpr std::size_t kEndpointCount = 2U;
inline constexpr std::size_t kGaussPointCount = 2U;
@@ -64,16 +68,11 @@ Status OutputFailure(const std::string& code, const std::string& message);
/// @brief Tests exact preserved source identity.
bool SameIdentity(const SourceEntityId& left, const SourceEntityId& right);
/// @brief Tests a fixed component record for finite values.
template <std::size_t Size>
bool IsFinite(const std::array<double, Size>& values) {
for (const double value : values) {
if (!std::isfinite(value)) {
return false;
}
}
return true;
}
/// @brief Appends source-ordered reference directors and a,b,d frame columns.
/// @note Callers retain allocation, schema, write/readback and failure ownership.
void AppendShellReferenceFrames(const Domain& domain,
std::vector<double>& directors,
std::vector<double>& frames);
/// @brief Validates UTF-8 without accepting overlong or surrogate encodings.
bool IsValidUtf8(const std::string& value);
@@ -93,6 +92,25 @@ std::string NormalizedPathString(const std::filesystem::path& path);
/// @brief Returns schema-v0 source path and content identity metadata.
std::string SourceInputIdentity(const Domain& domain);
/// @brief Copies validated vector values in their existing component order.
std::vector<double> CopyVectorValues(const Vector& source);
/// @brief Flattens global nodal A,B,D axes in stable node/axis/component order.
std::vector<double> FlattenNodalTriads(
const std::vector<std::array<std::array<double, 3>, 3>>& triads);
/// @brief Flattens global nodal directors in stable node/component order.
std::vector<double> FlattenNodalDirectors(
const std::vector<std::array<double, 3>>& directors);
/// @brief Preserves force rows and maps generalized moments to spatial moments.
/// @pre Both six-DOF vectors and node_count were validated by the typed writer.
/// @note Rotation entries are at offsets 3..5; conversion uses J^T m = q.
/// @throws std::runtime_error when the existing spatial-moment solve fails.
std::vector<double> SpatialReactionValues(const Vector& rotation,
const Vector& reaction,
std::size_t node_count);
Hdf5Handle MakeUtf8StringType();
void WriteStringAttribute(hid_t object, const char* name,
const std::string& value);
@@ -101,6 +119,11 @@ void WriteUint8Attribute(hid_t object, const char* name, std::uint8_t value);
void WriteDoubleAttribute(hid_t object, const char* name, double value);
Hdf5Handle CreateGroup(hid_t file, const char* path);
Hdf5Handle CreateDatasetSpace(const std::vector<hsize_t>& dimensions);
/// @brief Writes quantity identity attributes, without family/frame metadata.
void WriteQuantityAttributes(hid_t dataset, const std::string& component_names,
const std::string& component_units,
const std::string& coordinate_system,
const std::string& location);
void WriteResultAttributes(hid_t dataset, const std::string& component_names,
const std::string& component_units,
const std::string& coordinate_system,