#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include "dft_common.h"
#include "grid_reader.h"
#include "grid_stream.h"
#include "grid_hicu.h"
#include "grid_matrix.h"
Classes | |
class | FullMatrixWrapper |
class | SparseMatrixWrapper |
struct | DftGridReader |
Defines | |
#define | GRID_BASE_NAME "ERGO-grid" |
#define | GRID_PATT_NAME "ERGO-patt" |
Functions | |
Dft::Matrix * | createGridMatrix (const Dft::FullMatrix &mat) |
Dft::Matrix * | createGridMatrix (const Dft::SparseMatrix &mat) |
static char * | grid_get_fname (const char *base, int filenum) |
void | grid_set_tmpdir (const char *tmpdir) |
void | grid_free_files () |
Frees all the cached data if any. | |
static void | grid_atexit (void) |
bool | grid_is_ready () |
static void | grid_open_stream (const struct GridGenMolInfo &molInfo, const Dft::GridParams &gss, Dft::SparsePattern *pattern, DftGridReader *reader) |
static void | grid_open_cartesian (const BasisInfoStruct &bis, const Dft::GridParams &gss, const Dft::Matrix *dmat, Dft::SparsePattern *pattern, DftGridReader *reader) |
DftGridReader * | grid_open_full (const struct GridGenMolInfo *mol_info, const Dft::GridParams &gss, Dft::SparsePattern *pattern, const Dft::Matrix *dmat, const BasisInfoStruct &bis) |
Returns a handle to a grid file. | |
int | grid_getchunk_blocked (DftGridReader *rawgrid, int maxlen, int *nBlocks, int *shlBlocks, real(*coor)[3], real *weight) |
grid_getchunk_blocked() reads grid data also with screening information if only nblocks and shlblocks are provided. | |
void | grid_close (DftGridReader *rawgrid) |
Closes the shared grid handle that is specifed as the argument. | |
Variables | |
std::string | grid_tmpdir |
static FILE * | grid_file = NULL |
static int | grid_file_open_count = 0 |
static char * | grid_file_name = NULL |
static char * | patt_file_name = NULL |
static pthread_mutex_t | grid_mutex = PTHREAD_MUTEX_INITIALIZER |
static pthread_mutex_t | grdone_mutex = PTHREAD_MUTEX_INITIALIZER |
static int | grid_atexit_registered = 0 |
static const int | MY_MPI_NUM = 0 |
#define GRID_BASE_NAME "ERGO-grid" |
#define GRID_PATT_NAME "ERGO-patt" |
Dft::Matrix* createGridMatrix | ( | const Dft::SparseMatrix & | mat | ) |
Dft::Matrix* createGridMatrix | ( | const Dft::FullMatrix & | mat | ) |
static void grid_atexit | ( | void | ) | [static] |
void grid_close | ( | DftGridReader * | rawgrid | ) |
Closes the shared grid handle that is specifed as the argument.
void grid_free_files | ( | ) |
Frees all the cached data if any.
static char* grid_get_fname | ( | const char * | base, | |
int | filenum | |||
) | [static] |
int grid_getchunk_blocked | ( | DftGridReader * | rawgrid, | |
int | maxlen, | |||
int * | nBlocks, | |||
int * | shlBlocks, | |||
real * | coor[3], | |||
real * | weight | |||
) |
grid_getchunk_blocked() reads grid data also with screening information if only nblocks and shlblocks are provided.
rawgrid | shared grid handle. | |
maxlen | the upper limit on the grid point chunk length. | |
nBlocks | will contain number of active b.f. blocks. May be NULL if uninteresting. | |
shlBlocks | pointer to the shell block range. | |
coor | array with grid point coordinates. | |
weight | array with grid point weights. |
bool grid_is_ready | ( | ) |
static void grid_open_cartesian | ( | const BasisInfoStruct & | bis, | |
const Dft::GridParams & | gss, | |||
const Dft::Matrix * | dmat, | |||
Dft::SparsePattern * | pattern, | |||
DftGridReader * | reader | |||
) | [static] |
DftGridReader* grid_open_full | ( | const struct GridGenMolInfo * | mol_info, | |
const Dft::GridParams & | gss, | |||
Dft::SparsePattern * | pattern, | |||
const Dft::Matrix * | dmat, | |||
const BasisInfoStruct & | bis | |||
) |
Returns a handle to a grid file.
Sets the sparse pattern if passed. Observe that sparse pattern must be passed the first time to get generated. Otherwise, subsequent calls will not be able to set it.
static void grid_open_stream | ( | const struct GridGenMolInfo & | molInfo, | |
const Dft::GridParams & | gss, | |||
Dft::SparsePattern * | pattern, | |||
DftGridReader * | reader | |||
) | [static] |
void grid_set_tmpdir | ( | const char * | tmpdir | ) |
pthread_mutex_t grdone_mutex = PTHREAD_MUTEX_INITIALIZER [static] |
int grid_atexit_registered = 0 [static] |
FILE* grid_file = NULL [static] |
char* grid_file_name = NULL [static] |
int grid_file_open_count = 0 [static] |
pthread_mutex_t grid_mutex = PTHREAD_MUTEX_INITIALIZER [static] |
std::string grid_tmpdir |
const int MY_MPI_NUM = 0 [static] |
char* patt_file_name = NULL [static] |