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
914dd1c1
Commit
914dd1c1
authored
12 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Improved error messages in the ic.c file.
Former-commit-id: e59ca444428547c14c9764e976be34c76b89e37f
parent
58f63f93
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ic.c
+12
-13
12 additions, 13 deletions
src/ic.c
with
12 additions
and
13 deletions
src/ic.c
+
12
−
13
View file @
914dd1c1
...
...
@@ -153,9 +153,9 @@ void readArrayBackEnd(hid_t grp, char* name, enum DATA_TYPE type, int N, int dim
htri_t
exist
=
0
;
void
*
temp
;
int
i
=
0
;
size_t
typeSize
=
sizeOfType
(
type
);
size_t
copySize
=
typeSize
*
dim
;
size_t
partSize
=
sizeof
(
struct
part
);
const
size_t
typeSize
=
sizeOfType
(
type
);
const
size_t
copySize
=
typeSize
*
dim
;
const
size_t
partSize
=
sizeof
(
struct
part
);
char
*
temp_c
=
0
;
/* Check whether the dataspace exists or not */
...
...
@@ -185,7 +185,7 @@ void readArrayBackEnd(hid_t grp, char* name, enum DATA_TYPE type, int N, int dim
}
}
printf
(
"readArray: Reading '%s' array...
\n
"
,
name
);
printf
(
"readArray: Reading
%s
'%s' array...
\n
"
,
importance
==
COMPULSORY
?
"compulsory"
:
"optional "
,
name
);
/* Open data space */
h_data
=
H5Dopen
(
grp
,
name
);
...
...
@@ -282,17 +282,16 @@ void read_ic ( char* fileName, double dim[3], struct part **parts, int* N, int*
/* Open header to read simulation properties */
printf
(
"read_ic: Reading runtime parameters...
\n
"
);
/* h_grp = H5Gopen(h_file, "/RuntimePars"); */
/* if(h_grp < 0) */
/* error("Error while opening runtime parameters\n"); */
/* /\* Read the relevant information *\/ */
/* readAttribute(h_grp, "PeriodicBoundariesOn", INT, periodic); */
h_grp
=
H5Gopen
(
h_file
,
"/RuntimePars"
);
if
(
h_grp
<
0
)
error
(
"Error while opening runtime parameters
\n
"
);
/* /\* Close runtime parameters *\/ */
/* H5Gclose(h_grp); */
*
periodic
=
1
;
/* Read the relevant information */
readAttribute
(
h_grp
,
"PeriodicBoundariesOn"
,
INT
,
periodic
);
/* Close runtime parameters */
H5Gclose
(
h_grp
);
/* Open header to read simulation properties */
printf
(
"read_ic: Reading file header...
\n
"
);
h_grp
=
H5Gopen
(
h_file
,
"/Header"
);
...
...
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