tutil.h - granular - granular dynamics simulation
 (HTM) git clone git://src.adamsgaard.dk/granular
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       tutil.h (834B)
       ---
            1 #ifndef GRANULAR_UTIL_
            2 #define GRANULAR_UTIL_
            3 
            4 #define LENGTH(X)        (size_t)(sizeof X / sizeof X[0])
            5 
            6 void warn_parameter_value(const char message[], const double value, int *status);
            7 void check_float(const char name[], const double value, int *status);
            8 void check_float_non_negative(const char name[], const double value, int *status);
            9 void check_float_positive(const char name[], const double value, int *status);
           10 void check_int_bool(const char name[], const int value, int *status);
           11 void check_int_non_negative(const char name[], const int value, int *status);
           12 
           13 double residual(const double new_val, const double old_val);
           14 
           15 double random_value_uniform(double min, double max);
           16 double random_value_powerlaw(double min, double max);
           17 
           18 void * xreallocarray(void *m, size_t n, size_t s);
           19 
           20 double harmonic_mean(double a, double b);
           21 
           22 #endif