source/dft/sparse_pattern.cc File Reference

Class that can be used to store sparse matrix patterns. More...

#include "output.h"
#include "dft_common.h"
#include "sparse_pattern.h"

Defines

#define USE_CUTHILL_MCKEE   0
 prepares a shell map and matching AO map permuted to optimize performance of the XC code.

Functions

static void prepareAOMap (const BasisInfoStruct &bis, const int *shellMap, int *aoMap)
 Prepares the AO map given a shell map.
static void clusterShells (const ShellSpecStruct *shells, const Box &box, const std::vector< int > &inputList, std::vector< int > &result, int depth)
void setupShellMap (const BasisInfoStruct &bis, int *shellMap, int *aoMap)

Detailed Description

Class that can be used to store sparse matrix patterns.

Author:
: Pawel Salek responsible

Define Documentation

#define USE_CUTHILL_MCKEE   0

prepares a shell map and matching AO map permuted to optimize performance of the XC code.

We cannot reuse the permutations used in the matrix library because they can are AO based and not shell based.

Parameters:
shellMap - previously allocated vector that will be filled with the permutation data.
aoMap - corresponding AO permutation vector, preallocated.

The code uses a variant of the Cuthill-McKee algorithm to determine the shell map. The AO map is trivially generated from the shell map (perhaps it could be a separate function?). Generation of the optimal performance is in general a complex matter but since we use a discrete selection criteria to determine the shell radius, Cuthill-McKee will do.


Function Documentation

static void clusterShells ( const ShellSpecStruct shells,
const Box box,
const std::vector< int > &  inputList,
std::vector< int > &  result,
int  depth 
) [static]

References Box::getMaxDim(), Box::hi, and Box::lo.

Referenced by setupShellMap().

static void prepareAOMap ( const BasisInfoStruct bis,
const int *  shellMap,
int *  aoMap 
) [static]
void setupShellMap ( const BasisInfoStruct bis,
int *  shellMap,
int *  aoMap 
)

Generated on 10 Jul 2018 for ergo by  doxygen 1.6.1