Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
fcc0c5dc
Commit
fcc0c5dc
authored
3 years ago
by
Bert Vandenbroucke
Browse files
Options
Downloads
Plain Diff
Merge branch 'bounding_box_in_snaps' into 'master'
Add particle bounding box in the snapshots' cell meta-data Closes
#789
See merge request
!1525
parents
73cab43b
8a7f9ca1
No related branches found
No related tags found
2 merge requests
!1548
Mayor Sync
,
!1525
Add particle bounding box in the snapshots' cell meta-data
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/RTD/source/Snapshots/index.rst
+12
-3
12 additions, 3 deletions
doc/RTD/source/Snapshots/index.rst
src/common_io_cells.c
+308
-385
308 additions, 385 deletions
src/common_io_cells.c
with
320 additions
and
388 deletions
doc/RTD/source/Snapshots/index.rst
+
12
−
3
View file @
fcc0c5dc
...
@@ -379,9 +379,9 @@ expressed in the unit system used for the snapshots (see above) and are hence
...
@@ -379,9 +379,9 @@ expressed in the unit system used for the snapshots (see above) and are hence
consistent with the particle positions themselves.
consistent with the particle positions themselves.
Once the cell(s) containing the region of interest has been located,
Once the cell(s) containing the region of interest has been located,
users can use the ``/Cells/
Offset
s/PartTypeN/
Files
``,
users can use the ``/Cells/
File
s/PartTypeN/``,
``/Cells/
Offse
ts/PartTypeN/
Counts
`` and
``/Cells/
Coun
ts/PartTypeN/`` and
``/Cells/Offsets/PartTypeN/
OffsetsInFile
`` to retrieve the location of
``/Cells/Offsets
InFile
/PartTypeN/`` to retrieve the location of
the particles of type ``N`` in the ``/PartTypeN`` arrays. These
the particles of type ``N`` in the ``/PartTypeN`` arrays. These
contain information about which file contains the particles of a given
contain information about which file contains the particles of a given
cell. It also gives the offset from the start of the ``/PartTypeN``
cell. It also gives the offset from the start of the ``/PartTypeN``
...
@@ -398,6 +398,15 @@ In the case of a single-file snapshot, the ``Files`` array is just an array of
...
@@ -398,6 +398,15 @@ In the case of a single-file snapshot, the ``Files`` array is just an array of
zeroes since all the particles will be in the 0-th file. Note also that in the
zeroes since all the particles will be in the 0-th file. Note also that in the
case of a multi-files snapshot, a cell is always contained in a single file.
case of a multi-files snapshot, a cell is always contained in a single file.
As noted above, particles can (slightly) drift out of their cells. This can be
problematic in cases where one wants to find precisely all the particles in a
given region. To help with this, the meta-data also contains a "cell bounding
box". The arrays ``/Cells/MinPositions/PartTypeN`` and
``/Cells/MaxPositions/PartTypeN`` contain the minimal (maximal) x,y,z
coordinates of all the particles of this type in the cells. Note that these
coordinates can be outside of the cell itself. When using periodic boundary
conditions, no box-wrapping is applied.
If a snapshot used a sub-sampled output, then the counts and offsets are
If a snapshot used a sub-sampled output, then the counts and offsets are
adjusted accordingly and correspond to the actual content of the file
adjusted accordingly and correspond to the actual content of the file
(i.e. after the sub-sampling was applied).
(i.e. after the sub-sampling was applied).
...
...
This diff is collapsed.
Click to expand it.
src/common_io_cells.c
+
308
−
385
View file @
fcc0c5dc
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment