Skip to content
Prev Previous commit
Next Next commit
adding comments to split_op.c
  • Loading branch information
Gathros committed Aug 5, 2018
commit 89a8ca6fc6024d9fe38be3521c16db15362d78a9
3 changes: 3 additions & 0 deletions contents/split-operator_method/code/c/split_op.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <string.h>
#include <math.h>

// Using fftw3 library.
#include <fftw3.h>

struct params {
Expand Down Expand Up @@ -132,6 +133,8 @@ void split_op(struct params par, struct operators opr) {
}
}

// Writing data into a file in the format of:
// index, density, real potential.
char filename[256];
sprintf(filename, "output%lu.dat", i);
FILE *fp = fopen(filename, "w");
Expand Down