Skip to content

Conversation

@debog
Copy link
Owner

@debog debog commented Nov 20, 2025

A bunch of code refactorings

  • Prefixing member variables in classes/structs with m_
  • Prefixing function argument vairables with a_
  • Prefix static variables with s_

To do:

  • Standardize function names

debog and others added 14 commits November 19, 2025 22:17
Applied comprehensive naming standardization across entire codebase:
- All struct/class member variables now have m_ prefix
- Updated 347 files with 7,063 naming changes
- Refactored all major structs: HyPar, TimeIntegration, PETScContext, MPIVariables
- Refactored IB structs: Facet3D, FacetMap, Body3D, IBNode, ImmersedBoundary
- Refactored interpolation structs: MUSCLParameters, WENOParameters, CompactScheme
- Refactored utility structs: DomainBoundary, BandedMatrix, TridiagLU_Params
- Refactored all PhysicalModel structs across 16 physics modules
- Function pointers correctly excluded from m_ prefix
- All compilation successful, all 8 unit tests passing

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
GPU CUDA files were not updated in previous struct member refactoring,
causing MPI build errors (e.g., 'world' should be 'm_world').

Updated all GPU files to use m_ prefix for struct members:
- MPIVariables: ip, iproc, bcperiodic, world, rank, nproc, comm
- HyPar: ndims, nvars, ghosts, u, hyp, par, source, dim_local, x, dxinv
- DomainBoundary: on_this_proc

Fixes compilation for MPI builds with GPU support.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
  - Fixed function parameter naming to use a_ prefix consistently
    - MPIBroadcast.c, MPIMax.c, MPIMin.c, MPISum.c: comm → a_comm
    - MPIExchangeBoundaries1D.c: ndims → a_ndims
    - MPIExchangeBoundariesnD.c: var → a_var
    - All TridiagLU files: m → a_m

  - Fixed struct member naming: world → m_world
    - sparse_grids_simulation.h, ensemble_simulations.h, single_simulation.h

  - Fixed format string: %a_s → %s in ReadArray.c

  - Renamed all static variables to have s_ prefix
    - Static constants: one_twelve, tolerance, one_fourth, thirteen_by_twelve, etc.
    - Static counters: count
    - Updated both declarations and all usages
    - Fixed macro definitions in interpolation.h

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

  Co-Authored-By: Claude <[email protected]>
  - VlasovCleanup.c: Fixed all FFTW-related struct members
  - VlasovInitialize.c: Fixed all FFTW-related struct members
  - VlasovEField.c: Fixed all FFTW-related struct members

  Members renamed to follow m_ convention for consistency with
  recent naming convention changes.

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

  Co-Authored-By: Claude <[email protected]>
@debog debog closed this Dec 3, 2025
@debog debog deleted the code_improvements branch December 3, 2025 20:19
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