type, public, abstract :: lMat_t
Abstract base class for lMat_t objects (6-index integrals)
Components
Type |
Visibility | Attributes |
|
Name |
| Initial | |
procedure(lMatInd_t),
|
public, |
nopass, pointer
|
:: |
indexFunc |
=> |
lMatIndSym |
|
Type-Bound Procedures
procedure(get_elem_t), public, deferred :: get_elem
procedure(set_elem_t), private, deferred :: set_elem
-
subroutine set_elem_t(this, index, element)
Prototype
Set an element of a lMat
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
class(lMat_t),
|
intent(inout) |
|
|
:: |
this |
|
integer(kind=int64),
|
intent(in) |
|
|
:: |
index |
|
real(kind=dp),
|
intent(in) |
|
|
:: |
element |
|
procedure(alloc_t), public, deferred :: alloc
-
subroutine alloc_t(this, size)
Prototype
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
class(lMat_t),
|
intent(inout) |
|
|
:: |
this |
|
integer(kind=int64),
|
intent(in) |
|
|
:: |
size |
|
procedure(dealloc_t), public, deferred :: safe_dealloc
-
subroutine dealloc_t(this)
Prototype
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
class(lMat_t),
|
intent(inout) |
|
|
:: |
this |
|
procedure, public, :: read
-
private subroutine read(this, filename)
Read in the 6-index integrals from disk and histogram the integrals. The file itself
only has to store the nonzero integrals, either in ASCII or in HDF5 format. For conventions
in the HDF5 format, please refer to the developer’s guide.
@param[in] filename name of the integrals file
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
class(lMat_t),
|
intent(inout) |
|
|
:: |
this |
|
character(len=*),
|
intent(in) |
|
|
:: |
filename |
|
procedure(read_t), private, deferred :: read_kernel
-
subroutine read_t(this, filename)
Prototype
Read a lMat from a file
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
class(lMat_t),
|
intent(inout) |
|
|
:: |
this |
|
character(len=*),
|
intent(in) |
|
|
:: |
filename |
|
procedure(read_op_t), private, deferred :: read_op_hdf5
procedure, public, :: lMat_size
procedure, public, :: histogram_lMat
Source Code
type, abstract :: lMat_t
private
! Generic indexing routine
procedure(lMatInd_t), nopass, pointer, public :: indexFunc => lMatIndSym
contains
! Element getters/setters
procedure(get_elem_t), deferred :: get_elem
procedure(set_elem_t), deferred, private :: set_elem
! Allocation routines
procedure(alloc_t), deferred :: alloc
procedure(dealloc_t), deferred :: safe_dealloc
! I/O routines
! Interfaced read routine: Delegates to the read_kernel
procedure :: read
! Routine to read in any format (ascii/hdf5) to this object
procedure(read_t), deferred, private :: read_kernel
! When reading hdf5, the read is done by a lMat_hdf5_read object. This object
! calls a read_op_t from the respective lMat to load the data to memory
! This has to be threadsafe
procedure(read_op_t), deferred, private :: read_op_hdf5
procedure :: lMat_size
procedure :: histogram_lMat
end type lMat_t