Introduction
Introduction Statistics Contact Development Disclaimer Help
tinitialize slider values in setup_simulation - slidergrid - grid of elastic sl…
git clone git://src.adamsgaard.dk/slidergrid
Log
Files
Refs
README
LICENSE
---
commit 4dec9bb3157cedd9272eb7b2a9938c12ededcd24
parent 14e8686be58c808ac6a040a280c5f117ff13516f
Author: Anders Damsgaard <[email protected]>
Date: Tue, 22 Mar 2016 12:35:47 -0700
initialize slider values in setup_simulation
Diffstat:
M slidergrid/main.c | 4 ----
M test.c | 5 +++++
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/slidergrid/main.c b/slidergrid/main.c
t@@ -75,10 +75,6 @@ int main(int argc, char** argv)
printf("Sliders N = %d\n", sim.N);
}
- // set initial values for the sliders
- for (i=0; i<sim.N; i++)
- initialize_slider_values(&sim.sliders[i]);
-
// create bonds between sliders and update neighbor lists
find_and_bond_to_neighbors_n2(sim.sliders, sim.N, sim.bond_length_limit);
diff --git a/test.c b/test.c
t@@ -23,6 +23,11 @@ simulation setup_simulation()
// set slider masses and moments of inertia
int i;
for (i=0; i<sim.N; i++) {
+
+ // set default values
+ initialize_slider_values(&sim.sliders[i]);
+
+ // set custom values for certain parameters
sim.sliders[i].mass = 1.0e3;
sim.sliders[i].moment_of_inertia = 1.0e3;
sim.sliders[i].bond_parallel_stiffness = 1.0e5;
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.