Files
FESADev/include/fesa/results/result_records.h
T

87 lines
2.4 KiB
C++

#ifndef FESA_RESULTS_RESULT_RECORDS_H_
#define FESA_RESULTS_RESULT_RECORDS_H_
#include <array>
#include <cstddef>
#include <string>
#include <vector>
#include "fesa/model/model_types.h"
namespace fesa {
/// @brief Identifies one deterministic result frame.
struct StepFrameIdentity {
std::string step_name;
std::size_t frame_index;
};
/// @brief Stores one beam endpoint action and section-resultant row.
struct EndpointResultRow {
EntityIndex element;
int endpoint;
SourceEntityId node;
std::array<double, 6> end_action;
std::array<double, 4> section_resultant;
};
/// @brief Stores one beam Gauss generalized result row.
struct GaussResultRow {
EntityIndex element;
int gauss_point;
std::array<double, 4> generalized_strain;
std::array<double, 4> generalized_resultant;
};
/// @brief Stores one beam axial-stress section-point row.
struct StressS11Row {
EntityIndex element;
int gauss_point;
std::size_t section_point;
double x1;
double x2;
double s11;
std::string source;
};
/// @brief Identifies one MITC4 midsurface integration location.
enum class ShellMidsurfaceLocation { kGp1, kGp2, kGp3, kGp4 };
/// @brief Identifies one through-thickness shell recovery position.
enum class ShellSectionPosition { kBottom, kMiddle, kTop };
/// @brief Stores one through-thickness shell stress row.
struct ShellSectionStressRow {
ShellSectionPosition position;
double zeta;
std::array<double, 3> components;
};
/// @brief Stores one MITC4 physical recovery row.
struct ShellResultRow {
EntityIndex element;
ShellMidsurfaceLocation location;
std::array<double, 2> natural_coordinates;
// Axis rows [e1,e2,e3], global-component columns.
std::array<std::array<double, 3>, 3> local_frame;
std::array<double, 8> generalized_strain;
std::array<double, 8> section_resultant;
// Fixed BOTTOM, MIDDLE, TOP order; components are [S11,S22,S12].
std::array<ShellSectionStressRow, 3> stress;
};
/// @brief Carries a complete shell result candidate for atomic validation.
struct ShellStateCandidate {
std::vector<ShellResultRow> rows;
double physical_strain_energy{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> verification_metrics{};
};
} // namespace fesa
#endif // FESA_RESULTS_RESULT_RECORDS_H_