Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Member Functions
gmx_ga2la_t Class Reference

#include <gromacs/domdec/ga2la.h>


Global to local atom mapping.

Used for efficient mapping from global atom indices to local atom indices in the domain decomposition.


struct  Entry
 Structure for the local atom info. More...

Public Member Functions

 gmx_ga2la_t (int numAtomsTotal, int numAtomsLocal)
 Constructor. More...
void insert (int a_gl, const Entry &value)
 Inserts an entry, there should not already be an entry for a_gl. More...
void erase (int a_gl)
 Delete the entry for global atom a_gl.
const Entryfind (int a_gl) const
 Returns a pointer to the entry when present, nullptr otherwise.
const int * findHome (int a_gl) const
 Returns the local atom index if it is a home atom, nullptr otherwise.
Entryat (int a_gl)
 Returns a reference to the entry for a_gl. More...
void clear ()
 Clear all the entries in the list.

Constructor & Destructor Documentation

gmx_ga2la_t::gmx_ga2la_t ( int  numAtomsTotal,
int  numAtomsLocal 


[in]numAtomsTotalThe total number of atoms in the system
[in]numAtomsLocalAn estimate of the number of home+communicated atoms

Member Function Documentation

Entry& gmx_ga2la_t::at ( int  a_gl)

Returns a reference to the entry for a_gl.

A non-release assert checks that a_gl is present.

void gmx_ga2la_t::insert ( int  a_gl,
const Entry value 

Inserts an entry, there should not already be an entry for a_gl.

[in]a_glThe global atom index
[in]valueThe value to set for this index

The documentation for this class was generated from the following files: