ergo
|
Common DFT routines. More...
#include <stdlib.h>
#include <vector>
#include "realtype.h"
#include "basisinfo.h"
#include "matrix_typedefs.h"
#include "functionals.h"
#include "grid_atomic.h"
Go to the source code of this file.
Classes | |
struct | FirstDrv |
A vector of first order derivatives with respect to two parameters: density rho and SQUARE of the gradient of density grho. More... | |
struct | SecondDrv |
class | ErgoMolInfo |
Ergo specific implementation of molecule-grid interface. More... | |
class | Box |
Class Box provides an ability to determine box containing all Objects. More... | |
Macros | |
#define | EXTERN_C |
#define | dal_new(sz, tp) (tp*)dal_malloc_((sz)*sizeof(tp),__FUNCTION__, __LINE__) |
#define | dal_malloc(sz) dal_malloc_((sz),__FUNCTION__, __LINE__) |
Functions | |
EXTERN_C void | dftpot0_ (FirstDrv *ds, const real *weight, const FunDensProp *dp) |
EXTERN_C void | dftpot1_ (SecondDrv *ds, const real *w, const FunDensProp *dp, const int *triplet) |
EXTERN_C void | dft_init (void) |
EXTERN_C int | dft_setfunc (const char *line) |
EXTERN_C 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... | |
EXTERN_C int | dft_get_num_threads () |
EXTERN_C void | dft_set_num_threads (int nThreads) |
void * | dal_malloc_ (size_t sz, const char *func, unsigned line) |
template<typename Iterator > | |
void | getBoundingBox (Box &box, Iterator start, Iterator end) |
int | sync_threads (bool release, int nThreads) |
creates or destroys a barrier for nThreads. More... | |
Variables | |
int | ZEROI |
int | ONEI |
int | THREEI |
int | FOURI |
real | ZEROR |
real | ONER |
real | TWOR |
real | FOURR |
Common DFT routines.
Mostly functional mixing.
#define dal_malloc | ( | sz | ) | dal_malloc_((sz),__FUNCTION__, __LINE__) |
Referenced by dft_integrator_bl_new().
#define dal_new | ( | sz, | |
tp | |||
) | (tp*)dal_malloc_((sz)*sizeof(tp),__FUNCTION__, __LINE__) |
Referenced by dft_integrate(), dft_integrator_bl_new(), dft_lin_respao(), and grid_open_full().
#define EXTERN_C |
void* dal_malloc_ | ( | size_t | sz, |
const char * | func, | ||
unsigned | line | ||
) |
References malloc().
EXTERN_C int dft_get_num_threads | ( | ) |
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().
EXTERN_C void dft_set_num_threads | ( | int | nThreads | ) |
References dft_thread_count.
Referenced by es_set_nthreads().
EXTERN_C int dft_setfunc | ( | const char * | line | ) |
EXTERN_C void dftpot0_ | ( | FirstDrv * | ds, |
const real * | weight, | ||
const FunDensProp * | dp | ||
) |
EXTERN_C 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.
EXTERN_C 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().
void getBoundingBox | ( | Box & | box, |
Iterator | start, | ||
Iterator | end | ||
) |
References Box::hi, and Box::lo.
Referenced by Stream::saveToFile(), and ShellTree::ShellTree().
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(), XCEvaluatorRestricted::getXC(), and XCEvaluatorUnrestricted::getXC().
int FOURI |
real FOURR |
int ONEI |
Referenced by dft_get_uxc(), and dft_get_xc().
real ONER |
int THREEI |
real TWOR |
int ZEROI |
real ZEROR |