add_library( fesa_solver STATIC analysis/analysis_model.cpp analysis/analysis_state.cpp analysis/dynamic_analysis_state.cpp analysis/eigen_reduction.cpp analysis/hht_time_integration.cpp analysis/hht_dynamic_algebra.cpp analysis/hht_development_probe.h analysis/hht_dynamic_assembly.cpp analysis/hht_field_convergence.cpp analysis/hht_reduced_operators.cpp analysis/hht_reduced_procedure.cpp analysis/hht_dynamic_procedure.cpp analysis/linear_frequency_procedure.cpp analysis/linear_static_analysis.cpp analysis/linear_static_procedure.cpp analysis/newton_iteration_log.cpp analysis/nonlinear_analysis_state.cpp analysis/nonlinear_static_control.cpp analysis/nonlinear_static_procedure.cpp analysis/prepared_analysis.cpp analysis/solid_dynamic_analysis_state.cpp analysis/solid_frequency_procedure.cpp analysis/solid_hht_dynamic_procedure.cpp analysis/solid_static_procedure.cpp analysis/solid_static_state.cpp analysis/thermal_analysis_state.cpp analysis/thermal_time_grid.cpp analysis/thermal_transient_algebra.cpp analysis/transient_heat_procedure.cpp app/fesa_application.cpp app/output_paths.cpp assembly/load_assembler.cpp assembly/parallel_for.cpp assembly/sparse_assembler.cpp assembly/surface_pressure_assembler.cpp assembly/thermal_assembler.cpp build_info.cpp constraints/essential_constraint_policy.cpp constraints/prescribed_displacement.cpp core/ascii.cpp core/diagnostic.cpp core/status.cpp elements/element_capabilities.cpp elements/element_factory.cpp elements/hex8_element.cpp elements/hex8_high_low.cpp elements/hex8_pair_simd_dispatch.cpp elements/hex8_pair_simd_avx2.cpp elements/hex8_geometry.cpp elements/euler_beam_3d.cpp elements/finite_rotation.cpp elements/mitc4_shell.cpp elements/nonlinear_mitc4_shell.cpp elements/nonlinear_mitc4_inertia.cpp elements/thermal_shell.cpp elements/thermal_shell_geometry.cpp fem/dof_manager.cpp io/abaqus/domain_builder.cpp io/abaqus/domain_mapping_context.cpp io/abaqus/domain_mapper.cpp io/abaqus/input_reader.cpp io/abaqus/material_property_mapper.cpp io/abaqus/step_definition_mapper.cpp io/abaqus/surface_definition_mapper.cpp io/abaqus/topology_mapper.cpp io/hdf5/hdf5_atomic_file.cpp io/hdf5/dynamic_hdf5_results_writer.cpp io/hdf5/hdf5_model_writer.cpp io/hdf5/nonlinear_hdf5_results_writer.cpp io/hdf5/hdf5_primitives.cpp io/hdf5/hdf5_result_writer.cpp io/hdf5/hdf5_results_writer.cpp io/hdf5/eigen_hdf5_results_writer.cpp io/hdf5/eigen_hdf5_self_check.cpp io/hdf5/hdf5_self_check.cpp io/hdf5/thermal_hdf5_results_writer.cpp io/hdf5/thermal_hdf5_self_check.cpp io/hdf5/solid_hdf5_results_writer.cpp io/hdf5/solid_hdf5_self_check.cpp loads/concentrated_nodal_load.cpp loads/shell_surface_pressure.cpp materials/isotropic_linear_elastic_material.cpp materials/isotropic_thermal_material.cpp math/dense_blas_internal.cpp math/matrix.cpp math/sparse_matrix.cpp math/vector.cpp model/domain.cpp model/shell_geometry.cpp model/source_target_resolver.cpp properties/general_beam_section.cpp properties/shell_section.cpp results/analysis_state_commit.cpp results/beam_result_recovery.cpp results/global_equilibrium_recovery.cpp results/prepared_results_writer.cpp results/recovery_candidate.cpp results/result_recovery.cpp results/shell_result_recovery.cpp solvers/eigen/mkl_feast_eigen_solver.cpp solvers/linear/mkl_pardiso_solver.cpp solvers/linear/mkl_pardiso_tangent_solver.cpp solvers/linear/pardiso_session.cpp ) target_include_directories( fesa_solver PUBLIC "${PROJECT_SOURCE_DIR}/include" PRIVATE "${PROJECT_SOURCE_DIR}/src/fesa" ) target_link_libraries( fesa_solver PRIVATE Fesa::MKL Fesa::TBB Fesa::HDF5 ) # Product warnings are strict without imposing FESA policy on external targets. target_compile_options( fesa_solver PRIVATE $<$:/W4 /WX /EHsc> ) if(FESA_HHT_DEVELOPMENT_PROBE) target_compile_definitions(fesa_solver PRIVATE FESA_HHT_DEVELOPMENT_PROBE=1) endif() # Keep the CPU/OS dispatch on the baseline ISA; only its private kernel uses AVX2. if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL "x64") target_compile_definitions(fesa_solver PRIVATE FESA_HEX8_PAIR_AVX2=1) set_source_files_properties(elements/hex8_pair_simd_avx2.cpp PROPERTIES COMPILE_OPTIONS /arch:AVX2) endif() add_executable(fesa_cli app/main.cpp) set_target_properties(fesa_cli PROPERTIES OUTPUT_NAME fesa) target_link_libraries(fesa_cli PRIVATE fesa_solver) target_compile_options( fesa_cli PRIVATE $<$:/W4 /WX /EHsc> ) # Profile the optimized production build with the same binary used for timing. foreach(_fesa_target fesa_solver fesa_cli) target_compile_options(${_fesa_target} PRIVATE $<$,$>:/Zi>) endforeach() target_link_options(fesa_cli PRIVATE $<$,$>:/DEBUG /OPT:REF /OPT:ICF>) unset(_fesa_target) if(WIN32) if(NOT TARGET MKL::mkl_intel_thread OR NOT TARGET MKL::mkl_core OR NOT OMP_DLL_DIR OR NOT OMP_DLLNAME) message(FATAL_ERROR "The oneMKL runtime files required by fesa.exe were not resolved") endif() if(NOT EXISTS "${OMP_DLL_DIR}/libmmd.dll") message(FATAL_ERROR "The Intel runtime required by the selected HDF5 DLL was not resolved") endif() file(GLOB _fesa_cli_mkl_dispatch_dlls "${MKL_ROOT}/bin/mkl_def.*.dll") if(NOT _fesa_cli_mkl_dispatch_dlls) message(FATAL_ERROR "The oneMKL default dispatch runtime was not resolved") endif() list(SORT _fesa_cli_mkl_dispatch_dlls COMPARE NATURAL ORDER DESCENDING) list(GET _fesa_cli_mkl_dispatch_dlls 0 _fesa_cli_mkl_dispatch_dll) # Keep the installed CLI runnable without assuming oneAPI or HDF5 on PATH. add_custom_command( TARGET fesa_cli POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$" "$" COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$" "$" COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$" "$" COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${OMP_DLL_DIR}/${OMP_DLLNAME}" "$" COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${OMP_DLL_DIR}/libmmd.dll" "$" COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${_fesa_cli_mkl_dispatch_dll}" "$" COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$" "$" COMMAND_EXPAND_LISTS ) unset(_fesa_cli_mkl_dispatch_dll) unset(_fesa_cli_mkl_dispatch_dlls) endif()