From c4f5b25b89e0c5c07eed53fb4c554967de5b56c1 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 27 Mar 2018 14:48:13 -0400 Subject: record field values --- src/wolff_vector.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/wolff_vector.c b/src/wolff_vector.c index d283346..a7fd292 100644 --- a/src/wolff_vector.c +++ b/src/wolff_vector.c @@ -253,8 +253,14 @@ int main(int argc, char *argv[]) { FILE *outfile = fopen("out.m", "a"); - fprintf(outfile, "<|D->%" PRID ",L->%" PRIL ",q->%" PRIq ",T->%.15f", D, L, q, T); - fprintf(outfile, ",E->%.15f,\\[Delta]E->%.15f,C->%.15f,\\[Delta]C->%.15f,M->{", E->x / h->nv, E->dx / h->nv, E->c / h->nv, E->dc / h->nv); + fprintf(outfile, "<|D->%" PRID ",L->%" PRIL ",q->%" PRIq ",T->%.15f,H->{", D, L, q, T); + for (q_t i = 0; i < q; i++) { + fprintf(outfile, "%.15f", H[i]); + if (i != q-1) { + fprintf(outfile, ","); + } + } + fprintf(outfile, "},E->%.15f,\\[Delta]E->%.15f,C->%.15f,\\[Delta]C->%.15f,M->{", E->x / h->nv, E->dx / h->nv, E->c / h->nv, E->dc / h->nv); for (q_t i = 0; i < q; i++) { fprintf(outfile, "%.15f", M[i]->x / h->nv); if (i != q-1) { -- cgit v1.2.3-70-g09d2