Files
FESADev/include/fesa/properties/general_beam_section.h
T

84 lines
3.3 KiB
C++

#ifndef FESA_PROPERTIES_GENERAL_BEAM_SECTION_H_
#define FESA_PROPERTIES_GENERAL_BEAM_SECTION_H_
#include <array>
#include <string>
#include <vector>
#include "fesa/core/status.h"
#include "fesa/properties/element_property.h"
namespace fesa {
/// @brief Stores the approved general Euler-beam section properties.
class GeneralBeamSection final : public ElementProperty {
public:
/// @brief Creates a validated general beam section.
/// @param first_axis Abaqus first section axis in global coordinates.
/// @param section_points Optional section-point coordinates `(x1,x2)`.
/// @return A section or a structured model failure.
static Result<GeneralBeamSection> Create(
SourceEntityId source_id, std::string name, double area, double i11,
double i12, double i22, double torsional_constant,
std::array<double, 3> first_axis,
std::vector<std::array<double, 2>> section_points,
SourceLocation location);
/// @brief Constructs an already validated parser-owned section record.
/// @note This compatibility seam preserves current consumers until Domain
/// polymorphic ownership is migrated.
GeneralBeamSection(std::string name, double area, double i11, double i12,
double i22, double torsional_constant,
std::array<double, 3> first_axis,
std::vector<std::array<double, 2>> section_points,
SourceLocation location);
ElementPropertyKind Kind() const noexcept override;
const SourceEntityId& SourceId() const noexcept override;
const SourceLocation& Location() const noexcept override;
/// @brief Returns the source section name.
const std::string& Name() const noexcept;
/// @brief Returns cross-sectional area.
double Area() const noexcept;
/// @brief Returns the first principal section inertia input.
double I11() const noexcept;
/// @brief Returns the cross-bending inertia, which is exactly zero in V0.
double I12() const noexcept;
/// @brief Returns the second principal section inertia input.
double I22() const noexcept;
/// @brief Returns the Saint-Venant torsional constant.
double TorsionalConstant() const noexcept;
/// @brief Returns the Abaqus first section axis in global coordinates.
const std::array<double, 3>& FirstAxis() const noexcept;
/// @brief Returns optional section points in source order.
const std::vector<std::array<double, 2>>& SectionPoints() const noexcept;
// Public storage preserves the current semantic-record API until Domain
// ownership migrates in the next approved Step.
std::string name;
double area;
double i11;
double i12;
double i22;
double torsional_constant;
std::array<double, 3> first_axis;
std::vector<std::array<double, 2>> section_points;
SourceLocation location;
private:
/// @brief Constructs a candidate whose fields have already been checked.
GeneralBeamSection(SourceEntityId source_id, std::string name, double area,
double i11, double i12, double i22,
double torsional_constant,
std::array<double, 3> first_axis,
std::vector<std::array<double, 2>> section_points,
SourceLocation location);
SourceEntityId source_id_;
};
} // namespace fesa
#endif // FESA_PROPERTIES_GENERAL_BEAM_SECTION_H_