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
0c06a3b6
Commit
0c06a3b6
authored
6 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Actually write the background DM particles to the snapshots in parallel-i/o mode.
parent
99915198
No related branches found
No related tags found
1 merge request
!884
Support for multiple softening lengths in the gravity solver
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/parallel_io.c
+37
-0
37 additions, 0 deletions
src/parallel_io.c
with
37 additions
and
0 deletions
src/parallel_io.c
+
37
−
0
View file @
0c06a3b6
...
...
@@ -1710,6 +1710,43 @@ void write_output_parallel(struct engine* e, const char* baseName,
}
}
break
;
case
swift_type_dark_matter_background
:
{
/* Ok, we need to fish out the particles we want */
Nparticles
=
Ndm_background
;
/* Allocate temporary array */
if
(
swift_memalign
(
"gparts_written"
,
(
void
**
)
&
gparts_written
,
gpart_align
,
Ndm_background
*
sizeof
(
struct
gpart
))
!=
0
)
error
(
"Error while allocating temporart memory for gparts"
);
if
(
with_stf
)
{
if
(
swift_memalign
(
"gpart_group_written"
,
(
void
**
)
&
gpart_group_data_written
,
gpart_align
,
Ndm_background
*
sizeof
(
struct
velociraptor_gpart_data
))
!=
0
)
error
(
"Error while allocating temporart memory for gparts STF "
"data"
);
}
/* Collect the non-inhibited DM particles from gpart */
io_collect_gparts_background_to_write
(
gparts
,
e
->
s
->
gpart_group_data
,
gparts_written
,
gpart_group_data_written
,
Ntot
,
Ndm_background
,
with_stf
);
/* Select the fields to write */
darkmatter_write_particles
(
gparts_written
,
list
,
&
num_fields
);
if
(
with_stf
)
{
#ifdef HAVE_VELOCIRAPTOR
num_fields
+=
velociraptor_write_gparts
(
gpart_group_data_written
,
list
+
num_fields
);
#endif
}
}
break
;
case
swift_type_stars
:
{
if
(
Nstars
==
Nstars_written
)
{
...
...
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