Skip to content

Add particle unique ID#351

Open
ChunYen-Chen wants to merge 72 commits intogamer-project:mainfrom
ChunYen-Chen:par_id
Open

Add particle unique ID#351
ChunYen-Chen wants to merge 72 commits intogamer-project:mainfrom
ChunYen-Chen:par_id

Conversation

@ChunYen-Chen
Copy link
Copy Markdown
Collaborator

This is a follow-up PR of PR #348. It solves part of #79.

Changes

  • Wiki pages about particles are updated.

New

  • A new built-in particle attribute PAR_PUID to store the particle UID.
  • A new section of Wiki pages about particle UID.
  • A new script track_particle.py to track the particle by UID.

Results

Comparison of tracking particle by UID and index of the array with different MPI rank number

Here I show the results of three different UIDs (300, 5403, and 31111) with different MPI ranks (1, 2, and 16). As shown in the figures, the particles can be tracked well by the UID.
particle_00300
particle_05403
particle_31111
The figure shows the position and the velocity in each direction of particles with specified UID. The idx means the index of specified particle UID in the array at step 0.

Note

  • yt module does not recognize the integer attribute type correctly.
  • gamer_compare_data is not supported yet.
  • libyt is also not supported yet.

@hyschive hyschive self-requested a review December 21, 2024 07:10
@hyschive hyschive self-assigned this Dec 21, 2024
Conflicts:
	src/TestProblem/Hydro/ClusterMerger/Par_Init_ByFunction_ClusterMerger.cpp
Comment thread include/Particle.h
Comment thread src/Particle/Par_Aux_InitCheck.cpp Outdated
Comment thread src/Particle/Par_Aux_InitCheck.cpp Outdated
Comment thread doc/wiki/Runtime-Parameters-related/[Runtime-Parameters]-Particles.md Outdated
Comment thread include/Particle.h Outdated
Comment thread src/Particle/Par_Init_ByFunction.cpp Outdated
@hyschive
Copy link
Copy Markdown
Contributor

@ChunYen-Chen Since the C-binary output format is deprecated (i.e., OPT__OUTPUT_TOTAL = 2), I suggest the following changes:

  • Output_DumpData_Total.cpp: update FormatVersion to 2310.
  • Init_ByRestart_v2.cpp: raise an error when PARTICLE is enabled and restarting from a file with FormatVersion < 2310.

Do you agree?

Comment thread src/Init/Init_ByRestart_HDF5.cpp Outdated
Comment thread src/Init/Init_ByRestart_HDF5.cpp Outdated
Comment thread src/Init/Init_ByRestart_HDF5.cpp Outdated
@ChunYen-Chen
Copy link
Copy Markdown
Collaborator Author

Since the C-binary output format is deprecated (i.e., OPT__OUTPUT_TOTAL = 2), I suggest the following changes:
Output_DumpData_Total.cpp: update FormatVersion to 2310.
Init_ByRestart_v2.cpp: raise an error when PARTICLE is enabled and restarting from a file with FormatVersion < 2310.
Do you agree?

@hyschive I assume you are referring to version 2510. If so, I have updated the relevant files.

@hyschive
Copy link
Copy Markdown
Contributor

Since the C-binary output format is deprecated (i.e., OPT__OUTPUT_TOTAL = 2), I suggest the following changes:
Output_DumpData_Total.cpp: update FormatVersion to 2310.
Init_ByRestart_v2.cpp: raise an error when PARTICLE is enabled and restarting from a file with FormatVersion < 2310.
Do you agree?

@hyschive I assume you are referring to version 2510. If so, I have updated the relevant files.

No, I mean FormatVersion in Output_DumpData_Total.cpp instead of Output_DumpData_Total_HDF5.cpp

Conflicts:
	doc/wiki/Runtime-Parameters-related/[Runtime-Parameters]-All.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants