#include "results/recovery_candidate.h" #include #include namespace fesa::results_internal { RecoveryCandidate::RecoveryCandidate(const std::size_t full_dof_count) : displacement{full_dof_count}, external_force{full_dof_count}, internal_force{full_dof_count}, residual{full_dof_count}, reaction{full_dof_count} {} Status RecoveryFailure(const std::string& code, const SourceLocation& location, const std::string& identity, const std::string& message) { return Status::Failure(FailureCategory::kModel, {{Severity::kError, code, location, "RESULT_RECOVERY", 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 IsFiniteVector(const Vector& values) { for (std::size_t index = 0U; index < values.Size(); ++index) { if (!std::isfinite(values[index])) { return false; } } return true; } } // namespace fesa::results_internal