mdcore  0.1.5
Defines | Functions
/home/pedro/work/mdcore/src/engine_rigid.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include "../config.h"
#include <omp.h>
#include "cycle.h"
#include "errs.h"
#include "fptype.h"
#include "lock.h"
#include "part.h"
#include "cell.h"
#include "fifo.h"
#include "space.h"
#include "potential.h"
#include "runner.h"
#include "bond.h"
#include "rigid.h"
#include "angle.h"
#include "dihedral.h"
#include "exclusion.h"
#include "reader.h"
#include "engine.h"

Defines

#define error(id)   ( engine_err = errs_register( id , engine_err_msg[-(id)] , __LINE__ , __FUNCTION__ , __FILE__ ) )

Functions

int engine_rigid_add (struct engine *e, int pid, int pjd, double d)
 Add a rigid constraint to the engine.
int engine_rigid_unsort (struct engine *e)
 Shuffle the rigid constraints randomly.
int engine_rigid_sort (struct engine *e)
 Split the rigids into local, semilocal and non-local.
int engine_rigid_eval (struct engine *e)
 Resolve the constraints.

Define Documentation

#define error (   id)    ( engine_err = errs_register( id , engine_err_msg[-(id)] , __LINE__ , __FUNCTION__ , __FILE__ ) )

Function Documentation

int engine_rigid_add ( struct engine e,
int  pid,
int  pjd,
double  d 
)

Add a rigid constraint to the engine.

Parameters:
eThe engine.
pidThe ID of the first part.
pjdThe ID of the second part.
Returns:
The index of the rigid constraint or < 0 on error (see engine_err).

Beware that currently all particles have to have been inserted before the rigid constraints are added!

int engine_rigid_eval ( struct engine e)

Resolve the constraints.

Parameters:
eThe engine.
Returns:
engine_err_ok or < 0 on error (see engine_err).

Note that if in parallel, engine_rigid_sort should be called before this routine.

int engine_rigid_sort ( struct engine e)

Split the rigids into local, semilocal and non-local.

Parameters:
eThe engine.
Returns:
engine_err_ok or < 0 on error (see engine_err).
int engine_rigid_unsort ( struct engine e)

Shuffle the rigid constraints randomly.

Parameters:
eThe engine.
Returns:
engine_err_ok or < 0 on error (see engine_err).
 All Data Structures Files Functions Variables Typedefs Enumerator Defines