twrite interpolated velocities - sphere - GPU-based 3D discrete element method … | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 0f9c39f612cc0765f648a576b428ff8901ba3c58 | |
parent ddb69d1d3af5f0452a6a5d96f229513acb4320d2 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sat, 28 Jun 2014 15:11:01 +0200 | |
write interpolated velocities | |
Diffstat: | |
M src/file_io.cpp | 17 +++++++++++------ | |
1 file changed, 11 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/src/file_io.cpp b/src/file_io.cpp | |
t@@ -468,12 +468,17 @@ void DEM::writebin(const char *target) | |
for (y=0; y<ns.ny; y++) { | |
for (x=0; x<ns.nx; x++) { | |
i = idx(x,y,z); | |
- //ofs.write(as_bytes(ns.v[i].x), sizeof(Float)); | |
- //ofs.write(as_bytes(ns.v[i].y), sizeof(Float)); | |
- //ofs.write(as_bytes(ns.v[i].z), sizeof(Float)); | |
- ofs.write(as_bytes(ns.v_x[vidx(x,y,z)]), sizeof(Float)… | |
- ofs.write(as_bytes(ns.v_y[vidx(x,y,z)]), sizeof(Float)… | |
- ofs.write(as_bytes(ns.v_z[vidx(x,y,z)]), sizeof(Float)… | |
+ | |
+ // Interpolated cell-center velocities | |
+ ofs.write(as_bytes(ns.v[i].x), sizeof(Float)); | |
+ ofs.write(as_bytes(ns.v[i].y), sizeof(Float)); | |
+ ofs.write(as_bytes(ns.v[i].z), sizeof(Float)); | |
+ | |
+ // Cell-face velocities | |
+ //ofs.write(as_bytes(ns.v_x[vidx(x,y,z)]), sizeof(Floa… | |
+ //ofs.write(as_bytes(ns.v_y[vidx(x,y,z)]), sizeof(Floa… | |
+ //ofs.write(as_bytes(ns.v_z[vidx(x,y,z)]), sizeof(Floa… | |
+ | |
ofs.write(as_bytes(ns.p[i]), sizeof(Float)); | |
ofs.write(as_bytes(ns.phi[i]), sizeof(Float)); | |
ofs.write(as_bytes(ns.dphi[i]), sizeof(Float)); |