완성된 HHT trial의 constraint 자료 중복 평가 제거
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#define FESA_ANALYSIS_HHT_DYNAMIC_INTERNAL_H_
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
@@ -10,6 +12,8 @@
|
||||
#include "fesa/elements/nonlinear_mitc4_inertia.h"
|
||||
#include "fesa/elements/nonlinear_mitc4_shell.h"
|
||||
#include "fesa/math/sparse_matrix.h"
|
||||
#include "elements/nonlinear_mitc4_configuration_internal.h"
|
||||
#include "math/dense_blas_internal.h"
|
||||
|
||||
namespace fesa {
|
||||
class LinearSolver;
|
||||
@@ -25,6 +29,49 @@ struct RuntimeShell {
|
||||
NonlinearMitc4Inertia inertia;
|
||||
};
|
||||
|
||||
/// @brief Captures only controls used by the current MSVC x64 local evaluator.
|
||||
struct TrialEvaluationContext {
|
||||
int rounding{-1};
|
||||
unsigned int mxcsr_control{0U};
|
||||
dense_blas_internal::LocalDensePolicy dense_policy{0, -1};
|
||||
bool supported{false};
|
||||
};
|
||||
|
||||
/// @brief Queries metadata without changing FP controls or the restored TLS.
|
||||
TrialEvaluationContext ReadTrialEvaluationContext() noexcept;
|
||||
|
||||
/// @brief Allows only masked, stable, single-worker nondynamic local policy.
|
||||
bool ReusableTrialContext(const TrialEvaluationContext& before,
|
||||
const TrialEvaluationContext& after) noexcept;
|
||||
|
||||
/// @brief Owns only complete directional constraint data for one local trial.
|
||||
struct DirectionalShellConstraintData {
|
||||
EntityIndex element_index{0U};
|
||||
std::array<std::size_t, 24> scatter{};
|
||||
std::array<SourceEntityId, 4> node_source_ids{};
|
||||
nonlinear_mitc4_internal::ConfigurationSnapshot configuration;
|
||||
std::array<double, 24> q{};
|
||||
std::array<double, 24> v{};
|
||||
TrialEvaluationContext evaluation_context;
|
||||
bool directional_internal{false};
|
||||
Vector drilling_constraint{0U};
|
||||
Matrix drilling_constraint_gradient{0U, 0U};
|
||||
std::array<Matrix, 4> drilling_constraint_hessian{
|
||||
Matrix{0U, 0U}, Matrix{0U, 0U}, Matrix{0U, 0U}, Matrix{0U, 0U}};
|
||||
std::array<Vector, 4> drilling_constraint_third_directional_gradient{
|
||||
Vector{0U}, Vector{0U}, Vector{0U}, Vector{0U}};
|
||||
};
|
||||
|
||||
/// @brief Travels with one complete assembly, never accepted frame/history.
|
||||
struct TrialConstraintData {
|
||||
std::filesystem::path source_path;
|
||||
double time{0.0};
|
||||
std::uint32_t frame_index{0U};
|
||||
std::uint32_t increment_index{0U};
|
||||
std::uint32_t iteration_count{0U};
|
||||
std::vector<DirectionalShellConstraintData> shells;
|
||||
};
|
||||
|
||||
/// @brief Stores a complete trial with independently assembled operators.
|
||||
struct DynamicAssembly {
|
||||
DynamicAcceptedFrameState frame;
|
||||
@@ -43,6 +90,7 @@ struct DynamicAssembly {
|
||||
Vector hidden_second_scale{0U};
|
||||
// Canonical scalar drilling-constraint derivative, indexed by global node.
|
||||
std::optional<SparseMatrix> hidden_gradient;
|
||||
std::optional<TrialConstraintData> trial_constraints;
|
||||
};
|
||||
|
||||
/// @brief Builds checked shell evaluators in stable source order.
|
||||
|
||||
Reference in New Issue
Block a user