Integrate Refactor solver sources and dual MSVC CMake builds
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/analysis/analysis_model.h"
|
||||
#include "fesa/elements/element.h"
|
||||
#include "fesa/model/source_target_resolver.h"
|
||||
|
||||
namespace fesa {
|
||||
@@ -26,13 +28,6 @@ Status DofFailure(const std::string& code, const SourceLocation& location,
|
||||
{{Severity::kError, code, location, "DOF_MANAGER", identity, message}});
|
||||
}
|
||||
|
||||
bool SameSourceIdentity(const SourceEntityId& left,
|
||||
const SourceEntityId& right) {
|
||||
return left.instance_name == right.instance_name &&
|
||||
left.source_label == right.source_label &&
|
||||
left.source_label_text == right.source_label_text;
|
||||
}
|
||||
|
||||
bool IsStrictlyIncreasing(const std::vector<std::size_t>& values) {
|
||||
return std::adjacent_find(
|
||||
values.begin(), values.end(),
|
||||
@@ -220,7 +215,7 @@ Status DofManager::BuildThermal(
|
||||
candidate.element_scatters_.reserve(layouts.size());
|
||||
for (std::size_t index = 0U; index < layouts.size(); ++index) {
|
||||
const auto& definition = domain.ThermalElements()[index];
|
||||
if (!SameSourceIdentity(layouts[index].source_id, definition.SourceId())) {
|
||||
if (!SourceIdentityEquals(layouts[index].source_id, definition.SourceId())) {
|
||||
return DofFailure(
|
||||
"invalid-element-layout-order", {domain.SourcePath(), 0U},
|
||||
std::to_string(index), "Thermal layout identity changed source order.");
|
||||
@@ -323,7 +318,7 @@ Status DofManager::BuildLayouts(const AnalysisModel& analysis_model,
|
||||
}
|
||||
}
|
||||
if (definition_index >= domain.Elements().Size() ||
|
||||
!SameSourceIdentity(layouts[source_order].source_id,
|
||||
!SourceIdentityEquals(layouts[source_order].source_id,
|
||||
domain.Elements()[definition_index].SourceId())) {
|
||||
return DofFailure(
|
||||
"invalid-element-layout-order", {domain.SourcePath(), 0U},
|
||||
|
||||
Reference in New Issue
Block a user