| Date: Thu, 8 Apr 2021 22:42:45 +0200
add missing contact.c
Diffstat:
A contact.c | 32 +++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+), 0 deletions(-)
--- |
| t@@ -0,0 +1,32 @@
+#include
+#include "contact.h"
+
+void
+contact_defaults(struct contact *c)
+{
+ int d;
+
+ c->active = 0;
+ c->i = c->j = 0;
+ c->age = NAN;
+ c->overlap = NAN;
+ for (d = 0; d < 3; d++) {
+ c->centerdist[d] = NAN;
+ c->tandisp[d] = NAN;
+ c->stress[d] = NAN;
+ }
+}
+
+void
+contact_new(struct contact *c, size_t i, size_t j)
+{
+ int d;
+
+ c->active = 1;
+ c->i = i;
+ c->j = j;
+ c->age = 0.0;
+ for (d = 0; d < 3; d++) {
+ c->tandisp[d] = 0.0;
+ }
+} |