feat(cpp-object-oriented-modular-refactoring): step 18 - load-hierarchy
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
namespace fesa {
|
||||
|
||||
Result<AnalysisModel> AnalysisModel::Create(const Domain& domain) {
|
||||
if (domain.Steps().empty()) {
|
||||
if (domain.Steps().Empty()) {
|
||||
return Result<AnalysisModel>::Failure(
|
||||
Status::Failure(FailureCategory::kInput,
|
||||
{{Severity::kError,
|
||||
@@ -16,12 +16,12 @@ Result<AnalysisModel> AnalysisModel::Create(const Domain& domain) {
|
||||
"0",
|
||||
"AnalysisModel requires exactly one static step."}}));
|
||||
}
|
||||
if (domain.Steps().size() > 1U) {
|
||||
if (domain.Steps().Size() > 1U) {
|
||||
const auto& second_step = domain.Steps()[1];
|
||||
return Result<AnalysisModel>::Failure(
|
||||
Status::Failure(FailureCategory::kInput,
|
||||
{{Severity::kError, "unsupported-multiple-step",
|
||||
second_step.location, "STEP", second_step.name,
|
||||
second_step.Location(), "STEP", second_step.Name(),
|
||||
"AnalysisModel does not support multiple steps."}}));
|
||||
}
|
||||
return Result<AnalysisModel>::Success(AnalysisModel{domain});
|
||||
@@ -29,8 +29,8 @@ Result<AnalysisModel> AnalysisModel::Create(const Domain& domain) {
|
||||
|
||||
const Domain& AnalysisModel::GetDomain() const noexcept { return *domain_; }
|
||||
|
||||
const StaticStepDefinition& AnalysisModel::Step() const noexcept {
|
||||
return domain_->Steps().front();
|
||||
const StepDefinition& AnalysisModel::Step() const noexcept {
|
||||
return domain_->Steps()[0U];
|
||||
}
|
||||
|
||||
const std::vector<EntityIndex>& AnalysisModel::ActiveElements() const noexcept {
|
||||
@@ -101,10 +101,10 @@ AnalysisModel::AnalysisModel(const Domain& domain) : domain_{&domain} {
|
||||
}
|
||||
}
|
||||
|
||||
for (std::size_t index = 0U; index < Step().boundaries.size(); ++index) {
|
||||
for (std::size_t index = 0U; index < Step().Boundaries().size(); ++index) {
|
||||
active_boundary_conditions_.push_back(static_cast<EntityIndex>(index));
|
||||
}
|
||||
for (std::size_t index = 0U; index < Step().loads.size(); ++index) {
|
||||
for (std::size_t index = 0U; index < Step().Loads().size(); ++index) {
|
||||
active_loads_.push_back(static_cast<EntityIndex>(index));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user