Introduction
Introduction Statistics Contact Development Disclaimer Help
tadd bonding - slidergrid - grid of elastic sliders on a frictional surface
git clone git://src.adamsgaard.dk/slidergrid
Log
Files
Refs
README
LICENSE
---
commit 75872d905c2b8343e79dfd89b2122ad4d51b4f63
parent 6c55b2b5c3ebfea7827b1513dd5db5ac6cafd94b
Author: Anders Damsgaard <[email protected]>
Date: Tue, 15 Mar 2016 15:14:56 -0700
add bonding
Diffstat:
M grid.c | 17 +----------------
M grid.h | 5 +++++
M main.c | 2 ++
3 files changed, 8 insertions(+), 16 deletions(-)
---
diff --git a/grid.c b/grid.c
t@@ -34,7 +34,7 @@ slider* create_regular_slider_grid(
}
/* Find neighboring sliders within a defined cutoff distance */
-void find_neighbors_n2(
+void find_and_bond_to_neighbors_n2(
slider* sliders,
const int N,
const Float cutoff)
t@@ -58,21 +58,6 @@ void find_neighbors_n2(
}
}
}
-
-
-}
-
-// From the list of neighbors, find which sliders are within the debonding
-// distance
-void bond_to_neighbors(
- const slider* sliders,
- const int N,
- const Float debonding_distance)
-{
-
- // bond slider to the two closest neighbors in each direction
- //sliders[i].neighbors = malloc(sizeof(int)*
-
}
int save_slider_positions_to_file(
diff --git a/grid.h b/grid.h
t@@ -10,6 +10,11 @@ slider* create_regular_slider_grid(
const Float dy,
const Float dz);
+void find_and_bond_to_neighbors_n2(
+ slider* sliders,
+ const int N,
+ const Float cutoff);
+
int save_slider_positions_to_file(
const slider* sliders,
const int N,
diff --git a/main.c b/main.c
t@@ -18,6 +18,8 @@ int main(int argc, char** argv)
for (i=0; i<N; i++)
sliders[i].mass = 1.;
+ find_and_bond_to_neighbors_n2(sliders, N, 1.5);
+
// temporal loop
Float t;
const Float t_end = 1.;
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.