Skip to content

Xiangyu/log generation #855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jul 15, 2025
Merged

Xiangyu/log generation #855

merged 13 commits into from
Jul 15, 2025

Conversation

Xiangyu-Hu
Copy link
Owner

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 with std::string_view for improved type name extraction, removing unused code related to mesh dynamics, and restructuring mesh-related files.

Dependency Management:

Type Handling Improvements:

  • src/shared/common/ownership.h: Added a type_name utility function using std::string_view for extracting type names in a compiler-independent manner. Updated dynamic casting error messages to use type_name instead of typeid. [1] [2] [3]
  • src/for_2D_build/common/data_type.h and src/for_3D_build/common/data_type.h: Standardized template parameter naming conventions for consistency (ArraySize instead of array_size). [1] [2]

Logging Functionality:

  • src/shared/io_system/io_log.cpp and src/shared/io_system/io_log.h: Introduced a logging system using spdlog. 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 with mesh_for. [1] [2] [3] [4] [5] [6] [7]
  • Renamed file src/shared/meshes/mesh_dynamics.h to src/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 and src/shared/common/sphinxsys_variable.h: Removed unused typedefs and template definitions for mesh variables. [1] [2]
  • src/shared/io_system/io_all.h: Added io_log.h to the list of includes.

@Xiangyu-Hu Xiangyu-Hu merged commit f3153e6 into master Jul 15, 2025
7 checks passed
@Xiangyu-Hu Xiangyu-Hu deleted the xiangyu/log_generation branch July 15, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants