mdcore  0.1.5
Defines | Functions | Variables
/home/pedro/work/mdcore/src/exclusion.c File Reference
#include "../config.h"
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include <limits.h>
#include "cycle.h"
#include "errs.h"
#include "fptype.h"
#include "lock.h"
#include "part.h"
#include "potential.h"
#include "potential_eval.h"
#include "cell.h"
#include "fifo.h"
#include "space.h"
#include "engine.h"
#include "exclusion.h"

Defines

#define error(id)   ( exclusion_err = errs_register( id , exclusion_err_msg[-(id)] , __LINE__ , __FUNCTION__ , __FILE__ ) )

Functions

int exclusion_eval_div (struct exclusion *b, int N, int nr_threads, int cid_div, struct engine *e, double *epot_out)
 Evaluate a list of exclusioned interactoins.
int exclusion_eval_mod (struct exclusion *b, int N, int nr_threads, int cid_mod, struct engine *e, double *epot_out)
 Evaluate a list of exclusioned interactoins.
int exclusion_eval (struct exclusion *b, int N, struct engine *e, double *epot_out)
 Evaluate a list of exclusioned interactoins.

Variables

int exclusion_err = exclusion_err_ok
unsigned int exclusion_rcount = 0
char * exclusion_err_msg [2]

Define Documentation

#define error (   id)    ( exclusion_err = errs_register( id , exclusion_err_msg[-(id)] , __LINE__ , __FUNCTION__ , __FILE__ ) )

Function Documentation

int exclusion_eval ( struct exclusion b,
int  N,
struct engine e,
double *  epot_out 
)

Evaluate a list of exclusioned interactoins.

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

Evaluate a list of exclusioned interactoins.

Parameters:
bPointer to an array of exclusion.
NNr of exclusions in b.
nr_threadsNumber of computational threads.
cid_divcell id modulus.
ePointer to the engine in which these exclusions are evaluated.
epot_outPointer to a double in which to aggregate the potential energy.
Returns:
exclusion_err_ok or <0 on error (see exclusion_err)

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

int exclusion_eval_mod ( struct exclusion b,
int  N,
int  nr_threads,
int  cid_mod,
struct engine e,
double *  epot_out 
)

Evaluate a list of exclusioned interactoins.

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

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


Variable Documentation

The ID of the last error.

Initial value:
 {
        "Nothing bad happened.",
    "An unexpected NULL pointer was encountered."
        }
unsigned int exclusion_rcount = 0
 All Data Structures Files Functions Variables Typedefs Enumerator Defines