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
0b5ebeb4
Commit
0b5ebeb4
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
More pointer const-correctness
parent
47203584
No related branches found
No related tags found
2 merge requests
!136
Master
,
!131
Redistribute fixes
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common_io.c
+3
-3
3 additions, 3 deletions
src/common_io.c
src/common_io.h
+3
-3
3 additions, 3 deletions
src/common_io.h
with
6 additions
and
6 deletions
src/common_io.c
+
3
−
3
View file @
0b5ebeb4
...
@@ -502,7 +502,7 @@ void writeXMFline(FILE* xmfFile, char* fileName, char* partTypeGroupName,
...
@@ -502,7 +502,7 @@ void writeXMFline(FILE* xmfFile, char* fileName, char* partTypeGroupName,
* @param gparts The array of #gpart freshly read in.
* @param gparts The array of #gpart freshly read in.
* @param Ndm The number of DM particles read in.
* @param Ndm The number of DM particles read in.
*/
*/
void
prepare_dm_gparts
(
struct
gpart
*
gparts
,
size_t
Ndm
)
{
void
prepare_dm_gparts
(
struct
gpart
*
const
gparts
,
size_t
Ndm
)
{
/* Let's give all these gparts a negative id */
/* Let's give all these gparts a negative id */
for
(
size_t
i
=
0
;
i
<
Ndm
;
++
i
)
{
for
(
size_t
i
=
0
;
i
<
Ndm
;
++
i
)
{
...
@@ -527,7 +527,7 @@ void prepare_dm_gparts(struct gpart* gparts, size_t Ndm) {
...
@@ -527,7 +527,7 @@ void prepare_dm_gparts(struct gpart* gparts, size_t Ndm) {
* @param Ngas The number of gas particles read in.
* @param Ngas The number of gas particles read in.
* @param Ndm The number of DM particles read in.
* @param Ndm The number of DM particles read in.
*/
*/
void
duplicate_hydro_gparts
(
struct
part
*
parts
,
struct
gpart
*
gparts
,
void
duplicate_hydro_gparts
(
struct
part
*
const
parts
,
struct
gpart
*
const
gparts
,
size_t
Ngas
,
size_t
Ndm
)
{
size_t
Ngas
,
size_t
Ndm
)
{
for
(
size_t
i
=
0
;
i
<
Ngas
;
++
i
)
{
for
(
size_t
i
=
0
;
i
<
Ngas
;
++
i
)
{
...
@@ -557,7 +557,7 @@ void duplicate_hydro_gparts(struct part* parts, struct gpart* gparts,
...
@@ -557,7 +557,7 @@ void duplicate_hydro_gparts(struct part* parts, struct gpart* gparts,
* @param dmparts The array of #gpart containg DM particles to be filled.
* @param dmparts The array of #gpart containg DM particles to be filled.
* @param Ndm The number of DM particles.
* @param Ndm The number of DM particles.
*/
*/
void
collect_dm_gparts
(
struct
gpart
*
gparts
,
size_t
Ntot
,
struct
gpart
*
dmparts
,
void
collect_dm_gparts
(
const
struct
gpart
*
const
gparts
,
size_t
Ntot
,
struct
gpart
*
const
dmparts
,
size_t
Ndm
)
{
size_t
Ndm
)
{
size_t
count
=
0
;
size_t
count
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/common_io.h
+
3
−
3
View file @
0b5ebeb4
...
@@ -78,10 +78,10 @@ extern const char* particle_type_names[];
...
@@ -78,10 +78,10 @@ extern const char* particle_type_names[];
hid_t
hdf5Type
(
enum
DATA_TYPE
type
);
hid_t
hdf5Type
(
enum
DATA_TYPE
type
);
size_t
sizeOfType
(
enum
DATA_TYPE
type
);
size_t
sizeOfType
(
enum
DATA_TYPE
type
);
void
collect_dm_gparts
(
struct
gpart
*
gparts
,
size_t
Ntot
,
struct
gpart
*
dmparts
,
void
collect_dm_gparts
(
const
struct
gpart
*
const
gparts
,
size_t
Ntot
,
struct
gpart
*
const
dmparts
,
size_t
Ndm
);
size_t
Ndm
);
void
prepare_dm_gparts
(
struct
gpart
*
gparts
,
size_t
Ndm
);
void
prepare_dm_gparts
(
struct
gpart
*
const
gparts
,
size_t
Ndm
);
void
duplicate_hydro_gparts
(
struct
part
*
parts
,
struct
gpart
*
gparts
,
void
duplicate_hydro_gparts
(
struct
part
*
const
parts
,
struct
gpart
*
const
gparts
,
size_t
Ngas
,
size_t
Ndm
);
size_t
Ngas
,
size_t
Ndm
);
void
readAttribute
(
hid_t
grp
,
char
*
name
,
enum
DATA_TYPE
type
,
void
*
data
);
void
readAttribute
(
hid_t
grp
,
char
*
name
,
enum
DATA_TYPE
type
,
void
*
data
);
...
...
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