feat: add analysis model objects

This commit is contained in:
김경종
2026-06-09 09:04:21 +09:00
parent fdeac602f4
commit 8f24213ab7
44 changed files with 1893 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
#include "fesa/boundary/BoundaryCondition.hpp"
#include "fesa/boundary/SinglePointConstraint.hpp"
#include <memory>
namespace {
int require(bool condition) {
return condition ? 0 : 1;
}
} // namespace
int run_boundary_base_tests() {
std::unique_ptr<fesa::boundary::BoundaryCondition> owned =
std::make_unique<fesa::boundary::SinglePointConstraint>(1, fesa::core::Dof::UR3, 0.25);
const fesa::boundary::BoundaryCondition& boundary = *owned;
const auto& spc = static_cast<const fesa::boundary::SinglePointConstraint&>(boundary);
if (const int result = require(boundary.kind() == fesa::boundary::BoundaryConditionKind::SinglePointConstraint);
result != 0) {
return result;
}
if (const int result = require(spc.nodeId() == 1); result != 0) {
return result;
}
if (const int result = require(spc.dof() == fesa::core::Dof::UR3); result != 0) {
return result;
}
return require(spc.value() == 0.25);
}