.TH "sc::R12IntsAcc" 3 "Sun Oct 4 2020" "Version 2.3.1" "MPQC" \" -*- nroff -*- .ad l .nh .SH NAME sc::R12IntsAcc \- \fBR12IntsAcc\fP accumulates transformed (MO) integrals stored as (ijxy) where i, j, x, and, y lie in spaces I, J, \fBX\fP, and \fBY\fP, respectively\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBsc::SavableState\fP\&. .PP Inherited by \fBsc::R12IntsAcc_MemoryGrp\fP, \fBsc::R12IntsAcc_MPIIOFile\fP, and \fBsc::R12IntsAcc_Node0File\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBtbint_type\fP { \fBeri\fP =0, \fBr12\fP =1, \fBr12t1\fP =2, \fBr12t2\fP =3 }" .br .RI "Types of two-body operators that \fBR12IntsAcc\fP understands\&. " .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBR12IntsAcc\fP (int \fBnum_te_types\fP, int \fBni\fP, int \fBnj\fP, int \fBnx\fP, int \fBny\fP)" .br .ti -1c .RI "\fBR12IntsAcc\fP (\fBStateIn\fP &)" .br .ti -1c .RI "void \fBsave_data_state\fP (\fBStateOut\fP &)" .br .RI "Save the base classes (with save_data_state) and the members in the same order that the \fBStateIn\fP CTOR initializes them\&. " .ti -1c .RI "int \fBnum_te_types\fP () const" .br .RI "The number of types of integrals that are being handled together\&. " .ti -1c .RI "int \fBni\fP () const" .br .RI "Rank of index space i\&. " .ti -1c .RI "int \fBnj\fP () const" .br .RI "Rank of index space j\&. " .ti -1c .RI "int \fBnx\fP () const" .br .RI "Rank of index space x\&. " .ti -1c .RI "int \fBny\fP () const" .br .RI "Rank of index space y\&. " .ti -1c .RI "size_t \fBblocksize\fP () const" .br .RI "Size of each block of the integrals of one type, in double words\&. " .ti -1c .RI "int \fBnext_orbital\fP () const" .br .RI "The index of the first orbital in the next integrals batch to be stored\&. " .ti -1c .RI "virtual void \fBstore_memorygrp\fP (\fBRef\fP< \fBMemoryGrp\fP > &mem, int \fBni\fP, const size_t blksize=0)=0" .br .RI "Stores all pair block of integrals held in mem in a layout assumed throughout \fBMBPT2_R12\fP\&. " .ti -1c .RI "virtual void \fBstore_pair_block\fP (int i, int j, double *ints)=0" .br .RI "All member functions of this class and its children indices i and j don't include frozen orbitals Stores an ij pair block of integrals (assumes the block resides locally) " .ti -1c .RI "virtual void \fBcommit\fP ()" .br .RI "Commit the content of the accumulator for reading\&. " .ti -1c .RI "bool \fBis_committed\fP ()" .br .RI "Has the content of the accumulator been commited for reading? " .ti -1c .RI "virtual void \fBactivate\fP ()" .br .RI "Call before starting to read content\&. " .ti -1c .RI "virtual void \fBdeactivate\fP ()" .br .RI "Call when done reading content\&. " .ti -1c .RI "const bool \fBis_active\fP ()" .br .RI "Check if can read content\&. " .ti -1c .RI "virtual double * \fBretrieve_pair_block\fP (int i, int j, \fBtbint_type\fP oper_type)=0" .br .RI "Retrieves an ij pair block of integrals\&. " .ti -1c .RI "virtual void \fBrelease_pair_block\fP (int i, int j, \fBtbint_type\fP oper_type)=0" .br .RI "Releases an ij pair block of integrals (if needed) " .ti -1c .RI "virtual bool \fBis_local\fP (int i, int j) const =0" .br .RI "Is this block stored locally? " .ti -1c .RI "virtual bool \fBis_avail\fP (int i, int j) const =0" .br .RI "Is this block available to this task? " .ti -1c .RI "virtual bool \fBhas_access\fP (int proc) const =0" .br .RI "Does this task have access to all the integrals? " .ti -1c .RI "int \fBtasks_with_access\fP (vector< int > &twa_map) const" .br .RI "Returns the total number of tasks with access to integrals\&. " .ti -1c .RI "virtual bool \fBcan_restart\fP () const =0" .br .RI "Can this specialization be used in restarts? " .in -1c .SS "Static Public Attributes" .in +1c .ti -1c .RI "static const int \fBmax_num_te_types_\fP = 4" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "virtual int \fBntasks\fP () const =0" .br .RI "total number of tasks " .ti -1c .RI "virtual int \fBtaskid\fP () const =0" .br .RI "ID of this task\&. " .ti -1c .RI "void \fBinc_next_orbital\fP (int \fBni\fP)" .br .RI "The index of the first orbital in the next integrals batch to be stored\&. " .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "int \fBni_\fP" .br .ti -1c .RI "int \fBnj_\fP" .br .ti -1c .RI "int \fBnx_\fP" .br .ti -1c .RI "int \fBny_\fP" .br .ti -1c .RI "size_t \fBnxy_\fP" .br .ti -1c .RI "size_t \fBblksize_\fP" .br .ti -1c .RI "size_t \fBblocksize_\fP" .br .ti -1c .RI "int \fBnext_orbital_\fP" .br .ti -1c .RI "bool \fBcommitted_\fP" .br .ti -1c .RI "bool \fBactive_\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP \fBR12IntsAcc\fP accumulates transformed (MO) integrals stored as (ijxy) where i, j, x, and, y lie in spaces I, J, \fBX\fP, and \fBY\fP, respectively\&. ijxy is only the storage format, the actual type may be (ix|jy), (ij|xy), etc\&. .PP Transformed integrals are usually computed using a parallel MO integrals transformation procedure\&. In general, such transformations will require multiple passes through AO integrals\&. Each pass produces a batch of transformed integrals\&. For example, a batch in direct parallel MP2 energy algorithm is a set of integrals {(ix|jy)} in which i indices are in a finite subrange of O and x, j, and y take any of their allowed values\&. For example, if batch I contains all integrals (ix|jy) with i greater than or equal m but less than n, then batch I+1 contains integrals (ix|jy) with i greater than n\&. Integrals in batch 0 have indices i greater than or equal to 0\&. .PP After each pass the MO integrals are contained in a \fBMemoryGrp\fP object\&. The object is 'stored' in accumulator using \fCstore_memorygrp(Ref& mem, int ni)\fP\&. After all batches have been stored, the content of \fBR12IntsAcc\fP needs to be 'committed' using \fC\fBcommit()\fP\fP\&. After that blocks of MO integrals can be accessed using \fCretrieve_pair_block\fP\&. .SH "Member Function Documentation" .PP .SS "void sc::R12IntsAcc::save_data_state (\fBStateOut\fP &)\fC [virtual]\fP" .PP Save the base classes (with save_data_state) and the members in the same order that the \fBStateIn\fP CTOR initializes them\&. This must be implemented by the derived class if the class has data\&. .PP Reimplemented from \fBsc::SavableState\fP\&. .PP Reimplemented in \fBsc::R12IntsAcc_Node0File\fP, \fBsc::R12IntsAcc_MPIIOFile_Ind\fP, \fBsc::R12IntsAcc_MPIIOFile\fP, and \fBsc::R12IntsAcc_MemoryGrp\fP\&. .SS "virtual void sc::R12IntsAcc::store_memorygrp (\fBRef\fP< \fBMemoryGrp\fP > & mem, int ni, const size_t blksize = \fC0\fP)\fC [pure virtual]\fP" .PP Stores all pair block of integrals held in mem in a layout assumed throughout \fBMBPT2_R12\fP\&. Let's suppose the number of tasks is nproc, nj is the number of j indices, ni is the number of i indices of integrals held in mem at the moment\&. Then all integrals with a given i and j are stored on task (i*nj+j)/nproc and this ij block is (i*nj+j)nproc -th block on this task\&. Each ij block contains num_te_types_ subblocks of integrals\&. Each subblock of integrals has blksize bytes allocated for it\&. Note that blksize may be larger than blksize_ because an ij-block of partially transformed integrals may be larger than the block of fully transformed integrals\&. .PP Implemented in \fBsc::R12IntsAcc_Node0File\fP, \fBsc::R12IntsAcc_MPIIOFile_Ind\fP, and \fBsc::R12IntsAcc_MemoryGrp\fP\&. .SS "int sc::R12IntsAcc::tasks_with_access (vector< int > & twa_map) const" .PP Returns the total number of tasks with access to integrals\&. If task i has access to the integrals, then twa_map[i] is its index among the tasks with access, -1 otherwise\&. .SH "Author" .PP Generated automatically by Doxygen for MPQC from the source code\&.