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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
9782a9b5
Commit
9782a9b5
authored
Mar 11, 2016
by
Matthieu Schaller
Browse files
Options
Downloads
Plain Diff
Merge branch 'Gravity_basics' of gitlab.cosma.dur.ac.uk:swift/swiftsim into Gravity_basics
parents
2ed7e717
5f4084cc
No related branches found
No related tags found
2 merge requests
!136
Master
,
!116
Basic implementation of gparts
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
examples/SodShock/makeIC.py
+1
-1
1 addition, 1 deletion
examples/SodShock/makeIC.py
src/gravity/Default/gravity_io.h
+2
-2
2 additions, 2 deletions
src/gravity/Default/gravity_io.h
src/single_io.c
+5
-3
5 additions, 3 deletions
src/single_io.c
src/space.c
+4
-2
4 additions, 2 deletions
src/space.c
with
12 additions
and
8 deletions
examples/SodShock/makeIC.py
+
1
−
1
View file @
9782a9b5
...
@@ -87,7 +87,7 @@ u = append(u1, u2,0)
...
@@ -87,7 +87,7 @@ u = append(u1, u2,0)
m
=
append
(
m1
,
m2
,
0
)
m
=
append
(
m1
,
m2
,
0
)
ids
=
zeros
(
numPart
,
dtype
=
'
L
'
)
ids
=
zeros
(
numPart
,
dtype
=
'
L
'
)
for
i
in
range
(
1
,
numPart
+
1
):
for
i
in
range
(
1
,
numPart
+
1
):
ids
[
i
]
=
i
ids
[
i
-
1
]
=
i
#Final operations
#Final operations
h
/=
2
h
/=
2
...
...
This diff is collapsed.
Click to expand it.
src/gravity/Default/gravity_io.h
+
2
−
2
View file @
9782a9b5
...
@@ -18,14 +18,14 @@
...
@@ -18,14 +18,14 @@
******************************************************************************/
******************************************************************************/
/**
/**
* @brief Read
s the different particles to the HDF5 file
* @brief Read
dark matter particles from HDF5.
*
*
* @param h_grp The HDF5 group in which to read the arrays.
* @param h_grp The HDF5 group in which to read the arrays.
* @param N The number of particles on that MPI rank.
* @param N The number of particles on that MPI rank.
* @param N_total The total number of particles (only used in MPI mode)
* @param N_total The total number of particles (only used in MPI mode)
* @param offset The offset of the particles for this MPI rank (only used in MPI
* @param offset The offset of the particles for this MPI rank (only used in MPI
*mode)
*mode)
* @param parts The particle array
* @param
g
parts The particle array
*
*
*/
*/
__attribute__
((
always_inline
))
INLINE
static
void
darkmatter_read_particles
(
__attribute__
((
always_inline
))
INLINE
static
void
darkmatter_read_particles
(
...
...
This diff is collapsed.
Click to expand it.
src/single_io.c
+
5
−
3
View file @
9782a9b5
...
@@ -309,9 +309,11 @@ void writeArrayBackEnd(hid_t grp, char* fileName, FILE* xmfFile, char* name,
...
@@ -309,9 +309,11 @@ void writeArrayBackEnd(hid_t grp, char* fileName, FILE* xmfFile, char* name,
* @brief Reads an HDF5 initial condition file (GADGET-3 type)
* @brief Reads an HDF5 initial condition file (GADGET-3 type)
*
*
* @param fileName The file to read.
* @param fileName The file to read.
* @param dim (output) The dimension of the volume read from the file.
* @param dim (output) The dimension of the volume.
* @param parts (output) The array of #part read from the file.
* @param parts (output) Array of Gas particles.
* @param N (output) The number of particles read from the file.
* @param gparts (output) Array of DM particles.
* @param Ngas (output) number of Gas particles read.
* @param Ngparts (output) The number of DM particles read.
* @param periodic (output) 1 if the volume is periodic, 0 if not.
* @param periodic (output) 1 if the volume is periodic, 0 if not.
*
*
* Opens the HDF5 file fileName and reads the particles contained
* Opens the HDF5 file fileName and reads the particles contained
...
...
This diff is collapsed.
Click to expand it.
src/space.c
+
4
−
2
View file @
9782a9b5
...
@@ -1233,8 +1233,10 @@ struct cell *space_getcell(struct space *s) {
...
@@ -1233,8 +1233,10 @@ struct cell *space_getcell(struct space *s) {
*
*
* @param s The #space to initialize.
* @param s The #space to initialize.
* @param dim Spatial dimensions of the domain.
* @param dim Spatial dimensions of the domain.
* @param parts Pointer to an array of #part.
* @param parts Array of Gas particles.
* @param N The number of parts in the space.
* @param gparts Array of Gravity particles.
* @param Ngas The number of Gas particles in the space.
* @param Ngpart The number of Gravity particles in the space.
* @param periodic flag whether the domain is periodic or not.
* @param periodic flag whether the domain is periodic or not.
* @param h_max The maximal interaction radius.
* @param h_max The maximal interaction radius.
* @param verbose Print messages to stdout or not
* @param verbose Print messages to stdout or not
...
...
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
sign in
to comment