Skip to content
Snippets Groups Projects
Commit 5a69314f authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Compile with clang

parent 17cf7788
Branches
Tags
2 merge requests!136Master,!79First version of the multiple time-stepping
...@@ -568,3 +568,18 @@ void cell_init_parts(struct cell *c, void *data) { ...@@ -568,3 +568,18 @@ void cell_init_parts(struct cell *c, void *data) {
c->t_end_min = 0.; 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;
}
...@@ -178,5 +178,6 @@ int cell_unpack(struct pcell *pc, struct cell *c, struct space *s); ...@@ -178,5 +178,6 @@ int cell_unpack(struct pcell *pc, struct cell *c, struct space *s);
int cell_getsize(struct cell *c); int cell_getsize(struct cell *c);
int cell_link(struct cell *c, struct part *parts); int cell_link(struct cell *c, struct part *parts);
void cell_init_parts(struct cell *c, void *data); void cell_init_parts(struct cell *c, void *data);
void cell_clean_links(struct cell * c, void * data);
#endif /* SWIFT_CELL_H */ #endif /* SWIFT_CELL_H */
...@@ -1237,13 +1237,7 @@ void space_init(struct space *s, double dim[3], struct part *parts, int N, ...@@ -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 space_link_cleanup(struct space *s) {
void cell_clean_links(struct cell * c, void * data) { /* Recursively apply the cell link cleaning routine */
c->density = NULL;
c->nr_density = 0;
c->force = NULL;
c->nr_force = 0;
}
space_map_cells_pre(s, 1, cell_clean_links, NULL); space_map_cells_pre(s, 1, cell_clean_links, NULL);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment