Psi4
Public Member Functions | Private Attributes | List of all members
psi::pk::PKMgrInCore Class Reference

#include <PKmanagers.h>

Inheritance diagram for psi::pk::PKMgrInCore:
psi::pk::PKManager

Public Member Functions

 PKMgrInCore (std::shared_ptr< BasisSet > primary, size_t memory, Options &options)
 Constructor for in-core class. More...
 
virtual ~PKMgrInCore ()
 Destructor for in-core class. More...
 
virtual void initialize ()
 Initialize sequence for in-core algorithm. More...
 
virtual void initialize_wK ()
 Initialize the wK integrals. More...
 
virtual void form_PK ()
 Sequence of steps to form PK matrix. More...
 
virtual void form_PK_wK ()
 Sequence of steps to form wK PK matrix. More...
 
virtual void prepare_JK (std::vector< SharedMatrix > D, std::vector< SharedMatrix > Cl, std::vector< SharedMatrix > Cr)
 Steps to prepare JK formation. More...
 
virtual void form_J (std::vector< SharedMatrix > J, std::string exch="", std::vector< SharedMatrix > K=std::vector< SharedMatrix >())
 Form J matrix, shared_ptr() initializes to null. More...
 
virtual void finalize_JK ()
 Finalize JK formation. More...
 
virtual void write ()
 No disk write, only finalizes integral arrays. More...
 
virtual void write_wK ()
 Finalize integral arrays for wK. More...
 
virtual void print_batches ()
 Printing the algorithm header. More...
 
virtual void allocate_buffers ()
 Allocate the buffer threads. More...
 
virtual void finalize_PK ()
 Finalize PK, i.e. deallocate buffers. More...
 
- Public Member Functions inherited from psi::pk::PKManager
 PKManager (std::shared_ptr< BasisSet > primary, size_t memory, Options &options)
 Base constructor. More...
 
virtual ~PKManager ()
 Base destructor, does nothing. More...
 
bool do_wk () const
 Accessor functions for simple data. More...
 
double omega () const
 
double cutoff () const
 
int nthreads () const
 
int nbf () const
 
std::shared_ptr< ERISievesieve () const
 
size_t pk_pairs () const
 
size_t pk_size () const
 
size_t ntasks () const
 
size_t memory () const
 
SharedPKWrkr buffer (int i) const
 
double * D_glob_vecs (int i) const
 
double * JK_glob_vecs (int i) const
 
std::shared_ptr< BasisSetprimary () const
 
bool is_sym (int i) const
 
bool all_sym () const
 
SharedMatrix original_D (int N) const
 
SharedPKWrkr get_buffer ()
 Accessor that returns buffer corresponding to current thread. More...
 
void set_ntasks (size_t tmp)
 
virtual void print_batches_wK ()
 Some printing for wK integrals;. More...
 
virtual void compute_integrals (bool wK=false)
 Actually computing the integrals. More...
 
virtual void compute_integrals_wK ()
 Computing integrals for wK. More...
 
void integrals_buffering (const double *buffer, unsigned int P, unsigned int Q, unsigned int R, unsigned int S)
 Store the computed integrals in the appropriate buffers. More...
 
void integrals_buffering_wK (const double *buffer, unsigned int P, unsigned int Q, unsigned int R, unsigned int S)
 Store the computed wK integrals in the appropriate buffers. More...
 
void form_D_vec (std::vector< SharedMatrix > D, std::vector< SharedMatrix > Cl, std::vector< SharedMatrix > Cr)
 
void make_J_vec (std::vector< SharedMatrix > J)
 Preparing triangular vector for J/K. More...
 
void get_results (std::vector< SharedMatrix > J, std::string exch)
 Extracting results from vectors to matrix. More...
 
void form_K (std::vector< SharedMatrix > K)
 Forming K. More...
 
virtual void form_wK (std::vector< SharedMatrix > wK)
 Forming wK. More...
 
void finalize_D ()
 Finalize and delete the density matrix vectors. More...
 

Private Attributes

std::unique_ptr< double[]> J_ints_
 Large in core arrays for integral storage. More...
 
std::unique_ptr< double[]> K_ints_
 
std::unique_ptr< double[]> wK_ints_
 

Additional Inherited Members

- Static Public Member Functions inherited from psi::pk::PKManager
static std::shared_ptr< PKManagerbuild_PKManager (std::shared_ptr< PSIO > psio, std::shared_ptr< BasisSet > primary, size_t memory, Options &options, bool dowK, double omega_in=0)
 build_PKManager Static instance constructor, used to get a proper instance of PKManager through automatic selection and options provided More...
 
- Protected Member Functions inherited from psi::pk::PKManager
void fill_buffer (SharedPKWrkr tmp)
 Setter objects for internal data. More...
 

Detailed Description

The simplest algorithm: a large buffer is allocated in core and all integrals are written to it, directly sorted.

This routine uses OMP multithreading and, for efficiency reasons, each thread has a dedicated buffer and batch of integrals to compute for it. There is thus some recomputation of the shell quartets, but we completely avoid thread communication.

Constructor & Destructor Documentation

psi::pk::PKMgrInCore::PKMgrInCore ( std::shared_ptr< BasisSet primary,
size_t  memory,
Options options 
)
inline

Constructor for in-core class.

virtual psi::pk::PKMgrInCore::~PKMgrInCore ( )
inlinevirtual

Destructor for in-core class.

Member Function Documentation

void psi::pk::PKMgrInCore::allocate_buffers ( )
virtual

Allocate the buffer threads.

Implements psi::pk::PKManager.

void psi::pk::PKMgrInCore::finalize_JK ( )
virtual

Finalize JK formation.

Implements psi::pk::PKManager.

void psi::pk::PKMgrInCore::finalize_PK ( )
virtual

Finalize PK, i.e. deallocate buffers.

Implements psi::pk::PKManager.

void psi::pk::PKMgrInCore::form_J ( std::vector< SharedMatrix J,
std::string  exch = "",
std::vector< SharedMatrix K = std::vector<SharedMatrix>() 
)
virtual

Form J matrix, shared_ptr() initializes to null.

Implements psi::pk::PKManager.

void psi::pk::PKMgrInCore::form_PK ( )
virtual

Sequence of steps to form PK matrix.

Implements psi::pk::PKManager.

void psi::pk::PKMgrInCore::form_PK_wK ( )
virtual

Sequence of steps to form wK PK matrix.

Implements psi::pk::PKManager.

void psi::pk::PKMgrInCore::initialize ( )
virtual

Initialize sequence for in-core algorithm.

Implements psi::pk::PKManager.

void psi::pk::PKMgrInCore::initialize_wK ( )
virtual

Initialize the wK integrals.

Nothing to do

Implements psi::pk::PKManager.

void psi::pk::PKMgrInCore::prepare_JK ( std::vector< SharedMatrix D,
std::vector< SharedMatrix Cl,
std::vector< SharedMatrix Cr 
)
virtual

Steps to prepare JK formation.

Implements psi::pk::PKManager.

void psi::pk::PKMgrInCore::print_batches ( )
virtual

Printing the algorithm header.

Reimplemented from psi::pk::PKManager.

void psi::pk::PKMgrInCore::write ( )
virtual

No disk write, only finalizes integral arrays.

Implements psi::pk::PKManager.

void psi::pk::PKMgrInCore::write_wK ( )
virtual

Finalize integral arrays for wK.

Implements psi::pk::PKManager.

Member Data Documentation

std::unique_ptr<double []> psi::pk::PKMgrInCore::J_ints_
private

Large in core arrays for integral storage.

std::unique_ptr<double []> psi::pk::PKMgrInCore::K_ints_
private
std::unique_ptr<double []> psi::pk::PKMgrInCore::wK_ints_
private

The documentation for this class was generated from the following files: