Introduction
Introduction Statistics Contact Development Disclaimer Help
tuse define for number of dimensions (ND) - granular - granular dynamics simula…
git clone git://src.adamsgaard.dk/granular
Log
Files
Refs
README
LICENSE
---
commit a2face6a7e2d9f90a9aab186848b4c964effad27
parent de5b411b0d19c619085a9895f352df8005eece08
Author: Anders Damsgaard <[email protected]>
Date: Thu, 18 Mar 2021 00:21:14 +0100
use define for number of dimensions (ND)
Diffstat:
M grain.h | 26 +++++++++++++-------------
A granular.h | 6 ++++++
2 files changed, 19 insertions(+), 13 deletions(-)
---
diff --git a/grain.h b/grain.h
t@@ -1,21 +1,21 @@
#ifndef GRANULAR_GRAIN_
#define GRANULAR_GRAIN_
-extern size_t nd;
+#include "granular.h"
struct grain {
double radius;
- double pos[nd];
- double vel[nd];
- double acc[nd];
- double force[nd];
- double angpos[nd];
- double angvel[nd];
- double angacc[nd];
- double torque[nd];
- double disp[nd];
- double forceext[nd];
+ double pos[ND];
+ double vel[ND];
+ double acc[ND];
+ double force[ND];
+ double angpos[ND];
+ double angvel[ND];
+ double angacc[ND];
+ double torque[ND];
+ double disp[ND];
+ double forceext[ND];
double density;
size_t fixed;
size_t rotating;
t@@ -24,9 +24,9 @@ struct grain {
double poissons_ratio;
double friction_coeff;
double tensile_strength;
- size_t gridpos[nd];
+ size_t gridpos[ND];
size_t ncontacts;
- double contact_stress[nd];
+ double contact_stress[ND];
double thermal_energy;
size_t color;
};
diff --git a/granular.h b/granular.h
t@@ -0,0 +1,6 @@
+#ifndef GRANULAR_
+#define GRANULAR_
+
+#define ND 3
+
+#endif
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.