Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
f9c1d350
Commit
f9c1d350
authored
Feb 15, 2017
by
Matthieu Schaller
Browse files
Code formatting
parent
60906bb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/parallel_io.c
View file @
f9c1d350
...
...
@@ -431,11 +431,12 @@ void read_ic_parallel(char* fileName, const struct UnitSystem* internal_units,
*
flag_entropy
=
flag_entropy_temp
[
0
];
readAttribute
(
h_grp
,
"BoxSize"
,
DOUBLE
,
boxSize
);
readAttribute
(
h_grp
,
"NumPart_Total"
,
LONGLONG
,
numParticles
);
readAttribute
(
h_grp
,
"NumPart_Total_HighWord"
,
LONGLONG
,
numParticles_highWord
);
readAttribute
(
h_grp
,
"NumPart_Total_HighWord"
,
LONGLONG
,
numParticles_highWord
);
for
(
int
ptype
=
0
;
ptype
<
NUM_PARTICLE_TYPES
;
++
ptype
)
N_total
[
ptype
]
=
(
numParticles
[
ptype
])
+
(
numParticles_highWord
[
ptype
]
<<
32
);
N_total
[
ptype
]
=
(
numParticles
[
ptype
])
+
(
numParticles_highWord
[
ptype
]
<<
32
);
dim
[
0
]
=
boxSize
[
0
];
dim
[
1
]
=
(
boxSize
[
1
]
<
0
)
?
boxSize
[
0
]
:
boxSize
[
1
];
...
...
src/serial_io.c
View file @
f9c1d350
...
...
@@ -483,11 +483,12 @@ void read_ic_serial(char* fileName, const struct UnitSystem* internal_units,
*
flag_entropy
=
flag_entropy_temp
[
0
];
readAttribute
(
h_grp
,
"BoxSize"
,
DOUBLE
,
boxSize
);
readAttribute
(
h_grp
,
"NumPart_Total"
,
LONGLONG
,
numParticles
);
readAttribute
(
h_grp
,
"NumPart_Total_HighWord"
,
LONGLONG
,
numParticles_highWord
);
readAttribute
(
h_grp
,
"NumPart_Total_HighWord"
,
LONGLONG
,
numParticles_highWord
);
for
(
int
ptype
=
0
;
ptype
<
NUM_PARTICLE_TYPES
;
++
ptype
)
N_total
[
ptype
]
=
(
numParticles
[
ptype
])
+
(
numParticles_highWord
[
ptype
]
<<
32
);
N_total
[
ptype
]
=
(
numParticles
[
ptype
])
+
(
numParticles_highWord
[
ptype
]
<<
32
);
dim
[
0
]
=
boxSize
[
0
];
dim
[
1
]
=
(
boxSize
[
1
]
<
0
)
?
boxSize
[
0
]
:
boxSize
[
1
];
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment