feat(cpp-object-oriented-modular-refactoring): step 14 - runtime-element-factory
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/core/status.h"
|
||||
#include "fesa/elements/element.h"
|
||||
#include "fesa/elements/element_definition.h"
|
||||
#include "fesa/materials/isotropic_linear_elastic_material.h"
|
||||
#include "fesa/math/matrix.h"
|
||||
@@ -114,7 +115,7 @@ struct Mitc4PhysicalRecovery {
|
||||
|
||||
/// @brief Implements the approved small-rotation FESA-MITC4 shell kernel.
|
||||
/// @note Physical and numerical drilling contributions remain separate.
|
||||
class Mitc4Shell {
|
||||
class Mitc4Shell final : public Element {
|
||||
public:
|
||||
/// @brief Creates a validated shell kernel from four non-owning node
|
||||
/// pointers.
|
||||
@@ -128,6 +129,16 @@ class Mitc4Shell {
|
||||
std::array<std::array<double, 3>, 4> initial_directors,
|
||||
const ShellSection& section, const LinearElasticMaterial& material);
|
||||
|
||||
/// @brief Returns the factory-bound MITC4 DOF order.
|
||||
const ElementDofLayout& DofLayout() const noexcept override;
|
||||
|
||||
/// @brief Computes stabilized MITC4 stiffness through the runtime contract.
|
||||
Result<ElementStiffnessContribution> ComputeStiffness() const override;
|
||||
|
||||
/// @brief Recovers physical MITC4 rows through the runtime contract.
|
||||
Result<ElementResultBundle> Recover(
|
||||
const Vector& element_displacement) const override;
|
||||
|
||||
/// @brief Evaluates bilinear shape functions and derivatives.
|
||||
static Mitc4ShapeFunctions ShapeFunctions(double xi, double eta) noexcept;
|
||||
|
||||
@@ -183,6 +194,12 @@ class Mitc4Shell {
|
||||
const Vector& global_element_displacement24) const;
|
||||
|
||||
private:
|
||||
friend class ElementFactory;
|
||||
|
||||
/// @brief Binds Domain identity after the numerical candidate is valid.
|
||||
void BindRuntime(ElementDofLayout layout, EntityIndex element_index,
|
||||
SourceLocation location);
|
||||
|
||||
/// @brief Stores covariant, reciprocal, frame, and Jacobian data at one
|
||||
/// point.
|
||||
struct GeometryData {
|
||||
@@ -221,6 +238,9 @@ class Mitc4Shell {
|
||||
double poisson_ratio_;
|
||||
SourceLocation source_location_;
|
||||
std::string identity_;
|
||||
ElementDofLayout dof_layout_;
|
||||
EntityIndex element_index_{0U};
|
||||
SourceLocation runtime_location_;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
Reference in New Issue
Block a user