ergo
|
Common DFT routines. Mostly functional mixing. More...
#include <ctype.h>
#include <cmath>
#include <pthread.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <list>
#include <map>
#include "dft_common.h"
#include "functionals.h"
#include "grid_atomic.h"
#include "output.h"
#include "barrier.h"
Classes | |
class | ShellTree |
Class that allows to find in NLogN time all shells that overlap with a given box. More... | |
struct | Ball |
Macros | |
#define | __CVERSION__ |
Functions | |
void * | dal_malloc_ (size_t sz, const char *place, unsigned line) |
int | sync_threads (bool release, int nThreads) |
creates or destroys a barrier for nThreads. More... | |
static void | dft_set_hf_weight (real w) |
static real | dft_get_hf_weight (void) |
static int | ergo_fort_print (const char *format,...) |
EXTERN_C void | dft_init (void) |
EXTERN_C int | dft_get_num_threads (void) |
EXTERN_C void | dft_set_num_threads (int nThreads) |
int | dft_setfunc (const char *line) |
static ergo_real | distance (const ergo_real *a, const ergo_real *b) |
Coomputes distance between two points, they do not need to be of the Vector3D type. More... | |
void | ergoShellsToOrbs (const int *nshlbl, const int(*shlblock)[2], int *norbbl, int(*orbblock)[2], const BasisInfoStruct &bis) |
transform shell block indices to orbital block indices. More... | |
real | dftene_ (const real *rho, const real *grad) |
void | dftptf0_ (real *rho, real *grad, real *wght, real *vx) |
void | dftpot0_ (FirstDrv *ds, const real *weight, const FunDensProp *dp) |
void | dftpot1_ (SecondDrv *ds, const real *w, const FunDensProp *dp, const int *triplet) |
Variables | |
int | ZEROI = 0 |
int | ONEI = 1 |
int | THREEI = 3 |
int | FOURI = 4 |
real | ZEROR = 0.0 |
real | ONER = 1.0 |
real | TWOR = 2.0 |
real | FOURR = 4.0 |
static const ergo_real | GET_BLOCKS_FUDGE_FACTOR = 1.0 |
static const ergo_real | SET_SHELL_RADII_ORBITAL_THR = 1e-11 |
static real | dft_hf_weight = 0.0 |
int(* | fort_print )(const char *format,...) = printf |
static int | dft_thread_count = -1 |
Common DFT routines. Mostly functional mixing.
(c) Pawel Salek, pawsa, 2001-08-02 NOTES: Adding new functionals: a. use @the ochem .kth .sefun-slater.c as template. b. add 'extern Functional MyFunctional;' to functionals.h c. add '&MyFunctional' to available_functionals below. d. have a beer. Or some crackers, if you prefer.
#define __CVERSION__ |
void* dal_malloc_ | ( | size_t | sz, |
const char * | place, | ||
unsigned | line | ||
) |
|
static |
References dft_hf_weight.
Referenced by dft_setfunc().
EXTERN_C int dft_get_num_threads | ( | void | ) |
References dft_thread_count, and fort_print.
Referenced by dft_get_uxc_mt(), dft_get_xc_mt(), dft_lin_resp_mt(), getXC_mt(), grid_open_cartesian(), grid_open_stream(), and grid_test_scaling().
EXTERN_C void dft_init | ( | void | ) |
References ergo_fort_print(), fort_print, and fun_printf.
Referenced by main(), test_mol(), and test_small().
|
static |
References dft_hf_weight.
Referenced by dft_setfunc().
EXTERN_C void dft_set_num_threads | ( | int | nThreads | ) |
References dft_thread_count.
Referenced by es_set_nthreads().
int dft_setfunc | ( | const char * | line | ) |
References dft_get_hf_weight(), dft_set_hf_weight(), dftlistfuncs_(), fort_print, FUN_CONF_ERROR, fun_get_hf_weight, FUN_OK, fun_printf, fun_select_by_name(), fun_set_cam_param, fun_set_hf_weight, and FUN_UNKNOWN.
Referenced by calculation_shared(), es_run(), test_mol(), and test_small().
void dftpot0_ | ( | FirstDrv * | ds, |
const real * | weight, | ||
const FunDensProp * | dp | ||
) |
References FunFirstFuncDrv::df00001, FunFirstFuncDrv::df0010, FunFirstFuncDrv::df1000, drv1_clear(), Functional_::first, FirstDrv::fR, FirstDrv::fZ, FunDensProp_::grada, FunDensProp_::gradb, and selected_func.
Referenced by xcCallbackGgaR(), and xcCallbackLdaR().
void dftpot1_ | ( | SecondDrv * | ds, |
const real * | w, | ||
const FunDensProp * | dp, | ||
const int * | triplet | ||
) |
References FunSecondFuncDrv::df00001, FunSecondFuncDrv::df00002, FunSecondFuncDrv::df0010, FunSecondFuncDrv::df00101, FunSecondFuncDrv::df0011, FunSecondFuncDrv::df0020, FunSecondFuncDrv::df0100, FunSecondFuncDrv::df1000, FunSecondFuncDrv::df10001, FunSecondFuncDrv::df1001, FunSecondFuncDrv::df1010, FunSecondFuncDrv::df1100, FunSecondFuncDrv::df2000, drv2_clear(), SecondDrv::fG, SecondDrv::fGG, SecondDrv::fR, SecondDrv::fRG, SecondDrv::fRR, SecondDrv::fRZ, SecondDrv::fZ, SecondDrv::fZG, SecondDrv::fZZ, FunDensProp_::rhoa, FunDensProp_::rhob, Functional_::second, and selected_func.
Referenced by lin_resp_cb_b_lda().
Coomputes distance between two points, they do not need to be of the Vector3D type.
In a way, we lose here some error checking. Perhaps it should be avoided.
References template_blas_sqrt().
Referenced by check_if_multipoles_can_be_used(), compute_operator_matrix_sparse(), compute_T_matrix_sparse_linear(), create_joblist_exchange_for_two_boxes_recursive(), do_interaction_recursive(), do_interaction_recursive_2(), get_basis_func_pair_list_1el_for_V(), get_basis_func_pair_list_2el(), get_basis_func_pair_list_simple(), BoxSystem::get_items_near_point(), BoxSystem::get_items_near_point_recursive(), get_K_contribs_from_2_interacting_boxes(), get_list_of_labeled_distrs(), get_list_of_labeled_distrs_maxLimitingFactor(), MMLimitTable::get_max_abs_mm_contrib(), get_maxLimitingFactor(), MMLimitTable::get_minimum_multipole_degree_needed(), get_mulliken_charges(), get_nucl_repulsion_energy_using_multipoles(), MMLimitTable::get_x_from_distance(), ShellTree::getOverlappingWith(), and main().
|
static |
References do_voutput(), LOG_AREA_DFT, and LOG_CAT_INFO.
Referenced by dft_init().
void ergoShellsToOrbs | ( | const int * | nshlbl, |
const int(*) | shlblock[2], | ||
int * | norbbl, | ||
int(*) | orbblock[2], | ||
const BasisInfoStruct & | bis | ||
) |
transform shell block indices to orbital block indices.
IORIDX contains preprocessed information about where given shell begins and ends in given symmetry.
References ShellSpecStruct::noOfBasisFuncs, BasisInfoStruct::shellList, and ShellSpecStruct::startIndexInMatrix.
Referenced by SparsePattern::add(), compute_grid_thread_func(), and dft_integrate().
int sync_threads | ( | bool | release, |
int | nThreads | ||
) |
creates or destroys a barrier for nThreads.
release | tells whether we are to destroy the barrier (true) or just sync (false). |
nThreads | informs the code how many threads are supposed to block on the barrier. |
References ergo_barrier_destroy(), ergo_barrier_init(), ergo_barrier_wait(), and PTHREAD_BARRIER_SERIAL_THREAD.
Referenced by dft_integrate(), XCEvaluatorUnrestricted::getXC(), and XCEvaluatorRestricted::getXC().
|
static |
Referenced by dft_get_hf_weight(), and dft_set_hf_weight().
|
static |
Referenced by dft_get_num_threads(), and dft_set_num_threads().
int(* fort_print) (const char *format,...) = printf |
Referenced by dft_get_num_threads(), dft_init(), and dft_setfunc().
int FOURI = 4 |
real FOURR = 4.0 |
|
static |
Referenced by ErgoMolInfo::getBlocks().
int ONEI = 1 |
Referenced by dft_get_uxc(), and dft_get_xc().
real ONER = 1.0 |
|
static |
Referenced by ErgoMolInfo::setShellRadii().
int THREEI = 3 |
real TWOR = 2.0 |
int ZEROI = 0 |
real ZEROR = 0.0 |