ergo
|
This is a streaming version of the linearly-scaling grid generator. More...
#include <cmath>
#include <stdio.h>
#include <assert.h>
#include <pthread.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <vector>
#include "dft_common.h"
#include "grid_stream.h"
#include "grid_atomic.h"
#include "lebedev_laikov.h"
#include "molecule.h"
#include "output.h"
#include "realtype.h"
#include "utilities.h"
#include "sparse_matrix.h"
Classes | |
class | RadialGrid |
A grid describing a radial grid for an atom with a specific charge. More... | |
class | AtomicGrid |
class | BoxPartitioner |
"Block" partitioning is the only one implemented now... More... | |
class | ActiveBfShells |
A class that is able to quickly determine the active shells that overlap with given box in space. More... | |
struct | StreamSaveContext |
Saves the grid saving context. More... | |
class | Stream |
Streamlined, abstract grid generation class. More... | |
struct | ThreadInfo |
class | ErgoGridStream |
Ergo-specific GridStream implementation. More... | |
Typedefs | |
typedef ergo_real | real |
Functions | |
ErgoGridStream * | grid_stream_new (const struct Dft::GridParams &gss, const GridGenMolInfo &molInfo) |
Creates the grid object. More... | |
void | grid_stream_set_sparse_pattern (ErgoGridStream *stream, Dft::SparsePattern *pattern) |
unsigned | grid_stream_generate (ErgoGridStream *stream, const char *fname, int noOfThreads) |
Generate grid for given molecule. More... | |
void | grid_stream_free (ErgoGridStream *stream) |
Variables | |
static const real | WEIGHT_THRESHOLD = 1e-15 |
Ignore all grid points that partitioning scales down by more than WEIGHT_THRESHOLD. More... | |
This is a streaming version of the linearly-scaling grid generator.
The grid is generated on the fly, without the in-memory sort phase. The disk format is shared with the ordinary grid. The separation of the ordinary grid data (coordinates, weights) from the auxiliary data (lists of active orbitals) is taken into account so that grid can be used for integration in the auxiliary basis.
void grid_stream_free | ( | ErgoGridStream * | stream | ) |
Referenced by grid_open_stream(), grid_test_scaling(), and main().
unsigned grid_stream_generate | ( | ErgoGridStream * | stream, |
const char * | fname, | ||
int | noOfThreads | ||
) |
Generate grid for given molecule.
stream | The grid object. |
fname | The file name the grid is to be saved to. |
noOfThreads | the number of threads that are supposed to be created and used for the grid generation. |
References Dft::GridParams::angmax, Dft::GridParams::angmin, do_output(), Dft::GridParams::GC2, ErgoGridStream::gsSettings, Dft::GridParams::LMG, LOG_AREA_DFT, LOG_CAT_INFO, Util::TimeMeter::print(), Dft::GridParams::radialGridScheme, Dft::GridParams::radint, and Dft::GridParams::TURBO.
Referenced by grid_open_stream(), grid_test_scaling(), and main().
ErgoGridStream* grid_stream_new | ( | const struct Dft::GridParams & | gss, |
const GridGenMolInfo & | molInfo | ||
) |
Creates the grid object.
The Settings object must have longer lifetime than the grid itself - its content is not copied.
References Dft::GridParams::GC2, Dft::GridParams::LMG, Dft::GridParams::radialGridScheme, and Dft::GridParams::TURBO.
Referenced by grid_open_stream(), grid_test_scaling(), and main().
void grid_stream_set_sparse_pattern | ( | ErgoGridStream * | stream, |
Dft::SparsePattern * | pattern | ||
) |
Referenced by grid_open_stream(), and grid_test_scaling().
|
static |
Ignore all grid points that partitioning scales down by more than WEIGHT_THRESHOLD.
Referenced by BoxPartitioner::process().