mdcore  0.1.5
Data Structures | Defines | Functions | Variables
/home/pedro/work/mdcore/src/bond.h File Reference

Go to the source code of this file.

Data Structures

struct  bond

Defines

#define bond_err_ok   0
#define bond_err_null   -1
#define bond_err_malloc   -2

Functions

int bond_eval (struct bond *b, int N, struct engine *e, double *epot_out)
 Evaluate a list of bonded interactoins.
int bond_evalf (struct bond *b, int N, struct engine *e, FPTYPE *f, double *epot_out)
 Evaluate a list of bonded interactoins.
int bond_eval_div (struct bond *b, int N, int nr_threads, int cid_div, struct engine *e, double *epot_out)
 Evaluate a list of bonded interactoins.

Variables

int bond_err

Define Documentation

#define bond_err_malloc   -2
#define bond_err_null   -1
#define bond_err_ok   0

Function Documentation

int bond_eval ( struct bond b,
int  N,
struct engine e,
double *  epot_out 
)

Evaluate a list of bonded interactoins.

Parameters:
bPointer to an array of bond.
NNr of bonds in b.
ePointer to the engine in which these bonds are evaluated.
epot_outPointer to a double in which to aggregate the potential energy.
Returns:
bond_err_ok or <0 on error (see bond_err)
int bond_eval_div ( struct bond b,
int  N,
int  nr_threads,
int  cid_div,
struct engine e,
double *  epot_out 
)

Evaluate a list of bonded interactoins.

Parameters:
bPointer to an array of bond.
NNr of bonds in b.
nr_threadsNumber of computational threads.
cid_modcell id modulus.
ePointer to the engine in which these bonds are evaluated.
epot_outPointer to a double in which to aggregate the potential energy.
Returns:
bond_err_ok or <0 on error (see bond_err)

Computes only the interactions on particles inside cells c where c->id % nr_threads == cid_mod.

int bond_evalf ( struct bond b,
int  N,
struct engine e,
FPTYPE *  f,
double *  epot_out 
)

Evaluate a list of bonded interactoins.

Parameters:
bPointer to an array of bond.
NNr of bonds in b.
ePointer to the engine in which these bonds are evaluated.
fAn array of FPTYPE in which to aggregate the resulting forces.
epot_outPointer to a double in which to aggregate the potential energy.

This function differs from bond_eval in that the forces are added to the array f instead of directly in the particle data.

Returns:
bond_err_ok or <0 on error (see bond_err)

Variable Documentation

int bond_err

ID of the last error

The ID of the last error.

 All Data Structures Files Functions Variables Typedefs Enumerator Defines