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
cdea145c
Commit
cdea145c
authored
9 years ago
by
Pedro Gonnet
Browse files
Options
Downloads
Patches
Plain Diff
fix some things.
parent
40edb635
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!118
One major change to replace all gpart id/parts with the new id_or_neg_offset.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/part.c
+1
-1
1 addition, 1 deletion
src/part.c
src/part.h
+3
-2
3 additions, 2 deletions
src/part.h
with
4 additions
and
3 deletions
src/part.c
+
1
−
1
View file @
cdea145c
...
...
@@ -37,7 +37,7 @@
*/
void
part_relink_gparts
(
struct
part
*
parts
,
size_t
N
,
ptrdiff_t
offset
)
{
for
(
size_t
k
=
0
;
k
<
N
;
k
++
)
{
parts
[
k
]
->
gpart
->
id_or_neg_offset
=
-
(
k
+
offset
);
parts
[
k
]
.
gpart
->
id_or_neg_offset
=
-
(
k
+
offset
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/part.h
+
3
−
2
View file @
cdea145c
...
...
@@ -24,6 +24,7 @@
/* Some standard headers. */
#include
<stdlib.h>
#include
<stddef.h>
/* MPI headers. */
#ifdef WITH_MPI
...
...
@@ -51,8 +52,8 @@
#include
"./gravity/Default/gravity_part.h"
void
part_relink_gparts
(
struct
part
s
*
parts
,
size_t
N
,
ptrdiff_t
offset
);
void
part_relink_parts
(
struct
gpart
s
*
parts
,
size_t
N
);
void
part_relink_gparts
(
struct
part
*
parts
,
size_t
N
,
ptrdiff_t
offset
);
void
part_relink_parts
(
struct
gpart
*
g
parts
,
size_t
N
,
struct
part
*
parts
);
#ifdef WITH_MPI
void
part_create_mpi_type
(
MPI_Datatype
*
part_type
);
void
xpart_create_mpi_type
(
MPI_Datatype
*
xpart_type
);
...
...
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