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
f012c4bc
Commit
f012c4bc
authored
12 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
forgot about empty cells, no super.
Former-commit-id: 6ea4f886f11c84f67197cc58a3b137f02be967f8
parent
5366dfb9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/engine.c
+1
-1
1 addition, 1 deletion
src/engine.c
src/io.c
+3
-5
3 additions, 5 deletions
src/io.c
with
4 additions
and
6 deletions
src/engine.c
+
1
−
1
View file @
f012c4bc
...
...
@@ -320,7 +320,7 @@ void engine_collect_kick2 ( struct cell *c ) {
struct
cell
*
cp
;
/* If I am a super-cell, return immediately. */
if
(
c
->
kick2
!=
NULL
)
if
(
c
->
kick2
!=
NULL
||
c
->
count
==
0
)
return
;
/* If this cell is not split, I'm in trouble. */
...
...
This diff is collapsed.
Click to expand it.
src/io.c
+
3
−
5
View file @
f012c4bc
...
...
@@ -271,7 +271,7 @@ void readArrayBackEnd(hid_t grp, char* name, enum DATA_TYPE type, int N, int dim
void
read_ic
(
char
*
fileName
,
double
dim
[
3
],
struct
part
**
parts
,
int
*
N
,
int
*
periodic
)
{
hid_t
h_file
=
0
,
h_grp
=
0
;
double
boxSize
[
3
]
=
{
0
.,
-
1
,
-
1
};
/* GADGET has only cubic boxes (in cosmological mode) */
double
boxSize
[
3
]
=
{
0
.
0
,
-
1
.
0
,
-
1
.
0
};
/* GADGET has only cubic boxes (in cosmological mode) */
int
numParticles
[
6
]
=
{
0
};
/* GADGET has 6 particle types. We only keep the type 0*/
/* Open file */
...
...
@@ -308,10 +308,8 @@ void read_ic ( char* fileName, double dim[3], struct part **parts, int* N, int*
*
N
=
numParticles
[
0
];
dim
[
0
]
=
boxSize
[
0
];
if
(
boxSize
[
1
]
<
0
)
dim
[
1
]
=
boxSize
[
0
];
if
(
boxSize
[
2
]
<
0
)
dim
[
2
]
=
boxSize
[
0
];
dim
[
1
]
=
(
boxSize
[
1
]
<
0
)
?
boxSize
[
0
]
:
boxSize
[
1
];
dim
[
2
]
=
(
boxSize
[
2
]
<
0
)
?
boxSize
[
0
]
:
boxSize
[
2
];
/* printf("read_ic: Found %d particles in a %speriodic box of size [%f %f %f]\n", */
/* *N, (periodic ? "": "non-"), dim[0], dim[1], dim[2]); */
...
...
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