Gromacs  2019-beta2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
#include "gmxpre.h"
#include "ga2la.h"
+ Include dependency graph for ga2la.cpp:

Description

Implements functions for mapping from global to local atom indices.

Author
Berk Hess hess@.nosp@m.kth..nosp@m.se

Functions

static bool directListIsFaster (int numAtomsTotal, int numAtomsLocal)
 Returns whether to use a direct list only. More...
 

Function Documentation

static bool directListIsFaster ( int  numAtomsTotal,
int  numAtomsLocal 
)
static

Returns whether to use a direct list only.

There are two methods implemented for finding the local atom number belonging to a global atom number: 1) a simple, direct array 2) a hash table consisting of list of linked lists indexed with the global number modulo mod. Memory requirements: 1) numAtomsTotal*2 ints 2) numAtomsLocal*(2+1-2(1-e^-1/2))*4 ints where numAtomsLocal is the number of atoms in the home + communicated zones. Method 1 is faster for low parallelization, 2 for high parallelization. We switch to method 2 when it uses less than half the memory method 1.