MPQC  3.0.0-alpha
sc::GenericFockContribution Class Reference

The GenericFockContribution class provides much of the infrastructure needed by FockContribution specializations. More...

#include <chemistry/qc/lcao/fockbuild.h>

Inheritance diagram for sc::GenericFockContribution:
sc::FockContribution sc::RefCount sc::CLHFContribution sc::HSOSHFContribution

Classes

class  JKBlock
 
class  JLocator
 
class  KLocator
 
class  PBlock
 

Public Member Functions

double * jmat_shell_block (int i, int I, int J)
 
bool jmat_symmetric (int i) const
 
double * kmat_shell_block (int i, int I, int J)
 
bool kmat_symmetric (int i) const
 
const double * pmat_shell_block (int i, int I, int J)
 
double * jmat_block (int i, int I, int J)
 
double * kmat_block (int i, int I, int J)
 
const double * pmat_block (int i, int I, int J)
 
Ref< ThreadLock > & get_lock (int i, int Ish, int Jsh)
 
double * alloc_scratch (int size)
 
void free_scratch (double *data)
 
void set_fmat (int i, const RefSCMatrix &)
 
void set_fmat (int i, const RefSymmSCMatrix &)
 
void set_jmat (int i, const RefSCMatrix &)
 
void set_jmat (int i, const RefSymmSCMatrix &)
 
void set_kmat (int i, const RefSCMatrix &)
 
void set_kmat (int i, const RefSymmSCMatrix &)
 
void set_pmat (int i, const RefSymmSCMatrix &)
 
void copy_matrices (int unique_id)
 Copy matrices to allow multiple threads to coexist.
 
void accum (const Ref< FockContribution > &)
 Sum the Fock matrix contributions from different threads. More...
 
void accum_remote (const Ref< MessageGrp > &)
 Sum the Fock matrix contributions from different processors. More...
 
void update ()
 Push the internal Fock matrix data back into the original object.
 
signed char * compute_pmax () const
 Compute the maximum of the density in each block. More...
 
void activate ()
 
void sync ()
 
void deactivate ()
 
void prefetch_blocks (int I, int J, int ifetch, int nfetch)
 
void finish_prefetch_blocks ()
 
void set_fockblocks (const Ref< FockBlocks > &blocks_f1, const Ref< FockBlocks > &blocks_f2, const Ref< FockBlocks > &blocks_p)
 
void flush ()
 
const Ref< FockBuildMatrix > & jmat (int i)
 
const Ref< FockBuildMatrix > & kmat (int i)
 
const Ref< FockBuildMatrix > & pmat (int i)
 
bool use_shell_blocks () const
 
- Public Member Functions inherited from sc::FockContribution
 FockContribution (const FockContribution &)
 
virtual void contrib_e_J (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 This routine does not permute any indices. More...
 
virtual void contrib_e_K (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 This routine does not permute any indices. More...
 
virtual void contrib_p12_p13p24_J (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 
virtual void contrib_p12_p13p24_K (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 
virtual void contrib_p34_p13p24_J (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 
virtual void contrib_p34_p13p24_K (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 
virtual void contrib_p12_p34_J (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 
virtual void contrib_p12_p34_K (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 
virtual void contrib_p34_J (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 
virtual void contrib_p34_K (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 
virtual void contrib_p13p24_J (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 
virtual void contrib_p13p24_K (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 
virtual void contrib_all_J (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 
virtual void contrib_all_K (double factor, int I, int J, int K, int L, int nI, int nJ, int nK, int nL, const double *RESTRICT buf)=0
 
virtual Ref< FockContributionclone ()=0
 
double nint () const
 
double & nint ()
 
- Public Member Functions inherited from sc::RefCount
size_t identifier () const
 Return the unique identifier for this object that can be compared for different objects of different types. More...
 
int lock_ptr () const
 Lock this object.
 
int unlock_ptr () const
 Unlock this object.
 
void use_locks (bool inVal)
 start and stop using locks on this object
 
refcount_t nreference () const
 Return the reference count.
 
refcount_t reference ()
 Increment the reference count and return the new count.
 
refcount_t dereference ()
 Decrement the reference count and return the new count.
 
int managed () const
 
void unmanage ()
 Turn off the reference counting mechanism for this object. More...
 

Protected Member Functions

FockBuildMatrixfockbuildmatrix (int matrix, const std::string &type, const Ref< MessageGrp > &msg, const Ref< FockBuildAMG > &)
 
 GenericFockContribution (int nfmat, int npmat, const Ref< GaussianBasisSet > &f_b1, const Ref< GaussianBasisSet > &f_b2, const Ref< GaussianBasisSet > &p_b, const std::string &fockbuildmatrixtype)
 
void pmax_contrib (const Ref< FockBuildMatrix > &mat, signed char *pmax) const
 
- Protected Member Functions inherited from sc::RefCount
 RefCount (const RefCount &)
 
RefCountoperator= (const RefCount &)
 

Protected Attributes

int nfmat_
 
std::vector< Ref< FockBuildMatrix > > jmats_
 the number of Fock matrices
 
std::vector< Ref< FockBuildMatrix > > kmats_
 
std::vector< bool > k_is_j_
 
int npmat_
 
std::vector< Ref< FockBuildMatrix > > pmats_
 the number of density matrices
 
Ref< GaussianBasisSetf_b1_
 
Ref< GaussianBasisSetf_b2_
 
Ref< GaussianBasisSetp_b_
 
bool f_b1_equiv_f_b2
 
int nlocks_
 
std::vector< Ref< ThreadLock > > locks_
 
std::string fockbuildmatrixtype_
 
bool use_shell_blocks_
 
Ref< FockBuildAMGfbamg_
 
- Protected Attributes inherited from sc::FockContribution
double nint_
 

Detailed Description

The GenericFockContribution class provides much of the infrastructure needed by FockContribution specializations.

In addition to the members that GenericFockContribution provides, FockContribution classes must have members that actually do the work and sum in the contributions. Due to two electron integral permutation symmetry, one integral may make several contributions. A contrib member exists for each subgroup of the full permutation group.

void f()

The f member.

A lightweight copy CTOR should also exist for Contribution specializations.

Member Function Documentation

◆ accum()

void sc::GenericFockContribution::accum ( const Ref< FockContribution > &  )
virtual

Sum the Fock matrix contributions from different threads.

The passed specialization type must be the same as the specialization of this.

Implements sc::FockContribution.

◆ accum_remote()

void sc::GenericFockContribution::accum_remote ( const Ref< MessageGrp > &  )
virtual

Sum the Fock matrix contributions from different processors.

This might be a no-op for distributed matrices.

Implements sc::FockContribution.

◆ compute_pmax()

signed char* sc::GenericFockContribution::compute_pmax ( ) const
virtual

Compute the maximum of the density in each block.

The pmax vector holds only the unique elements.

Implements sc::FockContribution.


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

Generated at Sun Jan 26 2020 23:24:06 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.