ergo
grid_reader.h File Reference

Grid Generator interface. More...

#include "sparse_pattern.h"
#include "grid_stream.h"
#include "grid_interface.h"
#include "grid_params.h"
#include "grid_matrix.h"

Go to the source code of this file.

Macros

#define grid_getchunk_plain(r, m, coor, w)   (grid_getchunk_blocked((r),(m),NULL,NULL,(coor),(w)))
 

Functions

Dft::MatrixcreateGridMatrix (const Dft::FullMatrix &mat)
 
Dft::MatrixcreateGridMatrix (const Dft::SparseMatrix &mat)
 
DftGridReadergrid_open_full (const class GridGenMolInfo *mol_info, const Dft::GridParams &gss, Dft::SparsePattern *pattern, const Dft::Matrix *dmat, const BasisInfoStruct &bis)
 Returns a handle to a grid file. More...
 
bool grid_is_ready ()
 
int grid_getchunk_blocked (DftGridReader *grid_handle, 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. More...
 
void grid_close (DftGridReader *rawgrid)
 Closes the shared grid handle that is specifed as the argument. More...
 
void grid_free_files ()
 Frees all the cached data if any. More...
 
void grid_set_tmpdir (const char *tmpdir)
 

Detailed Description

Grid Generator interface.

Functions for opening grid file, reading chunks from it, and closing the file, are provided.

Author
: Pawel Salek responsible

Macro Definition Documentation

◆ grid_getchunk_plain

#define grid_getchunk_plain (   r,
  m,
  coor,
 
)    (grid_getchunk_blocked((r),(m),NULL,NULL,(coor),(w)))

Function Documentation

◆ createGridMatrix() [1/2]

Dft::Matrix* createGridMatrix ( const Dft::FullMatrix mat)

◆ createGridMatrix() [2/2]

Dft::Matrix* createGridMatrix ( const Dft::SparseMatrix &  mat)

◆ grid_close()

void grid_close ( DftGridReader rawgrid)

Closes the shared grid handle that is specifed as the argument.

References free(), grid_file, grid_file_open_count, and grid_mutex.

Referenced by dft_integrate(), grid_test_synchronisation(), and XCEvaluator::XCEvaluator().

◆ grid_free_files()

void grid_free_files ( )

◆ grid_getchunk_blocked()

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.

Parameters
rawgridshared grid handle.
maxlenthe upper limit on the grid point chunk length.
nBlockswill contain number of active b.f. blocks. May be NULL if uninteresting.
shlBlockspointer to the shell block range.
coorarray with grid point coordinates.
weightarray with grid point weights.
Returns
number of read grid points. -1 on end-of-file.

References DftGridReader::f, and grid_mutex.

Referenced by dft_integrate(), and grid_test_synchronisation().

◆ grid_is_ready()

bool grid_is_ready ( )

References grid_file_name.

Referenced by XCEvaluator::XCEvaluator().

◆ grid_open_full()

DftGridReader* grid_open_full ( const class 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.

References dal_new, free(), grid_atexit(), grid_atexit_registered, grid_open_cartesian(), grid_open_stream(), Dft::GridParams::gridType, Dft::GridParams::TYPE_HICU, and Dft::GridParams::TYPE_STANDARD.

Referenced by dft_integrate(), grid_test_synchronisation(), and XCEvaluator::XCEvaluator().

◆ grid_set_tmpdir()

void grid_set_tmpdir ( const char *  tmpdir)

References grid_tmpdir.