MPQC  3.0.0-alpha
sc::TwoBodyIntBatchGeneric< NumCenters > Class Template Reference

This is a generic implementation of TwoBodyIntBatch in terms of a TwoBodyInt. More...

#include <chemistry/qc/basis/tbint_batch.h>

Inheritance diagram for sc::TwoBodyIntBatchGeneric< NumCenters >:
sc::TwoBodyIntBatch< NumCenters > sc::RefCount

Public Types

typedef TwoBodyIntEvalType< NumCenters >::value TwoBodyIntEval
 
- Public Types inherited from sc::TwoBodyIntBatch< NumCenters >
typedef detail::tuple< NumCenters, unsigned int > IntTuple
 

Public Member Functions

 TwoBodyIntBatchGeneric (Ref< TwoBodyIntEval > tbint)
 
bool cloneable () const
 Return true if the clone member can be called. More...
 
Ref< TwoBodyIntBatch< NumCenters > > clone ()
 Returns a clone of this. More...
 
TwoBodyOperSet::type type () const
 Returns the type of the operator set that this object computes. More...
 
const Ref< TwoBodyOperSetDescr > & descr () const
 return the operator set descriptor
 
void set_integral_storage (size_t storage)
 This storage is used to cache computed integrals. More...
 
const std::vector< IntTuple > & current_batch () const
 returns the shell indices of the current batch
 
const std::vector< IntTuple > & start ()
 
const std::vector< IntTuple > & fence ()
 
const double * buffer (TwoBodyOper::type type=TwoBodyOper::eri) const
 The computed shell integrals will be put in the buffer returned by this member. More...
 
template<unsigned int >
void init (const Ref< IndexRangeIterator< NumCenters > > &i, int s=int())
 
bool next ()
 compute next batch, return true if have another may need to be split into have_next and next TODO JTF implement
 
- Public Member Functions inherited from sc::TwoBodyIntBatch< NumCenters >
 TwoBodyIntBatch (Ref< Integral > i)
 
template<typename Seed >
void init (const Ref< IndexRangeIterator< NumCenters > > &n, Seed s=Seed())
 prepare to iterate using seed s TODO JTF implement
 
const Ref< GaussianBasisSet > & basis (unsigned int c=0) const
 Return the basis set on center c TODO JTF implement.
 
Integralintegral () const
 Return the integral factory that was used to create this object.
 
- 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...
 

Additional Inherited Members

- Protected Member Functions inherited from sc::RefCount
 RefCount (const RefCount &)
 
RefCountoperator= (const RefCount &)
 
- Protected Attributes inherited from sc::TwoBodyIntBatch< NumCenters >
Ref< Integralintegral_
 
Ref< GaussianBasisSetbs_ [NumCenters]
 
std::vector< double > buffer_
 
std::vector< IntTupleshells_in_buffer_
 
std::vector< IntTuplestart_
 
std::vector< IntTuplefence_
 
size_t buf_cap_
 

Detailed Description

template<int NumCenters>
class sc::TwoBodyIntBatchGeneric< NumCenters >

This is a generic implementation of TwoBodyIntBatch in terms of a TwoBodyInt.

Member Function Documentation

◆ buffer()

template<int NumCenters>
const double* sc::TwoBodyIntBatchGeneric< NumCenters >::buffer ( TwoBodyOper::type  type = TwoBodyOper::eri) const
inlinevirtual

The computed shell integrals will be put in the buffer returned by this member.

Some TwoBodyInt specializations have more than one buffer: The type arguments selects which buffer is returned. If the requested type is not supported, then 0 is returned. TODO JTF implement

Implements sc::TwoBodyIntBatch< NumCenters >.

◆ clone()

template<int NumCenters>
Ref<TwoBodyIntBatch<NumCenters> > sc::TwoBodyIntBatchGeneric< NumCenters >::clone ( )
inlinevirtual

Returns a clone of this.

The default implementation throws an exception. TODO JTF implement

Implements sc::TwoBodyIntBatch< NumCenters >.

References sc::TwoBodyIntEval::clone().

◆ cloneable()

template<int NumCenters>
bool sc::TwoBodyIntBatchGeneric< NumCenters >::cloneable ( ) const
inlinevirtual

Return true if the clone member can be called.

The default implementation returns false. TODO JTF implement

Implements sc::TwoBodyIntBatch< NumCenters >.

◆ set_integral_storage()

template<int NumCenters>
void sc::TwoBodyIntBatchGeneric< NumCenters >::set_integral_storage ( size_t  storage)
inlinevirtual

This storage is used to cache computed integrals.

TODO: do we really want to allocate by size_t, instead of number of elements?

Implements sc::TwoBodyIntBatch< NumCenters >.

◆ type()

template<int NumCenters>
TwoBodyOperSet::type sc::TwoBodyIntBatchGeneric< NumCenters >::type ( ) const
inlinevirtual

Returns the type of the operator set that this object computes.

this function is necessary to describe the computed integrals (their number, symmetries, etc.) and/or to implement cloning.

Implements sc::TwoBodyIntBatch< NumCenters >.

References sc::TwoBodyIntEval::type().


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

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