tfix function calls - slidergrid - grid of elastic sliders on a frictional surface
(HTM) git clone git://src.adamsgaard.dk/slidergrid
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit e74cb395a9425ba9819ff606866e77e5ee9dfa93
(DIR) parent 9361f609b8753a5ee25000d7ff5269592b8f82ec
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Tue, 22 Mar 2016 14:34:12 -0700
fix function calls
Diffstat:
M slidergrid/main.c | 3 +--
M slidergrid/slider.c | 10 +++++-----
2 files changed, 6 insertions(+), 7 deletions(-)
---
(DIR) diff --git a/slidergrid/main.c b/slidergrid/main.c
t@@ -129,7 +129,6 @@ int main(int argc, char** argv)
for (i=0; i<sim.N; i++)
project_slider_position(&sim.sliders[i], sim.dt, sim.iteration);
-
// resolve slider-to-slider interaction
for (i=0; i<sim.N; i++) {
t@@ -156,7 +155,7 @@ int main(int argc, char** argv)
#endif
}
- for (i=0; i<sim.N; i++) {
+ for (i=0; i<sim.N; i++)
update_kinematics(&sim.sliders[i], sim.dt, sim.iteration);
if (time_since_file >= sim.file_interval) {
(DIR) diff --git a/slidergrid/slider.c b/slidergrid/slider.c
t@@ -118,7 +118,7 @@ void update_kinematics(slider* s, Float dt, long int iteration)
// Find the relative displacement and velocity between two sliders
void slider_displacement(slider* s1, const slider s2,
- const int idx_neighbor, const int iteration, const Float dt)
+ const int idx_neighbor, const int iteration)
{
// vector pointing from neighbor (s2) position to this slider position (s1)
t@@ -152,7 +152,7 @@ void slider_displacement(slider* s1, const slider s2,
// read previous inter-slider distance vector
const Float3 dist0 = s1->neighbor_distance[idx_neighbor];
- const Float3 dist_future = subtract_float3(s1_pos_future, s2_pos_future);
+ const Float3 dist_future = subtract_float3(s1->pos_future, s2.pos_future);
// increment in inter-slider distance, divide by two to get displacement
// over 1 time step
t@@ -233,8 +233,7 @@ void slider_neighbor_interaction(
slider* s,
const slider* sliders,
const int N,
- const int iteration,
- const Float dt)
+ const int iteration)
{
int idx_neighbor;
for (idx_neighbor=0; idx_neighbor<MAX_NEIGHBORS; idx_neighbor++) {
t@@ -247,7 +246,8 @@ void slider_neighbor_interaction(
slider_displacement(
s, sliders[s->neighbors[idx_neighbor]],
- idx_neighbor, iteration, dt);
+ idx_neighbor, iteration);
+
printf("- %d: rel_disp = %f %f %f\n",
idx_neighbor,
s->neighbor_relative_distance_displacement[idx_neighbor].x,