next up previous contents
Next: BP_EIV Up: ATSP2K manual Previous: BP_ANG   Contents

Subsections


BP_MAT

Introduction

The function of this program is to compute all possible radial integrals and combined with the angular data to determine all requested contributions to the Hamiltonian. All contributions are grouped into three types of data, which are saved in three files, respectively:
  1. hnr.lst non-relativistic, J-independent contributions.
  2. hzeta.lst spin-orbit and spin-other-orbit contributions
  3. hspin.lst spin-spin contributions
This stage of the Breit-Pauli calculation was made a separate program in order to simplify the process of energy adjustment of computed eigenvalues, which is the last step bp_eiv in a Breit-Pauli calculation.

The basic constants of the program are initialized in inita(), initr(). Then the user is prompted to input information about the name of the files with configuration .c and radial .w data. The user also need to specify the type of calculation, relativistic, with or without mass correction and the type of integration: in Gradient or Slater form.

bp_mat Program Structure

Figure 7.27: bp_mat program structure.
\begin{figure}\begin{center}
\centerline{\psfig{figure=tex/fig/bp_mat_main.epsi}}\end{center}\end{figure}

brevalf() reads the files generated from bp_ang and uses the information to allocate memory and to initialize the parameters which have been already determined by bp_ang and saved in cint.lst. readw() reads the radial data readw(). Next, genintbr() generates the list of possible integrals, ( ${\tt F_k, G_k, R_k, L, Z, N_k, V_k, S_k}$).

Figure 7.28: Subroutine brevalf().
\begin{figure}\begin{center}
\centerline{\psfig{figure=tex/fig/bp_mat_brevalr.epsi}}\end{center}\end{figure}

The contributions to the Hamiltonian are computed in genslt(). The next code segment shows data processing by columns, the contribution are saved in a set of three files hnr.lst, hzeta.lst, hspin.lst. This program currently does not include the orbit-orbit contribution. When IORBORB=1, which is a signal to bp_mat to include orbit-orbit, then inptr > intptr(0,4) and lcase = 1, while the correct handling should provide for this case lcase = 2. In most calculations this interaction shows very little effect on the accuracy, while the computational time may double  . On the other hand bpci correctly includes the orbit-orbit interaction and can be used for this purpose.

 JB = 1,ncfg
         if(mod(jb,100).eq.0) write(0,'(A,I5)') '   jb = ',jb
         if(jb == ncfg) write(0,'(A,I5)') '   jb = ',jb
*        initialize arrays for a column
         nrow(1:3) = 0
         jan(1:ncfg,1:3) = 0
         h(1:ncfg,1:3) = 0.d0
         ico(1:ncfg) = 0
         iflag(1:3)=0
         lij =  1
*       read info on matrix elements for the column
         read (51) nih, (janc(i),i=1,nih)
         read (52) nih, (ico(i),i=1,nih)
         Do
           n = n+1;
           if (n .gt. new) then
*           .. more data is needed
             read (50) new,(cn(j),j=1,new),(inptr(j),j=1,new)
             n = 1
           end if
*         .. determine case
           if (inptr(n) < 0) then
             lcase = 3
           else if (inptr(n) == 0) then
             print*,'inptr(',n,') can''t be 0'; lcase = 2
           else if (inptr(n).le.intptr(1,4))  then
             lcase = 1
           else
             lcase = 2
           end if
*         .. determine matrix element
           if ((nij > ico(lij))) then
*           .. we have new matrix element; set iflags to zero
             lij = lij + 1
             iflag(1:3) = 0
           end if
           if (iflag(lcase) .eq. 0) then
             nrow(lcase) = nrow(lcase) + 1
             jan(nrow(lcase),lcase) = janc(lij)
             iflag(lcase) = 1
           end if
*         .. add contribution to right matrix element
           v = value(abs(inptr(n)))
           h(nrow(lcase),lcase) = h(nrow(lcase),lcase) + cn(n)*v
           hh = h(nrow(lcase),lcase)
           nij = nij + 1
           if (nij .eq. jptr(jb_count) + 1) exit
*          if (lij .eq. nih) exit
         END DO
         write(iouhn) jb,nrow(1),(h(i,1),i=1,nrow(1)),
     :                (jan(i,1),i=1,nrow(1))
         write(iouhz) jb,nrow(2),(h(i,2),i=1,nrow(2)),
     :                (jan(i,2),i=1,nrow(2))
         write(iouhs) jb,nrow(3),(h(i,3),i=1,nrow(3)),
     :                (jan(i,3),i=1,nrow(3))
       END DO

I/O Files

bp_mat relies on a set of input files, Figure  8.33. All of them, except <name>.c are in binary format. The output files, hnr.lst.s, hzeta.lst.s, hspin.lst.s contain the nonrelativistic part and the J-dependent contributions to the Hamiltonian. The reason all IO files from serial calculation have the suffix .s, is to distinguish the files generated from nonh. Some of the filenames of the Breit-Pauli calculation bp_ang, bp_mat, bp_eiv coincide with the ons from the nonh, mchf calculation. This becomes is inconvenient when computing in the same directory.

Figure 7.29: Subroutine brevalr().
\begin{figure}\begin{center}
\centerline{\psfig{figure=tex/fig/io_bp_mat.eps}}\end{center}\end{figure}

MPI implementation

The MPI implementation computes all columns in an interleaved fashion. Each node computes only the nprocs + myid, where jb, nprocs, myid are correspondingly the current column, the number of processes (nodes), and ID number of the node.

 For column = 1,ncfg,nprocs
    For row = column to ncfg
       compute the matrix elements for all 
       three types HNR, HZETA, HSPIN

Each node reads input angular data for the current column and writes the contributions to a set of files. The filenames contain the processor ID as a four digit number, Figure  7.30.

Figure 7.30: Subroutine brevalr().
\begin{figure}\begin{center}
\centerline{\psfig{figure=tex/fig/mpi_io_bp_mat.eps}}\end{center}\end{figure}


next up previous contents
Next: BP_EIV Up: ATSP2K manual Previous: BP_ANG   Contents
2001-10-11