37 lines
1.2 KiB
C++
37 lines
1.2 KiB
C++
#ifndef FESA_ELEMENTS_ELEMENT_FACTORY_H_
|
|
#define FESA_ELEMENTS_ELEMENT_FACTORY_H_
|
|
|
|
#include <memory>
|
|
|
|
#include "fesa/core/status.h"
|
|
#include "fesa/elements/element.h"
|
|
|
|
namespace fesa {
|
|
|
|
class Domain;
|
|
class ElementDefinition;
|
|
|
|
/// @brief Creates checked numerical elements from Domain-owned definitions.
|
|
class ElementFactory {
|
|
public:
|
|
/// @brief Creates the supported runtime kernel for one semantic definition.
|
|
/// @param definition Definition owned by domain for the returned operation.
|
|
/// @param domain Immutable owner of referenced nodes, property, and material.
|
|
/// @return A non-null element or a structured model failure.
|
|
Result<std::unique_ptr<Element>> Create(const ElementDefinition& definition,
|
|
const Domain& domain) const;
|
|
|
|
private:
|
|
/// @brief Creates one checked B33 runtime candidate.
|
|
Result<std::unique_ptr<Element>> CreateBeam(
|
|
const ElementDefinition& definition, const Domain& domain) const;
|
|
|
|
/// @brief Creates one checked MITC4 runtime candidate.
|
|
Result<std::unique_ptr<Element>> CreateShell(
|
|
const ElementDefinition& definition, const Domain& domain) const;
|
|
};
|
|
|
|
} // namespace fesa
|
|
|
|
#endif // FESA_ELEMENTS_ELEMENT_FACTORY_H_
|