feat(linear-static-mitc4-shell): step 9 - shell-analysis-state

This commit is contained in:
KOKO\Mimi
2026-08-12 20:46:40 +09:00
parent 0a1ef59b41
commit 8c776fe6e2
4 changed files with 457 additions and 0 deletions
+14
View File
@@ -1,9 +1,11 @@
#pragma once
#include "fesa/core/status.hpp"
#include "fesa/fem/dof_manager.hpp"
#include "fesa/math/vector.hpp"
#include "fesa/results/result_records.hpp"
#include <array>
#include <cstddef>
#include <vector>
@@ -32,6 +34,13 @@ public:
const std::vector<GaussResultRow>& gaussResults() const noexcept;
std::vector<StressS11Row>& stressResults() noexcept;
const std::vector<StressS11Row>& stressResults() const noexcept;
Status commitShellResults(
const std::vector<EntityIndex>& expectedElementOrder,
ShellStateCandidate candidate);
const std::vector<ShellResultRow>& shellResults() const noexcept;
double physicalStrainEnergy() const noexcept;
const std::array<double, 6>& equilibrium() const noexcept;
const std::array<double, 3>& verificationMetrics() const noexcept;
private:
AnalysisState(std::size_t fullDofCount, StepFrameIdentity identity);
@@ -47,6 +56,11 @@ private:
std::vector<EndpointResultRow> endpointResults_;
std::vector<GaussResultRow> gaussResults_;
std::vector<StressS11Row> stressResults_;
// Shell recovery is replaced only through validated candidate commit.
std::vector<ShellResultRow> shellResults_;
double physicalStrainEnergy_{0.0};
std::array<double, 6> equilibrium_{};
std::array<double, 3> verificationMetrics_{};
};
} // namespace fesa
+42
View File
@@ -5,6 +5,7 @@
#include <array>
#include <cstddef>
#include <string>
#include <vector>
namespace fesa {
@@ -38,4 +39,45 @@ struct StressS11Row {
std::string source;
};
enum class ShellMidsurfaceLocation {
gp1,
gp2,
gp3,
gp4
};
enum class ShellSectionPosition {
bottom,
middle,
top
};
struct ShellSectionStressRow {
ShellSectionPosition position;
double zeta;
std::array<double, 3> components;
};
struct ShellResultRow {
EntityIndex element;
ShellMidsurfaceLocation location;
std::array<double, 2> naturalCoordinates;
// Axis rows [e1,e2,e3], global-component columns.
std::array<std::array<double, 3>, 3> localFrame;
std::array<double, 8> generalizedStrain;
std::array<double, 8> sectionResultant;
// Fixed BOTTOM, MIDDLE, TOP order; components are [S11,S22,S12].
std::array<ShellSectionStressRow, 3> stress;
};
struct ShellStateCandidate {
std::vector<ShellResultRow> rows;
double physicalStrainEnergy{0.0};
// [FORCE_1,FORCE_2,FORCE_3,MOMENT_1,MOMENT_2,MOMENT_3].
std::array<double, 6> equilibrium{};
// [FREE_RESIDUAL_NORMALIZED,FORCE_BALANCE_NORMALIZED,
// MOMENT_BALANCE_NORMALIZED].
std::array<double, 3> verificationMetrics{};
};
} // namespace fesa