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

54 lines
1.7 KiB
C++

#ifndef FESA_RESULTS_THERMAL_RESULT_RECORDS_H_
#define FESA_RESULTS_THERMAL_RESULT_RECORDS_H_
#include <array>
#include <cstdint>
#include <optional>
#include <vector>
#include "fesa/core/source_identity.h"
#include "fesa/math/vector.h"
#include "fesa/math/vector3.h"
namespace fesa {
/// @brief Identifies a prescribed temperature by Domain node and source DOF
/// 11/15.
struct ThermalReactionDof {
EntityIndex node;
int source_dof;
};
/// @brief Holds four CCW surface points times six ordered global flux traces.
/// @note Row=6*point+trace; traces are -1+, -.5, 0-, 0+, .5, 1-.
using ThermalElementFlux = std::array<Vector3, 24>;
/// @brief Holds R columns e1,e2,n at each of four CCW surface points.
using ThermalElementFrames = std::array<std::array<Vector3, 3>, 4>;
/// @brief Holds recovery present only at completed increments, including P=0.
struct ThermalCompletedPayload {
std::vector<ThermalReactionDof> reaction_dofs;
Vector reaction_heat_rate{0U}; // Power, positive into the model.
std::vector<EntityIndex> element_order;
std::vector<ThermalElementFlux> global_heat_flux; // Power/area.
};
/// @brief Carries an initial or completed thermal frame with explicit row
/// mapping.
/// @note Source identities are resolved through the state's immutable
/// inventory.
struct ThermalAcceptedFrame {
std::uint64_t frame_index = 0U;
std::uint64_t increment_index = 0U;
double time = 0;
double time_increment = 0;
bool is_initial = true;
std::vector<EntityIndex> node_order;
Vector temperature{
0U}; // Node-major, source DOFs 11..15; signed temperature.
std::optional<ThermalCompletedPayload> completed;
};
} // namespace fesa
#endif // FESA_RESULTS_THERMAL_RESULT_RECORDS_H_