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
2540f485
Commit
2540f485
authored
8 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Read the entropy flag as an array of 6 values
parent
dbb272c5
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!207
Read the entropy flag as an array of 6 values
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/parallel_io.c
+3
-1
3 additions, 1 deletion
src/parallel_io.c
src/serial_io.c
+3
-1
3 additions, 1 deletion
src/serial_io.c
src/single_io.c
+3
-1
3 additions, 1 deletion
src/single_io.c
with
9 additions
and
3 deletions
src/parallel_io.c
+
3
−
1
View file @
2540f485
...
...
@@ -410,7 +410,9 @@ void read_ic_parallel(char* fileName, const struct UnitSystem* internal_units,
if
(
h_grp
<
0
)
error
(
"Error while opening file header
\n
"
);
/* Read the relevant information and print status */
readAttribute
(
h_grp
,
"Flag_Entropy_ICs"
,
INT
,
flag_entropy
);
int
flag_entropy_temp
[
6
];
readAttribute
(
h_grp
,
"Flag_Entropy_ICs"
,
INT
,
flag_entropy_temp
);
*
flag_entropy
=
flag_entropy_temp
[
0
];
readAttribute
(
h_grp
,
"BoxSize"
,
DOUBLE
,
boxSize
);
readAttribute
(
h_grp
,
"NumPart_Total"
,
UINT
,
numParticles
);
readAttribute
(
h_grp
,
"NumPart_Total_HighWord"
,
UINT
,
numParticles_highWord
);
...
...
This diff is collapsed.
Click to expand it.
src/serial_io.c
+
3
−
1
View file @
2540f485
...
...
@@ -454,7 +454,9 @@ void read_ic_serial(char* fileName, const struct UnitSystem* internal_units,
if
(
h_grp
<
0
)
error
(
"Error while opening file header
\n
"
);
/* Read the relevant information and print status */
readAttribute
(
h_grp
,
"Flag_Entropy_ICs"
,
INT
,
flag_entropy
);
int
flag_entropy_temp
[
6
];
readAttribute
(
h_grp
,
"Flag_Entropy_ICs"
,
INT
,
flag_entropy_temp
);
*
flag_entropy
=
flag_entropy_temp
[
0
];
readAttribute
(
h_grp
,
"BoxSize"
,
DOUBLE
,
boxSize
);
readAttribute
(
h_grp
,
"NumPart_Total"
,
UINT
,
numParticles
);
readAttribute
(
h_grp
,
"NumPart_Total_HighWord"
,
UINT
,
numParticles_highWord
);
...
...
This diff is collapsed.
Click to expand it.
src/single_io.c
+
3
−
1
View file @
2540f485
...
...
@@ -365,7 +365,9 @@ void read_ic_single(char* fileName, const struct UnitSystem* internal_units,
if
(
h_grp
<
0
)
error
(
"Error while opening file header
\n
"
);
/* Read the relevant information and print status */
readAttribute
(
h_grp
,
"Flag_Entropy_ICs"
,
INT
,
flag_entropy
);
int
flag_entropy_temp
[
6
];
readAttribute
(
h_grp
,
"Flag_Entropy_ICs"
,
INT
,
flag_entropy_temp
);
*
flag_entropy
=
flag_entropy_temp
[
0
];
readAttribute
(
h_grp
,
"BoxSize"
,
DOUBLE
,
boxSize
);
readAttribute
(
h_grp
,
"NumPart_Total"
,
UINT
,
numParticles
);
readAttribute
(
h_grp
,
"NumPart_Total_HighWord"
,
UINT
,
numParticles_highWord
);
...
...
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