ergo
grid_reader.h
Go to the documentation of this file.
1 /* Ergo, version 3.7, a program for linear scaling electronic structure
2  * calculations.
3  * Copyright (C) 2018 Elias Rudberg, Emanuel H. Rubensson, Pawel Salek,
4  * and Anastasia Kruchinina.
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * Primary academic reference:
20  * Ergo: An open-source program for linear-scaling electronic structure
21  * calculations,
22  * Elias Rudberg, Emanuel H. Rubensson, Pawel Salek, and Anastasia
23  * Kruchinina,
24  * SoftwareX 7, 107 (2018),
25  * <http://dx.doi.org/10.1016/j.softx.2018.03.005>
26  *
27  * For further information about Ergo, see <http://www.ergoscf.org>.
28  */
29 
38 /* -*-mode:c; c-style:bsd; c-basic-offset:4;indent-tabs-mode:nil; -*- */
39 
40 #if !defined(_GRID_READER_H_)
41 #define _GRID_READER_H_ 1
42 
43 #include "sparse_pattern.h"
44 #include "grid_stream.h"
45 #include "grid_interface.h"
46 #include "grid_params.h"
47 #include "grid_matrix.h"
48 
49 struct DftGridReader;
50 
52 Dft::Matrix* createGridMatrix(const Dft::SparseMatrix& mat);
53 
54 DftGridReader* grid_open_full(const class GridGenMolInfo *mol_info,
55  const Dft::GridParams& gss,
56  Dft::SparsePattern *pattern,
57  const Dft::Matrix* dmat,
58  const BasisInfoStruct& bis);
59 
60 bool grid_is_ready();
61 
62 int grid_getchunk_blocked(DftGridReader* grid_handle, int maxlen,
63  int *nblocks, int *shlblocks,
64  real (*coor)[3], real *weight);
65 
66 #define grid_getchunk_plain(r,m,coor,w) \
67  (grid_getchunk_blocked((r),(m),NULL,NULL,(coor),(w)))
68 void grid_close(DftGridReader *rawgrid);
69 void grid_free_files();
70 void grid_set_tmpdir(const char *tmpdir);
71 
72 #endif /* !defined(_GRID_READER_H_) */
73 
74 
bool grid_is_ready()
Definition: grid_reader.cc:160
A structure describing the grid settings.
Definition: grid_params.h:59
Streaming grid generator.
Code organizing various settings related to grids used for numerical integration. ...
void grid_free_files()
Frees all the cached data if any.
Definition: grid_reader.cc:135
Class that can be used to store sparse matrix patterns.
Definition: allocate.cc:39
ergo_real real
Definition: test.cc:46
Definition: grid_matrix.h:44
Grid Generator interface.
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...
Definition: grid_reader.cc:325
Definition: basisinfo.h:112
Definition: grid_reader.cc:166
void grid_set_tmpdir(const char *tmpdir)
Definition: grid_reader.cc:116
GridGenMolInfo is an abstract class providing information about the molecule so that the grid generat...
Definition: grid_interface.h:45
Definition: grid_matrix.h:53
void grid_close(DftGridReader *rawgrid)
Closes the shared grid handle that is specifed as the argument.
Definition: grid_reader.cc:386
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.
Definition: grid_reader.cc:282
Dft::Matrix * createGridMatrix(const Dft::FullMatrix &mat)
Definition: grid_reader.cc:78
Generic matrix interface.