diff --git a/logger/logger_particle.c b/logger/logger_particle.c index 9d5bb0c8607128b2e14e61ddf03a73b4342ac339..4a4191ab61b59e06900480cf3c17fa61415c439e 100644 --- a/logger/logger_particle.c +++ b/logger/logger_particle.c @@ -18,9 +18,9 @@ void particle_print(const struct particle *p) { printf("Mass: %g\n", p->mass); printf("Time: %g\n", p->time); printf("Cutoff Radius: %g\n", p->h); - printf("Position: (%g, %g, %g)\n", p->pos[0], p->pos[1], p->pos[2]); - printf("Velocity: (%g, %g, %g)\n", p->vel[0], p->vel[1], p->vel[2]); - printf("Acceleration: (%g, %g, %g)\n", p->acc[0], p->acc[1], p->acc[2]); + printf("Positions: (%g, %g, %g)\n", p->pos[0], p->pos[1], p->pos[2]); + printf("Velocities: (%g, %g, %g)\n", p->vel[0], p->vel[1], p->vel[2]); + printf("Accelerations: (%g, %g, %g)\n", p->acc[0], p->acc[1], p->acc[2]); printf("Entropy: %g\n", p->entropy); printf("Density: %g\n", p->density); } @@ -72,15 +72,15 @@ int particle_read_field(struct particle *part, void *map, size_t *offset, const char *field, const size_t size) { void *p = NULL; - if (strcmp("position", field) == 0) { + if (strcmp("positions", field) == 0) { p = &part->pos; - } else if (strcmp("velocity", field) == 0) { + } else if (strcmp("velocities", field) == 0) { p = &part->vel; - } else if (strcmp("acceleration", field) == 0) { + } else if (strcmp("accelerations", field) == 0) { p = &part->acc; } else if (strcmp("entropy", field) == 0) { p = &part->entropy; - } else if (strcmp("cutoff radius", field) == 0) { + } else if (strcmp("smoothing length", field) == 0) { p = &part->h; } else if (strcmp("density", field) == 0) { p = &part->density; diff --git a/logger/logger_python_wrapper.c b/logger/logger_python_wrapper.c index 475c38b641becd2b20d21ab2076a29ef79e53598..d4eba9b25969784ad0c6b2d8f529726f86697aae 100644 --- a/logger/logger_python_wrapper.c +++ b/logger/logger_python_wrapper.c @@ -93,15 +93,15 @@ static PyObject *loadFromIndex(__attribute__((unused)) PyObject *self, dim[1] = DIM; /* init output */ - if (header_is_present(&h, "position")) { + if (header_is_present(&h, "positions")) { pos = (PyArrayObject *)PyArray_SimpleNew(2, dim, NPY_DOUBLE); } - if (header_is_present(&h, "velocity")) { + if (header_is_present(&h, "velocities")) { vel = (PyArrayObject *)PyArray_SimpleNew(2, dim, NPY_FLOAT); } - if (header_is_present(&h, "acceleration")) { + if (header_is_present(&h, "accelerations")) { acc = (PyArrayObject *)PyArray_SimpleNew(2, dim, NPY_FLOAT); } @@ -110,7 +110,7 @@ static PyObject *loadFromIndex(__attribute__((unused)) PyObject *self, (PyArrayObject *)PyArray_SimpleNew(1, PyArray_DIMS(offset), NPY_FLOAT); } - if (header_is_present(&h, "cutoff radius")) { + if (header_is_present(&h, "smoothing length")) { h_sph = (PyArrayObject *)PyArray_SimpleNew(1, PyArray_DIMS(offset), NPY_FLOAT); } @@ -196,16 +196,16 @@ static PyObject *loadFromIndex(__attribute__((unused)) PyObject *self, /* construct return */ PyObject *dict = PyDict_New(); - PyObject *key = PyUnicode_FromString("position"); + PyObject *key = PyUnicode_FromString("positions"); PyDict_SetItem(dict, key, PyArray_Return(pos)); if (vel) { - key = PyUnicode_FromString("velocity"); + key = PyUnicode_FromString("velocities"); PyDict_SetItem(dict, key, PyArray_Return(vel)); } if (acc) { - key = PyUnicode_FromString("acceleration"); + key = PyUnicode_FromString("accelerations"); PyDict_SetItem(dict, key, PyArray_Return(acc)); }