Xiangyu/log generation #855
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several updates across the codebase, focusing on dependency management, type handling improvements, logging functionality, and mesh dynamics refactoring. The most significant changes include adding support for
spdlog
for logging, refining type handling withstd::string_view
for improved type name extraction, removing unused code related to mesh dynamics, and restructuring mesh-related files.Dependency Management:
.github/workflows/ci.yml
: Addedspdlog
as a dependency in multiple sections of the CI configuration. [1] [2] [3] [4] [5] [6] [7]CMakeLists.txt
: Integratedspdlog
into the build system and linked it tosphinxsys_core
.Type Handling Improvements:
src/shared/common/ownership.h
: Added atype_name
utility function usingstd::string_view
for extracting type names in a compiler-independent manner. Updated dynamic casting error messages to usetype_name
instead oftypeid
. [1] [2] [3]src/for_2D_build/common/data_type.h
andsrc/for_3D_build/common/data_type.h
: Standardized template parameter naming conventions for consistency (ArraySize
instead ofarray_size
). [1] [2]Logging Functionality:
src/shared/io_system/io_log.cpp
andsrc/shared/io_system/io_log.h
: Introduced a logging system usingspdlog
. Added initialization and retrieval functions for the logger. [1] [2]src/shared/io_system/io_environment.h
: Added methods to retrieve folder paths (inputFolder
,outputFolder
,restartFolder
,reloadFolder
) for use in logging.Mesh Dynamics Refactoring:
src/shared/mesh_dynamics/mesh_dynamics.h
: Removed unused parallel execution policies and iterators for mesh cells. Simplified mesh dynamics classes by replacing custom parallel iteration logic withmesh_for
. [1] [2] [3] [4] [5] [6] [7]src/shared/meshes/mesh_dynamics.h
tosrc/shared/mesh_dynamics/mesh_dynamics.h
for better organization.Code Cleanup:
src/shared/meshes/base_mesh.h
: Removed unused includes and code related to memory pooling and containers.src/shared/common/sphinxsys_containers.h
andsrc/shared/common/sphinxsys_variable.h
: Removed unused typedefs and template definitions for mesh variables. [1] [2]src/shared/io_system/io_all.h
: Addedio_log.h
to the list of includes.