tadd missing contact.c - granular - granular dynamics simulation
 (HTM) git clone git://src.adamsgaard.dk/granular
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit cfa3bfe54ace36af3da7e87c548cebbd38549eb2
 (DIR) parent 8d4e5dd081797027aaa0e8b0b344ec02009f2499
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       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(-)
       ---
 (DIR) diff --git a/contact.c b/contact.c
       t@@ -0,0 +1,32 @@
       +#include <math.h>
       +#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;
       +        }
       +}