#pragma once #include "fesa/Core/Types.hpp" #include #include #include #include namespace fesa { enum class Dof : int { UX = 0, UY = 1, UZ = 2, RX = 3, RY = 4, RZ = 5 }; inline std::array allDofs() { return {Dof::UX, Dof::UY, Dof::UZ, Dof::RX, Dof::RY, Dof::RZ}; } inline int dofIndex(Dof dof) { return static_cast(dof); } inline int abaqusDofNumber(Dof dof) { return dofIndex(dof) + 1; } inline std::optional dofFromAbaqus(int dof) { if (dof < 1 || dof > 6) { return std::nullopt; } return static_cast(dof - 1); } inline const char* dofLabel(Dof dof) { switch (dof) { case Dof::UX: return "UX"; case Dof::UY: return "UY"; case Dof::UZ: return "UZ"; case Dof::RX: return "RX"; case Dof::RY: return "RY"; case Dof::RZ: return "RZ"; } return ""; } inline std::vector displacementComponentLabels() { return {"UX", "UY", "UZ", "RX", "RY", "RZ"}; } inline std::vector reactionComponentLabels() { return {"RFX", "RFY", "RFZ", "RMX", "RMY", "RMZ"}; } } // namespace fesa