Integrate Refactor solver sources and dual MSVC CMake builds
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#ifndef FESA_ANALYSIS_ANALYSIS_PROCEDURE_H_
|
||||
#define FESA_ANALYSIS_ANALYSIS_PROCEDURE_H_
|
||||
|
||||
#include "fesa/analysis/prepared_analysis_outcome.h"
|
||||
#include "fesa/core/status.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
class Domain;
|
||||
|
||||
/// @brief Executes one prepared Domain without opening result files.
|
||||
/// @note The Domain and injected adapters outlive Execute. Accepted histories
|
||||
/// remain procedure-specific and are returned only after validation.
|
||||
class AnalysisProcedure {
|
||||
public:
|
||||
virtual ~AnalysisProcedure() = default;
|
||||
/// @brief Returns the original typed completed payload or first failure.
|
||||
virtual Result<PreparedAnalysisOutcome> Execute(const Domain& domain) = 0;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_ANALYSIS_ANALYSIS_PROCEDURE_H_
|
||||
@@ -6,12 +6,13 @@
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/core/status.h"
|
||||
#include "fesa/fem/dof_manager.h"
|
||||
#include "fesa/math/vector.h"
|
||||
#include "fesa/results/result_records.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
class DofManager;
|
||||
|
||||
/// @brief Owns mutable quantities required by the V0 linear-static frame.
|
||||
class AnalysisState {
|
||||
public:
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef FESA_ANALYSIS_DYNAMIC_EXECUTION_RESULT_H_
|
||||
#define FESA_ANALYSIS_DYNAMIC_EXECUTION_RESULT_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/analysis/dynamic_analysis_state.h"
|
||||
#include "fesa/core/diagnostic.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
/// @brief Stores a complete HHT history before atomic result finalization.
|
||||
struct DynamicExecutionResult {
|
||||
DynamicAnalysisState state;
|
||||
std::vector<Diagnostic> diagnostics;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_ANALYSIS_DYNAMIC_EXECUTION_RESULT_H_
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/math/matrix.h"
|
||||
#include "fesa/solvers/eigen/mkl_feast_eigen_solver.h"
|
||||
#include "fesa/solvers/eigen/eigen_solver.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
#ifndef FESA_ANALYSIS_HHT_DYNAMIC_PROCEDURE_H_
|
||||
#define FESA_ANALYSIS_HHT_DYNAMIC_PROCEDURE_H_
|
||||
|
||||
#include "fesa/analysis/prepared_analysis.h"
|
||||
#include "fesa/analysis/dynamic_execution_result.h"
|
||||
#include "fesa/core/status.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
class Domain;
|
||||
class LinearSolver;
|
||||
class NewtonIterationLogWriter;
|
||||
class ParallelFor;
|
||||
class TangentSolver;
|
||||
|
||||
|
||||
@@ -6,13 +6,23 @@
|
||||
namespace fesa {
|
||||
|
||||
class Domain;
|
||||
class EigenSolver;
|
||||
|
||||
/// @brief Executes the supported linear MITC4 frequency procedure.
|
||||
class LinearFrequencyProcedureExecutor final {
|
||||
public:
|
||||
/// @brief Preserves default FEAST construction for existing callers.
|
||||
LinearFrequencyProcedureExecutor() = default;
|
||||
|
||||
/// @brief Borrows a solver that must outlive this executor and its calls.
|
||||
explicit LinearFrequencyProcedureExecutor(const EigenSolver& solver) : solver_(&solver) {}
|
||||
|
||||
/// @brief Builds, solves, and validates one frequency modal candidate.
|
||||
/// @return Requested physical modes plus all-c validation evidence.
|
||||
Result<EigenAnalysisState> Execute(const Domain& domain) const;
|
||||
|
||||
private:
|
||||
const EigenSolver* solver_{nullptr};
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef FESA_ANALYSIS_LINEAR_STATIC_EXECUTION_RESULT_H_
|
||||
#define FESA_ANALYSIS_LINEAR_STATIC_EXECUTION_RESULT_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/analysis/analysis_state.h"
|
||||
#include "fesa/core/diagnostic.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
/// @brief Stores a completed linear-static calculation before result writing.
|
||||
struct LinearStaticExecutionResult {
|
||||
AnalysisState state;
|
||||
std::vector<Diagnostic> diagnostics;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_ANALYSIS_LINEAR_STATIC_EXECUTION_RESULT_H_
|
||||
@@ -1,10 +1,13 @@
|
||||
#ifndef FESA_ANALYSIS_LINEAR_STATIC_PROCEDURE_H_
|
||||
#define FESA_ANALYSIS_LINEAR_STATIC_PROCEDURE_H_
|
||||
|
||||
#include "fesa/analysis/prepared_analysis.h"
|
||||
#include "fesa/analysis/linear_static_execution_result.h"
|
||||
#include "fesa/core/status.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
class Domain;
|
||||
|
||||
class LinearSolver;
|
||||
class ParallelFor;
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef FESA_ANALYSIS_NONLINEAR_STATIC_EXECUTION_RESULT_H_
|
||||
#define FESA_ANALYSIS_NONLINEAR_STATIC_EXECUTION_RESULT_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/analysis/nonlinear_analysis_state.h"
|
||||
#include "fesa/core/diagnostic.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
/// @brief Stores a completed nonlinear-static calculation before result
|
||||
/// writing.
|
||||
struct NonlinearStaticExecutionResult {
|
||||
NonlinearAnalysisState state;
|
||||
std::vector<Diagnostic> diagnostics;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_ANALYSIS_NONLINEAR_STATIC_EXECUTION_RESULT_H_
|
||||
@@ -1,10 +1,13 @@
|
||||
#ifndef FESA_ANALYSIS_NONLINEAR_STATIC_PROCEDURE_H_
|
||||
#define FESA_ANALYSIS_NONLINEAR_STATIC_PROCEDURE_H_
|
||||
|
||||
#include "fesa/analysis/prepared_analysis.h"
|
||||
#include "fesa/analysis/nonlinear_static_execution_result.h"
|
||||
#include "fesa/core/status.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
class Domain;
|
||||
|
||||
class NewtonIterationLogWriter;
|
||||
class ParallelFor;
|
||||
class TangentSolver;
|
||||
|
||||
@@ -2,23 +2,21 @@
|
||||
#define FESA_ANALYSIS_PREPARED_ANALYSIS_H_
|
||||
|
||||
#include <filesystem>
|
||||
#include <variant>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/analysis/analysis_state.h"
|
||||
#include "fesa/analysis/dynamic_analysis_state.h"
|
||||
#include "fesa/analysis/eigen_analysis_state.h"
|
||||
#include "fesa/analysis/nonlinear_analysis_state.h"
|
||||
#include "fesa/analysis/solid_frequency_state.h"
|
||||
#include "fesa/analysis/solid_hht_dynamic_procedure.h"
|
||||
#include "fesa/analysis/solid_static_procedure.h"
|
||||
#include "fesa/analysis/transient_heat_procedure.h"
|
||||
#include "fesa/analysis/analysis_procedure.h"
|
||||
#include "fesa/analysis/prepared_analysis_outcome.h"
|
||||
#include "fesa/core/diagnostic.h"
|
||||
#include "fesa/core/status.h"
|
||||
#include "fesa/model/domain.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
class ParallelFor;
|
||||
class LinearSolver;
|
||||
class TangentSolver;
|
||||
class EigenSolver;
|
||||
class LinearStaticProcedureExecutor;
|
||||
class LinearFrequencyProcedureExecutor;
|
||||
class EigenResultsWriter;
|
||||
@@ -31,6 +29,9 @@ class DynamicResultsWriter;
|
||||
class ThermalResultsWriter;
|
||||
class SolidResultsWriter;
|
||||
class SolidFrequencyProcedureExecutor;
|
||||
class SolidStaticProcedureExecutor;
|
||||
class SolidHhtDynamicProcedureExecutor;
|
||||
class TransientHeatProcedureExecutor;
|
||||
struct DerivedOutputPaths;
|
||||
|
||||
/// @brief Owns one parsed and semantically mapped analysis input.
|
||||
@@ -46,30 +47,16 @@ struct PreparedAnalysisInput {
|
||||
Result<PreparedAnalysisInput> PrepareAnalysisInput(
|
||||
const std::filesystem::path& input_path);
|
||||
|
||||
/// @brief Stores a completed linear-static calculation before result writing.
|
||||
struct LinearStaticExecutionResult {
|
||||
AnalysisState state;
|
||||
std::vector<Diagnostic> diagnostics;
|
||||
};
|
||||
/// @brief Creates exactly one selected family with caller-owned adapters.
|
||||
/// @note Domain and adapters remain alive and unmoved throughout execution.
|
||||
Result<std::unique_ptr<AnalysisProcedure>> CreateAnalysisProcedure(
|
||||
const Domain &domain, const ParallelFor ¶llel_for,
|
||||
LinearSolver &linear_solver, TangentSolver &tangent_solver,
|
||||
const EigenSolver &eigen_solver, NewtonIterationLogWriter &log);
|
||||
|
||||
/// @brief Stores a completed nonlinear-static calculation before result
|
||||
/// writing.
|
||||
struct NonlinearStaticExecutionResult {
|
||||
NonlinearAnalysisState state;
|
||||
std::vector<Diagnostic> diagnostics;
|
||||
};
|
||||
|
||||
/// @brief Stores a complete HHT history before atomic result finalization.
|
||||
struct DynamicExecutionResult {
|
||||
DynamicAnalysisState state;
|
||||
std::vector<Diagnostic> diagnostics;
|
||||
};
|
||||
|
||||
using PreparedAnalysisOutcome =
|
||||
std::variant<LinearStaticExecutionResult, NonlinearStaticExecutionResult,
|
||||
EigenAnalysisState, DynamicExecutionResult,
|
||||
ThermalExecutionResult, SolidStaticExecutionResult,
|
||||
SolidFrequencyState, SolidDynamicExecutionResult>;
|
||||
/// @brief Executes a caller-selected procedure through the common interface.
|
||||
Result<PreparedAnalysisOutcome>
|
||||
ExecutePreparedAnalysis(const Domain &domain, AnalysisProcedure &procedure);
|
||||
|
||||
/// @brief Selects the approved procedure from a prepared Domain.
|
||||
/// @pre The executors and log outlive this call.
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef FESA_ANALYSIS_PREPARED_ANALYSIS_OUTCOME_H_
|
||||
#define FESA_ANALYSIS_PREPARED_ANALYSIS_OUTCOME_H_
|
||||
|
||||
#include <variant>
|
||||
|
||||
#include "fesa/analysis/dynamic_execution_result.h"
|
||||
#include "fesa/analysis/eigen_analysis_state.h"
|
||||
#include "fesa/analysis/linear_static_execution_result.h"
|
||||
#include "fesa/analysis/nonlinear_static_execution_result.h"
|
||||
#include "fesa/analysis/solid_dynamic_execution_result.h"
|
||||
#include "fesa/analysis/solid_frequency_state.h"
|
||||
#include "fesa/analysis/solid_static_execution_result.h"
|
||||
#include "fesa/analysis/thermal_execution_result.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
/// @brief Owns a completed procedure result before result-file finalization.
|
||||
using PreparedAnalysisOutcome =
|
||||
std::variant<LinearStaticExecutionResult, NonlinearStaticExecutionResult,
|
||||
EigenAnalysisState, DynamicExecutionResult,
|
||||
ThermalExecutionResult, SolidStaticExecutionResult,
|
||||
SolidFrequencyState, SolidDynamicExecutionResult>;
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_ANALYSIS_PREPARED_ANALYSIS_OUTCOME_H_
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef FESA_ANALYSIS_SOLID_DYNAMIC_EXECUTION_RESULT_H_
|
||||
#define FESA_ANALYSIS_SOLID_DYNAMIC_EXECUTION_RESULT_H_
|
||||
|
||||
#include "fesa/analysis/solid_dynamic_analysis_state.h"
|
||||
#include "fesa/fem/dof_manager.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
/// @brief Owns the validated 3N dynamic result independently of serialization.
|
||||
struct SolidDynamicExecutionResult {
|
||||
DofManager dofs;
|
||||
SolidDynamicAnalysisState state;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_ANALYSIS_SOLID_DYNAMIC_EXECUTION_RESULT_H_
|
||||
@@ -5,14 +5,24 @@
|
||||
|
||||
namespace fesa {
|
||||
class Domain;
|
||||
class EigenSolver;
|
||||
/// @brief Executes unloaded reference-state C3D8 generalized frequency
|
||||
/// analysis.
|
||||
class SolidFrequencyProcedureExecutor final {
|
||||
public:
|
||||
/// @brief Preserves default FEAST construction for existing callers.
|
||||
SolidFrequencyProcedureExecutor() = default;
|
||||
|
||||
/// @brief Borrows a solver that must outlive this executor and its calls.
|
||||
explicit SolidFrequencyProcedureExecutor(const EigenSolver& solver) : solver_(&solver) {}
|
||||
|
||||
/// @brief Returns lowest requested modes after validating every returned
|
||||
/// pair.
|
||||
/// @note Domain is immutable and must remain alive during execution.
|
||||
Result<SolidFrequencyState> Execute(const Domain& domain) const;
|
||||
|
||||
private:
|
||||
const EigenSolver* solver_{nullptr};
|
||||
};
|
||||
} // namespace fesa
|
||||
#endif // FESA_ANALYSIS_SOLID_FREQUENCY_PROCEDURE_H_
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/math/matrix.h"
|
||||
#include "fesa/solvers/eigen/mkl_feast_eigen_solver.h"
|
||||
#include "fesa/solvers/eigen/eigen_solver.h"
|
||||
|
||||
namespace fesa {
|
||||
/// @brief Identifies a source-ordered physical Solid eigenmode.
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
#ifndef FESA_ANALYSIS_SOLID_HHT_DYNAMIC_PROCEDURE_H_
|
||||
#define FESA_ANALYSIS_SOLID_HHT_DYNAMIC_PROCEDURE_H_
|
||||
|
||||
#include "fesa/analysis/solid_dynamic_analysis_state.h"
|
||||
#include "fesa/analysis/solid_dynamic_execution_result.h"
|
||||
|
||||
namespace fesa {
|
||||
class LinearSolver;
|
||||
class ParallelFor;
|
||||
class TangentSolver;
|
||||
|
||||
/// @brief Owns the validated 3N dynamic result independently of serialization.
|
||||
struct SolidDynamicExecutionResult {
|
||||
DofManager dofs;
|
||||
SolidDynamicAnalysisState state;
|
||||
};
|
||||
|
||||
/// @brief Integrates linear or TL Solid mechanics with constant consistent
|
||||
/// mass.
|
||||
class SolidHhtDynamicProcedureExecutor {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef FESA_ANALYSIS_SOLID_STATIC_EXECUTION_RESULT_H_
|
||||
#define FESA_ANALYSIS_SOLID_STATIC_EXECUTION_RESULT_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/analysis/solid_static_state.h"
|
||||
#include "fesa/core/diagnostic.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
/// @brief Owns successful static frames and sorted model diagnostics.
|
||||
struct SolidStaticExecutionResult {
|
||||
SolidStaticState state;
|
||||
std::vector<Diagnostic> diagnostics;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_ANALYSIS_SOLID_STATIC_EXECUTION_RESULT_H_
|
||||
@@ -1,19 +1,13 @@
|
||||
#ifndef FESA_ANALYSIS_SOLID_STATIC_PROCEDURE_H_
|
||||
#define FESA_ANALYSIS_SOLID_STATIC_PROCEDURE_H_
|
||||
|
||||
#include "fesa/analysis/solid_static_state.h"
|
||||
#include "fesa/analysis/solid_static_execution_result.h"
|
||||
|
||||
namespace fesa {
|
||||
class LinearSolver;
|
||||
class ParallelFor;
|
||||
class TangentSolver;
|
||||
|
||||
/// @brief Owns successful static frames and sorted model diagnostics.
|
||||
struct SolidStaticExecutionResult {
|
||||
SolidStaticState state;
|
||||
std::vector<Diagnostic> diagnostics;
|
||||
};
|
||||
|
||||
/// @brief Executes linear K0 or fixed-factor TL StVK static analysis.
|
||||
class SolidStaticProcedureExecutor {
|
||||
public:
|
||||
|
||||
@@ -99,7 +99,7 @@ class SolidStaticState {
|
||||
const noexcept;
|
||||
|
||||
private:
|
||||
friend class SolidStaticProcedureExecutor;
|
||||
friend class SolidStaticCore;
|
||||
bool initialized_{false};
|
||||
bool nonlinear_{false};
|
||||
std::vector<SolidIntegrationPointRow> reference_points_;
|
||||
|
||||
@@ -6,11 +6,15 @@
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/analysis/thermal_time_grid.h"
|
||||
#include "fesa/assembly/thermal_assembler.h"
|
||||
#include "fesa/core/status.h"
|
||||
#include "fesa/results/thermal_result_records.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
class AnalysisModel;
|
||||
class DofManager;
|
||||
class ThermalAssembly;
|
||||
|
||||
/// @brief Owns the immutable thermal result inventory and accepted history.
|
||||
/// @note No Domain/model/assembly references survive Create; state may outlive
|
||||
/// them. Numerical equilibrium and energy checks belong to the procedure before
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef FESA_ANALYSIS_THERMAL_EXECUTION_RESULT_H_
|
||||
#define FESA_ANALYSIS_THERMAL_EXECUTION_RESULT_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/analysis/thermal_analysis_state.h"
|
||||
#include "fesa/core/diagnostic.h"
|
||||
|
||||
namespace fesa {
|
||||
|
||||
/// @brief Owns complete thermal history before any result output is opened.
|
||||
struct ThermalExecutionResult {
|
||||
ThermalAnalysisState state;
|
||||
std::vector<Diagnostic> diagnostics;
|
||||
};
|
||||
|
||||
} // namespace fesa
|
||||
|
||||
#endif // FESA_ANALYSIS_THERMAL_EXECUTION_RESULT_H_
|
||||
@@ -1,21 +1,14 @@
|
||||
#ifndef FESA_ANALYSIS_TRANSIENT_HEAT_PROCEDURE_H_
|
||||
#define FESA_ANALYSIS_TRANSIENT_HEAT_PROCEDURE_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "fesa/analysis/thermal_analysis_state.h"
|
||||
#include "fesa/analysis/thermal_execution_result.h"
|
||||
#include "fesa/core/status.h"
|
||||
|
||||
namespace fesa {
|
||||
class Domain;
|
||||
class LinearSolver;
|
||||
class ParallelFor;
|
||||
|
||||
/// @brief Owns complete thermal history before any result output is opened.
|
||||
struct ThermalExecutionResult {
|
||||
ThermalAnalysisState state;
|
||||
std::vector<Diagnostic> diagnostics;
|
||||
};
|
||||
|
||||
/// @brief Executes fixed-increment backward Euler with checked thermal
|
||||
/// recovery.
|
||||
class TransientHeatProcedureExecutor final {
|
||||
|
||||
Reference in New Issue
Block a user