49 lines
1.7 KiB
C++
49 lines
1.7 KiB
C++
#ifndef FESA_CONSTRAINTS_PRESCRIBED_DISPLACEMENT_H_
|
|
#define FESA_CONSTRAINTS_PRESCRIBED_DISPLACEMENT_H_
|
|
|
|
#include <cstddef>
|
|
|
|
#include "fesa/constraints/boundary_condition.h"
|
|
#include "fesa/core/diagnostic.h"
|
|
#include "fesa/elements/element.h"
|
|
#include "fesa/model/source_target_resolver.h"
|
|
|
|
namespace fesa {
|
|
|
|
/// @brief Emits one prescribed nodal displacement component for a target.
|
|
class PrescribedDisplacementBoundaryCondition final : public BoundaryCondition {
|
|
public:
|
|
/// @brief Creates one prescribed component in stable source order.
|
|
PrescribedDisplacementBoundaryCondition(SourceTargetQuery target,
|
|
DofComponent component,
|
|
double prescribed_value,
|
|
std::size_t source_order,
|
|
SourceLocation location = {});
|
|
|
|
/// @brief Resolves target-major full-DOF constraint definitions.
|
|
Result<std::vector<ConstraintDefinition>> ResolveConstraints(
|
|
const BoundaryConditionContext& context) const override;
|
|
|
|
/// @brief Returns the immutable source target query.
|
|
const SourceTargetQuery& Target() const noexcept;
|
|
|
|
/// @brief Returns the prescribed global DOF component.
|
|
DofComponent Component() const noexcept;
|
|
|
|
/// @brief Returns the exact prescribed displacement value.
|
|
double PrescribedValue() const noexcept;
|
|
|
|
/// @brief Returns the stable boundary-definition order.
|
|
std::size_t SourceOrder() const noexcept;
|
|
|
|
private:
|
|
SourceTargetQuery target_;
|
|
DofComponent component_;
|
|
double prescribed_value_;
|
|
std::size_t source_order_;
|
|
};
|
|
|
|
} // namespace fesa
|
|
|
|
#endif // FESA_CONSTRAINTS_PRESCRIBED_DISPLACEMENT_H_
|