tclean up headers and add empty time loop - granular - granular dynamics simula… | |
git clone git://src.adamsgaard.dk/granular | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 9f9ae51babeb3000e46c54c26b26cf88dc7e8d8f | |
parent 40ba40a9674ffd919a157cab8d4ea0089e0f5fe2 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Thu, 25 Mar 2021 22:14:56 +0100 | |
clean up headers and add empty time loop | |
Diffstat: | |
M grain.h | 2 ++ | |
M granular.c | 2 ++ | |
M granularpacking.c | 5 +++-- | |
M simulation.c | 5 +++++ | |
M simulation.h | 2 ++ | |
5 files changed, 14 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/grain.h b/grain.h | |
t@@ -1,6 +1,8 @@ | |
#ifndef GRANULAR_GRAIN_ | |
#define GRANULAR_GRAIN_ | |
+#include <stdio.h> | |
+ | |
struct grain { | |
double radius; | |
diff --git a/granular.c b/granular.c | |
t@@ -13,6 +13,8 @@ main(int argc, char *argv[]) | |
sim_defaults(&sim); | |
sim_read_grains(&sim, stdin); | |
+ if (sim.t < sim.t_end) | |
+ sim_run_time_loop(&sim); | |
sim_print_grains_vtk(stdout, &sim); | |
sim_free(&sim); | |
diff --git a/granularpacking.c b/granularpacking.c | |
t@@ -1,4 +1,4 @@ | |
-#include <stdio.h> | |
+#include <stdlib.h> | |
#include <stdlib.h> | |
#include <err.h> | |
#include "packing.h" | |
t@@ -98,6 +98,7 @@ main(int argc, char *argv[]) | |
} | |
sim_print_grains(stdout, &sim); | |
- | |
sim_free(&sim); | |
+ | |
+ return 0; | |
} | |
diff --git a/simulation.c b/simulation.c | |
t@@ -181,3 +181,8 @@ sim_print_grains_vtk(FILE *stream, const struct simulation… | |
{ | |
print_grains_vtk(stream, sim->grains, sim->np); | |
} | |
+ | |
+void | |
+sim_run_time_loop(struct simulation *sim) | |
+{ | |
+} | |
diff --git a/simulation.h b/simulation.h | |
t@@ -44,4 +44,6 @@ void sim_print_grains(FILE *stream, const struct simulation … | |
void print_grains_vtk(FILE *stream, const struct grain *grains, size_t n); | |
void sim_print_grains_vtk(FILE *stream, const struct simulation *sim); | |
+void sim_run_time_loop(struct simulation *sim); | |
+ | |
#endif |