aboutsummaryrefslogtreecommitdiff
path: root/src/partial_sim.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-08-19 12:27:18 +0200
committerThomas White <taw@physics.org>2020-08-19 12:27:18 +0200
commitd94e9bfa02bc1ee2f0e14132ea9f5f9d2689c757 (patch)
treed85d4eae0e89fd9e8759cc09efc63dbfa4f9f037 /src/partial_sim.c
parentd2015e147044765de4a6ba4ae96c3e2699124a72 (diff)
Make Stream responsible for its own DataTemplate
It makes no sense for a different DataTemplate to be used for every frame in a stream. And this way makes everything much easier for users ot the API.
Diffstat (limited to 'src/partial_sim.c')
-rw-r--r--src/partial_sim.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/partial_sim.c b/src/partial_sim.c
index dfadb94f..a0f60e1e 100644
--- a/src/partial_sim.c
+++ b/src/partial_sim.c
@@ -346,7 +346,6 @@ static void *create_job(void *vqargs)
struct image *image;
image = stream_read_chunk(qargs->template_stream,
- qargs->dtempl,
STREAM_UNITCELL | STREAM_REFLECTIONS);
if ( image == NULL ) {
ERROR("Failed to read template chunk!\n");
@@ -474,7 +473,7 @@ static void finalise_job(void *vqargs, void *vwargs)
int ret;
ret = stream_write_chunk(qargs->stream, wargs->image,
- qargs->dtempl, STREAM_UNITCELL
+ STREAM_UNITCELL
| STREAM_REFLECTIONS
| STREAM_CRYSTALS);
if ( ret != 0 ) {
@@ -852,7 +851,7 @@ int main(int argc, char *argv[])
ERROR("You must give a filename for the output.\n");
return 1;
}
- stream = stream_open_for_write(output_file);
+ stream = stream_open_for_write(output_file, dtempl);
if ( stream == NULL ) {
ERROR("Couldn't open output file '%s'\n", output_file);
return 1;