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

Add the ability to have i/o conversion functions for star particles as well.

parent 42cc0597
No related branches found
No related tags found
2 merge requests!688Star formation (non-MPI),!684Add star particles on-the-fly
......@@ -643,6 +643,30 @@ void io_copy_temp_buffer(void* temp, const struct engine* e,
io_convert_gpart_d_mapper, temp_d, N, copySize, 0,
(void*)&props);
} else if (props.convert_spart_f != NULL) {
/* Prepare some parameters */
float* temp_f = (float*)temp;
props.start_temp_f = (float*)temp;
props.e = e;
/* Copy the whole thing into a buffer */
threadpool_map((struct threadpool*)&e->threadpool,
io_convert_spart_f_mapper, temp_f, N, copySize, 0,
(void*)&props);
} else if (props.convert_spart_d != NULL) {
/* Prepare some parameters */
double* temp_d = (double*)temp;
props.start_temp_d = (double*)temp;
props.e = e;
/* Copy the whole thing into a buffer */
threadpool_map((struct threadpool*)&e->threadpool,
io_convert_spart_d_mapper, temp_d, N, copySize, 0,
(void*)&props);
} else {
error("Missing conversion function");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment