Skip to content
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

Add integer attribute of particle #348

Merged
merged 176 commits into from
Jan 14, 2025

Conversation

ChunYen-Chen
Copy link
Collaborator

@ChunYen-Chen ChunYen-Chen commented Aug 27, 2024

This PR allows the user to use integer attributes of particles and solves part of #79.

Changes

  • PAR_TYPE is now a built-in integer attribute.
  • Loading PAR_IC is updated.
  • Wiki pages about particles are updated.
  • Rename PAR_NATT_USER to PAR_NATT_FLT_USER.

New

  • A new script create_PAR_IC.cpp to generate new PAR_IC files.
  • A new compilation option INT8_PAR (--long_par in configure.py) to control the precision of the integer attributes.
  • A new compilation option PAR_NATT_INT_USER (--par_attribute_int in configure.py).

Note

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

@ChunYen-Chen
Copy link
Collaborator Author

@hyschive Thanks for the review. I have addressed the comment. Please take another review.

@ChunYen-Chen ChunYen-Chen mentioned this pull request Jan 8, 2025
@hyschive
Copy link
Contributor

@ChunYen-Chen I encountered the following error messages when using gamer_compare_data with the old data format, for both HDF5 and C-binary formats:

CompareParticleData ...
********************************************************************************
ERROR : particle integer arrays have not been allocated yet !!
        Rank <0>, file <Main.cpp>, line <439>, function <CompareParticleData>
********************************************************************************

I suspect the issue arises because Aux_AllocateArray2D() returns NULL when the array size is zero.

Copy link
Contributor

@hyschive hyschive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChunYen-Chen I've added some final minor comments, including a few bug fixes. Please also resolve the conflicts.

@hyschive hyschive merged commit 5c45f4d into gamer-project:main Jan 14, 2025
@ChunYen-Chen ChunYen-Chen deleted the par_attribute branch January 14, 2025 08:56
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.

3 participants