Psi4
Public Member Functions | Private Attributes | List of all members
psi::pk::PKMgrDisk Class Referenceabstract

#include <PKmanagers.h>

Inheritance diagram for psi::pk::PKMgrDisk:
psi::pk::PKManager psi::pk::PKMgrReorder psi::pk::PKMgrYoshimine

Public Member Functions

 PKMgrDisk (std::shared_ptr< PSIO > psio, std::shared_ptr< BasisSet > primary, size_t memory, Options &options)
 Constructor for PKMgrDisk. More...
 
virtual ~PKMgrDisk ()
 Destructor for PKMgrDisk, does nothing. More...
 
void set_writing (bool tmp)
 Setter/Getter functions. More...
 
bool writing () const
 
int pk_file () const
 
std::vector< size_t > & batch_ind_min ()
 
std::vector< size_t > & batch_ind_max ()
 
std::vector< size_t > & batch_pq_min ()
 
std::vector< size_t > & batch_pq_max ()
 
std::vector< int > & batch_for_pq ()
 
std::shared_ptr< AIOHandlerAIO () const
 
std::shared_ptr< PSIOpsio () const
 
virtual void finalize_PK ()
 Finalize the PK file formation. More...
 
virtual void initialize ()
 Initialize sequence for Disk algorithms. More...
 
virtual void initialize_wK ()
 
virtual void allocate_buffers_wK ()=0
 Allocating new buffers for wK integrals. More...
 
virtual void prepare_JK (std::vector< SharedMatrix > D, std::vector< SharedMatrix > Cl, std::vector< SharedMatrix > Cr)
 Prepare the JK formation for disk algorithms. More...
 
void batch_sizing ()
 Determining the batch sizes. More...
 
virtual void print_batches ()
 Printing out the batches. More...
 
virtual void prestripe_files ()=0
 Opening files for integral storage. More...
 
virtual void prestripe_files_wK ()=0
 Opening files for wK integral storage. More...
 
virtual void write ()
 Write integrals on disk. More...
 
virtual void write_wK ()
 Write wK integrals on disk. More...
 
void open_PK_file ()
 Opening the PK file. More...
 
virtual void close_PK_file (bool keep)
 Closing the files. More...
 
virtual void form_J (std::vector< SharedMatrix > J, std::string exch="", std::vector< SharedMatrix > K=std::vector< SharedMatrix >())
 Form J from PK supermatrix, shared_ptr() initialized to null. More...
 
virtual void finalize_JK ()
 Finalize JK matrix formation. 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 form_PK ()=0
 Forming the PK supermatrices. More...
 
virtual void form_PK_wK ()=0
 Forming PK supermatrices for wK. More...
 
virtual void print_batches_wK ()
 Some printing for wK integrals;. More...
 
virtual void allocate_buffers ()=0
 Allocating the thread buffers. 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::vector< size_t > batch_pq_min_
 The index of the first pair in each batch. More...
 
std::vector< size_t > batch_pq_max_
 The index of the last pair in each batch. More...
 
std::vector< size_t > batch_index_min_
 The index of the first integral in each batch. More...
 
std::vector< size_t > batch_index_max_
 The index of the last integral in each batch. More...
 
std::vector< int > batch_for_pq_
 Mapping pq indices to the correct batch. More...
 
std::map< size_t, std::pair
< int, int > > 
ind_for_pq_
 Mapping the min and max pq's to p,q pairs. More...
 
int max_batches_
 Maximum number of batches. More...
 
std::shared_ptr< PSIOpsio_
 PSIO handler (boost pointer for compatibility) More...
 
std::shared_ptr< AIOHandlerAIO_
 AIO Handler. More...
 
int pk_file_
 PK file number. More...
 
bool writing_
 Is there any pending AIO writing ? More...
 

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...
 

Constructor & Destructor Documentation

psi::pk::PKMgrDisk::PKMgrDisk ( std::shared_ptr< PSIO psio,
std::shared_ptr< BasisSet primary,
size_t  memory,
Options options 
)

Constructor for PKMgrDisk.

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

Destructor for PKMgrDisk, does nothing.

Member Function Documentation

std::shared_ptr< AIOHandler > psi::pk::PKMgrDisk::AIO ( ) const
inline
virtual void psi::pk::PKMgrDisk::allocate_buffers_wK ( )
pure virtual

Allocating new buffers for wK integrals.

Implemented in psi::pk::PKMgrYoshimine, and psi::pk::PKMgrReorder.

std::vector< int >& psi::pk::PKMgrDisk::batch_for_pq ( )
inline
std::vector< size_t >& psi::pk::PKMgrDisk::batch_ind_max ( )
inline
std::vector< size_t >& psi::pk::PKMgrDisk::batch_ind_min ( )
inline
std::vector< size_t >& psi::pk::PKMgrDisk::batch_pq_max ( )
inline
std::vector< size_t >& psi::pk::PKMgrDisk::batch_pq_min ( )
inline
void psi::pk::PKMgrDisk::batch_sizing ( )

Determining the batch sizes.

void psi::pk::PKMgrDisk::close_PK_file ( bool  keep)
virtual

Closing the files.

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

Finalize JK matrix formation.

Implements psi::pk::PKManager.

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

Finalize the PK file formation.

Implements psi::pk::PKManager.

Reimplemented in psi::pk::PKMgrReorder.

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

Form J from PK supermatrix, shared_ptr() initialized to null.

Implements psi::pk::PKManager.

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

Initialize sequence for Disk algorithms.

Implements psi::pk::PKManager.

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

Initialize wK PK supermatrix, has to be called after initialize()

Implements psi::pk::PKManager.

void psi::pk::PKMgrDisk::open_PK_file ( )

Opening the PK file.

int psi::pk::PKMgrDisk::pk_file ( ) const
inline
void psi::pk::PKMgrDisk::prepare_JK ( std::vector< SharedMatrix D,
std::vector< SharedMatrix Cl,
std::vector< SharedMatrix Cr 
)
virtual

Prepare the JK formation for disk algorithms.

Implements psi::pk::PKManager.

virtual void psi::pk::PKMgrDisk::prestripe_files ( )
pure virtual

Opening files for integral storage.

Implemented in psi::pk::PKMgrYoshimine, and psi::pk::PKMgrReorder.

virtual void psi::pk::PKMgrDisk::prestripe_files_wK ( )
pure virtual

Opening files for wK integral storage.

Implemented in psi::pk::PKMgrYoshimine, and psi::pk::PKMgrReorder.

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

Printing out the batches.

Reimplemented from psi::pk::PKManager.

std::shared_ptr< PSIO > psi::pk::PKMgrDisk::psio ( ) const
inline
void psi::pk::PKMgrDisk::set_writing ( bool  tmp)
inline

Setter/Getter functions.

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

Write integrals on disk.

Implements psi::pk::PKManager.

Reimplemented in psi::pk::PKMgrYoshimine.

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

Write wK integrals on disk.

Implements psi::pk::PKManager.

Reimplemented in psi::pk::PKMgrYoshimine.

bool psi::pk::PKMgrDisk::writing ( ) const
inline

Member Data Documentation

std::shared_ptr<AIOHandler> psi::pk::PKMgrDisk::AIO_
private

AIO Handler.

std::vector<int> psi::pk::PKMgrDisk::batch_for_pq_
private

Mapping pq indices to the correct batch.

std::vector<size_t> psi::pk::PKMgrDisk::batch_index_max_
private

The index of the last integral in each batch.

std::vector<size_t> psi::pk::PKMgrDisk::batch_index_min_
private

The index of the first integral in each batch.

std::vector<size_t> psi::pk::PKMgrDisk::batch_pq_max_
private

The index of the last pair in each batch.

std::vector<size_t> psi::pk::PKMgrDisk::batch_pq_min_
private

The index of the first pair in each batch.

std::map< size_t, std::pair< int, int> > psi::pk::PKMgrDisk::ind_for_pq_
private

Mapping the min and max pq's to p,q pairs.

int psi::pk::PKMgrDisk::max_batches_
private

Maximum number of batches.

int psi::pk::PKMgrDisk::pk_file_
private

PK file number.

std::shared_ptr<PSIO> psi::pk::PKMgrDisk::psio_
private

PSIO handler (boost pointer for compatibility)

bool psi::pk::PKMgrDisk::writing_
private

Is there any pending AIO writing ?


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