33 lines
690 B
C
33 lines
690 B
C
#ifndef interaction_h
|
|
#define interaction_h
|
|
|
|
#include <Python.h>
|
|
#include <numpy/ndarraytypes.h>
|
|
#include <numpy/ufuncobject.h>
|
|
|
|
/*
|
|
* This is a quite generic force function mapping a
|
|
* distance to the magnitude of a force. The coefficients
|
|
* are an array of length 19 and the force function
|
|
* is given as:
|
|
*
|
|
* (c0 + c1*r + c2*r^2 + ... + c6*r^6) * c7 * exp(c8*(r - c9))
|
|
* + c10 * exp(c11 * (r - c12))
|
|
* + c13 * exp(c14 * (r - c15)^2)
|
|
* + c16 * exp(c17 * (r - c18)^2)
|
|
* */
|
|
static float
|
|
interaction_force_function
|
|
( float r
|
|
, float * coefficients);
|
|
|
|
static void
|
|
interaction_ufunc_float2D
|
|
( char ** args
|
|
, npy_intp * dimensions
|
|
, npy_intp * steps
|
|
, void * data);
|
|
|
|
|
|
#endif
|