tadd linear array of wall shear stresses - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 3c5a8efe14ab698d5695f0ec74d9f0e5074cfdd6
(DIR) parent d409f5cbe71dd52da3f10a388d712e9957a41ad4
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Wed, 14 Jan 2015 10:04:14 +0100
add linear array of wall shear stresses
Diffstat:
M src/datatypes.h | 3 ++-
M src/file_io.cpp | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/src/datatypes.h b/src/datatypes.h
t@@ -103,7 +103,8 @@ struct Walls {
unsigned int nw; // Number of walls (<= MAXWALLS)
int wmode[MAXWALLS]; // Wall modes
Float4* nx; // Wall normal and position
- Float4* mvfd; // Wall mass, velocity, force and dev. stress
+ Float4* mvfd; // Wall mass, velocity, force and normal stress
+ Float* tau; // Wall shear stress
};
// Structures containing fluid parameters
(DIR) diff --git a/src/file_io.cpp b/src/file_io.cpp
t@@ -202,6 +202,7 @@ void DEM::readbin(const char *target)
// Wall mass (x), velocity (y), force (z), and deviatoric stress (w)
walls.nx = new Float4[walls.nw];
walls.mvfd = new Float4[walls.nw];
+ walls.tau = new Float[walls.nw];
for (i = 0; i<walls.nw; ++i)
ifs.read(as_bytes(walls.wmode[i]), sizeof(walls.wmode[i]));
t@@ -219,7 +220,7 @@ void DEM::readbin(const char *target)
}
ifs.read(as_bytes(params.sigma0_A), sizeof(params.sigma0_A));
ifs.read(as_bytes(params.sigma0_f), sizeof(params.sigma0_f));
-
+ ifs.read(as_bytes(walls.tau), sizeof(walls.tau));
// Read bond parameters
ifs.read(as_bytes(params.lambda_bar), sizeof(params.lambda_bar));
t@@ -521,6 +522,7 @@ void DEM::writebin(const char *target)
}
ofs.write(as_bytes(params.sigma0_A), sizeof(params.sigma0_A));
ofs.write(as_bytes(params.sigma0_f), sizeof(params.sigma0_f));
+ ofs.write(as_bytes(walls.tau), sizeof(walls.tau));
// Write bond parameters
ofs.write(as_bytes(params.lambda_bar), sizeof(params.lambda_bar));