ergo
|
Hierarchical Cubature (HiCu) grid generation. More...
#include <stdlib.h>
#include <cmath>
#include <stdio.h>
#include <errno.h>
#include <memory.h>
#include <time.h>
#include <pthread.h>
#include <stdexcept>
#include "grid_hicu.h"
#include "basisinfo.h"
#include "integrals_general.h"
#include "cubature_rules.h"
#include "utilities.h"
#include "pi.h"
#include "box_system.h"
#include "integrator.h"
#include "functionals.h"
#include "aos.h"
#include "dft_common.h"
#include "rho-mat.h"
#include "units.h"
Classes | |
struct | ShellSpecStructWithExtent |
struct | DensitySpecStruct |
struct | rhoTreeNode_ |
struct | GridGenerationParamsStruct |
struct | compute_grid_for_box_params_struct |
struct | ComputeGridResultValuesStruct |
struct | compute_grid_thread_func_struct |
Macros | |
#define | __CVERSION__ |
#define | USE_EXP_STD |
#define | USE_ERF_STD |
#define | DO_EXTRA_ERROR_CHECKING |
#define | FILE_BATCH_N 1000000 |
#define | MAX_NO_OF_POINTS_PER_BATCH 100 |
#define | MAX_NO_OF_SHLBLOCKS 44444 |
#define | EXPONENT_DIFF_LIMIT 1e-22 |
#define | DISTR_CENTER_DIST_LIMIT 1e-22 |
#define | N_BATCH_JOBS 22 |
#define | MAX_NO_OF_POINTS_PER_WRITE 50000 |
#define | HICU_SPARSE_MATRIX_ACCESS_ROUTINE at |
#define | solid_harmonic_s_0(x, y, z, x2, y2, z2, r2) 1 |
#define | solid_harmonic_p_2(x, y, z, x2, y2, z2, r2) x |
#define | solid_harmonic_p_0(x, y, z, x2, y2, z2, r2) y |
#define | solid_harmonic_p_1(x, y, z, x2, y2, z2, r2) z |
#define | solid_harmonic_d_0(x, y, z, x2, y2, z2, r2) (x * y) |
#define | solid_harmonic_d_1(x, y, z, x2, y2, z2, r2) (y * z) |
#define | solid_harmonic_d_2(x, y, z, x2, y2, z2, r2) ((2 * z2 - x2 - y2) / (2 * template_blas_sqrt((ergo_real)3))) |
#define | solid_harmonic_d_3(x, y, z, x2, y2, z2, r2) (x * z) |
#define | solid_harmonic_d_4(x, y, z, x2, y2, z2, r2) (0.5 * (x2 - y2)) |
#define | solid_harmonic_f_0(x, y, z, x2, y2, z2, r2) ((0.5 * template_blas_sqrt(2.5) * (3 * x2 - y2) * y) / template_blas_sqrt((ergo_real)15)) |
#define | solid_harmonic_f_1(x, y, z, x2, y2, z2, r2) (x * y * z) |
#define | solid_harmonic_f_2(x, y, z, x2, y2, z2, r2) (0.5 * template_blas_sqrt((ergo_real)1.5) * (5 * z2 - r2) * y / template_blas_sqrt((ergo_real)15)) |
#define | solid_harmonic_f_3(x, y, z, x2, y2, z2, r2) (0.5 * (5 * z2 - 3 * r2) * z / template_blas_sqrt((ergo_real)15)) |
#define | solid_harmonic_f_4(x, y, z, x2, y2, z2, r2) (0.5 * template_blas_sqrt((ergo_real)1.5) * (5 * z2 - r2) * x / template_blas_sqrt((ergo_real)15)) |
#define | solid_harmonic_f_5(x, y, z, x2, y2, z2, r2) (0.5 * (x2 - y2) * z) |
#define | solid_harmonic_f_6(x, y, z, x2, y2, z2, r2) (0.5 * template_blas_sqrt((ergo_real)2.5) * (x2 - 3 * y2) * x / template_blas_sqrt((ergo_real)15)) |
#define | MAX_DEPTH 888 |
#define | MAX_NO_OF_TEST_POINTS 1000 |
Typedefs | |
typedef struct rhoTreeNode_ | rhoTreeNode |
typedef std::vector< std::vector< std::vector< int > > > | tripleVectorOfInt |
typedef real | coor3DPtr[3] |
Functions | |
static void | print_box (BoxStruct *box) |
static void | get_distribution_box (BoxStruct *box, DistributionSpecStruct *distr, real targetRhoError) |
static void | get_shell_box (BoxStruct *box, ShellSpecStructWithExtent *shell) |
static real | compute_value_at_point (DensitySpecStruct *density, int noOfNonzeroShells, int *nonZeroShellsIndexList, int noOfNonzeroBasFuncs, int *nonZeroBasFuncsIndexList, const real *localFullDensityMatrix, real(*coor)[3], real *workList) |
static real | compute_integral_from_points (const BasisInfoStruct &bis, DensitySpecStruct *density, int noOfNonzeroShells, int *nonZeroShellsIndexList, int noOfNonzeroBasFuncs, int *nonZeroBasFuncsIndexList, const real *localFullDensityMatrix, int nPoints, real(*coor)[3], real *weight, real *workList, real &minValue, real &maxValue, real &maxAbsValue) |
template<class Treal > | |
Treal | hicuErf (Treal a) |
template<> | |
float | hicuErf (float a) |
template<> | |
double | hicuErf (double a) |
static real | to_power (real x, int n) |
static real | compute_1d_gaussian_integral_recursive (real a, real b, int n, real alpha) |
static real | compute_1d_gaussian_integral (real a, real b, int n, real alpha) |
static real | compute_integral_over_box (DistributionSpecStruct *distr, BoxStruct *box) |
static int | get_rhotree_indexes_for_box (int *resultList, int resultListMaxCount, const rhoTreeNode *node, const BoxStruct *inputBoxPtr) |
static void | callbackGga (DftIntegratorBl *grid, int bllen, real &energy) |
static void | callbackLda (DftIntegratorBl *grid, int bllen, real &energy) |
static void | integrate_density_and_energy (const BasisInfoStruct &bis, DensitySpecStruct *density, DftIntegratorBl *integrator, real &electrons, real &energy, int noOfGridPoints, real(*coor)[3], real *weight, real *dmagao) |
static int | compute_grid_for_box (compute_grid_for_box_params_struct *params, int maxlen, real(*coor)[3], real *weight, BoxStruct *box, real analyticalIntegralValue, real *workList, ComputeGridResultValuesStruct &resultValues, bool resolutionIsOk) |
static rhoTreeNode * | BuildRhoTreeBranch (int noOfDistributionsTot, DistributionSpecStruct *rho_alt_1, ShellSpecStructWithExtent *rho_alt_2, int distrIndexListN, int *distrIndexList, real targetRhoError) |
static rhoTreeNode * | BuildRhoTree (int noOfDistributions, DistributionSpecStruct *rho_alt_1, ShellSpecStructWithExtent *rho_alt_2, real targetRhoError) |
static void | free_rho_tree_memory (rhoTreeNode *rootNode) |
static int | round_real (real x) |
static void | getSubBox (const BoxStruct &startBox, BoxStruct &subBox, int Nx, int Ny, int Nz, int ix, int iy, int iz) |
static void * | compute_grid_thread_func (void *arg) |
static int | compute_grid (const BasisInfoStruct &bis, DensitySpecStruct *density, const GridGenerationParamsStruct &gridGenerationParams, real boxdist, real startBoxSizeDebug, const char *gridFileName, int noOfThreads, bool generateSparsePatternOnly, Dft::SparsePattern *sparsePattern) |
static int | do_merge_sort_distrs (int n, DistributionSpecStruct *list, DistributionSpecStruct *workList) |
static int | compute_extent_for_shells (ShellSpecStructWithExtent *shellList, const BasisInfoStruct &bis, real targetRhoError) |
static int | get_product_distrs (const BasisInfoStruct &bis, const Dft::Matrix &dmat, real targetRhoError, DistributionSpecStruct *rho, int maxCount) |
static void | get_shell_list_with_extents (const BasisInfoStruct &bis, int maxCountShellList, ShellSpecStructWithExtent *shellList, real targetRhoError) |
static int | get_density (const BasisInfoStruct &bis, DistributionSpecStruct *rho, int maxCountRho, real targetRhoError, int nbast, const Dft::Matrix &dmat, BasisFuncStruct *basisFuncList) |
int | hicu_grid_generate (const char *grid_file_name, const BasisInfoStruct &bis, ergo_real maxError, ergo_real boxSize, ergo_real startBoxSizeDebug, int use_error_per_volume, int do_double_checking, int compare_to_refined, int use_energy_criterion, int use_energy_criterion_only, int do_variation_checking, const Dft::Matrix *dmat, Dft::SparsePattern *sparsePattern, int nThreads, bool generateSparsePatternOnly) |
void | grid_generate_sparse_pattern (const BasisInfoStruct &bis, ergo_real maxError, ergo_real boxSize, ergo_real startBoxSizeDebug, Dft::SparsePattern &sparsePattern) |
Variables | |
static const int | CUBATURE_RULE = 3 |
static const int | CUBATURE_RULE_2 = 6 |
const real | COORD_DIFF_FOR_SAMEPOINT_CRITERION = 1.0e-11 |
const real | DISTR_PRODUCT_THRESHOLD = 1e-12 |
const real | RELATIVE_DENSITY_VARIATION_LIMIT = 0.5 |
const real | DISTR_COEFF_CUTOFF_VALUE = 1e-12 |
const real | TARGET_RHO_ERROR_FACTOR = 1e-4 |
pthread_mutex_t | global_main_hicu_mutex = PTHREAD_MUTEX_INITIALIZER |
const int | HICU_GRID_PLOT_RESOLUTION = 50 |
Hierarchical Cubature (HiCu) grid generation.
#define __CVERSION__ |
#define DISTR_CENTER_DIST_LIMIT 1e-22 |
Referenced by get_density().
#define DO_EXTRA_ERROR_CHECKING |
#define EXPONENT_DIFF_LIMIT 1e-22 |
Referenced by get_density().
#define FILE_BATCH_N 1000000 |
Referenced by compute_grid_thread_func().
#define HICU_SPARSE_MATRIX_ACCESS_ROUTINE at |
#define MAX_DEPTH 888 |
Referenced by get_rhotree_indexes_for_box().
#define MAX_NO_OF_POINTS_PER_BATCH 100 |
Referenced by compute_grid_thread_func().
#define MAX_NO_OF_POINTS_PER_WRITE 50000 |
Referenced by compute_grid_thread_func().
#define MAX_NO_OF_SHLBLOCKS 44444 |
Referenced by compute_grid_thread_func().
#define MAX_NO_OF_TEST_POINTS 1000 |
Referenced by compute_grid_for_box().
#define N_BATCH_JOBS 22 |
Referenced by compute_grid_thread_func().
#define solid_harmonic_d_0 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | (x * y) |
Referenced by compute_value_at_point().
#define solid_harmonic_d_1 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | (y * z) |
Referenced by compute_value_at_point().
#define solid_harmonic_d_2 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | ((2 * z2 - x2 - y2) / (2 * template_blas_sqrt((ergo_real)3))) |
Referenced by compute_value_at_point().
#define solid_harmonic_d_3 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | (x * z) |
Referenced by compute_value_at_point().
#define solid_harmonic_d_4 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | (0.5 * (x2 - y2)) |
Referenced by compute_value_at_point().
#define solid_harmonic_f_0 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | ((0.5 * template_blas_sqrt(2.5) * (3 * x2 - y2) * y) / template_blas_sqrt((ergo_real)15)) |
Referenced by compute_value_at_point().
#define solid_harmonic_f_1 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | (x * y * z) |
Referenced by compute_value_at_point().
#define solid_harmonic_f_2 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | (0.5 * template_blas_sqrt((ergo_real)1.5) * (5 * z2 - r2) * y / template_blas_sqrt((ergo_real)15)) |
Referenced by compute_value_at_point().
#define solid_harmonic_f_3 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | (0.5 * (5 * z2 - 3 * r2) * z / template_blas_sqrt((ergo_real)15)) |
Referenced by compute_value_at_point().
#define solid_harmonic_f_4 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | (0.5 * template_blas_sqrt((ergo_real)1.5) * (5 * z2 - r2) * x / template_blas_sqrt((ergo_real)15)) |
Referenced by compute_value_at_point().
#define solid_harmonic_f_5 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | (0.5 * (x2 - y2) * z) |
Referenced by compute_value_at_point().
#define solid_harmonic_f_6 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | (0.5 * template_blas_sqrt((ergo_real)2.5) * (x2 - 3 * y2) * x / template_blas_sqrt((ergo_real)15)) |
Referenced by compute_value_at_point().
#define solid_harmonic_p_0 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | y |
Referenced by compute_value_at_point().
#define solid_harmonic_p_1 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | z |
Referenced by compute_value_at_point().
#define solid_harmonic_p_2 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | x |
Referenced by compute_value_at_point().
#define solid_harmonic_s_0 | ( | x, | |
y, | |||
z, | |||
x2, | |||
y2, | |||
z2, | |||
r2 | |||
) | 1 |
Referenced by compute_value_at_point().
#define USE_ERF_STD |
#define USE_EXP_STD |
typedef real coor3DPtr[3] |
typedef struct rhoTreeNode_ rhoTreeNode |
typedef std::vector< std::vector< std::vector<int> > > tripleVectorOfInt |
|
static |
References BuildRhoTreeBranch(), DistributionSpecStruct::coeff, DistributionSpecStruct::exponent, DistributionSpecStruct::extent, template_blas_log(), and template_blas_sqrt().
Referenced by compute_grid().
|
static |
References rhoTreeNode_::box, DistributionSpecStruct::centerCoords, ShellSpecStruct::centerCoords, rhoTreeNode_::child1, rhoTreeNode_::child2, COORD_DIFF_FOR_SAMEPOINT_CRITERION, rhoTreeNode_::distrIndex, do_output(), DistributionSpecStruct::extent, ShellSpecStructWithExtent::extent, get_distribution_box(), get_shell_box(), LOG_AREA_DFT, LOG_CAT_ERROR, BoxStruct_::max, BoxStruct_::min, NO_OF_DIMENSIONS, and ShellSpecStructWithExtent::s.
Referenced by BuildRhoTree().
|
static |
References DftIntegratorBl_::curr_point, Functional_::func, DftIntegratorBl_::g, DftIntegratorBl_::grad, FunDensProp_::grada, FunDensProp_::gradab, FunDensProp_::gradb, DftIntegratorBl_::ntypso, DftIntegratorBl_::r, DftIntegratorBl_::rho, FunDensProp_::rhoa, FunDensProp_::rhob, selected_func, template_blas_sqrt(), and DftIntegratorBl_::weight.
Referenced by integrate_density_and_energy().
|
static |
References compute_1d_gaussian_integral_recursive(), hicuErf(), pi, template_blas_exp(), and template_blas_sqrt().
Referenced by compute_integral_over_box().
References hicuErf(), pi, template_blas_exp(), template_blas_sqrt(), and to_power().
Referenced by compute_1d_gaussian_integral().
|
static |
References ShellSpecStructWithExtent::extent, get_basis_func_extent_list(), get_max_basis_func_abs_value(), ShellSpecStruct::noOfBasisFuncs, BasisInfoStruct::noOfBasisFuncs, BasisInfoStruct::noOfShells, ShellSpecStructWithExtent::s, and ShellSpecStruct::startIndexInMatrix.
Referenced by get_shell_list_with_extents().
|
static |
References BuildRhoTree(), compute_grid_thread_func(), compute_integral_over_box(), compute_grid_thread_func_struct::density, DensitySpecStruct::distrList, do_output(), free_rho_tree_memory(), get_rhotree_indexes_for_box(), get_shell_box(), getSubBox(), HICU_GRID_PLOT_RESOLUTION, LOG_AREA_DFT, LOG_CAT_ERROR, LOG_CAT_INFO, BoxStruct_::max, GridGenerationParamsStruct::maxerrorPerBox, BoxStruct_::min, DensitySpecStruct::nbast, NO_OF_DIMENSIONS, DensitySpecStruct::noOfDistributions, DensitySpecStruct::noOfShells, Util::TimeMeter::print(), print_box(), round_real(), DensitySpecStruct::shellList, GridGenerationParamsStruct::targetRhoError, template_blas_fabs(), and UNIT_one_Angstrom.
Referenced by grid_generate_sparse_pattern(), and hicu_grid_generate().
|
static |
References compute_grid_for_box_params_struct::bis, GridGenerationParamsStruct::compareToRefined, compute_integral_from_points(), compute_integral_over_box(), CUBATURE_RULE, CUBATURE_RULE_2, compute_grid_for_box_params_struct::density, compute_grid_for_box_params_struct::dftIntegrator, DensitySpecStruct::distrList, compute_grid_for_box_params_struct::dmagao, GridGenerationParamsStruct::doDoubleChecking, GridGenerationParamsStruct::doVariationChecking, ComputeGridResultValuesStruct::estimatedIntegralErrorDensity, ComputeGridResultValuesStruct::estimatedIntegralErrorEnergy, compute_grid_for_box_params_struct::gridGenerationParams, integrate_density_and_energy(), compute_grid_for_box_params_struct::localFullDensityMatrix, BoxStruct_::max, MAX_NO_OF_TEST_POINTS, GridGenerationParamsStruct::maxerrorPerBox, BoxStruct_::min, NO_OF_DIMENSIONS, compute_grid_for_box_params_struct::nonZeroBasisFuncIndexList, compute_grid_for_box_params_struct::nonZeroShellsIndexList, DensitySpecStruct::noOfDistributions, compute_grid_for_box_params_struct::noOfNonzeroBasisFuncs, compute_grid_for_box_params_struct::noOfNonzeroShells, RELATIVE_DENSITY_VARIATION_LIMIT, GridGenerationParamsStruct::targetRhoError, template_blas_fabs(), ComputeGridResultValuesStruct::totalIntegralResultAnalytical, ComputeGridResultValuesStruct::totalIntegralResultEnergy, ComputeGridResultValuesStruct::totalIntegralResultNumerical, use_cubature_rule(), GridGenerationParamsStruct::useEnergyCriterion, GridGenerationParamsStruct::useEnergyCriterionOnly, and GridGenerationParamsStruct::useErrorPerVolume.
Referenced by compute_grid_thread_func().
|
static |
References Dft::Matrix::at(), DftIntegratorBl_::bas_bl_cnt, DftIntegratorBl_::basblocks, compute_grid_thread_func_struct::bis, compute_grid_for_box(), compute_integral_over_box(), compute_grid_thread_func_struct::counterArrForPlot, compute_grid_thread_func_struct::currJobNumber, compute_grid_for_box_params_struct::density, compute_grid_thread_func_struct::density, dft_integrator_bl_free(), dft_integrator_bl_new(), DFT_MAX_BLLEN, compute_grid_for_box_params_struct::dftIntegrator, DensitySpecStruct::distrList, compute_grid_for_box_params_struct::dmagao, DensitySpecStruct::dmat, do_output(), ergoShellsToOrbs(), FILE_BATCH_N, compute_grid_thread_func_struct::fileMutex, compute_grid_thread_func_struct::generateSparsePatternOnly, get_rhotree_indexes_for_box(), getSubBox(), compute_grid_thread_func_struct::gridFile, compute_grid_for_box_params_struct::gridGenerationParams, compute_grid_thread_func_struct::gridGenerationParams, HICU_GRID_PLOT_RESOLUTION, compute_grid_thread_func_struct::jobMutex, compute_grid_for_box_params_struct::listShlblocks_otherformat, compute_grid_for_box_params_struct::localFullDensityMatrix, LOG_AREA_DFT, LOG_CAT_ERROR, LOG_CAT_INFO, BoxStruct_::max, MAX_NO_OF_POINTS_PER_BATCH, MAX_NO_OF_POINTS_PER_WRITE, MAX_NO_OF_SHLBLOCKS, compute_grid_thread_func_struct::maxNoOfRelevantDistrsPerBox, BoxStruct_::min, N_BATCH_JOBS, DensitySpecStruct::nbast, compute_grid_for_box_params_struct::nonZeroBasisFuncIndexList, compute_grid_for_box_params_struct::nonZeroShellsIndexList, DensitySpecStruct::noOfDistributions, compute_grid_for_box_params_struct::noOfNonzeroBasisFuncs, compute_grid_for_box_params_struct::noOfNonzeroShells, compute_grid_thread_func_struct::noOfPoints, DensitySpecStruct::noOfShells, compute_grid_thread_func_struct::noOfWrittenBatches, compute_grid_for_box_params_struct::nShlblocks, compute_grid_thread_func_struct::Nx, compute_grid_thread_func_struct::Ny, compute_grid_thread_func_struct::Nz, compute_grid_thread_func_struct::resultCode, compute_grid_thread_func_struct::resultValues, compute_grid_thread_func_struct::rhoTreeRootNode, compute_grid_thread_func_struct::rhoTreeRootNodeShells, ShellSpecStructWithExtent::s, selected_func, DensitySpecStruct::shellList, ShellSpecStruct::shellType, DftIntegratorBl_::shl_bl_cnt, DftIntegratorBl_::shlblocks, compute_grid_thread_func_struct::sparsePattern, compute_grid_thread_func_struct::startBox, ShellSpecStruct::startIndexInMatrix, and compute_grid_thread_func_struct::threadNo.
Referenced by compute_grid().
|
static |
References compute_value_at_point(), BasisInfoStruct::noOfBasisFuncs, and template_blas_fabs().
Referenced by compute_grid_for_box().
|
static |
References DistributionSpecStruct::centerCoords, DistributionSpecStruct::coeff, compute_1d_gaussian_integral(), DistributionSpecStruct::exponent, BoxStruct_::max, BoxStruct_::min, DistributionSpecStruct::monomialInts, and NO_OF_DIMENSIONS.
Referenced by compute_grid(), compute_grid_for_box(), and compute_grid_thread_func().
|
static |
References ShellSpecStruct::centerCoords, ShellSpecStruct::coeffList, ShellSpecStruct::exponentList, DensitySpecStruct::nbast, ShellSpecStruct::noOfContr, ShellSpecStructWithExtent::s, DensitySpecStruct::shellList, ShellSpecStruct::shellType, solid_harmonic_d_0, solid_harmonic_d_1, solid_harmonic_d_2, solid_harmonic_d_3, solid_harmonic_d_4, solid_harmonic_f_0, solid_harmonic_f_1, solid_harmonic_f_2, solid_harmonic_f_3, solid_harmonic_f_4, solid_harmonic_f_5, solid_harmonic_f_6, solid_harmonic_p_0, solid_harmonic_p_1, solid_harmonic_p_2, solid_harmonic_s_0, and template_blas_exp().
Referenced by compute_integral_from_points().
|
static |
References do_output(), DistributionSpecStruct::exponent, LOG_AREA_DFT, LOG_CAT_ERROR, and DistributionSpecStruct::monomialInts.
Referenced by get_density().
|
static |
References rhoTreeNode_::child1, and rhoTreeNode_::child2.
Referenced by compute_grid().
|
static |
References BasisInfoStruct::basisFuncList, DistributionSpecStruct::coeff, BoxSystem::create_box_system(), DISTR_CENTER_DIST_LIMIT, DISTR_COEFF_CUTOFF_VALUE, do_merge_sort_distrs(), do_output(), EXPONENT_DIFF_LIMIT, BoxSystem::get_items_near_point(), get_product_distrs(), LOG_AREA_DFT, LOG_CAT_ERROR, LOG_CAT_INFO, BasisInfoStruct::noOfBasisFuncs, pi, Util::TimeMeter::print(), template_blas_fabs(), and template_blas_sqrt().
Referenced by do_density_images(), and hicu_grid_generate().
|
static |
|
static |
References Dft::Matrix::at(), BasisInfoStruct::basisFuncList, BasisFuncStruct::centerCoords, DistributionSpecStruct::coeff, BoxSystem::create_box_system(), DISTR_COEFF_CUTOFF_VALUE, DISTR_PRODUCT_THRESHOLD, do_output(), get_basis_func_extent_list(), BoxSystem::get_items_near_point(), get_max_basis_func_abs_value(), get_product_simple_primitives(), LOG_AREA_DFT, LOG_CAT_ERROR, BasisInfoStruct::noOfBasisFuncs, Util::TimeMeter::print(), and template_blas_fabs().
Referenced by get_density(), and hicu_grid_generate().
|
static |
References rhoTreeNode_::box, rhoTreeNode_::child1, rhoTreeNode_::child2, rhoTreeNode_::distrIndex, BoxStruct_::max, MAX_DEPTH, BoxStruct_::min, and NO_OF_DIMENSIONS.
Referenced by compute_grid(), and compute_grid_thread_func().
|
static |
References ShellSpecStruct::centerCoords, ShellSpecStructWithExtent::extent, BoxStruct_::max, BoxStruct_::min, NO_OF_DIMENSIONS, and ShellSpecStructWithExtent::s.
Referenced by BuildRhoTreeBranch(), and compute_grid().
|
static |
|
static |
References BoxStruct_::max, and BoxStruct_::min.
Referenced by compute_grid(), and compute_grid_thread_func().
void grid_generate_sparse_pattern | ( | const BasisInfoStruct & | bis, |
ergo_real | maxError, | ||
ergo_real | boxSize, | ||
ergo_real | startBoxSizeDebug, | ||
Dft::SparsePattern & | sparsePattern | ||
) |
References DensitySpecStruct::basisFuncList, compute_grid(), DensitySpecStruct::distrList, DensitySpecStruct::dmat, get_shell_list_with_extents(), global_main_hicu_mutex, LOG_AREA_DFT, GridGenerationParamsStruct::maxerrorPerBox, DensitySpecStruct::nbast, BasisInfoStruct::noOfBasisFuncs, DensitySpecStruct::noOfDistributions, BasisInfoStruct::noOfShells, DensitySpecStruct::noOfShells, output_current_memory_usage(), Util::TimeMeter::print(), DensitySpecStruct::shellList, TARGET_RHO_ERROR_FACTOR, and GridGenerationParamsStruct::targetRhoError.
Referenced by XCEvaluator::XCEvaluator().
int hicu_grid_generate | ( | const char * | grid_file_name, |
const BasisInfoStruct & | bis, | ||
ergo_real | maxError, | ||
ergo_real | boxSize, | ||
ergo_real | startBoxSizeDebug, | ||
int | use_error_per_volume, | ||
int | do_double_checking, | ||
int | compare_to_refined, | ||
int | use_energy_criterion, | ||
int | use_energy_criterion_only, | ||
int | do_variation_checking, | ||
const Dft::Matrix * | dmat, | ||
Dft::SparsePattern * | sparsePattern, | ||
int | nThreads, | ||
bool | generateSparsePatternOnly | ||
) |
References Dft::Matrix::at(), DensitySpecStruct::basisFuncList, GridGenerationParamsStruct::compareToRefined, compute_grid(), DensitySpecStruct::distrList, DensitySpecStruct::dmat, do_output(), GridGenerationParamsStruct::doDoubleChecking, GridGenerationParamsStruct::doVariationChecking, get_density(), get_product_distrs(), get_shell_list_with_extents(), global_main_hicu_mutex, grid_file_name, Dft::Matrix::isSparse(), LOG_AREA_DFT, LOG_CAT_INFO, GridGenerationParamsStruct::maxerrorPerBox, DensitySpecStruct::nbast, BasisInfoStruct::noOfBasisFuncs, DensitySpecStruct::noOfDistributions, BasisInfoStruct::noOfShells, DensitySpecStruct::noOfShells, output_current_memory_usage(), Util::TimeMeter::print(), DensitySpecStruct::shellList, TARGET_RHO_ERROR_FACTOR, GridGenerationParamsStruct::targetRhoError, template_blas_fabs(), GridGenerationParamsStruct::useEnergyCriterion, GridGenerationParamsStruct::useEnergyCriterionOnly, and GridGenerationParamsStruct::useErrorPerVolume.
Referenced by grid_open_cartesian().
Treal hicuErf | ( | Treal | a | ) |
Referenced by compute_1d_gaussian_integral(), and compute_1d_gaussian_integral_recursive().
float hicuErf | ( | float | a | ) |
double hicuErf | ( | double | a | ) |
|
static |
References Dft::Matrix::asFull(), Dft::Matrix::asSparse(), DftIntegratorBl_::atv, DftIntegratorBl_::bas_bl_cnt, DftIntegratorBl_::basblocks, callbackGga(), callbackLda(), DftIntegratorBl_::coor, DftIntegratorBl_::curr_point, dft_get_orbs(), DensitySpecStruct::dmat, DftIntegratorBl_::dogga, DftIntegratorBl_::g, getrho_blocked_gga(), getrho_blocked_lda(), Functional_::is_gga, Dft::Matrix::isSparse(), BasisInfoStruct::noOfBasisFuncs, DftIntegratorBl_::r, DftIntegratorBl_::rad, DftIntegratorBl_::rho, selected_func, DftIntegratorBl_::shl_bl_cnt, DftIntegratorBl_::shlblocks, and DftIntegratorBl_::weight.
Referenced by compute_grid_for_box().
|
static |
References do_output(), LOG_AREA_DFT, LOG_CAT_INFO, BoxStruct_::max, BoxStruct_::min, and NO_OF_DIMENSIONS.
Referenced by compute_grid().
|
static |
Referenced by compute_grid().
Referenced by compute_1d_gaussian_integral_recursive().
const real COORD_DIFF_FOR_SAMEPOINT_CRITERION = 1.0e-11 |
Referenced by BuildRhoTreeBranch().
|
static |
Referenced by compute_grid_for_box().
|
static |
Referenced by compute_grid_for_box().
const real DISTR_COEFF_CUTOFF_VALUE = 1e-12 |
Referenced by get_density(), and get_product_distrs().
const real DISTR_PRODUCT_THRESHOLD = 1e-12 |
Referenced by get_product_distrs().
pthread_mutex_t global_main_hicu_mutex = PTHREAD_MUTEX_INITIALIZER |
Referenced by grid_generate_sparse_pattern(), and hicu_grid_generate().
const int HICU_GRID_PLOT_RESOLUTION = 50 |
Referenced by compute_grid(), and compute_grid_thread_func().
const real RELATIVE_DENSITY_VARIATION_LIMIT = 0.5 |
Referenced by compute_grid_for_box().
const real TARGET_RHO_ERROR_FACTOR = 1e-4 |
Referenced by grid_generate_sparse_pattern(), and hicu_grid_generate().