From 9572faef7ffa8f5d80288cf28aa1ea89531e4af9 Mon Sep 17 00:00:00 2001 From: atmyers Date: Wed, 19 Nov 2025 10:04:27 -0800 Subject: [PATCH 1/3] Mention that particles with invalid ids are removed by default and be explicit about allowed ranges --- Docs/sphinx_documentation/source/Particle.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Docs/sphinx_documentation/source/Particle.rst b/Docs/sphinx_documentation/source/Particle.rst index 9499d08e5c..006852c8c7 100644 --- a/Docs/sphinx_documentation/source/Particle.rst +++ b/Docs/sphinx_documentation/source/Particle.rst @@ -48,7 +48,13 @@ the creation of particle initial conditions in parallel. In storing these identifying numbers, 39 bits are devoted to the `id`, allowing approximately 550 billion possible *local* `id` numbers, and 24 bits are used to store the `cpu`, allowing about 16.8 million unique (MPI) processes. -One bit is devoted to mark a particle valid or invalid. + +One bit is devoted to mark a particle valid or invalid. This is often used to remove particles from a +simulation. During :cpp:`Redistribute()`, particles with +invalid ids are removed from the simulation by default, although this behavior is customizable. Particles +with invalid ids are also not written out during plotfile writes or checkpoint / restart operations. +The allowed values for :cpp:`p.id()` are 0 to 2**39, and the allowed values for :cpp:`p.cpu()` are +0 to 2**24. To pack and unpack these numbers, one uses the following syntax: From 2dff4514660380b8eeccfc57644a306101c3503a Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 19 Nov 2025 10:18:10 -0800 Subject: [PATCH 2/3] Update Docs/sphinx_documentation/source/Particle.rst --- Docs/sphinx_documentation/source/Particle.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/sphinx_documentation/source/Particle.rst b/Docs/sphinx_documentation/source/Particle.rst index 006852c8c7..85c126bd66 100644 --- a/Docs/sphinx_documentation/source/Particle.rst +++ b/Docs/sphinx_documentation/source/Particle.rst @@ -53,7 +53,7 @@ One bit is devoted to mark a particle valid or invalid. This is often used to re simulation. During :cpp:`Redistribute()`, particles with invalid ids are removed from the simulation by default, although this behavior is customizable. Particles with invalid ids are also not written out during plotfile writes or checkpoint / restart operations. -The allowed values for :cpp:`p.id()` are 0 to 2**39, and the allowed values for :cpp:`p.cpu()` are +The allowed values for :cpp:`p.id()` are `0` to `2**39 - 1`, and the allowed values for :cpp:`p.cpu()` are 0 to 2**24. To pack and unpack these numbers, one uses the following syntax: From 43221c877e9497a14e79ba3b2cd436868f3715a4 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Wed, 19 Nov 2025 10:18:46 -0800 Subject: [PATCH 3/3] Update Docs/sphinx_documentation/source/Particle.rst --- Docs/sphinx_documentation/source/Particle.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docs/sphinx_documentation/source/Particle.rst b/Docs/sphinx_documentation/source/Particle.rst index 85c126bd66..d56824121e 100644 --- a/Docs/sphinx_documentation/source/Particle.rst +++ b/Docs/sphinx_documentation/source/Particle.rst @@ -54,7 +54,7 @@ simulation. During :cpp:`Redistribute()`, particles with invalid ids are removed from the simulation by default, although this behavior is customizable. Particles with invalid ids are also not written out during plotfile writes or checkpoint / restart operations. The allowed values for :cpp:`p.id()` are `0` to `2**39 - 1`, and the allowed values for :cpp:`p.cpu()` are -0 to 2**24. +`0` to `2**24 - 1`. To pack and unpack these numbers, one uses the following syntax: