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
5a69314f
Commit
5a69314f
authored
9 years ago
by
Matthieu Schaller
Browse files
Options
Downloads
Patches
Plain Diff
Compile with clang
parent
17cf7788
No related branches found
No related tags found
2 merge requests
!136
Master
,
!79
First version of the multiple time-stepping
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cell.c
+15
-0
15 additions, 0 deletions
src/cell.c
src/cell.h
+1
-0
1 addition, 0 deletions
src/cell.h
src/space.c
+2
-8
2 additions, 8 deletions
src/space.c
with
18 additions
and
8 deletions
src/cell.c
+
15
−
0
View file @
5a69314f
...
...
@@ -568,3 +568,18 @@ void cell_init_parts(struct cell *c, void *data) {
c
->
t_end_min
=
0
.;
}
/**
* @brief Cleans the links in a given cell.
*
* @param c Cell to act upon
* @param data Unused parameter
*/
void
cell_clean_links
(
struct
cell
*
c
,
void
*
data
)
{
c
->
density
=
NULL
;
c
->
nr_density
=
0
;
c
->
force
=
NULL
;
c
->
nr_force
=
0
;
}
This diff is collapsed.
Click to expand it.
src/cell.h
+
1
−
0
View file @
5a69314f
...
...
@@ -178,5 +178,6 @@ int cell_unpack(struct pcell *pc, struct cell *c, struct space *s);
int
cell_getsize
(
struct
cell
*
c
);
int
cell_link
(
struct
cell
*
c
,
struct
part
*
parts
);
void
cell_init_parts
(
struct
cell
*
c
,
void
*
data
);
void
cell_clean_links
(
struct
cell
*
c
,
void
*
data
);
#endif
/* SWIFT_CELL_H */
This diff is collapsed.
Click to expand it.
src/space.c
+
2
−
8
View file @
5a69314f
...
...
@@ -1237,13 +1237,7 @@ void space_init(struct space *s, double dim[3], struct part *parts, int N,
*/
void
space_link_cleanup
(
struct
space
*
s
)
{
void
cell_clean_links
(
struct
cell
*
c
,
void
*
data
)
{
c
->
density
=
NULL
;
c
->
nr_density
=
0
;
c
->
force
=
NULL
;
c
->
nr_force
=
0
;
}
/* Recursively apply the cell link cleaning routine */
space_map_cells_pre
(
s
,
1
,
cell_clean_links
,
NULL
);
}
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